diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml new file mode 100644 index 0000000..ffde95a --- /dev/null +++ b/.github/workflows/clang-format.yml @@ -0,0 +1,23 @@ +name: Run clang-format Linter + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: DoozyX/clang-format-lint-action@v0.12 + with: + source: '.' + extensions: 'hpp,cpp' + clangFormatVersion: 12 + inplace: True + - uses: EndBug/add-and-commit@v4 + with: + author_name: Clang Robot + author_email: robot@example.com + message: '[NFC] Auto-commit clang-format from github action' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9159259 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +build/ +.vscode/ +.cache/ +include/autogen +include/AutoGenComputeOp.h +*.pyc diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..e69de29 diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..4cd71e9 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,48 @@ +cmake_minimum_required(VERSION 3.13.4) + +project(vector-intrinsic-fuzzing LANGUAGES CXX C) + +set_property(GLOBAL PROPERTY C_STANDARD 11) +set_property(GLOBAL PROPERTY CXX_STANDARD 17) + +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +set(CMAKE_CXX_STANDARD 17) + +set(INC ${CMAKE_CURRENT_LIST_DIR}/include) +set(SPIKE ${CMAKE_CURRENT_LIST_DIR}/riscv-isa-sim) +set(LIB ${CMAKE_CURRENT_LIST_DIR}/library) +set(SOFTFLOAT ${CMAKE_CURRENT_LIST_DIR}/extern/riscv-softfloat-standalone) +set(METAL_RUN ${CMAKE_CURRENT_LIST_DIR}/prebuilt/metal-run) + +execute_process(COMMAND git submodule update --init --recursive ${SOFTFLOAT} WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) +execute_process(COMMAND git submodule update --init --recursive ${METAL_RUN} WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) + +add_custom_target(clean_headers + COMMAND rm -rf ${CMAKE_CURRENT_SOURCE_DIR}/include/autogen + COMMAND rm -rf ${CMAKE_CURRENT_SOURCE_DIR}/include/AutoGenComputeOp.h + COMMENT "Clean header files with golden compute functions for operators" +) + +add_custom_target(generate_headers ALL + COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/scripts/GenerateOperatorComputeHeaders.py ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDS clean_headers + COMMENT "Generate header files with golden compute functions for operators" +) + +# GoogleTest requires at least C++11 +include(FetchContent) +FetchContent_Declare( + googletest + URL https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip +) +# For Windows: Prevent overriding the parent project's compiler/linker settings +set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) +FetchContent_MakeAvailable(googletest) + +enable_testing() + +add_subdirectory(extern) +add_subdirectory(include) +add_subdirectory(library) +add_subdirectory(tool) +add_subdirectory(test) diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..e1571a1 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,6 @@ +// https://github.com/sifive/frameworksCI +@Library('frameworksCI') _ + +ci([ + [cpu: 10, memory: 20, minute: 60] +]) diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..8ffefeb --- /dev/null +++ b/Makefile.in @@ -0,0 +1,74 @@ +SRCTOP:={SRCTOP} +CC:={CC} +CFLAGS:={CFLAGS} +SIM:={SIM} +NODE:={NODE} +LENGTH:={LENGTH} +SEED:={SEED} +ARCH:={ARCH} +GEN_PATH:={GEN_PATH} +GEN_PATTERN:={GEN_PATTERN} +HAS_POLICY:={HAS_POLICY} + +include rules.mk + +GEN:=$(GEN_PATH)/$(GEN_PATTERN) + +SIM_LOGS:= $(addsuffix .log,$(TARGETS)) +SIM_1_LOGS:= $(addsuffix .1.log,$(TARGETS)) + +ifeq ($(VERBOSE),) +V:=@ +else +V:= +endif + +define cmd +(set -x; $(1)) >>$@ 2>&1 \ +|| (echo $(2) >> $@ && exit 1) +endef + +all: + -$(MAKE) -k run + $(MAKE) report + @echo "Test done" + +report: $(SIM_LOGS) + $(SRCTOP)/scripts/report + +clean: + rm -f *.c *.elf *.log *.dot + +run: $(SIM_LOGS) + +%.log: $(GEN) + $(V) \ + if [ ! -f $(subst .log,.c,$@) ]; then \ + echo "Gen testcase $(subst .log,,$@)"; \ + $(call cmd, $(GEN) \ + --root=$(notdir $(basename $@)) \ + --nodes-to-gen=$(NODE) \ + --length=$(LENGTH) \ + --dot=$(basename $@).dot \ + --code=$(notdir $(basename $@)).c \ + --seed=$(SEED) \ + --march=$(ARCH) \ + $(HAS_POLICY), "GEN FAIL") \ + fi + $(V)echo "Compile $(subst .log,,$@)" + $(V)$(call cmd, \ + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) \ + $(subst .log,.c,$@) \ + -o $(subst .log,.elf,$@) \ + , "COMPILE FAIL") + $(V)echo "Run $(subst .log,,$@)" + $(V)$(call cmd, \ + $(SIM) $(subst .log,.elf,$@) \ + , "RUN FAIL") + +$(GEN): +ifeq ("$(wildcard $(GEN))","") + mkdir -p build + cd build && cmake $(SRCTOP) + cd build && $(MAKE) +endif diff --git a/README.md b/README.md new file mode 100644 index 0000000..dd2cb70 --- /dev/null +++ b/README.md @@ -0,0 +1,77 @@ +# RVV Intrinsic Fuzzing (RIF) + +This repository aims to create fuzz testing for the RVV C intrinsic. + +## Usage + +### How To Use? + +`rif-test` is the current driver to fuzz all existing intrinsics in `include/CustomOperator.def`. + +``` +./rif-test --help +usage: rif-test [-h] [--gen {random_gen,fused_gen}] [--sim SIM] [--cc CC] + [--mode {full,fast}] [--node NODE] [--arch ARCH] [--abi ABI] + [--cflags CFLAGS] [--seed SEED] [--random {on,off}] [--has-policy] + +optional arguments: + -h, --help show this help message and exit + --gen {random_gen,fused_gen} + Random gen pattern + --sim SIM Path to simulator + --cc CC Path to compiler + --mode {full,fast} Testing mode + --node NODE Minimal # of node + --arch ARCH Target arch config, default is rv64gcv_zvfh + --abi ABI Target ABI config, default is lp64d + --cflags CFLAGS Default compilation flag + --seed SEED Fixed random seed + --random {on,off} Feed random seed + --has-policy Enable policy if set +``` + +RIF already have linked a pre-built simulator from [metal-run](https://github.com/sifive/metal-run). So the minimum +requirement for testing it to specify a compiler that is able to compile RISC-V vector intrinsics. To specify your +own simulator (QEMU), please add `${PATH_TO_QEMU_BINARY} ${CPU_CONFIGS}` of how you wish to run +`${PATH_TO_QEMU_BINARY} ${CPU_CONFIGS} ${PATH_TO_ELF}` under --sim. + + +``` +$ git clone https://github.com/sifive/rvv-intrinsic-fuzzing +$ mkdir test +$ cd test +$ ../rvv-intrinsic-fuzzing/rif-test --cc= +$ make +``` + + + +### How To Build? + +``` +$ git clone https://github.com/sifive/rvv-intrinsic-fuzzing +$ cd rvv-intrinsic-fuzzing +$ mkdir build; cd build +$ cmake .. +$ make +$ ./tool/random_gen --help +Usage: random_gen [OPTION...] + + -c, --code=FILE C code file, default filename: 'output.c' + -d, --dot=FILE Graphviz visualization file, default filename is + 'output.dot' + -h Give this help list + -m, --march=ARCH_STRING Arch string for testing, default is rv64gcv + -n, --nodes-to-gen=NODES_TO_GEN + The number of nodes to generate for the graph. + -r, --root=OPERATOR_ENUM Initial node for the graph generation, default + root is 'AddVV32' + -s, --seed=RANDOM_SEED Seed for random number generator, default seed is + '0xdeadbeef' + -v, --verbose Produce verbose output + -?, --help Give this help list + --usage Give a short usage message + +Mandatory or optional arguments to long options are also mandatory or optional +for any corresponding short options. +``` diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt new file mode 100644 index 0000000..940680a --- /dev/null +++ b/extern/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(riscv-softfloat-standalone) diff --git a/extern/riscv-softfloat-standalone/.gitignore b/extern/riscv-softfloat-standalone/.gitignore new file mode 100644 index 0000000..9785597 --- /dev/null +++ b/extern/riscv-softfloat-standalone/.gitignore @@ -0,0 +1,2 @@ +build +.cache diff --git a/extern/riscv-softfloat-standalone/CMakeLists.txt b/extern/riscv-softfloat-standalone/CMakeLists.txt new file mode 100644 index 0000000..1be12e1 --- /dev/null +++ b/extern/riscv-softfloat-standalone/CMakeLists.txt @@ -0,0 +1,12 @@ +cmake_minimum_required(VERSION 3.13.4) + +project(riscv-softfloat-standalone LANGUAGES C) + +set_property(GLOBAL PROPERTY C_STANDARD 11) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +set(CMAKE_C_FLAGS "-Wall -Wno-unused -Wno-nonportable-include-path -g -O2 -fPIC") +set(INC ${CMAKE_CURRENT_LIST_DIR}/include) +set(LIB ${CMAKE_CURRENT_LIST_DIR}/lib) + +add_subdirectory(include) +add_subdirectory(lib) diff --git a/extern/riscv-softfloat-standalone/README.md b/extern/riscv-softfloat-standalone/README.md new file mode 100644 index 0000000..e3704da --- /dev/null +++ b/extern/riscv-softfloat-standalone/README.md @@ -0,0 +1,12 @@ +# Softfloat from RISC-V ISA Simulator + +This is an extracted standlone for users hoping to reproduce floating point operations identical to the official riscv isa simulator. All licensing in this repository follows [riscv-software-src/riscv-isa-sim](https://github.com/riscv-software-src/riscv-isa-sim). + +## Usage + +``` +git clone https://github.com/eopXD/riscv-softfloat-standalone +mkdir build ; cd build +cmake .. +make +``` diff --git a/extern/riscv-softfloat-standalone/include/CMakeLists.txt b/extern/riscv-softfloat-standalone/include/CMakeLists.txt new file mode 100644 index 0000000..e69de29 diff --git a/extern/riscv-softfloat-standalone/include/config.h b/extern/riscv-softfloat-standalone/include/config.h new file mode 100644 index 0000000..b163c77 --- /dev/null +++ b/extern/riscv-softfloat-standalone/include/config.h @@ -0,0 +1,143 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define if subproject MCPPBS_SPROJ_NORM is enabled */ +#define CUSTOMEXT_ENABLED /**/ + +/* Default value for --isa switch */ +#define DEFAULT_ISA "RV64IMAFDC" + +/* Default value for --priv switch */ +#define DEFAULT_PRIV "MSU" + +/* Default value for --varch switch */ +#define DEFAULT_VARCH "vlen:128,elen:64" + +/* Define if subproject MCPPBS_SPROJ_NORM is enabled */ +#define DISASM_ENABLED /**/ + +/* Executable name of device-tree-compiler */ +#define DTC "dtc" + +/* Define if subproject MCPPBS_SPROJ_NORM is enabled */ +#define FDT_ENABLED /**/ + +/* Define if subproject MCPPBS_SPROJ_NORM is enabled */ +#define FESVR_ENABLED /**/ + +/* define if the Boost library is available */ +/* #undef HAVE_BOOST */ + +/* define if the Boost::ASIO library is available */ +/* #undef HAVE_BOOST_ASIO */ + +/* Dynamic library loading is supported */ +#define HAVE_DLOPEN /**/ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `boost_regex' library (-lboost_regex). */ +/* #undef HAVE_LIBBOOST_REGEX */ + +/* Define to 1 if you have the `boost_system' library (-lboost_system). */ +/* #undef HAVE_LIBBOOST_SYSTEM */ + +/* Define to 1 if you have the `pthread' library (-lpthread). */ +#define HAVE_LIBPTHREAD 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if struct statx exists. */ +#define HAVE_STATX 1 + +/* Define to 1 if struct statx has stx_mnt_id. */ +/* #undef HAVE_STATX_MNT_ID */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "Andrew Waterman" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "RISC-V ISA Simulator" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "RISC-V ISA Simulator ?" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "spike" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "?" + +/* Define if subproject MCPPBS_SPROJ_NORM is enabled */ +#define RISCV_ENABLED /**/ + +/* Enable commit log generation */ +/* #undef RISCV_ENABLE_COMMITLOG */ + +/* Enable hardware management of PTE accessed and dirty bits */ +/* #undef RISCV_ENABLE_DIRTY */ + +/* Enable support for running target in either endianness */ +/* #undef RISCV_ENABLE_DUAL_ENDIAN */ + +/* Enable PC histogram generation */ +/* #undef RISCV_ENABLE_HISTOGRAM */ + +/* Enable hardware support for misaligned loads and stores */ +/* #undef RISCV_ENABLE_MISALIGNED */ + +/* Define if subproject MCPPBS_SPROJ_NORM is enabled */ +#define SOFTFLOAT_ENABLED /**/ + +/* Define if subproject MCPPBS_SPROJ_NORM is enabled */ +#define SPIKE_DASM_ENABLED /**/ + +/* Define if subproject MCPPBS_SPROJ_NORM is enabled */ +#define SPIKE_MAIN_ENABLED /**/ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Default value for --with-target switch */ +#define TARGET_ARCH "riscv64-unknown-elf" + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif diff --git a/extern/riscv-softfloat-standalone/include/internals.h b/extern/riscv-softfloat-standalone/include/internals.h new file mode 100644 index 0000000..55585e9 --- /dev/null +++ b/extern/riscv-softfloat-standalone/include/internals.h @@ -0,0 +1,286 @@ + +/*============================================================================ + +This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#ifndef internals_h +#define internals_h 1 + +#include +#include +#include "primitives.h" +#include "softfloat_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +union ui16_f16 { uint16_t ui; float16_t f; }; +union ui32_f32 { uint32_t ui; float32_t f; }; +union ui64_f64 { uint64_t ui; float64_t f; }; + +#ifdef SOFTFLOAT_FAST_INT64 +union extF80M_extF80 { struct extFloat80M fM; extFloat80_t f; }; +union ui128_f128 { struct uint128 ui; float128_t f; }; +#endif + +enum { + softfloat_mulAdd_subC = 1, + softfloat_mulAdd_subProd = 2 +}; + +/*---------------------------------------------------------------------------- +*----------------------------------------------------------------------------*/ +uint_fast32_t softfloat_roundToUI32( bool, uint_fast64_t, uint_fast8_t, bool ); + +#ifdef SOFTFLOAT_FAST_INT64 +uint_fast64_t + softfloat_roundToUI64( + bool, uint_fast64_t, uint_fast64_t, uint_fast8_t, bool ); +#else +uint_fast64_t softfloat_roundMToUI64( bool, uint32_t *, uint_fast8_t, bool ); +#endif + +int_fast32_t softfloat_roundToI32( bool, uint_fast64_t, uint_fast8_t, bool ); + +#ifdef SOFTFLOAT_FAST_INT64 +int_fast64_t + softfloat_roundToI64( + bool, uint_fast64_t, uint_fast64_t, uint_fast8_t, bool ); +#else +int_fast64_t softfloat_roundMToI64( bool, uint32_t *, uint_fast8_t, bool ); +#endif + +/*---------------------------------------------------------------------------- +*----------------------------------------------------------------------------*/ +#define signF16UI( a ) ((bool) ((uint16_t) (a)>>15)) +#define expF16UI( a ) ((int_fast8_t) ((a)>>10) & 0x1F) +#define fracF16UI( a ) ((a) & 0x03FF) +#define packToF16UI( sign, exp, sig ) (((uint16_t) (sign)<<15) + ((uint16_t) (exp)<<10) + (sig)) + +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) + +struct exp8_sig16 { int_fast8_t exp; uint_fast16_t sig; }; +struct exp8_sig16 softfloat_normSubnormalF16Sig( uint_fast16_t ); + +float16_t softfloat_roundPackToF16( bool, int_fast16_t, uint_fast16_t ); +float16_t softfloat_normRoundPackToF16( bool, int_fast16_t, uint_fast16_t ); + +float16_t softfloat_addMagsF16( uint_fast16_t, uint_fast16_t ); +float16_t softfloat_subMagsF16( uint_fast16_t, uint_fast16_t ); +float16_t + softfloat_mulAddF16( + uint_fast16_t, uint_fast16_t, uint_fast16_t, uint_fast8_t ); + +/*---------------------------------------------------------------------------- +*----------------------------------------------------------------------------*/ +#define signF32UI( a ) ((bool) ((uint32_t) (a)>>31)) +#define expF32UI( a ) ((int_fast16_t) ((a)>>23) & 0xFF) +#define fracF32UI( a ) ((a) & 0x007FFFFF) +#define packToF32UI( sign, exp, sig ) (((uint32_t) (sign)<<31) + ((uint32_t) (exp)<<23) + (sig)) + +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) + +struct exp16_sig32 { int_fast16_t exp; uint_fast32_t sig; }; +struct exp16_sig32 softfloat_normSubnormalF32Sig( uint_fast32_t ); + +float32_t softfloat_roundPackToF32( bool, int_fast16_t, uint_fast32_t ); +float32_t softfloat_normRoundPackToF32( bool, int_fast16_t, uint_fast32_t ); + +float32_t softfloat_addMagsF32( uint_fast32_t, uint_fast32_t ); +float32_t softfloat_subMagsF32( uint_fast32_t, uint_fast32_t ); +float32_t + softfloat_mulAddF32( + uint_fast32_t, uint_fast32_t, uint_fast32_t, uint_fast8_t ); + +/*---------------------------------------------------------------------------- +*----------------------------------------------------------------------------*/ +#define signF64UI( a ) ((bool) ((uint64_t) (a)>>63)) +#define expF64UI( a ) ((int_fast16_t) ((a)>>52) & 0x7FF) +#define fracF64UI( a ) ((a) & UINT64_C( 0x000FFFFFFFFFFFFF )) +#define packToF64UI( sign, exp, sig ) ((uint64_t) (((uint_fast64_t) (sign)<<63) + ((uint_fast64_t) (exp)<<52) + (sig))) + +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) + +struct exp16_sig64 { int_fast16_t exp; uint_fast64_t sig; }; +struct exp16_sig64 softfloat_normSubnormalF64Sig( uint_fast64_t ); + +float64_t softfloat_roundPackToF64( bool, int_fast16_t, uint_fast64_t ); +float64_t softfloat_normRoundPackToF64( bool, int_fast16_t, uint_fast64_t ); + +float64_t softfloat_addMagsF64( uint_fast64_t, uint_fast64_t, bool ); +float64_t softfloat_subMagsF64( uint_fast64_t, uint_fast64_t, bool ); +float64_t + softfloat_mulAddF64( + uint_fast64_t, uint_fast64_t, uint_fast64_t, uint_fast8_t ); + +/*---------------------------------------------------------------------------- +*----------------------------------------------------------------------------*/ +#define signExtF80UI64( a64 ) ((bool) ((uint16_t) (a64)>>15)) +#define expExtF80UI64( a64 ) ((a64) & 0x7FFF) +#define packToExtF80UI64( sign, exp ) ((uint_fast16_t) (sign)<<15 | (exp)) + +#define isNaNExtF80UI( a64, a0 ) ((((a64) & 0x7FFF) == 0x7FFF) && ((a0) & UINT64_C( 0x7FFFFFFFFFFFFFFF ))) + +#ifdef SOFTFLOAT_FAST_INT64 + +/*---------------------------------------------------------------------------- +*----------------------------------------------------------------------------*/ + +struct exp32_sig64 { int_fast32_t exp; uint64_t sig; }; +struct exp32_sig64 softfloat_normSubnormalExtF80Sig( uint_fast64_t ); + +extFloat80_t + softfloat_roundPackToExtF80( + bool, int_fast32_t, uint_fast64_t, uint_fast64_t, uint_fast8_t ); +extFloat80_t + softfloat_normRoundPackToExtF80( + bool, int_fast32_t, uint_fast64_t, uint_fast64_t, uint_fast8_t ); + +extFloat80_t + softfloat_addMagsExtF80( + uint_fast16_t, uint_fast64_t, uint_fast16_t, uint_fast64_t, bool ); +extFloat80_t + softfloat_subMagsExtF80( + uint_fast16_t, uint_fast64_t, uint_fast16_t, uint_fast64_t, bool ); + +/*---------------------------------------------------------------------------- +*----------------------------------------------------------------------------*/ +#define signF128UI64( a64 ) ((bool) ((uint64_t) (a64)>>63)) +#define expF128UI64( a64 ) ((int_fast32_t) ((a64)>>48) & 0x7FFF) +#define fracF128UI64( a64 ) ((a64) & UINT64_C( 0x0000FFFFFFFFFFFF )) +#define packToF128UI64( sign, exp, sig64 ) (((uint_fast64_t) (sign)<<63) + ((uint_fast64_t) (exp)<<48) + (sig64)) + +#define isNaNF128UI( a64, a0 ) (((~(a64) & UINT64_C( 0x7FFF000000000000 )) == 0) && (a0 || ((a64) & UINT64_C( 0x0000FFFFFFFFFFFF )))) + +struct exp32_sig128 { int_fast32_t exp; struct uint128 sig; }; +struct exp32_sig128 + softfloat_normSubnormalF128Sig( uint_fast64_t, uint_fast64_t ); + +float128_t + softfloat_roundPackToF128( + bool, int_fast32_t, uint_fast64_t, uint_fast64_t, uint_fast64_t ); +float128_t + softfloat_normRoundPackToF128( + bool, int_fast32_t, uint_fast64_t, uint_fast64_t ); + +float128_t + softfloat_addMagsF128( + uint_fast64_t, uint_fast64_t, uint_fast64_t, uint_fast64_t, bool ); +float128_t + softfloat_subMagsF128( + uint_fast64_t, uint_fast64_t, uint_fast64_t, uint_fast64_t, bool ); +float128_t + softfloat_mulAddF128( + uint_fast64_t, + uint_fast64_t, + uint_fast64_t, + uint_fast64_t, + uint_fast64_t, + uint_fast64_t, + uint_fast8_t + ); + +#else + +/*---------------------------------------------------------------------------- +*----------------------------------------------------------------------------*/ + +bool + softfloat_tryPropagateNaNExtF80M( + const struct extFloat80M *, + const struct extFloat80M *, + struct extFloat80M * + ); +void softfloat_invalidExtF80M( struct extFloat80M * ); + +int softfloat_normExtF80SigM( uint64_t * ); + +void + softfloat_roundPackMToExtF80M( + bool, int32_t, uint32_t *, uint_fast8_t, struct extFloat80M * ); +void + softfloat_normRoundPackMToExtF80M( + bool, int32_t, uint32_t *, uint_fast8_t, struct extFloat80M * ); + +void + softfloat_addExtF80M( + const struct extFloat80M *, + const struct extFloat80M *, + struct extFloat80M *, + bool + ); + +int + softfloat_compareNonnormExtF80M( + const struct extFloat80M *, const struct extFloat80M * ); + +/*---------------------------------------------------------------------------- +*----------------------------------------------------------------------------*/ +#define signF128UI96( a96 ) ((bool) ((uint32_t) (a96)>>31)) +#define expF128UI96( a96 ) ((int32_t) ((a96)>>16) & 0x7FFF) +#define fracF128UI96( a96 ) ((a96) & 0x0000FFFF) +#define packToF128UI96( sign, exp, sig96 ) (((uint32_t) (sign)<<31) + ((uint32_t) (exp)<<16) + (sig96)) + +bool softfloat_isNaNF128M( const uint32_t * ); + +bool + softfloat_tryPropagateNaNF128M( + const uint32_t *, const uint32_t *, uint32_t * ); +void softfloat_invalidF128M( uint32_t * ); + +int softfloat_shiftNormSigF128M( const uint32_t *, uint_fast8_t, uint32_t * ); + +void softfloat_roundPackMToF128M( bool, int32_t, uint32_t *, uint32_t * ); +void softfloat_normRoundPackMToF128M( bool, int32_t, uint32_t *, uint32_t * ); + +void + softfloat_addF128M( const uint32_t *, const uint32_t *, uint32_t *, bool ); +void + softfloat_mulAddF128M( + const uint32_t *, + const uint32_t *, + const uint32_t *, + uint32_t *, + uint_fast8_t + ); + +#endif + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/extern/riscv-softfloat-standalone/include/platform.h b/extern/riscv-softfloat-standalone/include/platform.h new file mode 100644 index 0000000..55de194 --- /dev/null +++ b/extern/riscv-softfloat-standalone/include/platform.h @@ -0,0 +1,52 @@ + +/*============================================================================ + +This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3a, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +/*---------------------------------------------------------------------------- +*----------------------------------------------------------------------------*/ +#include "config.h" +#ifndef WORDS_BIGENDIAN +#define LITTLEENDIAN 1 +#endif + +#define INLINE_LEVEL 5 +#define SOFTFLOAT_FAST_INT64 +#define SOFTFLOAT_FAST_DIV64TO32 +#define SOFTFLOAT_ROUND_ODD + +/*---------------------------------------------------------------------------- +*----------------------------------------------------------------------------*/ +#define INLINE static inline + diff --git a/extern/riscv-softfloat-standalone/include/primitiveTypes.h b/extern/riscv-softfloat-standalone/include/primitiveTypes.h new file mode 100644 index 0000000..b112049 --- /dev/null +++ b/extern/riscv-softfloat-standalone/include/primitiveTypes.h @@ -0,0 +1,86 @@ + +/*============================================================================ + +This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3a, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#ifndef primitiveTypes_h +#define primitiveTypes_h 1 + +#include +#include "platform.h" + +#ifdef SOFTFLOAT_FAST_INT64 + +#ifdef LITTLEENDIAN +struct uint128 { uint64_t v0, v64; }; +struct uint64_extra { uint64_t extra, v; }; +struct uint128_extra { uint64_t extra; struct uint128 v; }; +#else +struct uint128 { uint64_t v64, v0; }; +struct uint64_extra { uint64_t v, extra; }; +struct uint128_extra { struct uint128 v; uint64_t extra; }; +#endif + +#endif + +/*---------------------------------------------------------------------------- +| These macros are used to isolate the differences in word order between big- +| endian and little-endian platforms. +*----------------------------------------------------------------------------*/ +#ifdef LITTLEENDIAN +#define wordIncr 1 +#define indexWord( total, n ) (n) +#define indexWordHi( total ) ((total) - 1) +#define indexWordLo( total ) 0 +#define indexMultiword( total, m, n ) (n) +#define indexMultiwordHi( total, n ) ((total) - (n)) +#define indexMultiwordLo( total, n ) 0 +#define indexMultiwordHiBut( total, n ) (n) +#define indexMultiwordLoBut( total, n ) 0 +#define INIT_UINTM4( v3, v2, v1, v0 ) { v0, v1, v2, v3 } +#else +#define wordIncr -1 +#define indexWord( total, n ) ((total) - 1 - (n)) +#define indexWordHi( total ) 0 +#define indexWordLo( total ) ((total) - 1) +#define indexMultiword( total, m, n ) ((total) - 1 - (m)) +#define indexMultiwordHi( total, n ) 0 +#define indexMultiwordLo( total, n ) ((total) - (n)) +#define indexMultiwordHiBut( total, n ) 0 +#define indexMultiwordLoBut( total, n ) (n) +#define INIT_UINTM4( v3, v2, v1, v0 ) { v3, v2, v1, v0 } +#endif + +#endif + diff --git a/extern/riscv-softfloat-standalone/include/primitives.h b/extern/riscv-softfloat-standalone/include/primitives.h new file mode 100644 index 0000000..1acc8a8 --- /dev/null +++ b/extern/riscv-softfloat-standalone/include/primitives.h @@ -0,0 +1,1168 @@ + +/*============================================================================ + +This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#ifndef primitives_h +#define primitives_h 1 + +#include +#include +#include "primitiveTypes.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef softfloat_shortShiftRightJam64 +/*---------------------------------------------------------------------------- +| Shifts 'a' right by the number of bits given in 'dist', which must be in +| the range 1 to 63. If any nonzero bits are shifted off, they are "jammed" +| into the least-significant bit of the shifted value by setting the least- +| significant bit to 1. This shifted-and-jammed value is returned. +*----------------------------------------------------------------------------*/ +#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) +INLINE +uint64_t softfloat_shortShiftRightJam64( uint64_t a, uint_fast8_t dist ) + { return a>>dist | ((a & (((uint_fast64_t) 1<>dist | ((uint32_t) (a<<(-dist & 31)) != 0) : (a != 0); +} +#else +uint32_t softfloat_shiftRightJam32( uint32_t a, uint_fast16_t dist ); +#endif +#endif + +#ifndef softfloat_shiftRightJam64 +/*---------------------------------------------------------------------------- +| Shifts 'a' right by the number of bits given in 'dist', which must not +| be zero. If any nonzero bits are shifted off, they are "jammed" into the +| least-significant bit of the shifted value by setting the least-significant +| bit to 1. This shifted-and-jammed value is returned. +| The value of 'dist' can be arbitrarily large. In particular, if 'dist' is +| greater than 64, the result will be either 0 or 1, depending on whether 'a' +| is zero or nonzero. +*----------------------------------------------------------------------------*/ +#if defined INLINE_LEVEL && (3 <= INLINE_LEVEL) +INLINE uint64_t softfloat_shiftRightJam64( uint64_t a, uint_fast32_t dist ) +{ + return + (dist < 63) ? a>>dist | ((uint64_t) (a<<(-dist & 63)) != 0) : (a != 0); +} +#else +uint64_t softfloat_shiftRightJam64( uint64_t a, uint_fast32_t dist ); +#endif +#endif + +/*---------------------------------------------------------------------------- +| A constant table that translates an 8-bit unsigned integer (the array index) +| into the number of leading 0 bits before the most-significant 1 of that +| integer. For integer zero (index 0), the corresponding table element is 8. +*----------------------------------------------------------------------------*/ +extern const uint_least8_t softfloat_countLeadingZeros8[256]; + +#ifndef softfloat_countLeadingZeros16 +/*---------------------------------------------------------------------------- +| Returns the number of leading 0 bits before the most-significant 1 bit of +| 'a'. If 'a' is zero, 16 is returned. +*----------------------------------------------------------------------------*/ +#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) +INLINE uint_fast8_t softfloat_countLeadingZeros16( uint16_t a ) +{ + uint_fast8_t count = 8; + if ( 0x100 <= a ) { + count = 0; + a >>= 8; + } + count += softfloat_countLeadingZeros8[a]; + return count; +} +#else +uint_fast8_t softfloat_countLeadingZeros16( uint16_t a ); +#endif +#endif + +#ifndef softfloat_countLeadingZeros32 +/*---------------------------------------------------------------------------- +| Returns the number of leading 0 bits before the most-significant 1 bit of +| 'a'. If 'a' is zero, 32 is returned. +*----------------------------------------------------------------------------*/ +#if defined INLINE_LEVEL && (3 <= INLINE_LEVEL) +INLINE uint_fast8_t softfloat_countLeadingZeros32( uint32_t a ) +{ + uint_fast8_t count = 0; + if ( a < 0x10000 ) { + count = 16; + a <<= 16; + } + if ( a < 0x1000000 ) { + count += 8; + a <<= 8; + } + count += softfloat_countLeadingZeros8[a>>24]; + return count; +} +#else +uint_fast8_t softfloat_countLeadingZeros32( uint32_t a ); +#endif +#endif + +#ifndef softfloat_countLeadingZeros64 +/*---------------------------------------------------------------------------- +| Returns the number of leading 0 bits before the most-significant 1 bit of +| 'a'. If 'a' is zero, 64 is returned. +*----------------------------------------------------------------------------*/ +uint_fast8_t softfloat_countLeadingZeros64( uint64_t a ); +#endif + +extern const uint16_t softfloat_approxRecip_1k0s[16]; +extern const uint16_t softfloat_approxRecip_1k1s[16]; + +#ifndef softfloat_approxRecip32_1 +/*---------------------------------------------------------------------------- +| Returns an approximation to the reciprocal of the number represented by 'a', +| where 'a' is interpreted as an unsigned fixed-point number with one integer +| bit and 31 fraction bits. The 'a' input must be "normalized", meaning that +| its most-significant bit (bit 31) must be 1. Thus, if A is the value of +| the fixed-point interpretation of 'a', then 1 <= A < 2. The returned value +| is interpreted as a pure unsigned fraction, having no integer bits and 32 +| fraction bits. The approximation returned is never greater than the true +| reciprocal 1/A, and it differs from the true reciprocal by at most 2.006 ulp +| (units in the last place). +*----------------------------------------------------------------------------*/ +#ifdef SOFTFLOAT_FAST_DIV64TO32 +#define softfloat_approxRecip32_1( a ) ((uint32_t) (UINT64_C( 0x7FFFFFFFFFFFFFFF ) / (uint32_t) (a))) +#else +uint32_t softfloat_approxRecip32_1( uint32_t a ); +#endif +#endif + +extern const uint16_t softfloat_approxRecipSqrt_1k0s[16]; +extern const uint16_t softfloat_approxRecipSqrt_1k1s[16]; + +#ifndef softfloat_approxRecipSqrt32_1 +/*---------------------------------------------------------------------------- +| Returns an approximation to the reciprocal of the square root of the number +| represented by 'a', where 'a' is interpreted as an unsigned fixed-point +| number either with one integer bit and 31 fraction bits or with two integer +| bits and 30 fraction bits. The format of 'a' is determined by 'oddExpA', +| which must be either 0 or 1. If 'oddExpA' is 1, 'a' is interpreted as +| having one integer bit, and if 'oddExpA' is 0, 'a' is interpreted as having +| two integer bits. The 'a' input must be "normalized", meaning that its +| most-significant bit (bit 31) must be 1. Thus, if A is the value of the +| fixed-point interpretation of 'a', it follows that 1 <= A < 2 when 'oddExpA' +| is 1, and 2 <= A < 4 when 'oddExpA' is 0. +| The returned value is interpreted as a pure unsigned fraction, having +| no integer bits and 32 fraction bits. The approximation returned is never +| greater than the true reciprocal 1/sqrt(A), and it differs from the true +| reciprocal by at most 2.06 ulp (units in the last place). The approximation +| returned is also always within the range 0.5 to 1; thus, the most- +| significant bit of the result is always set. +*----------------------------------------------------------------------------*/ +uint32_t softfloat_approxRecipSqrt32_1( unsigned int oddExpA, uint32_t a ); +#endif + +#ifdef SOFTFLOAT_FAST_INT64 + +/*---------------------------------------------------------------------------- +| The following functions are needed only when 'SOFTFLOAT_FAST_INT64' is +| defined. +*----------------------------------------------------------------------------*/ + +#ifndef softfloat_eq128 +/*---------------------------------------------------------------------------- +| Returns true if the 128-bit unsigned integer formed by concatenating 'a64' +| and 'a0' is equal to the 128-bit unsigned integer formed by concatenating +| 'b64' and 'b0'. +*----------------------------------------------------------------------------*/ +#if defined INLINE_LEVEL && (1 <= INLINE_LEVEL) +INLINE +bool softfloat_eq128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ) + { return (a64 == b64) && (a0 == b0); } +#else +bool softfloat_eq128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ); +#endif +#endif + +#ifndef softfloat_le128 +/*---------------------------------------------------------------------------- +| Returns true if the 128-bit unsigned integer formed by concatenating 'a64' +| and 'a0' is less than or equal to the 128-bit unsigned integer formed by +| concatenating 'b64' and 'b0'. +*----------------------------------------------------------------------------*/ +#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) +INLINE +bool softfloat_le128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ) + { return (a64 < b64) || ((a64 == b64) && (a0 <= b0)); } +#else +bool softfloat_le128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ); +#endif +#endif + +#ifndef softfloat_lt128 +/*---------------------------------------------------------------------------- +| Returns true if the 128-bit unsigned integer formed by concatenating 'a64' +| and 'a0' is less than the 128-bit unsigned integer formed by concatenating +| 'b64' and 'b0'. +*----------------------------------------------------------------------------*/ +#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) +INLINE +bool softfloat_lt128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ) + { return (a64 < b64) || ((a64 == b64) && (a0 < b0)); } +#else +bool softfloat_lt128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ); +#endif +#endif + +#ifndef softfloat_shortShiftLeft128 +/*---------------------------------------------------------------------------- +| Shifts the 128 bits formed by concatenating 'a64' and 'a0' left by the +| number of bits given in 'dist', which must be in the range 1 to 63. +*----------------------------------------------------------------------------*/ +#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) +INLINE +struct uint128 + softfloat_shortShiftLeft128( uint64_t a64, uint64_t a0, uint_fast8_t dist ) +{ + struct uint128 z; + z.v64 = a64<>(-dist & 63); + z.v0 = a0<>dist; + z.v0 = a64<<(-dist & 63) | a0>>dist; + return z; +} +#else +struct uint128 + softfloat_shortShiftRight128( uint64_t a64, uint64_t a0, uint_fast8_t dist ); +#endif +#endif + +#ifndef softfloat_shortShiftRightJam64Extra +/*---------------------------------------------------------------------------- +| This function is the same as 'softfloat_shiftRightJam64Extra' (below), +| except that 'dist' must be in the range 1 to 63. +*----------------------------------------------------------------------------*/ +#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) +INLINE +struct uint64_extra + softfloat_shortShiftRightJam64Extra( + uint64_t a, uint64_t extra, uint_fast8_t dist ) +{ + struct uint64_extra z; + z.v = a>>dist; + z.extra = a<<(-dist & 63) | (extra != 0); + return z; +} +#else +struct uint64_extra + softfloat_shortShiftRightJam64Extra( + uint64_t a, uint64_t extra, uint_fast8_t dist ); +#endif +#endif + +#ifndef softfloat_shortShiftRightJam128 +/*---------------------------------------------------------------------------- +| Shifts the 128 bits formed by concatenating 'a64' and 'a0' right by the +| number of bits given in 'dist', which must be in the range 1 to 63. If any +| nonzero bits are shifted off, they are "jammed" into the least-significant +| bit of the shifted value by setting the least-significant bit to 1. This +| shifted-and-jammed value is returned. +*----------------------------------------------------------------------------*/ +#if defined INLINE_LEVEL && (3 <= INLINE_LEVEL) +INLINE +struct uint128 + softfloat_shortShiftRightJam128( + uint64_t a64, uint64_t a0, uint_fast8_t dist ) +{ + uint_fast8_t negDist = -dist; + struct uint128 z; + z.v64 = a64>>dist; + z.v0 = + a64<<(negDist & 63) | a0>>dist + | ((uint64_t) (a0<<(negDist & 63)) != 0); + return z; +} +#else +struct uint128 + softfloat_shortShiftRightJam128( + uint64_t a64, uint64_t a0, uint_fast8_t dist ); +#endif +#endif + +#ifndef softfloat_shortShiftRightJam128Extra +/*---------------------------------------------------------------------------- +| This function is the same as 'softfloat_shiftRightJam128Extra' (below), +| except that 'dist' must be in the range 1 to 63. +*----------------------------------------------------------------------------*/ +#if defined INLINE_LEVEL && (3 <= INLINE_LEVEL) +INLINE +struct uint128_extra + softfloat_shortShiftRightJam128Extra( + uint64_t a64, uint64_t a0, uint64_t extra, uint_fast8_t dist ) +{ + uint_fast8_t negDist = -dist; + struct uint128_extra z; + z.v.v64 = a64>>dist; + z.v.v0 = a64<<(negDist & 63) | a0>>dist; + z.extra = a0<<(negDist & 63) | (extra != 0); + return z; +} +#else +struct uint128_extra + softfloat_shortShiftRightJam128Extra( + uint64_t a64, uint64_t a0, uint64_t extra, uint_fast8_t dist ); +#endif +#endif + +#ifndef softfloat_shiftRightJam64Extra +/*---------------------------------------------------------------------------- +| Shifts the 128 bits formed by concatenating 'a' and 'extra' right by 64 +| _plus_ the number of bits given in 'dist', which must not be zero. This +| shifted value is at most 64 nonzero bits and is returned in the 'v' field +| of the 'struct uint64_extra' result. The 64-bit 'extra' field of the result +| contains a value formed as follows from the bits that were shifted off: The +| _last_ bit shifted off is the most-significant bit of the 'extra' field, and +| the other 63 bits of the 'extra' field are all zero if and only if _all_but_ +| _the_last_ bits shifted off were all zero. +| (This function makes more sense if 'a' and 'extra' are considered to form +| an unsigned fixed-point number with binary point between 'a' and 'extra'. +| This fixed-point value is shifted right by the number of bits given in +| 'dist', and the integer part of this shifted value is returned in the 'v' +| field of the result. The fractional part of the shifted value is modified +| as described above and returned in the 'extra' field of the result.) +*----------------------------------------------------------------------------*/ +#if defined INLINE_LEVEL && (4 <= INLINE_LEVEL) +INLINE +struct uint64_extra + softfloat_shiftRightJam64Extra( + uint64_t a, uint64_t extra, uint_fast32_t dist ) +{ + struct uint64_extra z; + if ( dist < 64 ) { + z.v = a>>dist; + z.extra = a<<(-dist & 63); + } else { + z.v = 0; + z.extra = (dist == 64) ? a : (a != 0); + } + z.extra |= (extra != 0); + return z; +} +#else +struct uint64_extra + softfloat_shiftRightJam64Extra( + uint64_t a, uint64_t extra, uint_fast32_t dist ); +#endif +#endif + +#ifndef softfloat_shiftRightJam128 +/*---------------------------------------------------------------------------- +| Shifts the 128 bits formed by concatenating 'a64' and 'a0' right by the +| number of bits given in 'dist', which must not be zero. If any nonzero bits +| are shifted off, they are "jammed" into the least-significant bit of the +| shifted value by setting the least-significant bit to 1. This shifted-and- +| jammed value is returned. +| The value of 'dist' can be arbitrarily large. In particular, if 'dist' is +| greater than 128, the result will be either 0 or 1, depending on whether the +| original 128 bits are all zeros. +*----------------------------------------------------------------------------*/ +struct uint128 + softfloat_shiftRightJam128( uint64_t a64, uint64_t a0, uint_fast32_t dist ); +#endif + +#ifndef softfloat_shiftRightJam128Extra +/*---------------------------------------------------------------------------- +| Shifts the 192 bits formed by concatenating 'a64', 'a0', and 'extra' right +| by 64 _plus_ the number of bits given in 'dist', which must not be zero. +| This shifted value is at most 128 nonzero bits and is returned in the 'v' +| field of the 'struct uint128_extra' result. The 64-bit 'extra' field of the +| result contains a value formed as follows from the bits that were shifted +| off: The _last_ bit shifted off is the most-significant bit of the 'extra' +| field, and the other 63 bits of the 'extra' field are all zero if and only +| if _all_but_the_last_ bits shifted off were all zero. +| (This function makes more sense if 'a64', 'a0', and 'extra' are considered +| to form an unsigned fixed-point number with binary point between 'a0' and +| 'extra'. This fixed-point value is shifted right by the number of bits +| given in 'dist', and the integer part of this shifted value is returned +| in the 'v' field of the result. The fractional part of the shifted value +| is modified as described above and returned in the 'extra' field of the +| result.) +*----------------------------------------------------------------------------*/ +struct uint128_extra + softfloat_shiftRightJam128Extra( + uint64_t a64, uint64_t a0, uint64_t extra, uint_fast32_t dist ); +#endif + +#ifndef softfloat_shiftRightJam256M +/*---------------------------------------------------------------------------- +| Shifts the 256-bit unsigned integer pointed to by 'aPtr' right by the number +| of bits given in 'dist', which must not be zero. If any nonzero bits are +| shifted off, they are "jammed" into the least-significant bit of the shifted +| value by setting the least-significant bit to 1. This shifted-and-jammed +| value is stored at the location pointed to by 'zPtr'. Each of 'aPtr' and +| 'zPtr' points to an array of four 64-bit elements that concatenate in the +| platform's normal endian order to form a 256-bit integer. +| The value of 'dist' can be arbitrarily large. In particular, if 'dist' +| is greater than 256, the stored result will be either 0 or 1, depending on +| whether the original 256 bits are all zeros. +*----------------------------------------------------------------------------*/ +void + softfloat_shiftRightJam256M( + const uint64_t *aPtr, uint_fast32_t dist, uint64_t *zPtr ); +#endif + +#ifndef softfloat_add128 +/*---------------------------------------------------------------------------- +| Returns the sum of the 128-bit integer formed by concatenating 'a64' and +| 'a0' and the 128-bit integer formed by concatenating 'b64' and 'b0'. The +| addition is modulo 2^128, so any carry out is lost. +*----------------------------------------------------------------------------*/ +#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) +INLINE +struct uint128 + softfloat_add128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ) +{ + struct uint128 z; + z.v0 = a0 + b0; + z.v64 = a64 + b64 + (z.v0 < a0); + return z; +} +#else +struct uint128 + softfloat_add128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ); +#endif +#endif + +#ifndef softfloat_add256M +/*---------------------------------------------------------------------------- +| Adds the two 256-bit integers pointed to by 'aPtr' and 'bPtr'. The addition +| is modulo 2^256, so any carry out is lost. The sum is stored at the +| location pointed to by 'zPtr'. Each of 'aPtr', 'bPtr', and 'zPtr' points to +| an array of four 64-bit elements that concatenate in the platform's normal +| endian order to form a 256-bit integer. +*----------------------------------------------------------------------------*/ +void + softfloat_add256M( + const uint64_t *aPtr, const uint64_t *bPtr, uint64_t *zPtr ); +#endif + +#ifndef softfloat_sub128 +/*---------------------------------------------------------------------------- +| Returns the difference of the 128-bit integer formed by concatenating 'a64' +| and 'a0' and the 128-bit integer formed by concatenating 'b64' and 'b0'. +| The subtraction is modulo 2^128, so any borrow out (carry out) is lost. +*----------------------------------------------------------------------------*/ +#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) +INLINE +struct uint128 + softfloat_sub128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ) +{ + struct uint128 z; + z.v0 = a0 - b0; + z.v64 = a64 - b64; + z.v64 -= (a0 < b0); + return z; +} +#else +struct uint128 + softfloat_sub128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ); +#endif +#endif + +#ifndef softfloat_sub256M +/*---------------------------------------------------------------------------- +| Subtracts the 256-bit integer pointed to by 'bPtr' from the 256-bit integer +| pointed to by 'aPtr'. The addition is modulo 2^256, so any borrow out +| (carry out) is lost. The difference is stored at the location pointed to +| by 'zPtr'. Each of 'aPtr', 'bPtr', and 'zPtr' points to an array of four +| 64-bit elements that concatenate in the platform's normal endian order to +| form a 256-bit integer. +*----------------------------------------------------------------------------*/ +void + softfloat_sub256M( + const uint64_t *aPtr, const uint64_t *bPtr, uint64_t *zPtr ); +#endif + +#ifndef softfloat_mul64ByShifted32To128 +/*---------------------------------------------------------------------------- +| Returns the 128-bit product of 'a', 'b', and 2^32. +*----------------------------------------------------------------------------*/ +#if defined INLINE_LEVEL && (3 <= INLINE_LEVEL) +INLINE struct uint128 softfloat_mul64ByShifted32To128( uint64_t a, uint32_t b ) +{ + uint_fast64_t mid; + struct uint128 z; + mid = (uint_fast64_t) (uint32_t) a * b; + z.v0 = mid<<32; + z.v64 = (uint_fast64_t) (uint32_t) (a>>32) * b + (mid>>32); + return z; +} +#else +struct uint128 softfloat_mul64ByShifted32To128( uint64_t a, uint32_t b ); +#endif +#endif + +#ifndef softfloat_mul64To128 +/*---------------------------------------------------------------------------- +| Returns the 128-bit product of 'a' and 'b'. +*----------------------------------------------------------------------------*/ +struct uint128 softfloat_mul64To128( uint64_t a, uint64_t b ); +#endif + +#ifndef softfloat_mul128By32 +/*---------------------------------------------------------------------------- +| Returns the product of the 128-bit integer formed by concatenating 'a64' and +| 'a0', multiplied by 'b'. The multiplication is modulo 2^128; any overflow +| bits are discarded. +*----------------------------------------------------------------------------*/ +#if defined INLINE_LEVEL && (4 <= INLINE_LEVEL) +INLINE +struct uint128 softfloat_mul128By32( uint64_t a64, uint64_t a0, uint32_t b ) +{ + struct uint128 z; + uint_fast64_t mid; + uint_fast32_t carry; + z.v0 = a0 * b; + mid = (uint_fast64_t) (uint32_t) (a0>>32) * b; + carry = (uint32_t) ((uint_fast32_t) (z.v0>>32) - (uint_fast32_t) mid); + z.v64 = a64 * b + (uint_fast32_t) ((mid + carry)>>32); + return z; +} +#else +struct uint128 softfloat_mul128By32( uint64_t a64, uint64_t a0, uint32_t b ); +#endif +#endif + +#ifndef softfloat_mul128To256M +/*---------------------------------------------------------------------------- +| Multiplies the 128-bit unsigned integer formed by concatenating 'a64' and +| 'a0' by the 128-bit unsigned integer formed by concatenating 'b64' and +| 'b0'. The 256-bit product is stored at the location pointed to by 'zPtr'. +| Argument 'zPtr' points to an array of four 64-bit elements that concatenate +| in the platform's normal endian order to form a 256-bit integer. +*----------------------------------------------------------------------------*/ +void + softfloat_mul128To256M( + uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0, uint64_t *zPtr ); +#endif + +#else + +/*---------------------------------------------------------------------------- +| The following functions are needed only when 'SOFTFLOAT_FAST_INT64' is not +| defined. +*----------------------------------------------------------------------------*/ + +#ifndef softfloat_compare96M +/*---------------------------------------------------------------------------- +| Compares the two 96-bit unsigned integers pointed to by 'aPtr' and 'bPtr'. +| Returns -1 if the first integer (A) is less than the second (B); returns 0 +| if the two integers are equal; and returns +1 if the first integer (A) +| is greater than the second (B). (The result is thus the signum of A - B.) +| Each of 'aPtr' and 'bPtr' points to an array of three 32-bit elements that +| concatenate in the platform's normal endian order to form a 96-bit integer. +*----------------------------------------------------------------------------*/ +int_fast8_t softfloat_compare96M( const uint32_t *aPtr, const uint32_t *bPtr ); +#endif + +#ifndef softfloat_compare128M +/*---------------------------------------------------------------------------- +| Compares the two 128-bit unsigned integers pointed to by 'aPtr' and 'bPtr'. +| Returns -1 if the first integer (A) is less than the second (B); returns 0 +| if the two integers are equal; and returns +1 if the first integer (A) +| is greater than the second (B). (The result is thus the signum of A - B.) +| Each of 'aPtr' and 'bPtr' points to an array of four 32-bit elements that +| concatenate in the platform's normal endian order to form a 128-bit integer. +*----------------------------------------------------------------------------*/ +int_fast8_t + softfloat_compare128M( const uint32_t *aPtr, const uint32_t *bPtr ); +#endif + +#ifndef softfloat_shortShiftLeft64To96M +/*---------------------------------------------------------------------------- +| Extends 'a' to 96 bits and shifts the value left by the number of bits given +| in 'dist', which must be in the range 1 to 31. The result is stored at the +| location pointed to by 'zPtr'. Argument 'zPtr' points to an array of three +| 32-bit elements that concatenate in the platform's normal endian order to +| form a 96-bit integer. +*----------------------------------------------------------------------------*/ +#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) +INLINE +void + softfloat_shortShiftLeft64To96M( + uint64_t a, uint_fast8_t dist, uint32_t *zPtr ) +{ + zPtr[indexWord( 3, 0 )] = (uint32_t) a<>= 32 - dist; + zPtr[indexWord( 3, 2 )] = a>>32; + zPtr[indexWord( 3, 1 )] = a; +} +#else +void + softfloat_shortShiftLeft64To96M( + uint64_t a, uint_fast8_t dist, uint32_t *zPtr ); +#endif +#endif + +#ifndef softfloat_shortShiftLeftM +/*---------------------------------------------------------------------------- +| Shifts the N-bit unsigned integer pointed to by 'aPtr' left by the number +| of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist' +| must be in the range 1 to 31. Any nonzero bits shifted off are lost. The +| shifted N-bit result is stored at the location pointed to by 'zPtr'. Each +| of 'aPtr' and 'zPtr' points to a 'size_words'-long array of 32-bit elements +| that concatenate in the platform's normal endian order to form an N-bit +| integer. +*----------------------------------------------------------------------------*/ +void + softfloat_shortShiftLeftM( + uint_fast8_t size_words, + const uint32_t *aPtr, + uint_fast8_t dist, + uint32_t *zPtr + ); +#endif + +#ifndef softfloat_shortShiftLeft96M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_shortShiftLeftM' with +| 'size_words' = 3 (N = 96). +*----------------------------------------------------------------------------*/ +#define softfloat_shortShiftLeft96M( aPtr, dist, zPtr ) softfloat_shortShiftLeftM( 3, aPtr, dist, zPtr ) +#endif + +#ifndef softfloat_shortShiftLeft128M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_shortShiftLeftM' with +| 'size_words' = 4 (N = 128). +*----------------------------------------------------------------------------*/ +#define softfloat_shortShiftLeft128M( aPtr, dist, zPtr ) softfloat_shortShiftLeftM( 4, aPtr, dist, zPtr ) +#endif + +#ifndef softfloat_shortShiftLeft160M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_shortShiftLeftM' with +| 'size_words' = 5 (N = 160). +*----------------------------------------------------------------------------*/ +#define softfloat_shortShiftLeft160M( aPtr, dist, zPtr ) softfloat_shortShiftLeftM( 5, aPtr, dist, zPtr ) +#endif + +#ifndef softfloat_shiftLeftM +/*---------------------------------------------------------------------------- +| Shifts the N-bit unsigned integer pointed to by 'aPtr' left by the number +| of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist' +| must not be zero. Any nonzero bits shifted off are lost. The shifted +| N-bit result is stored at the location pointed to by 'zPtr'. Each of 'aPtr' +| and 'zPtr' points to a 'size_words'-long array of 32-bit elements that +| concatenate in the platform's normal endian order to form an N-bit integer. +| The value of 'dist' can be arbitrarily large. In particular, if 'dist' is +| greater than N, the stored result will be 0. +*----------------------------------------------------------------------------*/ +void + softfloat_shiftLeftM( + uint_fast8_t size_words, + const uint32_t *aPtr, + uint32_t dist, + uint32_t *zPtr + ); +#endif + +#ifndef softfloat_shiftLeft96M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_shiftLeftM' with +| 'size_words' = 3 (N = 96). +*----------------------------------------------------------------------------*/ +#define softfloat_shiftLeft96M( aPtr, dist, zPtr ) softfloat_shiftLeftM( 3, aPtr, dist, zPtr ) +#endif + +#ifndef softfloat_shiftLeft128M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_shiftLeftM' with +| 'size_words' = 4 (N = 128). +*----------------------------------------------------------------------------*/ +#define softfloat_shiftLeft128M( aPtr, dist, zPtr ) softfloat_shiftLeftM( 4, aPtr, dist, zPtr ) +#endif + +#ifndef softfloat_shiftLeft160M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_shiftLeftM' with +| 'size_words' = 5 (N = 160). +*----------------------------------------------------------------------------*/ +#define softfloat_shiftLeft160M( aPtr, dist, zPtr ) softfloat_shiftLeftM( 5, aPtr, dist, zPtr ) +#endif + +#ifndef softfloat_shortShiftRightM +/*---------------------------------------------------------------------------- +| Shifts the N-bit unsigned integer pointed to by 'aPtr' right by the number +| of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist' +| must be in the range 1 to 31. Any nonzero bits shifted off are lost. The +| shifted N-bit result is stored at the location pointed to by 'zPtr'. Each +| of 'aPtr' and 'zPtr' points to a 'size_words'-long array of 32-bit elements +| that concatenate in the platform's normal endian order to form an N-bit +| integer. +*----------------------------------------------------------------------------*/ +void + softfloat_shortShiftRightM( + uint_fast8_t size_words, + const uint32_t *aPtr, + uint_fast8_t dist, + uint32_t *zPtr + ); +#endif + +#ifndef softfloat_shortShiftRight128M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_shortShiftRightM' with +| 'size_words' = 4 (N = 128). +*----------------------------------------------------------------------------*/ +#define softfloat_shortShiftRight128M( aPtr, dist, zPtr ) softfloat_shortShiftRightM( 4, aPtr, dist, zPtr ) +#endif + +#ifndef softfloat_shortShiftRight160M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_shortShiftRightM' with +| 'size_words' = 5 (N = 160). +*----------------------------------------------------------------------------*/ +#define softfloat_shortShiftRight160M( aPtr, dist, zPtr ) softfloat_shortShiftRightM( 5, aPtr, dist, zPtr ) +#endif + +#ifndef softfloat_shortShiftRightJamM +/*---------------------------------------------------------------------------- +| Shifts the N-bit unsigned integer pointed to by 'aPtr' right by the number +| of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist' +| must be in the range 1 to 31. If any nonzero bits are shifted off, they are +| "jammed" into the least-significant bit of the shifted value by setting the +| least-significant bit to 1. This shifted-and-jammed N-bit result is stored +| at the location pointed to by 'zPtr'. Each of 'aPtr' and 'zPtr' points +| to a 'size_words'-long array of 32-bit elements that concatenate in the +| platform's normal endian order to form an N-bit integer. +*----------------------------------------------------------------------------*/ +void + softfloat_shortShiftRightJamM( + uint_fast8_t, const uint32_t *, uint_fast8_t, uint32_t * ); +#endif + +#ifndef softfloat_shortShiftRightJam160M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_shortShiftRightJamM' with +| 'size_words' = 5 (N = 160). +*----------------------------------------------------------------------------*/ +#define softfloat_shortShiftRightJam160M( aPtr, dist, zPtr ) softfloat_shortShiftRightJamM( 5, aPtr, dist, zPtr ) +#endif + +#ifndef softfloat_shiftRightM +/*---------------------------------------------------------------------------- +| Shifts the N-bit unsigned integer pointed to by 'aPtr' right by the number +| of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist' +| must not be zero. Any nonzero bits shifted off are lost. The shifted +| N-bit result is stored at the location pointed to by 'zPtr'. Each of 'aPtr' +| and 'zPtr' points to a 'size_words'-long array of 32-bit elements that +| concatenate in the platform's normal endian order to form an N-bit integer. +| The value of 'dist' can be arbitrarily large. In particular, if 'dist' is +| greater than N, the stored result will be 0. +*----------------------------------------------------------------------------*/ +void + softfloat_shiftRightM( + uint_fast8_t size_words, + const uint32_t *aPtr, + uint32_t dist, + uint32_t *zPtr + ); +#endif + +#ifndef softfloat_shiftRight96M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_shiftRightM' with +| 'size_words' = 3 (N = 96). +*----------------------------------------------------------------------------*/ +#define softfloat_shiftRight96M( aPtr, dist, zPtr ) softfloat_shiftRightM( 3, aPtr, dist, zPtr ) +#endif + +#ifndef softfloat_shiftRightJamM +/*---------------------------------------------------------------------------- +| Shifts the N-bit unsigned integer pointed to by 'aPtr' right by the number +| of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist' +| must not be zero. If any nonzero bits are shifted off, they are "jammed" +| into the least-significant bit of the shifted value by setting the least- +| significant bit to 1. This shifted-and-jammed N-bit result is stored +| at the location pointed to by 'zPtr'. Each of 'aPtr' and 'zPtr' points +| to a 'size_words'-long array of 32-bit elements that concatenate in the +| platform's normal endian order to form an N-bit integer. +| The value of 'dist' can be arbitrarily large. In particular, if 'dist' +| is greater than N, the stored result will be either 0 or 1, depending on +| whether the original N bits are all zeros. +*----------------------------------------------------------------------------*/ +void + softfloat_shiftRightJamM( + uint_fast8_t size_words, + const uint32_t *aPtr, + uint32_t dist, + uint32_t *zPtr + ); +#endif + +#ifndef softfloat_shiftRightJam96M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_shiftRightJamM' with +| 'size_words' = 3 (N = 96). +*----------------------------------------------------------------------------*/ +#define softfloat_shiftRightJam96M( aPtr, dist, zPtr ) softfloat_shiftRightJamM( 3, aPtr, dist, zPtr ) +#endif + +#ifndef softfloat_shiftRightJam128M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_shiftRightJamM' with +| 'size_words' = 4 (N = 128). +*----------------------------------------------------------------------------*/ +#define softfloat_shiftRightJam128M( aPtr, dist, zPtr ) softfloat_shiftRightJamM( 4, aPtr, dist, zPtr ) +#endif + +#ifndef softfloat_shiftRightJam160M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_shiftRightJamM' with +| 'size_words' = 5 (N = 160). +*----------------------------------------------------------------------------*/ +#define softfloat_shiftRightJam160M( aPtr, dist, zPtr ) softfloat_shiftRightJamM( 5, aPtr, dist, zPtr ) +#endif + +#ifndef softfloat_addM +/*---------------------------------------------------------------------------- +| Adds the two N-bit integers pointed to by 'aPtr' and 'bPtr', where N = +| 'size_words' * 32. The addition is modulo 2^N, so any carry out is lost. +| The N-bit sum is stored at the location pointed to by 'zPtr'. Each of +| 'aPtr', 'bPtr', and 'zPtr' points to a 'size_words'-long array of 32-bit +| elements that concatenate in the platform's normal endian order to form an +| N-bit integer. +*----------------------------------------------------------------------------*/ +void + softfloat_addM( + uint_fast8_t size_words, + const uint32_t *aPtr, + const uint32_t *bPtr, + uint32_t *zPtr + ); +#endif + +#ifndef softfloat_add96M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_addM' with 'size_words' +| = 3 (N = 96). +*----------------------------------------------------------------------------*/ +#define softfloat_add96M( aPtr, bPtr, zPtr ) softfloat_addM( 3, aPtr, bPtr, zPtr ) +#endif + +#ifndef softfloat_add128M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_addM' with 'size_words' +| = 4 (N = 128). +*----------------------------------------------------------------------------*/ +#define softfloat_add128M( aPtr, bPtr, zPtr ) softfloat_addM( 4, aPtr, bPtr, zPtr ) +#endif + +#ifndef softfloat_add160M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_addM' with 'size_words' +| = 5 (N = 160). +*----------------------------------------------------------------------------*/ +#define softfloat_add160M( aPtr, bPtr, zPtr ) softfloat_addM( 5, aPtr, bPtr, zPtr ) +#endif + +#ifndef softfloat_addCarryM +/*---------------------------------------------------------------------------- +| Adds the two N-bit unsigned integers pointed to by 'aPtr' and 'bPtr', where +| N = 'size_words' * 32, plus 'carry', which must be either 0 or 1. The N-bit +| sum (modulo 2^N) is stored at the location pointed to by 'zPtr', and any +| carry out is returned as the result. Each of 'aPtr', 'bPtr', and 'zPtr' +| points to a 'size_words'-long array of 32-bit elements that concatenate in +| the platform's normal endian order to form an N-bit integer. +*----------------------------------------------------------------------------*/ +uint_fast8_t + softfloat_addCarryM( + uint_fast8_t size_words, + const uint32_t *aPtr, + const uint32_t *bPtr, + uint_fast8_t carry, + uint32_t *zPtr + ); +#endif + +#ifndef softfloat_addComplCarryM +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_addCarryM', except that +| the value of the unsigned integer pointed to by 'bPtr' is bit-wise completed +| before the addition. +*----------------------------------------------------------------------------*/ +uint_fast8_t + softfloat_addComplCarryM( + uint_fast8_t size_words, + const uint32_t *aPtr, + const uint32_t *bPtr, + uint_fast8_t carry, + uint32_t *zPtr + ); +#endif + +#ifndef softfloat_addComplCarry96M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_addComplCarryM' with +| 'size_words' = 3 (N = 96). +*----------------------------------------------------------------------------*/ +#define softfloat_addComplCarry96M( aPtr, bPtr, carry, zPtr ) softfloat_addComplCarryM( 3, aPtr, bPtr, carry, zPtr ) +#endif + +#ifndef softfloat_negXM +/*---------------------------------------------------------------------------- +| Replaces the N-bit unsigned integer pointed to by 'zPtr' by the +| 2s-complement of itself, where N = 'size_words' * 32. Argument 'zPtr' +| points to a 'size_words'-long array of 32-bit elements that concatenate in +| the platform's normal endian order to form an N-bit integer. +*----------------------------------------------------------------------------*/ +void softfloat_negXM( uint_fast8_t size_words, uint32_t *zPtr ); +#endif + +#ifndef softfloat_negX96M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_negXM' with 'size_words' +| = 3 (N = 96). +*----------------------------------------------------------------------------*/ +#define softfloat_negX96M( zPtr ) softfloat_negXM( 3, zPtr ) +#endif + +#ifndef softfloat_negX128M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_negXM' with 'size_words' +| = 4 (N = 128). +*----------------------------------------------------------------------------*/ +#define softfloat_negX128M( zPtr ) softfloat_negXM( 4, zPtr ) +#endif + +#ifndef softfloat_negX160M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_negXM' with 'size_words' +| = 5 (N = 160). +*----------------------------------------------------------------------------*/ +#define softfloat_negX160M( zPtr ) softfloat_negXM( 5, zPtr ) +#endif + +#ifndef softfloat_negX256M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_negXM' with 'size_words' +| = 8 (N = 256). +*----------------------------------------------------------------------------*/ +#define softfloat_negX256M( zPtr ) softfloat_negXM( 8, zPtr ) +#endif + +#ifndef softfloat_sub1XM +/*---------------------------------------------------------------------------- +| Subtracts 1 from the N-bit integer pointed to by 'zPtr', where N = +| 'size_words' * 32. The subtraction is modulo 2^N, so any borrow out (carry +| out) is lost. Argument 'zPtr' points to a 'size_words'-long array of 32-bit +| elements that concatenate in the platform's normal endian order to form an +| N-bit integer. +*----------------------------------------------------------------------------*/ +void softfloat_sub1XM( uint_fast8_t size_words, uint32_t *zPtr ); +#endif + +#ifndef softfloat_sub1X96M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_sub1XM' with 'size_words' +| = 3 (N = 96). +*----------------------------------------------------------------------------*/ +#define softfloat_sub1X96M( zPtr ) softfloat_sub1XM( 3, zPtr ) +#endif + +#ifndef softfloat_sub1X160M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_sub1XM' with 'size_words' +| = 5 (N = 160). +*----------------------------------------------------------------------------*/ +#define softfloat_sub1X160M( zPtr ) softfloat_sub1XM( 5, zPtr ) +#endif + +#ifndef softfloat_subM +/*---------------------------------------------------------------------------- +| Subtracts the two N-bit integers pointed to by 'aPtr' and 'bPtr', where N = +| 'size_words' * 32. The subtraction is modulo 2^N, so any borrow out (carry +| out) is lost. The N-bit difference is stored at the location pointed to by +| 'zPtr'. Each of 'aPtr', 'bPtr', and 'zPtr' points to a 'size_words'-long +| array of 32-bit elements that concatenate in the platform's normal endian +| order to form an N-bit integer. +*----------------------------------------------------------------------------*/ +void + softfloat_subM( + uint_fast8_t size_words, + const uint32_t *aPtr, + const uint32_t *bPtr, + uint32_t *zPtr + ); +#endif + +#ifndef softfloat_sub96M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_subM' with 'size_words' +| = 3 (N = 96). +*----------------------------------------------------------------------------*/ +#define softfloat_sub96M( aPtr, bPtr, zPtr ) softfloat_subM( 3, aPtr, bPtr, zPtr ) +#endif + +#ifndef softfloat_sub128M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_subM' with 'size_words' +| = 4 (N = 128). +*----------------------------------------------------------------------------*/ +#define softfloat_sub128M( aPtr, bPtr, zPtr ) softfloat_subM( 4, aPtr, bPtr, zPtr ) +#endif + +#ifndef softfloat_sub160M +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_subM' with 'size_words' +| = 5 (N = 160). +*----------------------------------------------------------------------------*/ +#define softfloat_sub160M( aPtr, bPtr, zPtr ) softfloat_subM( 5, aPtr, bPtr, zPtr ) +#endif + +#ifndef softfloat_mul64To128M +/*---------------------------------------------------------------------------- +| Multiplies 'a' and 'b' and stores the 128-bit product at the location +| pointed to by 'zPtr'. Argument 'zPtr' points to an array of four 32-bit +| elements that concatenate in the platform's normal endian order to form a +| 128-bit integer. +*----------------------------------------------------------------------------*/ +void softfloat_mul64To128M( uint64_t a, uint64_t b, uint32_t *zPtr ); +#endif + +#ifndef softfloat_mul128MTo256M +/*---------------------------------------------------------------------------- +| Multiplies the two 128-bit unsigned integers pointed to by 'aPtr' and +| 'bPtr', and stores the 256-bit product at the location pointed to by 'zPtr'. +| Each of 'aPtr' and 'bPtr' points to an array of four 32-bit elements that +| concatenate in the platform's normal endian order to form a 128-bit integer. +| Argument 'zPtr' points to an array of eight 32-bit elements that concatenate +| to form a 256-bit integer. +*----------------------------------------------------------------------------*/ +void + softfloat_mul128MTo256M( + const uint32_t *aPtr, const uint32_t *bPtr, uint32_t *zPtr ); +#endif + +#ifndef softfloat_remStepMBy32 +/*---------------------------------------------------------------------------- +| Performs a "remainder reduction step" as follows: Arguments 'remPtr' and +| 'bPtr' both point to N-bit unsigned integers, where N = 'size_words' * 32. +| Defining R and B as the values of those integers, the expression (R<<'dist') +| - B * q is computed modulo 2^N, and the N-bit result is stored at the +| location pointed to by 'zPtr'. Each of 'remPtr', 'bPtr', and 'zPtr' points +| to a 'size_words'-long array of 32-bit elements that concatenate in the +| platform's normal endian order to form an N-bit integer. +*----------------------------------------------------------------------------*/ +void + softfloat_remStepMBy32( + uint_fast8_t size_words, + const uint32_t *remPtr, + uint_fast8_t dist, + const uint32_t *bPtr, + uint32_t q, + uint32_t *zPtr + ); +#endif + +#ifndef softfloat_remStep96MBy32 +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_remStepMBy32' with +| 'size_words' = 3 (N = 96). +*----------------------------------------------------------------------------*/ +#define softfloat_remStep96MBy32( remPtr, dist, bPtr, q, zPtr ) softfloat_remStepMBy32( 3, remPtr, dist, bPtr, q, zPtr ) +#endif + +#ifndef softfloat_remStep128MBy32 +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_remStepMBy32' with +| 'size_words' = 4 (N = 128). +*----------------------------------------------------------------------------*/ +#define softfloat_remStep128MBy32( remPtr, dist, bPtr, q, zPtr ) softfloat_remStepMBy32( 4, remPtr, dist, bPtr, q, zPtr ) +#endif + +#ifndef softfloat_remStep160MBy32 +/*---------------------------------------------------------------------------- +| This function or macro is the same as 'softfloat_remStepMBy32' with +| 'size_words' = 5 (N = 160). +*----------------------------------------------------------------------------*/ +#define softfloat_remStep160MBy32( remPtr, dist, bPtr, q, zPtr ) softfloat_remStepMBy32( 5, remPtr, dist, bPtr, q, zPtr ) +#endif + +#endif + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/extern/riscv-softfloat-standalone/include/softfloat.h b/extern/riscv-softfloat-standalone/include/softfloat.h new file mode 100644 index 0000000..bdac1be --- /dev/null +++ b/extern/riscv-softfloat-standalone/include/softfloat.h @@ -0,0 +1,402 @@ + +/*============================================================================ + +This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + + +/*============================================================================ +| Note: If SoftFloat is made available as a general library for programs to +| use, it is strongly recommended that a platform-specific version of this +| header, "softfloat.h", be created that folds in "softfloat_types.h" and that +| eliminates all dependencies on compile-time macros. +*============================================================================*/ + + +#ifndef softfloat_h +#define softfloat_h 1 + +#include +#include +#include "softfloat_types.h" + +#ifndef THREAD_LOCAL +#define THREAD_LOCAL +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/*---------------------------------------------------------------------------- +| Software floating-point underflow tininess-detection mode. +*----------------------------------------------------------------------------*/ +extern THREAD_LOCAL uint_fast8_t softfloat_detectTininess; +enum { + softfloat_tininess_beforeRounding = 0, + softfloat_tininess_afterRounding = 1 +}; + +/*---------------------------------------------------------------------------- +| Software floating-point rounding mode. (Mode "odd" is supported only if +| SoftFloat is compiled with macro 'SOFTFLOAT_ROUND_ODD' defined.) +*----------------------------------------------------------------------------*/ +extern THREAD_LOCAL uint_fast8_t softfloat_roundingMode; +enum { + softfloat_round_near_even = 0, + softfloat_round_minMag = 1, + softfloat_round_min = 2, + softfloat_round_max = 3, + softfloat_round_near_maxMag = 4, + softfloat_round_odd = 5 +}; + +/*---------------------------------------------------------------------------- +| Software floating-point exception flags. +*----------------------------------------------------------------------------*/ +extern THREAD_LOCAL uint_fast8_t softfloat_exceptionFlags; +enum { + softfloat_flag_inexact = 1, + softfloat_flag_underflow = 2, + softfloat_flag_overflow = 4, + softfloat_flag_infinite = 8, + softfloat_flag_invalid = 16 +}; + +/*---------------------------------------------------------------------------- +| Routine to raise any or all of the software floating-point exception flags. +*----------------------------------------------------------------------------*/ +void softfloat_raiseFlags( uint_fast8_t ); + +/*---------------------------------------------------------------------------- +| Integer-to-floating-point conversion routines. +*----------------------------------------------------------------------------*/ +float16_t ui32_to_f16( uint32_t ); +float32_t ui32_to_f32( uint32_t ); +float64_t ui32_to_f64( uint32_t ); +#ifdef SOFTFLOAT_FAST_INT64 +extFloat80_t ui32_to_extF80( uint32_t ); +float128_t ui32_to_f128( uint32_t ); +#endif +void ui32_to_extF80M( uint32_t, extFloat80_t * ); +void ui32_to_f128M( uint32_t, float128_t * ); +float16_t ui64_to_f16( uint64_t ); +float32_t ui64_to_f32( uint64_t ); +float64_t ui64_to_f64( uint64_t ); +#ifdef SOFTFLOAT_FAST_INT64 +extFloat80_t ui64_to_extF80( uint64_t ); +float128_t ui64_to_f128( uint64_t ); +#endif +void ui64_to_extF80M( uint64_t, extFloat80_t * ); +void ui64_to_f128M( uint64_t, float128_t * ); +float16_t i32_to_f16( int32_t ); +float32_t i32_to_f32( int32_t ); +float64_t i32_to_f64( int32_t ); +#ifdef SOFTFLOAT_FAST_INT64 +extFloat80_t i32_to_extF80( int32_t ); +float128_t i32_to_f128( int32_t ); +#endif +void i32_to_extF80M( int32_t, extFloat80_t * ); +void i32_to_f128M( int32_t, float128_t * ); +float16_t i64_to_f16( int64_t ); +float32_t i64_to_f32( int64_t ); +float64_t i64_to_f64( int64_t ); +#ifdef SOFTFLOAT_FAST_INT64 +extFloat80_t i64_to_extF80( int64_t ); +float128_t i64_to_f128( int64_t ); +#endif +void i64_to_extF80M( int64_t, extFloat80_t * ); +void i64_to_f128M( int64_t, float128_t * ); + +/*---------------------------------------------------------------------------- +| 16-bit (half-precision) floating-point operations. +*----------------------------------------------------------------------------*/ +uint_fast8_t f16_to_ui8( float16_t, uint_fast8_t, bool ); +uint_fast16_t f16_to_ui16( float16_t, uint_fast8_t, bool ); +uint_fast32_t f16_to_ui32( float16_t, uint_fast8_t, bool ); +uint_fast64_t f16_to_ui64( float16_t, uint_fast8_t, bool ); +int_fast8_t f16_to_i8( float16_t, uint_fast8_t, bool ); +int_fast16_t f16_to_i16( float16_t, uint_fast8_t, bool ); +int_fast32_t f16_to_i32( float16_t, uint_fast8_t, bool ); +int_fast64_t f16_to_i64( float16_t, uint_fast8_t, bool ); +uint_fast32_t f16_to_ui32_r_minMag( float16_t, bool ); +uint_fast64_t f16_to_ui64_r_minMag( float16_t, bool ); +int_fast32_t f16_to_i32_r_minMag( float16_t, bool ); +int_fast64_t f16_to_i64_r_minMag( float16_t, bool ); +float32_t f16_to_f32( float16_t ); +float64_t f16_to_f64( float16_t ); +#ifdef SOFTFLOAT_FAST_INT64 +extFloat80_t f16_to_extF80( float16_t ); +float128_t f16_to_f128( float16_t ); +#endif +void f16_to_extF80M( float16_t, extFloat80_t * ); +void f16_to_f128M( float16_t, float128_t * ); +float16_t f16_roundToInt( float16_t, uint_fast8_t, bool ); +float16_t f16_add( float16_t, float16_t ); +float16_t f16_sub( float16_t, float16_t ); +float16_t f16_max( float16_t, float16_t ); +float16_t f16_min( float16_t, float16_t ); +float16_t f16_mul( float16_t, float16_t ); +float16_t f16_mulAdd( float16_t, float16_t, float16_t ); +float16_t f16_div( float16_t, float16_t ); +float16_t f16_rem( float16_t, float16_t ); +float16_t f16_sqrt( float16_t ); +bool f16_eq( float16_t, float16_t ); +bool f16_le( float16_t, float16_t ); +bool f16_lt( float16_t, float16_t ); +bool f16_eq_signaling( float16_t, float16_t ); +bool f16_le_quiet( float16_t, float16_t ); +bool f16_lt_quiet( float16_t, float16_t ); +bool f16_isSignalingNaN( float16_t ); +uint_fast16_t f16_classify( float16_t ); +float16_t f16_rsqrte7( float16_t ); +float16_t f16_recip7( float16_t ); + +/*---------------------------------------------------------------------------- +| 32-bit (single-precision) floating-point operations. +*----------------------------------------------------------------------------*/ +uint_fast16_t f32_to_ui16( float32_t, uint_fast8_t, bool ); +uint_fast32_t f32_to_ui32( float32_t, uint_fast8_t, bool ); +uint_fast64_t f32_to_ui64( float32_t, uint_fast8_t, bool ); +int_fast16_t f32_to_i16( float32_t, uint_fast8_t, bool ); +int_fast32_t f32_to_i32( float32_t, uint_fast8_t, bool ); +int_fast64_t f32_to_i64( float32_t, uint_fast8_t, bool ); +uint_fast32_t f32_to_ui32_r_minMag( float32_t, bool ); +uint_fast64_t f32_to_ui64_r_minMag( float32_t, bool ); +int_fast32_t f32_to_i32_r_minMag( float32_t, bool ); +int_fast64_t f32_to_i64_r_minMag( float32_t, bool ); +float16_t f32_to_f16( float32_t ); +float64_t f32_to_f64( float32_t ); +#ifdef SOFTFLOAT_FAST_INT64 +extFloat80_t f32_to_extF80( float32_t ); +float128_t f32_to_f128( float32_t ); +#endif +void f32_to_extF80M( float32_t, extFloat80_t * ); +void f32_to_f128M( float32_t, float128_t * ); +float32_t f32_roundToInt( float32_t, uint_fast8_t, bool ); +float32_t f32_add( float32_t, float32_t ); +float32_t f32_sub( float32_t, float32_t ); +float32_t f32_max( float32_t, float32_t ); +float32_t f32_min( float32_t, float32_t ); +float32_t f32_mul( float32_t, float32_t ); +float32_t f32_mulAdd( float32_t, float32_t, float32_t ); +float32_t f32_div( float32_t, float32_t ); +float32_t f32_rem( float32_t, float32_t ); +float32_t f32_sqrt( float32_t ); +bool f32_eq( float32_t, float32_t ); +bool f32_le( float32_t, float32_t ); +bool f32_lt( float32_t, float32_t ); +bool f32_eq_signaling( float32_t, float32_t ); +bool f32_le_quiet( float32_t, float32_t ); +bool f32_lt_quiet( float32_t, float32_t ); +bool f32_isSignalingNaN( float32_t ); +uint_fast16_t f32_classify( float32_t ); +float32_t f32_rsqrte7( float32_t ); +float32_t f32_recip7( float32_t ); + +/*---------------------------------------------------------------------------- +| 64-bit (double-precision) floating-point operations. +*----------------------------------------------------------------------------*/ +uint_fast32_t f64_to_ui32( float64_t, uint_fast8_t, bool ); +uint_fast64_t f64_to_ui64( float64_t, uint_fast8_t, bool ); +int_fast32_t f64_to_i32( float64_t, uint_fast8_t, bool ); +int_fast64_t f64_to_i64( float64_t, uint_fast8_t, bool ); +uint_fast32_t f64_to_ui32_r_minMag( float64_t, bool ); +uint_fast64_t f64_to_ui64_r_minMag( float64_t, bool ); +int_fast32_t f64_to_i32_r_minMag( float64_t, bool ); +int_fast64_t f64_to_i64_r_minMag( float64_t, bool ); +float16_t f64_to_f16( float64_t ); +float32_t f64_to_f32( float64_t ); +#ifdef SOFTFLOAT_FAST_INT64 +extFloat80_t f64_to_extF80( float64_t ); +float128_t f64_to_f128( float64_t ); +#endif +void f64_to_extF80M( float64_t, extFloat80_t * ); +void f64_to_f128M( float64_t, float128_t * ); +float64_t f64_roundToInt( float64_t, uint_fast8_t, bool ); +float64_t f64_add( float64_t, float64_t ); +float64_t f64_sub( float64_t, float64_t ); +float64_t f64_max( float64_t, float64_t ); +float64_t f64_min( float64_t, float64_t ); +float64_t f64_mul( float64_t, float64_t ); +float64_t f64_mulAdd( float64_t, float64_t, float64_t ); +float64_t f64_div( float64_t, float64_t ); +float64_t f64_rem( float64_t, float64_t ); +float64_t f64_sqrt( float64_t ); +bool f64_eq( float64_t, float64_t ); +bool f64_le( float64_t, float64_t ); +bool f64_lt( float64_t, float64_t ); +bool f64_eq_signaling( float64_t, float64_t ); +bool f64_le_quiet( float64_t, float64_t ); +bool f64_lt_quiet( float64_t, float64_t ); +bool f64_isSignalingNaN( float64_t ); +uint_fast16_t f64_classify( float64_t ); +float64_t f64_rsqrte7( float64_t ); +float64_t f64_recip7( float64_t ); + +/*---------------------------------------------------------------------------- +| Rounding precision for 80-bit extended double-precision floating-point. +| Valid values are 32, 64, and 80. +*----------------------------------------------------------------------------*/ +extern THREAD_LOCAL uint_fast8_t extF80_roundingPrecision; + +/*---------------------------------------------------------------------------- +| 80-bit extended double-precision floating-point operations. +*----------------------------------------------------------------------------*/ +#ifdef SOFTFLOAT_FAST_INT64 +uint_fast32_t extF80_to_ui32( extFloat80_t, uint_fast8_t, bool ); +uint_fast64_t extF80_to_ui64( extFloat80_t, uint_fast8_t, bool ); +int_fast32_t extF80_to_i32( extFloat80_t, uint_fast8_t, bool ); +int_fast64_t extF80_to_i64( extFloat80_t, uint_fast8_t, bool ); +uint_fast32_t extF80_to_ui32_r_minMag( extFloat80_t, bool ); +uint_fast64_t extF80_to_ui64_r_minMag( extFloat80_t, bool ); +int_fast32_t extF80_to_i32_r_minMag( extFloat80_t, bool ); +int_fast64_t extF80_to_i64_r_minMag( extFloat80_t, bool ); +float16_t extF80_to_f16( extFloat80_t ); +float32_t extF80_to_f32( extFloat80_t ); +float64_t extF80_to_f64( extFloat80_t ); +float128_t extF80_to_f128( extFloat80_t ); +extFloat80_t extF80_roundToInt( extFloat80_t, uint_fast8_t, bool ); +extFloat80_t extF80_add( extFloat80_t, extFloat80_t ); +extFloat80_t extF80_sub( extFloat80_t, extFloat80_t ); +extFloat80_t extF80_mul( extFloat80_t, extFloat80_t ); +extFloat80_t extF80_div( extFloat80_t, extFloat80_t ); +extFloat80_t extF80_rem( extFloat80_t, extFloat80_t ); +extFloat80_t extF80_sqrt( extFloat80_t ); +bool extF80_eq( extFloat80_t, extFloat80_t ); +bool extF80_le( extFloat80_t, extFloat80_t ); +bool extF80_lt( extFloat80_t, extFloat80_t ); +bool extF80_eq_signaling( extFloat80_t, extFloat80_t ); +bool extF80_le_quiet( extFloat80_t, extFloat80_t ); +bool extF80_lt_quiet( extFloat80_t, extFloat80_t ); +bool extF80_isSignalingNaN( extFloat80_t ); +#endif +uint_fast32_t extF80M_to_ui32( const extFloat80_t *, uint_fast8_t, bool ); +uint_fast64_t extF80M_to_ui64( const extFloat80_t *, uint_fast8_t, bool ); +int_fast32_t extF80M_to_i32( const extFloat80_t *, uint_fast8_t, bool ); +int_fast64_t extF80M_to_i64( const extFloat80_t *, uint_fast8_t, bool ); +uint_fast32_t extF80M_to_ui32_r_minMag( const extFloat80_t *, bool ); +uint_fast64_t extF80M_to_ui64_r_minMag( const extFloat80_t *, bool ); +int_fast32_t extF80M_to_i32_r_minMag( const extFloat80_t *, bool ); +int_fast64_t extF80M_to_i64_r_minMag( const extFloat80_t *, bool ); +float16_t extF80M_to_f16( const extFloat80_t * ); +float32_t extF80M_to_f32( const extFloat80_t * ); +float64_t extF80M_to_f64( const extFloat80_t * ); +void extF80M_to_f128M( const extFloat80_t *, float128_t * ); +void + extF80M_roundToInt( + const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * ); +void extF80M_add( const extFloat80_t *, const extFloat80_t *, extFloat80_t * ); +void extF80M_sub( const extFloat80_t *, const extFloat80_t *, extFloat80_t * ); +void extF80M_mul( const extFloat80_t *, const extFloat80_t *, extFloat80_t * ); +void extF80M_div( const extFloat80_t *, const extFloat80_t *, extFloat80_t * ); +void extF80M_rem( const extFloat80_t *, const extFloat80_t *, extFloat80_t * ); +void extF80M_sqrt( const extFloat80_t *, extFloat80_t * ); +bool extF80M_eq( const extFloat80_t *, const extFloat80_t * ); +bool extF80M_le( const extFloat80_t *, const extFloat80_t * ); +bool extF80M_lt( const extFloat80_t *, const extFloat80_t * ); +bool extF80M_eq_signaling( const extFloat80_t *, const extFloat80_t * ); +bool extF80M_le_quiet( const extFloat80_t *, const extFloat80_t * ); +bool extF80M_lt_quiet( const extFloat80_t *, const extFloat80_t * ); +bool extF80M_isSignalingNaN( const extFloat80_t * ); + +/*---------------------------------------------------------------------------- +| 128-bit (quadruple-precision) floating-point operations. +*----------------------------------------------------------------------------*/ +#ifdef SOFTFLOAT_FAST_INT64 +uint_fast32_t f128_to_ui32( float128_t, uint_fast8_t, bool ); +uint_fast64_t f128_to_ui64( float128_t, uint_fast8_t, bool ); +int_fast32_t f128_to_i32( float128_t, uint_fast8_t, bool ); +int_fast64_t f128_to_i64( float128_t, uint_fast8_t, bool ); +uint_fast32_t f128_to_ui32_r_minMag( float128_t, bool ); +uint_fast64_t f128_to_ui64_r_minMag( float128_t, bool ); +int_fast32_t f128_to_i32_r_minMag( float128_t, bool ); +int_fast64_t f128_to_i64_r_minMag( float128_t, bool ); +float16_t f128_to_f16( float128_t ); +float32_t f128_to_f32( float128_t ); +float64_t f128_to_f64( float128_t ); +extFloat80_t f128_to_extF80( float128_t ); +float128_t f128_roundToInt( float128_t, uint_fast8_t, bool ); +float128_t f128_add( float128_t, float128_t ); +float128_t f128_sub( float128_t, float128_t ); +float128_t f128_mul( float128_t, float128_t ); +float128_t f128_mulAdd( float128_t, float128_t, float128_t ); +float128_t f128_div( float128_t, float128_t ); +float128_t f128_rem( float128_t, float128_t ); +float128_t f128_sqrt( float128_t ); +bool f128_eq( float128_t, float128_t ); +bool f128_le( float128_t, float128_t ); +bool f128_lt( float128_t, float128_t ); +bool f128_eq_signaling( float128_t, float128_t ); +bool f128_le_quiet( float128_t, float128_t ); +bool f128_lt_quiet( float128_t, float128_t ); +bool f128_isSignalingNaN( float128_t ); +uint_fast16_t f128_classify( float128_t ); +#endif +uint_fast32_t f128M_to_ui32( const float128_t *, uint_fast8_t, bool ); +uint_fast64_t f128M_to_ui64( const float128_t *, uint_fast8_t, bool ); +int_fast32_t f128M_to_i32( const float128_t *, uint_fast8_t, bool ); +int_fast64_t f128M_to_i64( const float128_t *, uint_fast8_t, bool ); +uint_fast32_t f128M_to_ui32_r_minMag( const float128_t *, bool ); +uint_fast64_t f128M_to_ui64_r_minMag( const float128_t *, bool ); +int_fast32_t f128M_to_i32_r_minMag( const float128_t *, bool ); +int_fast64_t f128M_to_i64_r_minMag( const float128_t *, bool ); +float16_t f128M_to_f16( const float128_t * ); +float32_t f128M_to_f32( const float128_t * ); +float64_t f128M_to_f64( const float128_t * ); +void f128M_to_extF80M( const float128_t *, extFloat80_t * ); +void f128M_roundToInt( const float128_t *, uint_fast8_t, bool, float128_t * ); +void f128M_add( const float128_t *, const float128_t *, float128_t * ); +void f128M_sub( const float128_t *, const float128_t *, float128_t * ); +void f128M_mul( const float128_t *, const float128_t *, float128_t * ); +void + f128M_mulAdd( + const float128_t *, const float128_t *, const float128_t *, float128_t * + ); +void f128M_div( const float128_t *, const float128_t *, float128_t * ); +void f128M_rem( const float128_t *, const float128_t *, float128_t * ); +void f128M_sqrt( const float128_t *, float128_t * ); +bool f128M_eq( const float128_t *, const float128_t * ); +bool f128M_le( const float128_t *, const float128_t * ); +bool f128M_lt( const float128_t *, const float128_t * ); +bool f128M_eq_signaling( const float128_t *, const float128_t * ); +bool f128M_le_quiet( const float128_t *, const float128_t * ); +bool f128M_lt_quiet( const float128_t *, const float128_t * ); +bool f128M_isSignalingNaN( const float128_t * ); + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/extern/riscv-softfloat-standalone/include/softfloat_types.h b/extern/riscv-softfloat-standalone/include/softfloat_types.h new file mode 100644 index 0000000..af1888f --- /dev/null +++ b/extern/riscv-softfloat-standalone/include/softfloat_types.h @@ -0,0 +1,81 @@ + +/*============================================================================ + +This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#ifndef softfloat_types_h +#define softfloat_types_h 1 + +#include + +/*---------------------------------------------------------------------------- +| Types used to pass 16-bit, 32-bit, 64-bit, and 128-bit floating-point +| arguments and results to/from functions. These types must be exactly +| 16 bits, 32 bits, 64 bits, and 128 bits in size, respectively. Where a +| platform has "native" support for IEEE-Standard floating-point formats, +| the types below may, if desired, be defined as aliases for the native types +| (typically 'float' and 'double', and possibly 'long double'). +*----------------------------------------------------------------------------*/ +typedef struct { uint16_t v; } float16_t; +typedef struct { uint32_t v; } float32_t; +typedef struct { uint64_t v; } float64_t; +typedef struct { uint64_t v[2]; } float128_t; + +/*---------------------------------------------------------------------------- +| The format of an 80-bit extended floating-point number in memory. This +| structure must contain a 16-bit field named 'signExp' and a 64-bit field +| named 'signif'. +*----------------------------------------------------------------------------*/ +#ifdef LITTLEENDIAN +struct extFloat80M { uint64_t signif; uint16_t signExp; }; +#else +struct extFloat80M { uint16_t signExp; uint64_t signif; }; +#endif + +/*---------------------------------------------------------------------------- +| The type used to pass 80-bit extended floating-point arguments and +| results to/from functions. This type must have size identical to +| 'struct extFloat80M'. Type 'extFloat80_t' can be defined as an alias for +| 'struct extFloat80M'. Alternatively, if a platform has "native" support +| for IEEE-Standard 80-bit extended floating-point, it may be possible, +| if desired, to define 'extFloat80_t' as an alias for the native type +| (presumably either 'long double' or a nonstandard compiler-intrinsic type). +| In that case, the 'signif' and 'signExp' fields of 'struct extFloat80M' +| must align exactly with the locations in memory of the sign, exponent, and +| significand of the native type. +*----------------------------------------------------------------------------*/ +typedef struct extFloat80M extFloat80_t; + +#endif + diff --git a/extern/riscv-softfloat-standalone/include/specialize.h b/extern/riscv-softfloat-standalone/include/specialize.h new file mode 100644 index 0000000..556476c --- /dev/null +++ b/extern/riscv-softfloat-standalone/include/specialize.h @@ -0,0 +1,429 @@ + +/*============================================================================ + +This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#ifndef specialize_h +#define specialize_h 1 + +#include +#include +#include "primitiveTypes.h" +#include "softfloat.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*---------------------------------------------------------------------------- +| Default value for `softfloat_detectTininess'. +*----------------------------------------------------------------------------*/ +#define init_detectTininess softfloat_tininess_afterRounding + +/*---------------------------------------------------------------------------- +| The values to return on conversions to 32-bit integer formats that raise an +| invalid exception. +*----------------------------------------------------------------------------*/ +#define ui8_fromPosOverflow 0xFF +#define ui8_fromNegOverflow 0 +#define ui8_fromNaN 0xFF +#define i8_fromPosOverflow 0x7F +#define i8_fromNegOverflow (-0x7F - 1) +#define i8_fromNaN 0x7F + +#define ui16_fromPosOverflow 0xFFFF +#define ui16_fromNegOverflow 0 +#define ui16_fromNaN 0xFFFF +#define i16_fromPosOverflow 0x7FFF +#define i16_fromNegOverflow (-0x7FFF - 1) +#define i16_fromNaN 0x7FFF + +#define ui32_fromPosOverflow 0xFFFFFFFF +#define ui32_fromNegOverflow 0 +#define ui32_fromNaN 0xFFFFFFFF +#define i32_fromPosOverflow 0x7FFFFFFF +#define i32_fromNegOverflow (-0x7FFFFFFF - 1) +#define i32_fromNaN 0x7FFFFFFF + +/*---------------------------------------------------------------------------- +| The values to return on conversions to 64-bit integer formats that raise an +| invalid exception. +*----------------------------------------------------------------------------*/ +#define ui64_fromPosOverflow UINT64_C( 0xFFFFFFFFFFFFFFFF ) +#define ui64_fromNegOverflow 0 +#define ui64_fromNaN UINT64_C( 0xFFFFFFFFFFFFFFFF ) +#define i64_fromPosOverflow UINT64_C( 0x7FFFFFFFFFFFFFFF ) +#define i64_fromNegOverflow (-UINT64_C( 0x7FFFFFFFFFFFFFFF ) - 1) +#define i64_fromNaN UINT64_C( 0x7FFFFFFFFFFFFFFF ) + +/*---------------------------------------------------------------------------- +| "Common NaN" structure, used to transfer NaN representations from one format +| to another. +*----------------------------------------------------------------------------*/ +struct commonNaN { char _unused; }; + +/*---------------------------------------------------------------------------- +| The bit pattern for a default generated 16-bit floating-point NaN. +*----------------------------------------------------------------------------*/ +#define defaultNaNF16UI 0x7E00 + +/*---------------------------------------------------------------------------- +| Returns true when 16-bit unsigned integer `uiA' has the bit pattern of a +| 16-bit floating-point signaling NaN. +| Note: This macro evaluates its argument more than once. +*----------------------------------------------------------------------------*/ +#define softfloat_isSigNaNF16UI( uiA ) ((((uiA) & 0x7E00) == 0x7C00) && ((uiA) & 0x01FF)) + +/*---------------------------------------------------------------------------- +| Assuming `uiA' has the bit pattern of a 16-bit floating-point NaN, converts +| this NaN to the common NaN form, and stores the resulting common NaN at the +| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid +| exception is raised. +*----------------------------------------------------------------------------*/ +#define softfloat_f16UIToCommonNaN( uiA, zPtr ) if ( ! ((uiA) & 0x0200) ) softfloat_raiseFlags( softfloat_flag_invalid ) + +/*---------------------------------------------------------------------------- +| Converts the common NaN pointed to by `aPtr' into a 16-bit floating-point +| NaN, and returns the bit pattern of this value as an unsigned integer. +*----------------------------------------------------------------------------*/ +#define softfloat_commonNaNToF16UI( aPtr ) ((uint_fast16_t) defaultNaNF16UI) + +/*---------------------------------------------------------------------------- +| Interpreting `uiA' and `uiB' as the bit patterns of two 16-bit floating- +| point values, at least one of which is a NaN, returns the bit pattern of +| the combined NaN result. If either `uiA' or `uiB' has the pattern of a +| signaling NaN, the invalid exception is raised. +*----------------------------------------------------------------------------*/ +uint_fast16_t + softfloat_propagateNaNF16UI( uint_fast16_t uiA, uint_fast16_t uiB ); + +/*---------------------------------------------------------------------------- +| The bit pattern for a default generated 32-bit floating-point NaN. +*----------------------------------------------------------------------------*/ +#define defaultNaNF32UI 0x7FC00000 + +/*---------------------------------------------------------------------------- +| Returns true when 32-bit unsigned integer `uiA' has the bit pattern of a +| 32-bit floating-point signaling NaN. +| Note: This macro evaluates its argument more than once. +*----------------------------------------------------------------------------*/ +#define softfloat_isSigNaNF32UI( uiA ) ((((uiA) & 0x7FC00000) == 0x7F800000) && ((uiA) & 0x003FFFFF)) + +/*---------------------------------------------------------------------------- +| Assuming `uiA' has the bit pattern of a 32-bit floating-point NaN, converts +| this NaN to the common NaN form, and stores the resulting common NaN at the +| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid +| exception is raised. +*----------------------------------------------------------------------------*/ +#define softfloat_f32UIToCommonNaN( uiA, zPtr ) if ( ! ((uiA) & 0x00400000) ) softfloat_raiseFlags( softfloat_flag_invalid ) + +/*---------------------------------------------------------------------------- +| Converts the common NaN pointed to by `aPtr' into a 32-bit floating-point +| NaN, and returns the bit pattern of this value as an unsigned integer. +*----------------------------------------------------------------------------*/ +#define softfloat_commonNaNToF32UI( aPtr ) ((uint_fast32_t) defaultNaNF32UI) + +/*---------------------------------------------------------------------------- +| Interpreting `uiA' and `uiB' as the bit patterns of two 32-bit floating- +| point values, at least one of which is a NaN, returns the bit pattern of +| the combined NaN result. If either `uiA' or `uiB' has the pattern of a +| signaling NaN, the invalid exception is raised. +*----------------------------------------------------------------------------*/ +uint_fast32_t + softfloat_propagateNaNF32UI( uint_fast32_t uiA, uint_fast32_t uiB ); + +/*---------------------------------------------------------------------------- +| The bit pattern for a default generated 64-bit floating-point NaN. +*----------------------------------------------------------------------------*/ +#define defaultNaNF64UI UINT64_C( 0x7FF8000000000000 ) + +/*---------------------------------------------------------------------------- +| Returns true when 64-bit unsigned integer `uiA' has the bit pattern of a +| 64-bit floating-point signaling NaN. +| Note: This macro evaluates its argument more than once. +*----------------------------------------------------------------------------*/ +#define softfloat_isSigNaNF64UI( uiA ) ((((uiA) & UINT64_C( 0x7FF8000000000000 )) == UINT64_C( 0x7FF0000000000000 )) && ((uiA) & UINT64_C( 0x0007FFFFFFFFFFFF ))) + +/*---------------------------------------------------------------------------- +| Assuming `uiA' has the bit pattern of a 64-bit floating-point NaN, converts +| this NaN to the common NaN form, and stores the resulting common NaN at the +| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid +| exception is raised. +*----------------------------------------------------------------------------*/ +#define softfloat_f64UIToCommonNaN( uiA, zPtr ) if ( ! ((uiA) & UINT64_C( 0x0008000000000000 )) ) softfloat_raiseFlags( softfloat_flag_invalid ) + +/*---------------------------------------------------------------------------- +| Converts the common NaN pointed to by `aPtr' into a 64-bit floating-point +| NaN, and returns the bit pattern of this value as an unsigned integer. +*----------------------------------------------------------------------------*/ +#define softfloat_commonNaNToF64UI( aPtr ) ((uint_fast64_t) defaultNaNF64UI) + +/*---------------------------------------------------------------------------- +| Interpreting `uiA' and `uiB' as the bit patterns of two 64-bit floating- +| point values, at least one of which is a NaN, returns the bit pattern of +| the combined NaN result. If either `uiA' or `uiB' has the pattern of a +| signaling NaN, the invalid exception is raised. +*----------------------------------------------------------------------------*/ +uint_fast64_t + softfloat_propagateNaNF64UI( uint_fast64_t uiA, uint_fast64_t uiB ); + +/*---------------------------------------------------------------------------- +| The bit pattern for a default generated 80-bit extended floating-point NaN. +*----------------------------------------------------------------------------*/ +#define defaultNaNExtF80UI64 0x7FFF +#define defaultNaNExtF80UI0 UINT64_C( 0xC000000000000000 ) + +/*---------------------------------------------------------------------------- +| Returns true when the 80-bit unsigned integer formed from concatenating +| 16-bit `uiA64' and 64-bit `uiA0' has the bit pattern of an 80-bit extended +| floating-point signaling NaN. +| Note: This macro evaluates its arguments more than once. +*----------------------------------------------------------------------------*/ +#define softfloat_isSigNaNExtF80UI( uiA64, uiA0 ) ((((uiA64) & 0x7FFF) == 0x7FFF) && ! ((uiA0) & UINT64_C( 0x4000000000000000 )) && ((uiA0) & UINT64_C( 0x3FFFFFFFFFFFFFFF ))) + +#ifdef SOFTFLOAT_FAST_INT64 + +/*---------------------------------------------------------------------------- +| The following functions are needed only when `SOFTFLOAT_FAST_INT64' is +| defined. +*----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +| Assuming the unsigned integer formed from concatenating `uiA64' and `uiA0' +| has the bit pattern of an 80-bit extended floating-point NaN, converts +| this NaN to the common NaN form, and stores the resulting common NaN at the +| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid +| exception is raised. +*----------------------------------------------------------------------------*/ +#define softfloat_extF80UIToCommonNaN( uiA64, uiA0, zPtr ) if ( ! ((uiA0) & UINT64_C( 0x4000000000000000 )) ) softfloat_raiseFlags( softfloat_flag_invalid ) + +/*---------------------------------------------------------------------------- +| Converts the common NaN pointed to by `aPtr' into an 80-bit extended +| floating-point NaN, and returns the bit pattern of this value as an unsigned +| integer. +*----------------------------------------------------------------------------*/ +#if defined INLINE && ! defined softfloat_commonNaNToExtF80UI +INLINE +struct uint128 softfloat_commonNaNToExtF80UI( const struct commonNaN *aPtr ) +{ + struct uint128 uiZ; + uiZ.v64 = defaultNaNExtF80UI64; + uiZ.v0 = defaultNaNExtF80UI0; + return uiZ; +} +#else +struct uint128 softfloat_commonNaNToExtF80UI( const struct commonNaN *aPtr ); +#endif + +/*---------------------------------------------------------------------------- +| Interpreting the unsigned integer formed from concatenating `uiA64' and +| `uiA0' as an 80-bit extended floating-point value, and likewise interpreting +| the unsigned integer formed from concatenating `uiB64' and `uiB0' as another +| 80-bit extended floating-point value, and assuming at least on of these +| floating-point values is a NaN, returns the bit pattern of the combined NaN +| result. If either original floating-point value is a signaling NaN, the +| invalid exception is raised. +*----------------------------------------------------------------------------*/ +struct uint128 + softfloat_propagateNaNExtF80UI( + uint_fast16_t uiA64, + uint_fast64_t uiA0, + uint_fast16_t uiB64, + uint_fast64_t uiB0 + ); + +/*---------------------------------------------------------------------------- +| The bit pattern for a default generated 128-bit floating-point NaN. +*----------------------------------------------------------------------------*/ +#define defaultNaNF128UI64 UINT64_C( 0x7FFF800000000000 ) +#define defaultNaNF128UI0 UINT64_C( 0 ) + +/*---------------------------------------------------------------------------- +| Returns true when the 128-bit unsigned integer formed from concatenating +| 64-bit `uiA64' and 64-bit `uiA0' has the bit pattern of a 128-bit floating- +| point signaling NaN. +| Note: This macro evaluates its arguments more than once. +*----------------------------------------------------------------------------*/ +#define softfloat_isSigNaNF128UI( uiA64, uiA0 ) ((((uiA64) & UINT64_C( 0x7FFF800000000000 )) == UINT64_C( 0x7FFF000000000000 )) && ((uiA0) || ((uiA64) & UINT64_C( 0x00007FFFFFFFFFFF )))) + +/*---------------------------------------------------------------------------- +| Assuming the unsigned integer formed from concatenating `uiA64' and `uiA0' +| has the bit pattern of a 128-bit floating-point NaN, converts this NaN to +| the common NaN form, and stores the resulting common NaN at the location +| pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid exception +| is raised. +*----------------------------------------------------------------------------*/ +#define softfloat_f128UIToCommonNaN( uiA64, uiA0, zPtr ) if ( ! ((uiA64) & UINT64_C( 0x0000800000000000 )) ) softfloat_raiseFlags( softfloat_flag_invalid ) + +/*---------------------------------------------------------------------------- +| Converts the common NaN pointed to by `aPtr' into a 128-bit floating-point +| NaN, and returns the bit pattern of this value as an unsigned integer. +*----------------------------------------------------------------------------*/ +#if defined INLINE && ! defined softfloat_commonNaNToF128UI +INLINE +struct uint128 softfloat_commonNaNToF128UI( const struct commonNaN *aPtr ) +{ + struct uint128 uiZ; + uiZ.v64 = defaultNaNF128UI64; + uiZ.v0 = defaultNaNF128UI0; + return uiZ; +} +#else +struct uint128 softfloat_commonNaNToF128UI( const struct commonNaN * ); +#endif + +/*---------------------------------------------------------------------------- +| Interpreting the unsigned integer formed from concatenating `uiA64' and +| `uiA0' as a 128-bit floating-point value, and likewise interpreting the +| unsigned integer formed from concatenating `uiB64' and `uiB0' as another +| 128-bit floating-point value, and assuming at least on of these floating- +| point values is a NaN, returns the bit pattern of the combined NaN result. +| If either original floating-point value is a signaling NaN, the invalid +| exception is raised. +*----------------------------------------------------------------------------*/ +struct uint128 + softfloat_propagateNaNF128UI( + uint_fast64_t uiA64, + uint_fast64_t uiA0, + uint_fast64_t uiB64, + uint_fast64_t uiB0 + ); + +#else + +/*---------------------------------------------------------------------------- +| The following functions are needed only when `SOFTFLOAT_FAST_INT64' is not +| defined. +*----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- +| Assuming the 80-bit extended floating-point value pointed to by `aSPtr' is +| a NaN, converts this NaN to the common NaN form, and stores the resulting +| common NaN at the location pointed to by `zPtr'. If the NaN is a signaling +| NaN, the invalid exception is raised. +*----------------------------------------------------------------------------*/ +#define softfloat_extF80MToCommonNaN( aSPtr, zPtr ) if ( ! ((aSPtr)->signif & UINT64_C( 0x4000000000000000 )) ) softfloat_raiseFlags( softfloat_flag_invalid ) + +/*---------------------------------------------------------------------------- +| Converts the common NaN pointed to by `aPtr' into an 80-bit extended +| floating-point NaN, and stores this NaN at the location pointed to by +| `zSPtr'. +*----------------------------------------------------------------------------*/ +#if defined INLINE && ! defined softfloat_commonNaNToExtF80M +INLINE +void + softfloat_commonNaNToExtF80M( + const struct commonNaN *aPtr, struct extFloat80M *zSPtr ) +{ + zSPtr->signExp = defaultNaNExtF80UI64; + zSPtr->signif = defaultNaNExtF80UI0; +} +#else +void + softfloat_commonNaNToExtF80M( + const struct commonNaN *aPtr, struct extFloat80M *zSPtr ); +#endif + +/*---------------------------------------------------------------------------- +| Assuming at least one of the two 80-bit extended floating-point values +| pointed to by `aSPtr' and `bSPtr' is a NaN, stores the combined NaN result +| at the location pointed to by `zSPtr'. If either original floating-point +| value is a signaling NaN, the invalid exception is raised. +*----------------------------------------------------------------------------*/ +void + softfloat_propagateNaNExtF80M( + const struct extFloat80M *aSPtr, + const struct extFloat80M *bSPtr, + struct extFloat80M *zSPtr + ); + +/*---------------------------------------------------------------------------- +| The bit pattern for a default generated 128-bit floating-point NaN. +*----------------------------------------------------------------------------*/ +#define defaultNaNF128UI96 0x7FFF8000 +#define defaultNaNF128UI64 0 +#define defaultNaNF128UI32 0 +#define defaultNaNF128UI0 0 + +/*---------------------------------------------------------------------------- +| Assuming the 128-bit floating-point value pointed to by `aWPtr' is a NaN, +| converts this NaN to the common NaN form, and stores the resulting common +| NaN at the location pointed to by `zPtr'. If the NaN is a signaling NaN, +| the invalid exception is raised. Argument `aWPtr' points to an array of +| four 32-bit elements that concatenate in the platform's normal endian order +| to form a 128-bit floating-point value. +*----------------------------------------------------------------------------*/ +#define softfloat_f128MToCommonNaN( aWPtr, zPtr ) if ( ! ((aWPtr)[indexWordHi( 4 )] & UINT64_C( 0x0000800000000000 )) ) softfloat_raiseFlags( softfloat_flag_invalid ) + +/*---------------------------------------------------------------------------- +| Converts the common NaN pointed to by `aPtr' into a 128-bit floating-point +| NaN, and stores this NaN at the location pointed to by `zWPtr'. Argument +| `zWPtr' points to an array of four 32-bit elements that concatenate in the +| platform's normal endian order to form a 128-bit floating-point value. +*----------------------------------------------------------------------------*/ +#if defined INLINE && ! defined softfloat_commonNaNToF128M +INLINE +void + softfloat_commonNaNToF128M( const struct commonNaN *aPtr, uint32_t *zWPtr ) +{ + zWPtr[indexWord( 4, 3 )] = defaultNaNF128UI96; + zWPtr[indexWord( 4, 2 )] = defaultNaNF128UI64; + zWPtr[indexWord( 4, 1 )] = defaultNaNF128UI32; + zWPtr[indexWord( 4, 0 )] = defaultNaNF128UI0; +} +#else +void + softfloat_commonNaNToF128M( const struct commonNaN *aPtr, uint32_t *zWPtr ); +#endif + +/*---------------------------------------------------------------------------- +| Assuming at least one of the two 128-bit floating-point values pointed to by +| `aWPtr' and `bWPtr' is a NaN, stores the combined NaN result at the location +| pointed to by `zWPtr'. If either original floating-point value is a +| signaling NaN, the invalid exception is raised. Each of `aWPtr', `bWPtr', +| and `zWPtr' points to an array of four 32-bit elements that concatenate in +| the platform's normal endian order to form a 128-bit floating-point value. +*----------------------------------------------------------------------------*/ +void + softfloat_propagateNaNF128M( + const uint32_t *aWPtr, const uint32_t *bWPtr, uint32_t *zWPtr ); + +#endif + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/CMakeLists.txt b/extern/riscv-softfloat-standalone/lib/CMakeLists.txt new file mode 100644 index 0000000..3dbe843 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/CMakeLists.txt @@ -0,0 +1,7 @@ +include_directories(${INC}) + +file(GLOB SRC + "*.c" +) + +add_library(softfloat ${SRC}) \ No newline at end of file diff --git a/extern/riscv-softfloat-standalone/lib/f128_add.c b/extern/riscv-softfloat-standalone/lib/f128_add.c new file mode 100644 index 0000000..6568ab6 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_add.c @@ -0,0 +1,78 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float128_t f128_add( float128_t a, float128_t b ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + bool signA; + union ui128_f128 uB; + uint_fast64_t uiB64, uiB0; + bool signB; +#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2) + float128_t + (*magsFuncPtr)( + uint_fast64_t, uint_fast64_t, uint_fast64_t, uint_fast64_t, bool ); +#endif + + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + signA = signF128UI64( uiA64 ); + uB.f = b; + uiB64 = uB.ui.v64; + uiB0 = uB.ui.v0; + signB = signF128UI64( uiB64 ); +#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) + if ( signA == signB ) { + return softfloat_addMagsF128( uiA64, uiA0, uiB64, uiB0, signA ); + } else { + return softfloat_subMagsF128( uiA64, uiA0, uiB64, uiB0, signA ); + } +#else + magsFuncPtr = + (signA == signB) ? softfloat_addMagsF128 : softfloat_subMagsF128; + return (*magsFuncPtr)( uiA64, uiA0, uiB64, uiB0, signA ); +#endif + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f128_classify.c b/extern/riscv-softfloat-standalone/lib/f128_classify.c new file mode 100755 index 0000000..1092a9b --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_classify.c @@ -0,0 +1,37 @@ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast16_t f128_classify( float128_t a ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + + uint_fast16_t infOrNaN = expF128UI64( uiA64 ) == 0x7FFF; + uint_fast16_t subnormalOrZero = expF128UI64( uiA64 ) == 0; + bool sign = signF128UI64( uiA64 ); + bool fracZero = fracF128UI64( uiA64 ) == 0 && uiA0 == 0; + bool isNaN = isNaNF128UI( uiA64, uiA0 ); + bool isSNaN = softfloat_isSigNaNF128UI( uiA64, uiA0 ); + + return + ( sign && infOrNaN && fracZero ) << 0 | + ( sign && !infOrNaN && !subnormalOrZero ) << 1 | + ( sign && subnormalOrZero && !fracZero ) << 2 | + ( sign && subnormalOrZero && fracZero ) << 3 | + ( !sign && infOrNaN && fracZero ) << 7 | + ( !sign && !infOrNaN && !subnormalOrZero ) << 6 | + ( !sign && subnormalOrZero && !fracZero ) << 5 | + ( !sign && subnormalOrZero && fracZero ) << 4 | + ( isNaN && isSNaN ) << 8 | + ( isNaN && !isSNaN ) << 9; +} + diff --git a/extern/riscv-softfloat-standalone/lib/f128_div.c b/extern/riscv-softfloat-standalone/lib/f128_div.c new file mode 100644 index 0000000..9384e75 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_div.c @@ -0,0 +1,199 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float128_t f128_div( float128_t a, float128_t b ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + bool signA; + int_fast32_t expA; + struct uint128 sigA; + union ui128_f128 uB; + uint_fast64_t uiB64, uiB0; + bool signB; + int_fast32_t expB; + struct uint128 sigB; + bool signZ; + struct exp32_sig128 normExpSig; + int_fast32_t expZ; + struct uint128 rem; + uint_fast32_t recip32; + int ix; + uint_fast64_t q64; + uint_fast32_t q; + struct uint128 term; + uint_fast32_t qs[3]; + uint_fast64_t sigZExtra; + struct uint128 sigZ, uiZ; + union ui128_f128 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + signA = signF128UI64( uiA64 ); + expA = expF128UI64( uiA64 ); + sigA.v64 = fracF128UI64( uiA64 ); + sigA.v0 = uiA0; + uB.f = b; + uiB64 = uB.ui.v64; + uiB0 = uB.ui.v0; + signB = signF128UI64( uiB64 ); + expB = expF128UI64( uiB64 ); + sigB.v64 = fracF128UI64( uiB64 ); + sigB.v0 = uiB0; + signZ = signA ^ signB; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( expA == 0x7FFF ) { + if ( sigA.v64 | sigA.v0 ) goto propagateNaN; + if ( expB == 0x7FFF ) { + if ( sigB.v64 | sigB.v0 ) goto propagateNaN; + goto invalid; + } + goto infinity; + } + if ( expB == 0x7FFF ) { + if ( sigB.v64 | sigB.v0 ) goto propagateNaN; + goto zero; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! expB ) { + if ( ! (sigB.v64 | sigB.v0) ) { + if ( ! (expA | sigA.v64 | sigA.v0) ) goto invalid; + softfloat_raiseFlags( softfloat_flag_infinite ); + goto infinity; + } + normExpSig = softfloat_normSubnormalF128Sig( sigB.v64, sigB.v0 ); + expB = normExpSig.exp; + sigB = normExpSig.sig; + } + if ( ! expA ) { + if ( ! (sigA.v64 | sigA.v0) ) goto zero; + normExpSig = softfloat_normSubnormalF128Sig( sigA.v64, sigA.v0 ); + expA = normExpSig.exp; + sigA = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expZ = expA - expB + 0x3FFE; + sigA.v64 |= UINT64_C( 0x0001000000000000 ); + sigB.v64 |= UINT64_C( 0x0001000000000000 ); + rem = sigA; + if ( softfloat_lt128( sigA.v64, sigA.v0, sigB.v64, sigB.v0 ) ) { + --expZ; + rem = softfloat_add128( sigA.v64, sigA.v0, sigA.v64, sigA.v0 ); + } + recip32 = softfloat_approxRecip32_1( sigB.v64>>17 ); + ix = 3; + for (;;) { + q64 = (uint_fast64_t) (uint32_t) (rem.v64>>19) * recip32; + q = (q64 + 0x80000000)>>32; + --ix; + if ( ix < 0 ) break; + rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 ); + term = softfloat_mul128By32( sigB.v64, sigB.v0, q ); + rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 ); + if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) { + --q; + rem = softfloat_add128( rem.v64, rem.v0, sigB.v64, sigB.v0 ); + } + qs[ix] = q; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ((q + 1) & 7) < 2 ) { + rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 ); + term = softfloat_mul128By32( sigB.v64, sigB.v0, q ); + rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 ); + if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) { + --q; + rem = softfloat_add128( rem.v64, rem.v0, sigB.v64, sigB.v0 ); + } else if ( softfloat_le128( sigB.v64, sigB.v0, rem.v64, rem.v0 ) ) { + ++q; + rem = softfloat_sub128( rem.v64, rem.v0, sigB.v64, sigB.v0 ); + } + if ( rem.v64 | rem.v0 ) q |= 1; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sigZExtra = (uint64_t) ((uint_fast64_t) q<<60); + term = softfloat_shortShiftLeft128( 0, qs[1], 54 ); + sigZ = + softfloat_add128( + (uint_fast64_t) qs[2]<<19, ((uint_fast64_t) qs[0]<<25) + (q>>4), + term.v64, term.v0 + ); + return + softfloat_roundPackToF128( signZ, expZ, sigZ.v64, sigZ.v0, sigZExtra ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + propagateNaN: + uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, uiB64, uiB0 ); + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + uiZ.v64 = defaultNaNF128UI64; + uiZ.v0 = defaultNaNF128UI0; + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + infinity: + uiZ.v64 = packToF128UI64( signZ, 0x7FFF, 0 ); + goto uiZ0; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + zero: + uiZ.v64 = packToF128UI64( signZ, 0, 0 ); + uiZ0: + uiZ.v0 = 0; + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f128_eq.c b/extern/riscv-softfloat-standalone/lib/f128_eq.c new file mode 100644 index 0000000..a0e1ad2 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_eq.c @@ -0,0 +1,73 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +bool f128_eq( float128_t a, float128_t b ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + union ui128_f128 uB; + uint_fast64_t uiB64, uiB0; + + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + uB.f = b; + uiB64 = uB.ui.v64; + uiB0 = uB.ui.v0; + if ( isNaNF128UI( uiA64, uiA0 ) || isNaNF128UI( uiB64, uiB0 ) ) { + if ( + softfloat_isSigNaNF128UI( uiA64, uiA0 ) + || softfloat_isSigNaNF128UI( uiB64, uiB0 ) + ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + } + return false; + } + return + (uiA0 == uiB0) + && ( (uiA64 == uiB64) + || (! uiA0 && ! ((uiA64 | uiB64) & UINT64_C( 0x7FFFFFFFFFFFFFFF ))) + ); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f128_eq_signaling.c b/extern/riscv-softfloat-standalone/lib/f128_eq_signaling.c new file mode 100644 index 0000000..bd37b97 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_eq_signaling.c @@ -0,0 +1,67 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +bool f128_eq_signaling( float128_t a, float128_t b ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + union ui128_f128 uB; + uint_fast64_t uiB64, uiB0; + + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + uB.f = b; + uiB64 = uB.ui.v64; + uiB0 = uB.ui.v0; + if ( isNaNF128UI( uiA64, uiA0 ) || isNaNF128UI( uiB64, uiB0 ) ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return false; + } + return + (uiA0 == uiB0) + && ( (uiA64 == uiB64) + || (! uiA0 && ! ((uiA64 | uiB64) & UINT64_C( 0x7FFFFFFFFFFFFFFF ))) + ); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f128_isSignalingNaN.c b/extern/riscv-softfloat-standalone/lib/f128_isSignalingNaN.c new file mode 100644 index 0000000..fced58e --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_isSignalingNaN.c @@ -0,0 +1,51 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +bool f128_isSignalingNaN( float128_t a ) +{ + union ui128_f128 uA; + + uA.f = a; + return softfloat_isSigNaNF128UI( uA.ui.v64, uA.ui.v0 ); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f128_le.c b/extern/riscv-softfloat-standalone/lib/f128_le.c new file mode 100644 index 0000000..9b0aa23 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_le.c @@ -0,0 +1,72 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +bool f128_le( float128_t a, float128_t b ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + union ui128_f128 uB; + uint_fast64_t uiB64, uiB0; + bool signA, signB; + + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + uB.f = b; + uiB64 = uB.ui.v64; + uiB0 = uB.ui.v0; + if ( isNaNF128UI( uiA64, uiA0 ) || isNaNF128UI( uiB64, uiB0 ) ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return false; + } + signA = signF128UI64( uiA64 ); + signB = signF128UI64( uiB64 ); + return + (signA != signB) + ? signA + || ! (((uiA64 | uiB64) & UINT64_C( 0x7FFFFFFFFFFFFFFF )) + | uiA0 | uiB0) + : ((uiA64 == uiB64) && (uiA0 == uiB0)) + || (signA ^ softfloat_lt128( uiA64, uiA0, uiB64, uiB0 )); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f128_le_quiet.c b/extern/riscv-softfloat-standalone/lib/f128_le_quiet.c new file mode 100644 index 0000000..3b44038 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_le_quiet.c @@ -0,0 +1,78 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +bool f128_le_quiet( float128_t a, float128_t b ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + union ui128_f128 uB; + uint_fast64_t uiB64, uiB0; + bool signA, signB; + + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + uB.f = b; + uiB64 = uB.ui.v64; + uiB0 = uB.ui.v0; + if ( isNaNF128UI( uiA64, uiA0 ) || isNaNF128UI( uiB64, uiB0 ) ) { + if ( + softfloat_isSigNaNF128UI( uiA64, uiA0 ) + || softfloat_isSigNaNF128UI( uiB64, uiB0 ) + ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + } + return false; + } + signA = signF128UI64( uiA64 ); + signB = signF128UI64( uiB64 ); + return + (signA != signB) + ? signA + || ! (((uiA64 | uiB64) & UINT64_C( 0x7FFFFFFFFFFFFFFF )) + | uiA0 | uiB0) + : ((uiA64 == uiB64) && (uiA0 == uiB0)) + || (signA ^ softfloat_lt128( uiA64, uiA0, uiB64, uiB0 )); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f128_lt.c b/extern/riscv-softfloat-standalone/lib/f128_lt.c new file mode 100644 index 0000000..a28f95b --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_lt.c @@ -0,0 +1,72 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +bool f128_lt( float128_t a, float128_t b ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + union ui128_f128 uB; + uint_fast64_t uiB64, uiB0; + bool signA, signB; + + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + uB.f = b; + uiB64 = uB.ui.v64; + uiB0 = uB.ui.v0; + if ( isNaNF128UI( uiA64, uiA0 ) || isNaNF128UI( uiB64, uiB0 ) ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return false; + } + signA = signF128UI64( uiA64 ); + signB = signF128UI64( uiB64 ); + return + (signA != signB) + ? signA + && (((uiA64 | uiB64) & UINT64_C( 0x7FFFFFFFFFFFFFFF )) + | uiA0 | uiB0) + : ((uiA64 != uiB64) || (uiA0 != uiB0)) + && (signA ^ softfloat_lt128( uiA64, uiA0, uiB64, uiB0 )); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f128_lt_quiet.c b/extern/riscv-softfloat-standalone/lib/f128_lt_quiet.c new file mode 100644 index 0000000..20146ee --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_lt_quiet.c @@ -0,0 +1,78 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +bool f128_lt_quiet( float128_t a, float128_t b ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + union ui128_f128 uB; + uint_fast64_t uiB64, uiB0; + bool signA, signB; + + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + uB.f = b; + uiB64 = uB.ui.v64; + uiB0 = uB.ui.v0; + if ( isNaNF128UI( uiA64, uiA0 ) || isNaNF128UI( uiB64, uiB0 ) ) { + if ( + softfloat_isSigNaNF128UI( uiA64, uiA0 ) + || softfloat_isSigNaNF128UI( uiB64, uiB0 ) + ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + } + return false; + } + signA = signF128UI64( uiA64 ); + signB = signF128UI64( uiB64 ); + return + (signA != signB) + ? signA + && (((uiA64 | uiB64) & UINT64_C( 0x7FFFFFFFFFFFFFFF )) + | uiA0 | uiB0) + : ((uiA64 != uiB64) || (uiA0 != uiB0)) + && (signA ^ softfloat_lt128( uiA64, uiA0, uiB64, uiB0 )); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f128_mul.c b/extern/riscv-softfloat-standalone/lib/f128_mul.c new file mode 100644 index 0000000..1871613 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_mul.c @@ -0,0 +1,163 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float128_t f128_mul( float128_t a, float128_t b ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + bool signA; + int_fast32_t expA; + struct uint128 sigA; + union ui128_f128 uB; + uint_fast64_t uiB64, uiB0; + bool signB; + int_fast32_t expB; + struct uint128 sigB; + bool signZ; + uint_fast64_t magBits; + struct exp32_sig128 normExpSig; + int_fast32_t expZ; + uint64_t sig256Z[4]; + uint_fast64_t sigZExtra; + struct uint128 sigZ; + struct uint128_extra sig128Extra; + struct uint128 uiZ; + union ui128_f128 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + signA = signF128UI64( uiA64 ); + expA = expF128UI64( uiA64 ); + sigA.v64 = fracF128UI64( uiA64 ); + sigA.v0 = uiA0; + uB.f = b; + uiB64 = uB.ui.v64; + uiB0 = uB.ui.v0; + signB = signF128UI64( uiB64 ); + expB = expF128UI64( uiB64 ); + sigB.v64 = fracF128UI64( uiB64 ); + sigB.v0 = uiB0; + signZ = signA ^ signB; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( expA == 0x7FFF ) { + if ( + (sigA.v64 | sigA.v0) || ((expB == 0x7FFF) && (sigB.v64 | sigB.v0)) + ) { + goto propagateNaN; + } + magBits = expB | sigB.v64 | sigB.v0; + goto infArg; + } + if ( expB == 0x7FFF ) { + if ( sigB.v64 | sigB.v0 ) goto propagateNaN; + magBits = expA | sigA.v64 | sigA.v0; + goto infArg; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! expA ) { + if ( ! (sigA.v64 | sigA.v0) ) goto zero; + normExpSig = softfloat_normSubnormalF128Sig( sigA.v64, sigA.v0 ); + expA = normExpSig.exp; + sigA = normExpSig.sig; + } + if ( ! expB ) { + if ( ! (sigB.v64 | sigB.v0) ) goto zero; + normExpSig = softfloat_normSubnormalF128Sig( sigB.v64, sigB.v0 ); + expB = normExpSig.exp; + sigB = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expZ = expA + expB - 0x4000; + sigA.v64 |= UINT64_C( 0x0001000000000000 ); + sigB = softfloat_shortShiftLeft128( sigB.v64, sigB.v0, 16 ); + softfloat_mul128To256M( sigA.v64, sigA.v0, sigB.v64, sigB.v0, sig256Z ); + sigZExtra = sig256Z[indexWord( 4, 1 )] | (sig256Z[indexWord( 4, 0 )] != 0); + sigZ = + softfloat_add128( + sig256Z[indexWord( 4, 3 )], sig256Z[indexWord( 4, 2 )], + sigA.v64, sigA.v0 + ); + if ( UINT64_C( 0x0002000000000000 ) <= sigZ.v64 ) { + ++expZ; + sig128Extra = + softfloat_shortShiftRightJam128Extra( + sigZ.v64, sigZ.v0, sigZExtra, 1 ); + sigZ = sig128Extra.v; + sigZExtra = sig128Extra.extra; + } + return + softfloat_roundPackToF128( signZ, expZ, sigZ.v64, sigZ.v0, sigZExtra ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + propagateNaN: + uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, uiB64, uiB0 ); + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + infArg: + if ( ! magBits ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + uiZ.v64 = defaultNaNF128UI64; + uiZ.v0 = defaultNaNF128UI0; + goto uiZ; + } + uiZ.v64 = packToF128UI64( signZ, 0x7FFF, 0 ); + goto uiZ0; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + zero: + uiZ.v64 = packToF128UI64( signZ, 0, 0 ); + uiZ0: + uiZ.v0 = 0; + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f128_mulAdd.c b/extern/riscv-softfloat-standalone/lib/f128_mulAdd.c new file mode 100644 index 0000000..b2e2142 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_mulAdd.c @@ -0,0 +1,63 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float128_t f128_mulAdd( float128_t a, float128_t b, float128_t c ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + union ui128_f128 uB; + uint_fast64_t uiB64, uiB0; + union ui128_f128 uC; + uint_fast64_t uiC64, uiC0; + + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + uB.f = b; + uiB64 = uB.ui.v64; + uiB0 = uB.ui.v0; + uC.f = c; + uiC64 = uC.ui.v64; + uiC0 = uC.ui.v0; + return softfloat_mulAddF128( uiA64, uiA0, uiB64, uiB0, uiC64, uiC0, 0 ); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f128_rem.c b/extern/riscv-softfloat-standalone/lib/f128_rem.c new file mode 100644 index 0000000..555d71e --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_rem.c @@ -0,0 +1,190 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float128_t f128_rem( float128_t a, float128_t b ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + bool signA; + int_fast32_t expA; + struct uint128 sigA; + union ui128_f128 uB; + uint_fast64_t uiB64, uiB0; + int_fast32_t expB; + struct uint128 sigB; + struct exp32_sig128 normExpSig; + struct uint128 rem; + int_fast32_t expDiff; + uint_fast32_t q, recip32; + uint_fast64_t q64; + struct uint128 term, altRem, meanRem; + bool signRem; + struct uint128 uiZ; + union ui128_f128 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + signA = signF128UI64( uiA64 ); + expA = expF128UI64( uiA64 ); + sigA.v64 = fracF128UI64( uiA64 ); + sigA.v0 = uiA0; + uB.f = b; + uiB64 = uB.ui.v64; + uiB0 = uB.ui.v0; + expB = expF128UI64( uiB64 ); + sigB.v64 = fracF128UI64( uiB64 ); + sigB.v0 = uiB0; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( expA == 0x7FFF ) { + if ( + (sigA.v64 | sigA.v0) || ((expB == 0x7FFF) && (sigB.v64 | sigB.v0)) + ) { + goto propagateNaN; + } + goto invalid; + } + if ( expB == 0x7FFF ) { + if ( sigB.v64 | sigB.v0 ) goto propagateNaN; + return a; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! expB ) { + if ( ! (sigB.v64 | sigB.v0) ) goto invalid; + normExpSig = softfloat_normSubnormalF128Sig( sigB.v64, sigB.v0 ); + expB = normExpSig.exp; + sigB = normExpSig.sig; + } + if ( ! expA ) { + if ( ! (sigA.v64 | sigA.v0) ) return a; + normExpSig = softfloat_normSubnormalF128Sig( sigA.v64, sigA.v0 ); + expA = normExpSig.exp; + sigA = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sigA.v64 |= UINT64_C( 0x0001000000000000 ); + sigB.v64 |= UINT64_C( 0x0001000000000000 ); + rem = sigA; + expDiff = expA - expB; + if ( expDiff < 1 ) { + if ( expDiff < -1 ) return a; + if ( expDiff ) { + --expB; + sigB = softfloat_add128( sigB.v64, sigB.v0, sigB.v64, sigB.v0 ); + q = 0; + } else { + q = softfloat_le128( sigB.v64, sigB.v0, rem.v64, rem.v0 ); + if ( q ) { + rem = softfloat_sub128( rem.v64, rem.v0, sigB.v64, sigB.v0 ); + } + } + } else { + recip32 = softfloat_approxRecip32_1( sigB.v64>>17 ); + expDiff -= 30; + for (;;) { + q64 = (uint_fast64_t) (uint32_t) (rem.v64>>19) * recip32; + if ( expDiff < 0 ) break; + q = (q64 + 0x80000000)>>32; + rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 ); + term = softfloat_mul128By32( sigB.v64, sigB.v0, q ); + rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 ); + if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) { + rem = softfloat_add128( rem.v64, rem.v0, sigB.v64, sigB.v0 ); + } + expDiff -= 29; + } + /*-------------------------------------------------------------------- + | (`expDiff' cannot be less than -29 here.) + *--------------------------------------------------------------------*/ + q = (uint32_t) (q64>>32)>>(~expDiff & 31); + rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, expDiff + 30 ); + term = softfloat_mul128By32( sigB.v64, sigB.v0, q ); + rem = softfloat_sub128( rem.v64, rem.v0, term.v64, term.v0 ); + if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) { + altRem = softfloat_add128( rem.v64, rem.v0, sigB.v64, sigB.v0 ); + goto selectRem; + } + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + do { + altRem = rem; + ++q; + rem = softfloat_sub128( rem.v64, rem.v0, sigB.v64, sigB.v0 ); + } while ( ! (rem.v64 & UINT64_C( 0x8000000000000000 )) ); + selectRem: + meanRem = softfloat_add128( rem.v64, rem.v0, altRem.v64, altRem.v0 ); + if ( + (meanRem.v64 & UINT64_C( 0x8000000000000000 )) + || (! (meanRem.v64 | meanRem.v0) && (q & 1)) + ) { + rem = altRem; + } + signRem = signA; + if ( rem.v64 & UINT64_C( 0x8000000000000000 ) ) { + signRem = ! signRem; + rem = softfloat_sub128( 0, 0, rem.v64, rem.v0 ); + } + return softfloat_normRoundPackToF128( signRem, expB - 1, rem.v64, rem.v0 ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + propagateNaN: + uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, uiB64, uiB0 ); + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + uiZ.v64 = defaultNaNF128UI64; + uiZ.v0 = defaultNaNF128UI0; + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f128_roundToInt.c b/extern/riscv-softfloat-standalone/lib/f128_roundToInt.c new file mode 100644 index 0000000..0f1f07e --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_roundToInt.c @@ -0,0 +1,160 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float128_t + f128_roundToInt( float128_t a, uint_fast8_t roundingMode, bool exact ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + int_fast32_t exp; + struct uint128 uiZ; + uint_fast64_t lastBitMask, roundBitsMask; + bool roundNearEven; + union ui128_f128 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + exp = expF128UI64( uiA64 ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( 0x402F <= exp ) { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( 0x406F <= exp ) { + if ( (exp == 0x7FFF) && (fracF128UI64( uiA64 ) | uiA0) ) { + uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, 0, 0 ); + goto uiZ; + } + return a; + } + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + lastBitMask = (uint_fast64_t) 2<<(0x406E - exp); + roundBitsMask = lastBitMask - 1; + uiZ.v64 = uiA64; + uiZ.v0 = uiA0; + roundNearEven = (roundingMode == softfloat_round_near_even); + if ( roundNearEven || (roundingMode == softfloat_round_near_maxMag) ) { + if ( exp == 0x402F ) { + if ( UINT64_C( 0x8000000000000000 ) <= uiZ.v0 ) { + ++uiZ.v64; + if ( + roundNearEven + && (uiZ.v0 == UINT64_C( 0x8000000000000000 )) + ) { + uiZ.v64 &= ~1; + } + } + } else { + uiZ = softfloat_add128( uiZ.v64, uiZ.v0, 0, lastBitMask>>1 ); + if ( roundNearEven && ! (uiZ.v0 & roundBitsMask) ) { + uiZ.v0 &= ~lastBitMask; + } + } + } else if ( + roundingMode + == (signF128UI64( uiZ.v64 ) ? softfloat_round_min + : softfloat_round_max) + ) { + uiZ = softfloat_add128( uiZ.v64, uiZ.v0, 0, roundBitsMask ); + } + uiZ.v0 &= ~roundBitsMask; + } else { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( exp < 0x3FFF ) { + if ( ! ((uiA64 & UINT64_C( 0x7FFFFFFFFFFFFFFF )) | uiA0) ) { + return a; + } + if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact; + uiZ.v64 = uiA64 & packToF128UI64( 1, 0, 0 ); + uiZ.v0 = 0; + switch ( roundingMode ) { + case softfloat_round_near_even: + if ( ! (fracF128UI64( uiA64 ) | uiA0) ) break; + case softfloat_round_near_maxMag: + if ( exp == 0x3FFE ) uiZ.v64 |= packToF128UI64( 0, 0x3FFF, 0 ); + break; + case softfloat_round_min: + if ( uiZ.v64 ) uiZ.v64 = packToF128UI64( 1, 0x3FFF, 0 ); + break; + case softfloat_round_max: + if ( ! uiZ.v64 ) uiZ.v64 = packToF128UI64( 0, 0x3FFF, 0 ); + break; + } + goto uiZ; + } + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + uiZ.v64 = uiA64; + uiZ.v0 = 0; + lastBitMask = (uint_fast64_t) 1<<(0x402F - exp); + roundBitsMask = lastBitMask - 1; + if ( roundingMode == softfloat_round_near_maxMag ) { + uiZ.v64 += lastBitMask>>1; + } else if ( roundingMode == softfloat_round_near_even ) { + uiZ.v64 += lastBitMask>>1; + if ( ! ((uiZ.v64 & roundBitsMask) | uiA0) ) { + uiZ.v64 &= ~lastBitMask; + } + } else if ( + roundingMode + == (signF128UI64( uiZ.v64 ) ? softfloat_round_min + : softfloat_round_max) + ) { + uiZ.v64 = (uiZ.v64 | (uiA0 != 0)) + roundBitsMask; + } + uiZ.v64 &= ~roundBitsMask; + } + if ( exact && ((uiZ.v64 != uiA64) || (uiZ.v0 != uiA0)) ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f128_sqrt.c b/extern/riscv-softfloat-standalone/lib/f128_sqrt.c new file mode 100644 index 0000000..5b99694 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_sqrt.c @@ -0,0 +1,201 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float128_t f128_sqrt( float128_t a ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + bool signA; + int_fast32_t expA; + struct uint128 sigA, uiZ; + struct exp32_sig128 normExpSig; + int_fast32_t expZ; + uint_fast32_t sig32A, recipSqrt32, sig32Z; + struct uint128 rem; + uint32_t qs[3]; + uint_fast32_t q; + uint_fast64_t x64, sig64Z; + struct uint128 y, term; + uint_fast64_t sigZExtra; + struct uint128 sigZ; + union ui128_f128 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + signA = signF128UI64( uiA64 ); + expA = expF128UI64( uiA64 ); + sigA.v64 = fracF128UI64( uiA64 ); + sigA.v0 = uiA0; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( expA == 0x7FFF ) { + if ( sigA.v64 | sigA.v0 ) { + uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, 0, 0 ); + goto uiZ; + } + if ( ! signA ) return a; + goto invalid; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( signA ) { + if ( ! (expA | sigA.v64 | sigA.v0) ) return a; + goto invalid; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! expA ) { + if ( ! (sigA.v64 | sigA.v0) ) return a; + normExpSig = softfloat_normSubnormalF128Sig( sigA.v64, sigA.v0 ); + expA = normExpSig.exp; + sigA = normExpSig.sig; + } + /*------------------------------------------------------------------------ + | (`sig32Z' is guaranteed to be a lower bound on the square root of + | `sig32A', which makes `sig32Z' also a lower bound on the square root of + | `sigA'.) + *------------------------------------------------------------------------*/ + expZ = ((expA - 0x3FFF)>>1) + 0x3FFE; + expA &= 1; + sigA.v64 |= UINT64_C( 0x0001000000000000 ); + sig32A = sigA.v64>>17; + recipSqrt32 = softfloat_approxRecipSqrt32_1( expA, sig32A ); + sig32Z = ((uint_fast64_t) sig32A * recipSqrt32)>>32; + if ( expA ) { + sig32Z >>= 1; + rem = softfloat_shortShiftLeft128( sigA.v64, sigA.v0, 12 ); + } else { + rem = softfloat_shortShiftLeft128( sigA.v64, sigA.v0, 13 ); + } + qs[2] = sig32Z; + rem.v64 -= (uint_fast64_t) sig32Z * sig32Z; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + q = ((uint32_t) (rem.v64>>2) * (uint_fast64_t) recipSqrt32)>>32; + x64 = (uint_fast64_t) sig32Z<<32; + sig64Z = x64 + ((uint_fast64_t) q<<3); + y = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 ); + /*------------------------------------------------------------------------ + | (Repeating this loop is a rare occurrence.) + *------------------------------------------------------------------------*/ + for (;;) { + term = softfloat_mul64ByShifted32To128( x64 + sig64Z, q ); + rem = softfloat_sub128( y.v64, y.v0, term.v64, term.v0 ); + if ( ! (rem.v64 & UINT64_C( 0x8000000000000000 )) ) break; + --q; + sig64Z -= 1<<3; + } + qs[1] = q; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + q = ((rem.v64>>2) * recipSqrt32)>>32; + y = softfloat_shortShiftLeft128( rem.v64, rem.v0, 29 ); + sig64Z <<= 1; + /*------------------------------------------------------------------------ + | (Repeating this loop is a rare occurrence.) + *------------------------------------------------------------------------*/ + for (;;) { + term = softfloat_shortShiftLeft128( 0, sig64Z, 32 ); + term = softfloat_add128( term.v64, term.v0, 0, (uint_fast64_t) q<<6 ); + term = softfloat_mul128By32( term.v64, term.v0, q ); + rem = softfloat_sub128( y.v64, y.v0, term.v64, term.v0 ); + if ( ! (rem.v64 & UINT64_C( 0x8000000000000000 )) ) break; + --q; + } + qs[0] = q; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + q = (((rem.v64>>2) * recipSqrt32)>>32) + 2; + sigZExtra = (uint64_t) ((uint_fast64_t) q<<59); + term = softfloat_shortShiftLeft128( 0, qs[1], 53 ); + sigZ = + softfloat_add128( + (uint_fast64_t) qs[2]<<18, ((uint_fast64_t) qs[0]<<24) + (q>>5), + term.v64, term.v0 + ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( (q & 0xF) <= 2 ) { + q &= ~3; + sigZExtra = (uint64_t) ((uint_fast64_t) q<<59); + y = softfloat_shortShiftLeft128( sigZ.v64, sigZ.v0, 6 ); + y.v0 |= sigZExtra>>58; + term = softfloat_sub128( y.v64, y.v0, 0, q ); + y = softfloat_mul64ByShifted32To128( term.v0, q ); + term = softfloat_mul64ByShifted32To128( term.v64, q ); + term = softfloat_add128( term.v64, term.v0, 0, y.v64 ); + rem = softfloat_shortShiftLeft128( rem.v64, rem.v0, 20 ); + term = softfloat_sub128( term.v64, term.v0, rem.v64, rem.v0 ); + /*-------------------------------------------------------------------- + | The concatenation of `term' and `y.v0' is now the negative remainder + | (3 words altogether). + *--------------------------------------------------------------------*/ + if ( term.v64 & UINT64_C( 0x8000000000000000 ) ) { + sigZExtra |= 1; + } else { + if ( term.v64 | term.v0 | y.v0 ) { + if ( sigZExtra ) { + --sigZExtra; + } else { + sigZ = softfloat_sub128( sigZ.v64, sigZ.v0, 0, 1 ); + sigZExtra = ~0; + } + } + } + } + return softfloat_roundPackToF128( 0, expZ, sigZ.v64, sigZ.v0, sigZExtra ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + uiZ.v64 = defaultNaNF128UI64; + uiZ.v0 = defaultNaNF128UI0; + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f128_sub.c b/extern/riscv-softfloat-standalone/lib/f128_sub.c new file mode 100644 index 0000000..ce2e5ad --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_sub.c @@ -0,0 +1,78 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float128_t f128_sub( float128_t a, float128_t b ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + bool signA; + union ui128_f128 uB; + uint_fast64_t uiB64, uiB0; + bool signB; +#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2) + float128_t + (*magsFuncPtr)( + uint_fast64_t, uint_fast64_t, uint_fast64_t, uint_fast64_t, bool ); +#endif + + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + signA = signF128UI64( uiA64 ); + uB.f = b; + uiB64 = uB.ui.v64; + uiB0 = uB.ui.v0; + signB = signF128UI64( uiB64 ); +#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) + if ( signA == signB ) { + return softfloat_subMagsF128( uiA64, uiA0, uiB64, uiB0, signA ); + } else { + return softfloat_addMagsF128( uiA64, uiA0, uiB64, uiB0, signA ); + } +#else + magsFuncPtr = + (signA == signB) ? softfloat_subMagsF128 : softfloat_addMagsF128; + return (*magsFuncPtr)( uiA64, uiA0, uiB64, uiB0, signA ); +#endif + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f128_to_f16.c b/extern/riscv-softfloat-standalone/lib/f128_to_f16.c new file mode 100644 index 0000000..a910c12 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_to_f16.c @@ -0,0 +1,95 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float16_t f128_to_f16( float128_t a ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + bool sign; + int_fast32_t exp; + uint_fast64_t frac64; + struct commonNaN commonNaN; + uint_fast16_t uiZ, frac16; + union ui16_f16 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + sign = signF128UI64( uiA64 ); + exp = expF128UI64( uiA64 ); + frac64 = fracF128UI64( uiA64 ) | (uiA0 != 0); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp == 0x7FFF ) { + if ( frac64 ) { + softfloat_f128UIToCommonNaN( uiA64, uiA0, &commonNaN ); + uiZ = softfloat_commonNaNToF16UI( &commonNaN ); + } else { + uiZ = packToF16UI( sign, 0x1F, 0 ); + } + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + frac16 = softfloat_shortShiftRightJam64( frac64, 34 ); + if ( ! (exp | frac16) ) { + uiZ = packToF16UI( sign, 0, 0 ); + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + exp -= 0x3FF1; + if ( sizeof (int_fast16_t) < sizeof (int_fast32_t) ) { + if ( exp < -0x40 ) exp = -0x40; + } + return softfloat_roundPackToF16( sign, exp, frac16 | 0x4000 ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f128_to_f32.c b/extern/riscv-softfloat-standalone/lib/f128_to_f32.c new file mode 100644 index 0000000..d890d3e --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_to_f32.c @@ -0,0 +1,95 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float32_t f128_to_f32( float128_t a ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + bool sign; + int_fast32_t exp; + uint_fast64_t frac64; + struct commonNaN commonNaN; + uint_fast32_t uiZ, frac32; + union ui32_f32 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + sign = signF128UI64( uiA64 ); + exp = expF128UI64( uiA64 ); + frac64 = fracF128UI64( uiA64 ) | (uiA0 != 0); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp == 0x7FFF ) { + if ( frac64 ) { + softfloat_f128UIToCommonNaN( uiA64, uiA0, &commonNaN ); + uiZ = softfloat_commonNaNToF32UI( &commonNaN ); + } else { + uiZ = packToF32UI( sign, 0xFF, 0 ); + } + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + frac32 = softfloat_shortShiftRightJam64( frac64, 18 ); + if ( ! (exp | frac32) ) { + uiZ = packToF32UI( sign, 0, 0 ); + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + exp -= 0x3F81; + if ( sizeof (int_fast16_t) < sizeof (int_fast32_t) ) { + if ( exp < -0x1000 ) exp = -0x1000; + } + return softfloat_roundPackToF32( sign, exp, frac32 | 0x40000000 ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f128_to_f64.c b/extern/riscv-softfloat-standalone/lib/f128_to_f64.c new file mode 100644 index 0000000..e7aec20 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_to_f64.c @@ -0,0 +1,100 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float64_t f128_to_f64( float128_t a ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + bool sign; + int_fast32_t exp; + uint_fast64_t frac64, frac0; + struct commonNaN commonNaN; + uint_fast64_t uiZ; + struct uint128 frac128; + union ui64_f64 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + sign = signF128UI64( uiA64 ); + exp = expF128UI64( uiA64 ); + frac64 = fracF128UI64( uiA64 ); + frac0 = uiA0; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp == 0x7FFF ) { + if ( frac64 | frac0 ) { + softfloat_f128UIToCommonNaN( uiA64, uiA0, &commonNaN ); + uiZ = softfloat_commonNaNToF64UI( &commonNaN ); + } else { + uiZ = packToF64UI( sign, 0x7FF, 0 ); + } + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + frac128 = softfloat_shortShiftLeft128( frac64, frac0, 14 ); + frac64 = frac128.v64 | (frac128.v0 != 0); + if ( ! (exp | frac64) ) { + uiZ = packToF64UI( sign, 0, 0 ); + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + exp -= 0x3C01; + if ( sizeof (int_fast16_t) < sizeof (int_fast32_t) ) { + if ( exp < -0x1000 ) exp = -0x1000; + } + return + softfloat_roundPackToF64( + sign, exp, frac64 | UINT64_C( 0x4000000000000000 ) ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f128_to_i32.c b/extern/riscv-softfloat-standalone/lib/f128_to_i32.c new file mode 100644 index 0000000..507691c --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_to_i32.c @@ -0,0 +1,85 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +int_fast32_t f128_to_i32( float128_t a, uint_fast8_t roundingMode, bool exact ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + bool sign; + int_fast32_t exp; + uint_fast64_t sig64, sig0; + int_fast32_t shiftDist; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + sign = signF128UI64( uiA64 ); + exp = expF128UI64( uiA64 ); + sig64 = fracF128UI64( uiA64 ); + sig0 = uiA0; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ +#if (i32_fromNaN != i32_fromPosOverflow) || (i32_fromNaN != i32_fromNegOverflow) + if ( (exp == 0x7FFF) && (sig64 | sig0) ) { +#if (i32_fromNaN == i32_fromPosOverflow) + sign = 0; +#elif (i32_fromNaN == i32_fromNegOverflow) + sign = 1; +#else + softfloat_raiseFlags( softfloat_flag_invalid ); + return i32_fromNaN; +#endif + } +#endif + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp ) sig64 |= UINT64_C( 0x0001000000000000 ); + sig64 |= (sig0 != 0); + shiftDist = 0x4023 - exp; + if ( 0 < shiftDist ) sig64 = softfloat_shiftRightJam64( sig64, shiftDist ); + return softfloat_roundToI32( sign, sig64, roundingMode, exact ); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f128_to_i32_r_minMag.c b/extern/riscv-softfloat-standalone/lib/f128_to_i32_r_minMag.c new file mode 100644 index 0000000..fc9f84f --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_to_i32_r_minMag.c @@ -0,0 +1,100 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +int_fast32_t f128_to_i32_r_minMag( float128_t a, bool exact ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + int_fast32_t exp; + uint_fast64_t sig64; + int_fast32_t shiftDist; + bool sign; + int_fast32_t absZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + exp = expF128UI64( uiA64 ); + sig64 = fracF128UI64( uiA64 ) | (uiA0 != 0); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + shiftDist = 0x402F - exp; + if ( 49 <= shiftDist ) { + if ( exact && (exp | sig64) ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return 0; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sign = signF128UI64( uiA64 ); + if ( shiftDist < 18 ) { + if ( + sign && (shiftDist == 17) + && (sig64 < UINT64_C( 0x0000000000020000 )) + ) { + if ( exact && sig64 ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return -0x7FFFFFFF - 1; + } + softfloat_raiseFlags( softfloat_flag_invalid ); + return + (exp == 0x7FFF) && sig64 ? i32_fromNaN + : sign ? i32_fromNegOverflow : i32_fromPosOverflow; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sig64 |= UINT64_C( 0x0001000000000000 ); + absZ = sig64>>shiftDist; + if ( + exact && ((uint_fast64_t) (uint_fast32_t) absZ< +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +int_fast64_t f128_to_i64( float128_t a, uint_fast8_t roundingMode, bool exact ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + bool sign; + int_fast32_t exp; + uint_fast64_t sig64, sig0; + int_fast32_t shiftDist; + struct uint128 sig128; + struct uint64_extra sigExtra; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + sign = signF128UI64( uiA64 ); + exp = expF128UI64( uiA64 ); + sig64 = fracF128UI64( uiA64 ); + sig0 = uiA0; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + shiftDist = 0x402F - exp; + if ( shiftDist <= 0 ) { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( shiftDist < -15 ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return + (exp == 0x7FFF) && (sig64 | sig0) ? i64_fromNaN + : sign ? i64_fromNegOverflow : i64_fromPosOverflow; + } + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + sig64 |= UINT64_C( 0x0001000000000000 ); + if ( shiftDist ) { + sig128 = softfloat_shortShiftLeft128( sig64, sig0, -shiftDist ); + sig64 = sig128.v64; + sig0 = sig128.v0; + } + } else { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( exp ) sig64 |= UINT64_C( 0x0001000000000000 ); + sigExtra = softfloat_shiftRightJam64Extra( sig64, sig0, shiftDist ); + sig64 = sigExtra.v; + sig0 = sigExtra.extra; + } + return softfloat_roundToI64( sign, sig64, sig0, roundingMode, exact ); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f128_to_i64_r_minMag.c b/extern/riscv-softfloat-standalone/lib/f128_to_i64_r_minMag.c new file mode 100644 index 0000000..7e0d63d --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_to_i64_r_minMag.c @@ -0,0 +1,113 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +int_fast64_t f128_to_i64_r_minMag( float128_t a, bool exact ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + bool sign; + int_fast32_t exp; + uint_fast64_t sig64, sig0; + int_fast32_t shiftDist; + int_fast8_t negShiftDist; + int_fast64_t absZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + sign = signF128UI64( uiA64 ); + exp = expF128UI64( uiA64 ); + sig64 = fracF128UI64( uiA64 ); + sig0 = uiA0; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + shiftDist = 0x402F - exp; + if ( shiftDist < 0 ) { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( shiftDist < -14 ) { + if ( + (uiA64 == UINT64_C( 0xC03E000000000000 )) + && (sig0 < UINT64_C( 0x0002000000000000 )) + ) { + if ( exact && sig0 ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1; + } + softfloat_raiseFlags( softfloat_flag_invalid ); + return + (exp == 0x7FFF) && (sig64 | sig0) ? i64_fromNaN + : sign ? i64_fromNegOverflow : i64_fromPosOverflow; + } + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + sig64 |= UINT64_C( 0x0001000000000000 ); + negShiftDist = -shiftDist; + absZ = sig64<>(shiftDist & 63); + if ( exact && (uint64_t) (sig0<>shiftDist; + if ( exact && (sig0 || (absZ< +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast32_t + f128_to_ui32( float128_t a, uint_fast8_t roundingMode, bool exact ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + bool sign; + int_fast32_t exp; + uint_fast64_t sig64; + int_fast32_t shiftDist; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + sign = signF128UI64( uiA64 ); + exp = expF128UI64( uiA64 ); + sig64 = fracF128UI64( uiA64 ) | (uiA0 != 0); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ +#if (ui32_fromNaN != ui32_fromPosOverflow) || (ui32_fromNaN != ui32_fromNegOverflow) + if ( (exp == 0x7FFF) && sig64 ) { +#if (ui32_fromNaN == ui32_fromPosOverflow) + sign = 0; +#elif (ui32_fromNaN == ui32_fromNegOverflow) + sign = 1; +#else + softfloat_raiseFlags( softfloat_flag_invalid ); + return ui32_fromNaN; +#endif + } +#endif + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp ) sig64 |= UINT64_C( 0x0001000000000000 ); + shiftDist = 0x4023 - exp; + if ( 0 < shiftDist ) { + sig64 = softfloat_shiftRightJam64( sig64, shiftDist ); + } + return softfloat_roundToUI32( sign, sig64, roundingMode, exact ); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f128_to_ui32_r_minMag.c b/extern/riscv-softfloat-standalone/lib/f128_to_ui32_r_minMag.c new file mode 100644 index 0000000..2097fb8 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_to_ui32_r_minMag.c @@ -0,0 +1,89 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast32_t f128_to_ui32_r_minMag( float128_t a, bool exact ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + int_fast32_t exp; + uint_fast64_t sig64; + int_fast32_t shiftDist; + bool sign; + uint_fast32_t z; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + exp = expF128UI64( uiA64 ); + sig64 = fracF128UI64( uiA64 ) | (uiA0 != 0); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + shiftDist = 0x402F - exp; + if ( 49 <= shiftDist ) { + if ( exact && (exp | sig64) ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return 0; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sign = signF128UI64( uiA64 ); + if ( sign || (shiftDist < 17) ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return + (exp == 0x7FFF) && sig64 ? ui32_fromNaN + : sign ? ui32_fromNegOverflow : ui32_fromPosOverflow; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sig64 |= UINT64_C( 0x0001000000000000 ); + z = sig64>>shiftDist; + if ( exact && ((uint_fast64_t) z< +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast64_t + f128_to_ui64( float128_t a, uint_fast8_t roundingMode, bool exact ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + bool sign; + int_fast32_t exp; + uint_fast64_t sig64, sig0; + int_fast32_t shiftDist; + struct uint128 sig128; + struct uint64_extra sigExtra; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + sign = signF128UI64( uiA64 ); + exp = expF128UI64( uiA64 ); + sig64 = fracF128UI64( uiA64 ); + sig0 = uiA0; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + shiftDist = 0x402F - exp; + if ( shiftDist <= 0 ) { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( shiftDist < -15 ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return + (exp == 0x7FFF) && (sig64 | sig0) ? ui64_fromNaN + : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; + } + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + sig64 |= UINT64_C( 0x0001000000000000 ); + if ( shiftDist ) { + sig128 = softfloat_shortShiftLeft128( sig64, sig0, -shiftDist ); + sig64 = sig128.v64; + sig0 = sig128.v0; + } + } else { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( exp ) sig64 |= UINT64_C( 0x0001000000000000 ); + sigExtra = softfloat_shiftRightJam64Extra( sig64, sig0, shiftDist ); + sig64 = sigExtra.v; + sig0 = sigExtra.extra; + } + return softfloat_roundToUI64( sign, sig64, sig0, roundingMode, exact ); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f128_to_ui64_r_minMag.c b/extern/riscv-softfloat-standalone/lib/f128_to_ui64_r_minMag.c new file mode 100644 index 0000000..fb16320 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f128_to_ui64_r_minMag.c @@ -0,0 +1,105 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast64_t f128_to_ui64_r_minMag( float128_t a, bool exact ) +{ + union ui128_f128 uA; + uint_fast64_t uiA64, uiA0; + bool sign; + int_fast32_t exp; + uint_fast64_t sig64, sig0; + int_fast32_t shiftDist; + int_fast8_t negShiftDist; + uint_fast64_t z; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA64 = uA.ui.v64; + uiA0 = uA.ui.v0; + sign = signF128UI64( uiA64 ); + exp = expF128UI64( uiA64 ); + sig64 = fracF128UI64( uiA64 ); + sig0 = uiA0; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + shiftDist = 0x402F - exp; + if ( shiftDist < 0 ) { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( sign || (shiftDist < -15) ) goto invalid; + sig64 |= UINT64_C( 0x0001000000000000 ); + negShiftDist = -shiftDist; + z = sig64<>(shiftDist & 63); + if ( exact && (uint64_t) (sig0<>shiftDist; + if ( exact && (sig0 || (z< +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float16_t f16_add( float16_t a, float16_t b ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + union ui16_f16 uB; + uint_fast16_t uiB; +#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 1) + float16_t (*magsFuncPtr)( uint_fast16_t, uint_fast16_t ); +#endif + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; +#if defined INLINE_LEVEL && (1 <= INLINE_LEVEL) + if ( signF16UI( uiA ^ uiB ) ) { + return softfloat_subMagsF16( uiA, uiB ); + } else { + return softfloat_addMagsF16( uiA, uiB ); + } +#else + magsFuncPtr = + signF16UI( uiA ^ uiB ) ? softfloat_subMagsF16 : softfloat_addMagsF16; + return (*magsFuncPtr)( uiA, uiB ); +#endif + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_classify.c b/extern/riscv-softfloat-standalone/lib/f16_classify.c new file mode 100755 index 0000000..9402ff1 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_classify.c @@ -0,0 +1,36 @@ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast16_t f16_classify( float16_t a ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + + uA.f = a; + uiA = uA.ui; + + uint_fast16_t infOrNaN = expF16UI( uiA ) == 0x1F; + uint_fast16_t subnormalOrZero = expF16UI( uiA ) == 0; + bool sign = signF16UI( uiA ); + bool fracZero = fracF16UI( uiA ) == 0; + bool isNaN = isNaNF16UI( uiA ); + bool isSNaN = softfloat_isSigNaNF16UI( uiA ); + + return + ( sign && infOrNaN && fracZero ) << 0 | + ( sign && !infOrNaN && !subnormalOrZero ) << 1 | + ( sign && subnormalOrZero && !fracZero ) << 2 | + ( sign && subnormalOrZero && fracZero ) << 3 | + ( !sign && infOrNaN && fracZero ) << 7 | + ( !sign && !infOrNaN && !subnormalOrZero ) << 6 | + ( !sign && subnormalOrZero && !fracZero ) << 5 | + ( !sign && subnormalOrZero && fracZero ) << 4 | + ( isNaN && isSNaN ) << 8 | + ( isNaN && !isSNaN ) << 9; +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_div.c b/extern/riscv-softfloat-standalone/lib/f16_div.c new file mode 100644 index 0000000..71b5c29 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_div.c @@ -0,0 +1,186 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +extern const uint16_t softfloat_approxRecip_1k0s[]; +extern const uint16_t softfloat_approxRecip_1k1s[]; + +float16_t f16_div( float16_t a, float16_t b ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + bool signA; + int_fast8_t expA; + uint_fast16_t sigA; + union ui16_f16 uB; + uint_fast16_t uiB; + bool signB; + int_fast8_t expB; + uint_fast16_t sigB; + bool signZ; + struct exp8_sig16 normExpSig; + int_fast8_t expZ; +#ifdef SOFTFLOAT_FAST_DIV32TO16 + uint_fast32_t sig32A; + uint_fast16_t sigZ; +#else + int index; + uint16_t r0; + uint_fast16_t sigZ, rem; +#endif + uint_fast16_t uiZ; + union ui16_f16 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + signA = signF16UI( uiA ); + expA = expF16UI( uiA ); + sigA = fracF16UI( uiA ); + uB.f = b; + uiB = uB.ui; + signB = signF16UI( uiB ); + expB = expF16UI( uiB ); + sigB = fracF16UI( uiB ); + signZ = signA ^ signB; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( expA == 0x1F ) { + if ( sigA ) goto propagateNaN; + if ( expB == 0x1F ) { + if ( sigB ) goto propagateNaN; + goto invalid; + } + goto infinity; + } + if ( expB == 0x1F ) { + if ( sigB ) goto propagateNaN; + goto zero; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! expB ) { + if ( ! sigB ) { + if ( ! (expA | sigA) ) goto invalid; + softfloat_raiseFlags( softfloat_flag_infinite ); + goto infinity; + } + normExpSig = softfloat_normSubnormalF16Sig( sigB ); + expB = normExpSig.exp; + sigB = normExpSig.sig; + } + if ( ! expA ) { + if ( ! sigA ) goto zero; + normExpSig = softfloat_normSubnormalF16Sig( sigA ); + expA = normExpSig.exp; + sigA = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expZ = expA - expB + 0xE; + sigA |= 0x0400; + sigB |= 0x0400; +#ifdef SOFTFLOAT_FAST_DIV32TO16 + if ( sigA < sigB ) { + --expZ; + sig32A = (uint_fast32_t) sigA<<15; + } else { + sig32A = (uint_fast32_t) sigA<<14; + } + sigZ = sig32A / sigB; + if ( ! (sigZ & 7) ) sigZ |= ((uint_fast32_t) sigB * sigZ != sig32A); +#else + if ( sigA < sigB ) { + --expZ; + sigA <<= 5; + } else { + sigA <<= 4; + } + index = sigB>>6 & 0xF; + r0 = softfloat_approxRecip_1k0s[index] + - (((uint_fast32_t) softfloat_approxRecip_1k1s[index] + * (sigB & 0x3F)) + >>10); + sigZ = ((uint_fast32_t) sigA * r0)>>16; + rem = (sigA<<10) - sigZ * sigB; + sigZ += (rem * (uint_fast32_t) r0)>>26; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + ++sigZ; + if ( ! (sigZ & 7) ) { + sigZ &= ~1; + rem = (sigA<<10) - sigZ * sigB; + if ( rem & 0x8000 ) { + sigZ -= 2; + } else { + if ( rem ) sigZ |= 1; + } + } +#endif + return softfloat_roundPackToF16( signZ, expZ, sigZ ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + propagateNaN: + uiZ = softfloat_propagateNaNF16UI( uiA, uiB ); + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + uiZ = defaultNaNF16UI; + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + infinity: + uiZ = packToF16UI( signZ, 0x1F, 0 ); + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + zero: + uiZ = packToF16UI( signZ, 0, 0 ); + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_eq.c b/extern/riscv-softfloat-standalone/lib/f16_eq.c new file mode 100644 index 0000000..37a6099 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_eq.c @@ -0,0 +1,66 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +bool f16_eq( float16_t a, float16_t b ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + union ui16_f16 uB; + uint_fast16_t uiB; + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; + if ( isNaNF16UI( uiA ) || isNaNF16UI( uiB ) ) { + if ( + softfloat_isSigNaNF16UI( uiA ) || softfloat_isSigNaNF16UI( uiB ) + ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + } + return false; + } + return (uiA == uiB) || ! (uint16_t) ((uiA | uiB)<<1); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_eq_signaling.c b/extern/riscv-softfloat-standalone/lib/f16_eq_signaling.c new file mode 100644 index 0000000..894f7b5 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_eq_signaling.c @@ -0,0 +1,61 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +bool f16_eq_signaling( float16_t a, float16_t b ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + union ui16_f16 uB; + uint_fast16_t uiB; + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; + if ( isNaNF16UI( uiA ) || isNaNF16UI( uiB ) ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return false; + } + return (uiA == uiB) || ! (uint16_t) ((uiA | uiB)<<1); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_isSignalingNaN.c b/extern/riscv-softfloat-standalone/lib/f16_isSignalingNaN.c new file mode 100644 index 0000000..657805b --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_isSignalingNaN.c @@ -0,0 +1,51 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +bool f16_isSignalingNaN( float16_t a ) +{ + union ui16_f16 uA; + + uA.f = a; + return softfloat_isSigNaNF16UI( uA.ui ); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_le.c b/extern/riscv-softfloat-standalone/lib/f16_le.c new file mode 100644 index 0000000..37eaf18 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_le.c @@ -0,0 +1,66 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +bool f16_le( float16_t a, float16_t b ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + union ui16_f16 uB; + uint_fast16_t uiB; + bool signA, signB; + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; + if ( isNaNF16UI( uiA ) || isNaNF16UI( uiB ) ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return false; + } + signA = signF16UI( uiA ); + signB = signF16UI( uiB ); + return + (signA != signB) ? signA || ! (uint16_t) ((uiA | uiB)<<1) + : (uiA == uiB) || (signA ^ (uiA < uiB)); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_le_quiet.c b/extern/riscv-softfloat-standalone/lib/f16_le_quiet.c new file mode 100644 index 0000000..8391db7 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_le_quiet.c @@ -0,0 +1,71 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +bool f16_le_quiet( float16_t a, float16_t b ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + union ui16_f16 uB; + uint_fast16_t uiB; + bool signA, signB; + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; + if ( isNaNF16UI( uiA ) || isNaNF16UI( uiB ) ) { + if ( + softfloat_isSigNaNF16UI( uiA ) || softfloat_isSigNaNF16UI( uiB ) + ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + } + return false; + } + signA = signF16UI( uiA ); + signB = signF16UI( uiB ); + return + (signA != signB) ? signA || ! (uint16_t) ((uiA | uiB)<<1) + : (uiA == uiB) || (signA ^ (uiA < uiB)); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_lt.c b/extern/riscv-softfloat-standalone/lib/f16_lt.c new file mode 100644 index 0000000..3d3522a --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_lt.c @@ -0,0 +1,66 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +bool f16_lt( float16_t a, float16_t b ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + union ui16_f16 uB; + uint_fast16_t uiB; + bool signA, signB; + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; + if ( isNaNF16UI( uiA ) || isNaNF16UI( uiB ) ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return false; + } + signA = signF16UI( uiA ); + signB = signF16UI( uiB ); + return + (signA != signB) ? signA && ((uint16_t) ((uiA | uiB)<<1) != 0) + : (uiA != uiB) && (signA ^ (uiA < uiB)); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_lt_quiet.c b/extern/riscv-softfloat-standalone/lib/f16_lt_quiet.c new file mode 100644 index 0000000..37f762c --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_lt_quiet.c @@ -0,0 +1,71 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +bool f16_lt_quiet( float16_t a, float16_t b ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + union ui16_f16 uB; + uint_fast16_t uiB; + bool signA, signB; + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; + if ( isNaNF16UI( uiA ) || isNaNF16UI( uiB ) ) { + if ( + softfloat_isSigNaNF16UI( uiA ) || softfloat_isSigNaNF16UI( uiB ) + ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + } + return false; + } + signA = signF16UI( uiA ); + signB = signF16UI( uiB ); + return + (signA != signB) ? signA && ((uint16_t) ((uiA | uiB)<<1) != 0) + : (uiA != uiB) && (signA ^ (uiA < uiB)); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_mul.c b/extern/riscv-softfloat-standalone/lib/f16_mul.c new file mode 100644 index 0000000..255caa7 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_mul.c @@ -0,0 +1,140 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float16_t f16_mul( float16_t a, float16_t b ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + bool signA; + int_fast8_t expA; + uint_fast16_t sigA; + union ui16_f16 uB; + uint_fast16_t uiB; + bool signB; + int_fast8_t expB; + uint_fast16_t sigB; + bool signZ; + uint_fast16_t magBits; + struct exp8_sig16 normExpSig; + int_fast8_t expZ; + uint_fast32_t sig32Z; + uint_fast16_t sigZ, uiZ; + union ui16_f16 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + signA = signF16UI( uiA ); + expA = expF16UI( uiA ); + sigA = fracF16UI( uiA ); + uB.f = b; + uiB = uB.ui; + signB = signF16UI( uiB ); + expB = expF16UI( uiB ); + sigB = fracF16UI( uiB ); + signZ = signA ^ signB; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( expA == 0x1F ) { + if ( sigA || ((expB == 0x1F) && sigB) ) goto propagateNaN; + magBits = expB | sigB; + goto infArg; + } + if ( expB == 0x1F ) { + if ( sigB ) goto propagateNaN; + magBits = expA | sigA; + goto infArg; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! expA ) { + if ( ! sigA ) goto zero; + normExpSig = softfloat_normSubnormalF16Sig( sigA ); + expA = normExpSig.exp; + sigA = normExpSig.sig; + } + if ( ! expB ) { + if ( ! sigB ) goto zero; + normExpSig = softfloat_normSubnormalF16Sig( sigB ); + expB = normExpSig.exp; + sigB = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expZ = expA + expB - 0xF; + sigA = (sigA | 0x0400)<<4; + sigB = (sigB | 0x0400)<<5; + sig32Z = (uint_fast32_t) sigA * sigB; + sigZ = sig32Z>>16; + if ( sig32Z & 0xFFFF ) sigZ |= 1; + if ( sigZ < 0x4000 ) { + --expZ; + sigZ <<= 1; + } + return softfloat_roundPackToF16( signZ, expZ, sigZ ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + propagateNaN: + uiZ = softfloat_propagateNaNF16UI( uiA, uiB ); + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + infArg: + if ( ! magBits ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + uiZ = defaultNaNF16UI; + } else { + uiZ = packToF16UI( signZ, 0x1F, 0 ); + } + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + zero: + uiZ = packToF16UI( signZ, 0, 0 ); + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_mulAdd.c b/extern/riscv-softfloat-standalone/lib/f16_mulAdd.c new file mode 100644 index 0000000..4026196 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_mulAdd.c @@ -0,0 +1,60 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float16_t f16_mulAdd( float16_t a, float16_t b, float16_t c ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + union ui16_f16 uB; + uint_fast16_t uiB; + union ui16_f16 uC; + uint_fast16_t uiC; + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; + uC.f = c; + uiC = uC.ui; + return softfloat_mulAddF16( uiA, uiB, uiC, 0 ); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_rem.c b/extern/riscv-softfloat-standalone/lib/f16_rem.c new file mode 100644 index 0000000..86c319d --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_rem.c @@ -0,0 +1,171 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float16_t f16_rem( float16_t a, float16_t b ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + bool signA; + int_fast8_t expA; + uint_fast16_t sigA; + union ui16_f16 uB; + uint_fast16_t uiB; + int_fast8_t expB; + uint_fast16_t sigB; + struct exp8_sig16 normExpSig; + uint16_t rem; + int_fast8_t expDiff; + uint_fast16_t q; + uint32_t recip32, q32; + uint16_t altRem, meanRem; + bool signRem; + uint_fast16_t uiZ; + union ui16_f16 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + signA = signF16UI( uiA ); + expA = expF16UI( uiA ); + sigA = fracF16UI( uiA ); + uB.f = b; + uiB = uB.ui; + expB = expF16UI( uiB ); + sigB = fracF16UI( uiB ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( expA == 0x1F ) { + if ( sigA || ((expB == 0x1F) && sigB) ) goto propagateNaN; + goto invalid; + } + if ( expB == 0x1F ) { + if ( sigB ) goto propagateNaN; + return a; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! expB ) { + if ( ! sigB ) goto invalid; + normExpSig = softfloat_normSubnormalF16Sig( sigB ); + expB = normExpSig.exp; + sigB = normExpSig.sig; + } + if ( ! expA ) { + if ( ! sigA ) return a; + normExpSig = softfloat_normSubnormalF16Sig( sigA ); + expA = normExpSig.exp; + sigA = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + rem = sigA | 0x0400; + sigB |= 0x0400; + expDiff = expA - expB; + if ( expDiff < 1 ) { + if ( expDiff < -1 ) return a; + sigB <<= 3; + if ( expDiff ) { + rem <<= 2; + q = 0; + } else { + rem <<= 3; + q = (sigB <= rem); + if ( q ) rem -= sigB; + } + } else { + recip32 = softfloat_approxRecip32_1( (uint_fast32_t) sigB<<21 ); + /*-------------------------------------------------------------------- + | Changing the shift of `rem' here requires also changing the initial + | subtraction from `expDiff'. + *--------------------------------------------------------------------*/ + rem <<= 4; + expDiff -= 31; + /*-------------------------------------------------------------------- + | The scale of `sigB' affects how many bits are obtained during each + | cycle of the loop. Currently this is 29 bits per loop iteration, + | which is believed to be the maximum possible. + *--------------------------------------------------------------------*/ + sigB <<= 3; + for (;;) { + q32 = (rem * (uint_fast64_t) recip32)>>16; + if ( expDiff < 0 ) break; + rem = -((uint_fast16_t) q32 * sigB); + expDiff -= 29; + } + /*-------------------------------------------------------------------- + | (`expDiff' cannot be less than -30 here.) + *--------------------------------------------------------------------*/ + q32 >>= ~expDiff & 31; + q = q32; + rem = (rem<<(expDiff + 30)) - q * sigB; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + do { + altRem = rem; + ++q; + rem -= sigB; + } while ( ! (rem & 0x8000) ); + meanRem = rem + altRem; + if ( (meanRem & 0x8000) || (! meanRem && (q & 1)) ) rem = altRem; + signRem = signA; + if ( 0x8000 <= rem ) { + signRem = ! signRem; + rem = -rem; + } + return softfloat_normRoundPackToF16( signRem, expB, rem ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + propagateNaN: + uiZ = softfloat_propagateNaNF16UI( uiA, uiB ); + goto uiZ; + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + uiZ = defaultNaNF16UI; + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_roundToInt.c b/extern/riscv-softfloat-standalone/lib/f16_roundToInt.c new file mode 100644 index 0000000..9bbd47e --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_roundToInt.c @@ -0,0 +1,112 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float16_t f16_roundToInt( float16_t a, uint_fast8_t roundingMode, bool exact ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + int_fast8_t exp; + uint_fast16_t uiZ, lastBitMask, roundBitsMask; + union ui16_f16 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + exp = expF16UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp <= 0xE ) { + if ( ! (uint16_t) (uiA<<1) ) return a; + if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact; + uiZ = uiA & packToF16UI( 1, 0, 0 ); + switch ( roundingMode ) { + case softfloat_round_near_even: + if ( ! fracF16UI( uiA ) ) break; + case softfloat_round_near_maxMag: + if ( exp == 0xE ) uiZ |= packToF16UI( 0, 0xF, 0 ); + break; + case softfloat_round_min: + if ( uiZ ) uiZ = packToF16UI( 1, 0xF, 0 ); + break; + case softfloat_round_max: + if ( ! uiZ ) uiZ = packToF16UI( 0, 0xF, 0 ); + break; + } + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( 0x19 <= exp ) { + if ( (exp == 0x1F) && fracF16UI( uiA ) ) { + uiZ = softfloat_propagateNaNF16UI( uiA, 0 ); + goto uiZ; + } + return a; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uiZ = uiA; + lastBitMask = (uint_fast16_t) 1<<(0x19 - exp); + roundBitsMask = lastBitMask - 1; + if ( roundingMode == softfloat_round_near_maxMag ) { + uiZ += lastBitMask>>1; + } else if ( roundingMode == softfloat_round_near_even ) { + uiZ += lastBitMask>>1; + if ( ! (uiZ & roundBitsMask) ) uiZ &= ~lastBitMask; + } else if ( + roundingMode + == (signF16UI( uiZ ) ? softfloat_round_min : softfloat_round_max) + ) { + uiZ += roundBitsMask; + } + uiZ &= ~roundBitsMask; + if ( exact && (uiZ != uiA) ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_sqrt.c b/extern/riscv-softfloat-standalone/lib/f16_sqrt.c new file mode 100644 index 0000000..7ff2923 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_sqrt.c @@ -0,0 +1,136 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +extern const uint16_t softfloat_approxRecipSqrt_1k0s[]; +extern const uint16_t softfloat_approxRecipSqrt_1k1s[]; + +float16_t f16_sqrt( float16_t a ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + bool signA; + int_fast8_t expA; + uint_fast16_t sigA, uiZ; + struct exp8_sig16 normExpSig; + int_fast8_t expZ; + int index; + uint_fast16_t r0; + uint_fast32_t ESqrR0; + uint16_t sigma0; + uint_fast16_t recipSqrt16, sigZ, shiftedSigZ; + uint16_t negRem; + union ui16_f16 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + signA = signF16UI( uiA ); + expA = expF16UI( uiA ); + sigA = fracF16UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( expA == 0x1F ) { + if ( sigA ) { + uiZ = softfloat_propagateNaNF16UI( uiA, 0 ); + goto uiZ; + } + if ( ! signA ) return a; + goto invalid; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( signA ) { + if ( ! (expA | sigA) ) return a; + goto invalid; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! expA ) { + if ( ! sigA ) return a; + normExpSig = softfloat_normSubnormalF16Sig( sigA ); + expA = normExpSig.exp; + sigA = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expZ = ((expA - 0xF)>>1) + 0xE; + expA &= 1; + sigA |= 0x0400; + index = (sigA>>6 & 0xE) + expA; + r0 = softfloat_approxRecipSqrt_1k0s[index] + - (((uint_fast32_t) softfloat_approxRecipSqrt_1k1s[index] + * (sigA & 0x7F)) + >>11); + ESqrR0 = ((uint_fast32_t) r0 * r0)>>1; + if ( expA ) ESqrR0 >>= 1; + sigma0 = ~(uint_fast16_t) ((ESqrR0 * sigA)>>16); + recipSqrt16 = r0 + (((uint_fast32_t) r0 * sigma0)>>25); + if ( ! (recipSqrt16 & 0x8000) ) recipSqrt16 = 0x8000; + sigZ = ((uint_fast32_t) (sigA<<5) * recipSqrt16)>>16; + if ( expA ) sigZ >>= 1; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + ++sigZ; + if ( ! (sigZ & 7) ) { + shiftedSigZ = sigZ>>1; + negRem = shiftedSigZ * shiftedSigZ; + sigZ &= ~1; + if ( negRem & 0x8000 ) { + sigZ |= 1; + } else { + if ( negRem ) --sigZ; + } + } + return softfloat_roundPackToF16( 0, expZ, sigZ ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + uiZ = defaultNaNF16UI; + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_sub.c b/extern/riscv-softfloat-standalone/lib/f16_sub.c new file mode 100644 index 0000000..811f239 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_sub.c @@ -0,0 +1,70 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float16_t f16_sub( float16_t a, float16_t b ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + union ui16_f16 uB; + uint_fast16_t uiB; +#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 1) + float16_t (*magsFuncPtr)( uint_fast16_t, uint_fast16_t ); +#endif + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; +#if defined INLINE_LEVEL && (1 <= INLINE_LEVEL) + if ( signF16UI( uiA ^ uiB ) ) { + return softfloat_addMagsF16( uiA, uiB ); + } else { + return softfloat_subMagsF16( uiA, uiB ); + } +#else + magsFuncPtr = + signF16UI( uiA ^ uiB ) ? softfloat_addMagsF16 : softfloat_subMagsF16; + return (*magsFuncPtr)( uiA, uiB ); +#endif + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_to_f128.c b/extern/riscv-softfloat-standalone/lib/f16_to_f128.c new file mode 100644 index 0000000..961cdaa --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_to_f128.c @@ -0,0 +1,96 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float128_t f16_to_f128( float16_t a ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + bool sign; + int_fast8_t exp; + uint_fast16_t frac; + struct commonNaN commonNaN; + struct uint128 uiZ; + struct exp8_sig16 normExpSig; + union ui128_f128 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + sign = signF16UI( uiA ); + exp = expF16UI( uiA ); + frac = fracF16UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp == 0x1F ) { + if ( frac ) { + softfloat_f16UIToCommonNaN( uiA, &commonNaN ); + uiZ = softfloat_commonNaNToF128UI( &commonNaN ); + } else { + uiZ.v64 = packToF128UI64( sign, 0x7FFF, 0 ); + uiZ.v0 = 0; + } + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! exp ) { + if ( ! frac ) { + uiZ.v64 = packToF128UI64( sign, 0, 0 ); + uiZ.v0 = 0; + goto uiZ; + } + normExpSig = softfloat_normSubnormalF16Sig( frac ); + exp = normExpSig.exp - 1; + frac = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uiZ.v64 = packToF128UI64( sign, exp + 0x3FF0, (uint_fast64_t) frac<<38 ); + uiZ.v0 = 0; + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_to_f32.c b/extern/riscv-softfloat-standalone/lib/f16_to_f32.c new file mode 100644 index 0000000..fb8b381 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_to_f32.c @@ -0,0 +1,93 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float32_t f16_to_f32( float16_t a ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + bool sign; + int_fast8_t exp; + uint_fast16_t frac; + struct commonNaN commonNaN; + uint_fast32_t uiZ; + struct exp8_sig16 normExpSig; + union ui32_f32 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + sign = signF16UI( uiA ); + exp = expF16UI( uiA ); + frac = fracF16UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp == 0x1F ) { + if ( frac ) { + softfloat_f16UIToCommonNaN( uiA, &commonNaN ); + uiZ = softfloat_commonNaNToF32UI( &commonNaN ); + } else { + uiZ = packToF32UI( sign, 0xFF, 0 ); + } + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! exp ) { + if ( ! frac ) { + uiZ = packToF32UI( sign, 0, 0 ); + goto uiZ; + } + normExpSig = softfloat_normSubnormalF16Sig( frac ); + exp = normExpSig.exp - 1; + frac = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uiZ = packToF32UI( sign, exp + 0x70, (uint_fast32_t) frac<<13 ); + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_to_f64.c b/extern/riscv-softfloat-standalone/lib/f16_to_f64.c new file mode 100644 index 0000000..4ab27ba --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_to_f64.c @@ -0,0 +1,93 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float64_t f16_to_f64( float16_t a ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + bool sign; + int_fast8_t exp; + uint_fast16_t frac; + struct commonNaN commonNaN; + uint_fast64_t uiZ; + struct exp8_sig16 normExpSig; + union ui64_f64 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + sign = signF16UI( uiA ); + exp = expF16UI( uiA ); + frac = fracF16UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp == 0x1F ) { + if ( frac ) { + softfloat_f16UIToCommonNaN( uiA, &commonNaN ); + uiZ = softfloat_commonNaNToF64UI( &commonNaN ); + } else { + uiZ = packToF64UI( sign, 0x7FF, 0 ); + } + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! exp ) { + if ( ! frac ) { + uiZ = packToF64UI( sign, 0, 0 ); + goto uiZ; + } + normExpSig = softfloat_normSubnormalF16Sig( frac ); + exp = normExpSig.exp - 1; + frac = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uiZ = packToF64UI( sign, exp + 0x3F0, (uint_fast64_t) frac<<42 ); + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_to_i16.c b/extern/riscv-softfloat-standalone/lib/f16_to_i16.c new file mode 100644 index 0000000..b0fbb7c --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_to_i16.c @@ -0,0 +1,57 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "specialize.h" +#include "softfloat.h" + +int_fast16_t f16_to_i16( float16_t a, uint_fast8_t roundingMode, bool exact ) +{ + uint_fast8_t old_flags = softfloat_exceptionFlags; + + int_fast32_t sig32 = f16_to_i32(a, roundingMode, exact); + + if (sig32 > INT16_MAX) { + softfloat_exceptionFlags = old_flags | softfloat_flag_invalid; + return i16_fromPosOverflow; + } else if (sig32 < INT16_MIN) { + softfloat_exceptionFlags = old_flags | softfloat_flag_invalid; + return i16_fromNegOverflow; + } else { + return sig32; + } +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_to_i32.c b/extern/riscv-softfloat-standalone/lib/f16_to_i32.c new file mode 100644 index 0000000..24b1984 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_to_i32.c @@ -0,0 +1,87 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +int_fast32_t f16_to_i32( float16_t a, uint_fast8_t roundingMode, bool exact ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + bool sign; + int_fast8_t exp; + uint_fast16_t frac; + int_fast32_t sig32; + int_fast8_t shiftDist; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + sign = signF16UI( uiA ); + exp = expF16UI( uiA ); + frac = fracF16UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp == 0x1F ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return + frac ? i32_fromNaN + : sign ? i32_fromNegOverflow : i32_fromPosOverflow; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sig32 = frac; + if ( exp ) { + sig32 |= 0x0400; + shiftDist = exp - 0x19; + if ( 0 <= shiftDist ) { + sig32 <<= shiftDist; + return sign ? -sig32 : sig32; + } + shiftDist = exp - 0x0D; + if ( 0 < shiftDist ) sig32 <<= shiftDist; + } + return + softfloat_roundToI32( + sign, (uint_fast32_t) sig32, roundingMode, exact ); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_to_i32_r_minMag.c b/extern/riscv-softfloat-standalone/lib/f16_to_i32_r_minMag.c new file mode 100644 index 0000000..ebb4965 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_to_i32_r_minMag.c @@ -0,0 +1,88 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +int_fast32_t f16_to_i32_r_minMag( float16_t a, bool exact ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + int_fast8_t exp; + uint_fast16_t frac; + int_fast8_t shiftDist; + bool sign; + int_fast32_t alignedSig; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + exp = expF16UI( uiA ); + frac = fracF16UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + shiftDist = exp - 0x0F; + if ( shiftDist < 0 ) { + if ( exact && (exp | frac) ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return 0; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sign = signF16UI( uiA ); + if ( exp == 0x1F ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return + (exp == 0x1F) && frac ? i32_fromNaN + : sign ? i32_fromNegOverflow : i32_fromPosOverflow; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + alignedSig = (int_fast32_t) (frac | 0x0400)<>= 10; + return sign ? -alignedSig : alignedSig; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_to_i64.c b/extern/riscv-softfloat-standalone/lib/f16_to_i64.c new file mode 100644 index 0000000..c241745 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_to_i64.c @@ -0,0 +1,87 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +int_fast64_t f16_to_i64( float16_t a, uint_fast8_t roundingMode, bool exact ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + bool sign; + int_fast8_t exp; + uint_fast16_t frac; + int_fast32_t sig32; + int_fast8_t shiftDist; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + sign = signF16UI( uiA ); + exp = expF16UI( uiA ); + frac = fracF16UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp == 0x1F ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return + frac ? i64_fromNaN + : sign ? i64_fromNegOverflow : i64_fromPosOverflow; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sig32 = frac; + if ( exp ) { + sig32 |= 0x0400; + shiftDist = exp - 0x19; + if ( 0 <= shiftDist ) { + sig32 <<= shiftDist; + return sign ? -sig32 : sig32; + } + shiftDist = exp - 0x0D; + if ( 0 < shiftDist ) sig32 <<= shiftDist; + } + return + softfloat_roundToI32( + sign, (uint_fast32_t) sig32, roundingMode, exact ); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_to_i64_r_minMag.c b/extern/riscv-softfloat-standalone/lib/f16_to_i64_r_minMag.c new file mode 100644 index 0000000..dc9a8d3 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_to_i64_r_minMag.c @@ -0,0 +1,88 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +int_fast64_t f16_to_i64_r_minMag( float16_t a, bool exact ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + int_fast8_t exp; + uint_fast16_t frac; + int_fast8_t shiftDist; + bool sign; + int_fast32_t alignedSig; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + exp = expF16UI( uiA ); + frac = fracF16UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + shiftDist = exp - 0x0F; + if ( shiftDist < 0 ) { + if ( exact && (exp | frac) ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return 0; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sign = signF16UI( uiA ); + if ( exp == 0x1F ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return + (exp == 0x1F) && frac ? i64_fromNaN + : sign ? i64_fromNegOverflow : i64_fromPosOverflow; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + alignedSig = (int_fast32_t) (frac | 0x0400)<>= 10; + return sign ? -alignedSig : alignedSig; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_to_i8.c b/extern/riscv-softfloat-standalone/lib/f16_to_i8.c new file mode 100644 index 0000000..23638cc --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_to_i8.c @@ -0,0 +1,57 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "specialize.h" +#include "softfloat.h" + +int_fast8_t f16_to_i8( float16_t a, uint_fast8_t roundingMode, bool exact ) +{ + uint_fast8_t old_flags = softfloat_exceptionFlags; + + int_fast32_t sig32 = f16_to_i32(a, roundingMode, exact); + + if (sig32 > INT8_MAX) { + softfloat_exceptionFlags = old_flags | softfloat_flag_invalid; + return i8_fromPosOverflow; + } else if (sig32 < INT8_MIN) { + softfloat_exceptionFlags = old_flags | softfloat_flag_invalid; + return i8_fromNegOverflow; + } else { + return sig32; + } +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_to_ui16.c b/extern/riscv-softfloat-standalone/lib/f16_to_ui16.c new file mode 100644 index 0000000..81c4f8d --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_to_ui16.c @@ -0,0 +1,54 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "specialize.h" +#include "softfloat.h" + +uint_fast16_t f16_to_ui16( float16_t a, uint_fast8_t roundingMode, bool exact ) +{ + uint_fast8_t old_flags = softfloat_exceptionFlags; + + uint_fast32_t sig32 = f16_to_ui32(a, roundingMode, exact); + + if (sig32 > UINT16_MAX) { + softfloat_exceptionFlags = old_flags | softfloat_flag_invalid; + return ui16_fromPosOverflow; + } else { + return sig32; + } +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_to_ui32.c b/extern/riscv-softfloat-standalone/lib/f16_to_ui32.c new file mode 100644 index 0000000..c99af39 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_to_ui32.c @@ -0,0 +1,84 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast32_t f16_to_ui32( float16_t a, uint_fast8_t roundingMode, bool exact ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + bool sign; + int_fast8_t exp; + uint_fast16_t frac; + uint_fast32_t sig32; + int_fast8_t shiftDist; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + sign = signF16UI( uiA ); + exp = expF16UI( uiA ); + frac = fracF16UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp == 0x1F ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return + frac ? ui32_fromNaN + : sign ? ui32_fromNegOverflow : ui32_fromPosOverflow; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sig32 = frac; + if ( exp ) { + sig32 |= 0x0400; + shiftDist = exp - 0x19; + if ( (0 <= shiftDist) && ! sign ) { + return sig32< +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast32_t f16_to_ui32_r_minMag( float16_t a, bool exact ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + int_fast8_t exp; + uint_fast16_t frac; + int_fast8_t shiftDist; + bool sign; + uint_fast32_t alignedSig; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + exp = expF16UI( uiA ); + frac = fracF16UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + shiftDist = exp - 0x0F; + if ( shiftDist < 0 ) { + if ( exact && (exp | frac) ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return 0; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sign = signF16UI( uiA ); + if ( sign || (exp == 0x1F) ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return + (exp == 0x1F) && frac ? ui32_fromNaN + : sign ? ui32_fromNegOverflow : ui32_fromPosOverflow; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + alignedSig = (uint_fast32_t) (frac | 0x0400)<>10; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_to_ui64.c b/extern/riscv-softfloat-standalone/lib/f16_to_ui64.c new file mode 100644 index 0000000..dd260ea --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_to_ui64.c @@ -0,0 +1,84 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast64_t f16_to_ui64( float16_t a, uint_fast8_t roundingMode, bool exact ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + bool sign; + int_fast8_t exp; + uint_fast16_t frac; + uint_fast32_t sig32; + int_fast8_t shiftDist; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + sign = signF16UI( uiA ); + exp = expF16UI( uiA ); + frac = fracF16UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp == 0x1F ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return + frac ? ui64_fromNaN + : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sig32 = frac; + if ( exp ) { + sig32 |= 0x0400; + shiftDist = exp - 0x19; + if ( (0 <= shiftDist) && ! sign ) { + return sig32< +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast64_t f16_to_ui64_r_minMag( float16_t a, bool exact ) +{ + union ui16_f16 uA; + uint_fast16_t uiA; + int_fast8_t exp; + uint_fast16_t frac; + int_fast8_t shiftDist; + bool sign; + uint_fast32_t alignedSig; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + exp = expF16UI( uiA ); + frac = fracF16UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + shiftDist = exp - 0x0F; + if ( shiftDist < 0 ) { + if ( exact && (exp | frac) ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return 0; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sign = signF16UI( uiA ); + if ( sign || (exp == 0x1F) ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return + (exp == 0x1F) && frac ? ui64_fromNaN + : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + alignedSig = (uint_fast32_t) (frac | 0x0400)<>10; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f16_to_ui8.c b/extern/riscv-softfloat-standalone/lib/f16_to_ui8.c new file mode 100644 index 0000000..96124e1 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f16_to_ui8.c @@ -0,0 +1,54 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "specialize.h" +#include "softfloat.h" + +uint_fast8_t f16_to_ui8( float16_t a, uint_fast8_t roundingMode, bool exact ) +{ + uint_fast8_t old_flags = softfloat_exceptionFlags; + + uint_fast32_t sig32 = f16_to_ui32(a, roundingMode, exact); + + if (sig32 > UINT8_MAX) { + softfloat_exceptionFlags = old_flags | softfloat_flag_invalid; + return ui8_fromPosOverflow; + } else { + return sig32; + } +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_add.c b/extern/riscv-softfloat-standalone/lib/f32_add.c new file mode 100644 index 0000000..4a51ecc --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_add.c @@ -0,0 +1,70 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float32_t f32_add( float32_t a, float32_t b ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + union ui32_f32 uB; + uint_fast32_t uiB; +#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 1) + float32_t (*magsFuncPtr)( uint_fast32_t, uint_fast32_t ); +#endif + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; +#if defined INLINE_LEVEL && (1 <= INLINE_LEVEL) + if ( signF32UI( uiA ^ uiB ) ) { + return softfloat_subMagsF32( uiA, uiB ); + } else { + return softfloat_addMagsF32( uiA, uiB ); + } +#else + magsFuncPtr = + signF32UI( uiA ^ uiB ) ? softfloat_subMagsF32 : softfloat_addMagsF32; + return (*magsFuncPtr)( uiA, uiB ); +#endif + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_classify.c b/extern/riscv-softfloat-standalone/lib/f32_classify.c new file mode 100755 index 0000000..83fad87 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_classify.c @@ -0,0 +1,36 @@ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast16_t f32_classify( float32_t a ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + + uA.f = a; + uiA = uA.ui; + + uint_fast16_t infOrNaN = expF32UI( uiA ) == 0xFF; + uint_fast16_t subnormalOrZero = expF32UI( uiA ) == 0; + bool sign = signF32UI( uiA ); + bool fracZero = fracF32UI( uiA ) == 0; + bool isNaN = isNaNF32UI( uiA ); + bool isSNaN = softfloat_isSigNaNF32UI( uiA ); + + return + ( sign && infOrNaN && fracZero ) << 0 | + ( sign && !infOrNaN && !subnormalOrZero ) << 1 | + ( sign && subnormalOrZero && !fracZero ) << 2 | + ( sign && subnormalOrZero && fracZero ) << 3 | + ( !sign && infOrNaN && fracZero ) << 7 | + ( !sign && !infOrNaN && !subnormalOrZero ) << 6 | + ( !sign && subnormalOrZero && !fracZero ) << 5 | + ( !sign && subnormalOrZero && fracZero ) << 4 | + ( isNaN && isSNaN ) << 8 | + ( isNaN && !isSNaN ) << 9; +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_div.c b/extern/riscv-softfloat-standalone/lib/f32_div.c new file mode 100644 index 0000000..9d10125 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_div.c @@ -0,0 +1,180 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float32_t f32_div( float32_t a, float32_t b ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + bool signA; + int_fast16_t expA; + uint_fast32_t sigA; + union ui32_f32 uB; + uint_fast32_t uiB; + bool signB; + int_fast16_t expB; + uint_fast32_t sigB; + bool signZ; + struct exp16_sig32 normExpSig; + int_fast16_t expZ; +#ifdef SOFTFLOAT_FAST_DIV64TO32 + uint_fast64_t sig64A; + uint_fast32_t sigZ; +#else + uint_fast32_t sigZ; + uint_fast64_t rem; +#endif + uint_fast32_t uiZ; + union ui32_f32 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + signA = signF32UI( uiA ); + expA = expF32UI( uiA ); + sigA = fracF32UI( uiA ); + uB.f = b; + uiB = uB.ui; + signB = signF32UI( uiB ); + expB = expF32UI( uiB ); + sigB = fracF32UI( uiB ); + signZ = signA ^ signB; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( expA == 0xFF ) { + if ( sigA ) goto propagateNaN; + if ( expB == 0xFF ) { + if ( sigB ) goto propagateNaN; + goto invalid; + } + goto infinity; + } + if ( expB == 0xFF ) { + if ( sigB ) goto propagateNaN; + goto zero; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! expB ) { + if ( ! sigB ) { + if ( ! (expA | sigA) ) goto invalid; + softfloat_raiseFlags( softfloat_flag_infinite ); + goto infinity; + } + normExpSig = softfloat_normSubnormalF32Sig( sigB ); + expB = normExpSig.exp; + sigB = normExpSig.sig; + } + if ( ! expA ) { + if ( ! sigA ) goto zero; + normExpSig = softfloat_normSubnormalF32Sig( sigA ); + expA = normExpSig.exp; + sigA = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expZ = expA - expB + 0x7E; + sigA |= 0x00800000; + sigB |= 0x00800000; +#ifdef SOFTFLOAT_FAST_DIV64TO32 + if ( sigA < sigB ) { + --expZ; + sig64A = (uint_fast64_t) sigA<<31; + } else { + sig64A = (uint_fast64_t) sigA<<30; + } + sigZ = sig64A / sigB; + if ( ! (sigZ & 0x3F) ) sigZ |= ((uint_fast64_t) sigB * sigZ != sig64A); +#else + if ( sigA < sigB ) { + --expZ; + sigA <<= 8; + } else { + sigA <<= 7; + } + sigB <<= 8; + sigZ = ((uint_fast64_t) sigA * softfloat_approxRecip32_1( sigB ))>>32; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sigZ += 2; + if ( (sigZ & 0x3F) < 2 ) { + sigZ &= ~3; +#ifdef SOFTFLOAT_FAST_INT64 + rem = ((uint_fast64_t) sigA<<31) - (uint_fast64_t) sigZ * sigB; +#else + rem = ((uint_fast64_t) sigA<<32) - (uint_fast64_t) (sigZ<<1) * sigB; +#endif + if ( rem & UINT64_C( 0x8000000000000000 ) ) { + sigZ -= 4; + } else { + if ( rem ) sigZ |= 1; + } + } +#endif + return softfloat_roundPackToF32( signZ, expZ, sigZ ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + propagateNaN: + uiZ = softfloat_propagateNaNF32UI( uiA, uiB ); + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + uiZ = defaultNaNF32UI; + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + infinity: + uiZ = packToF32UI( signZ, 0xFF, 0 ); + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + zero: + uiZ = packToF32UI( signZ, 0, 0 ); + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_eq.c b/extern/riscv-softfloat-standalone/lib/f32_eq.c new file mode 100644 index 0000000..5f07eee --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_eq.c @@ -0,0 +1,66 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +bool f32_eq( float32_t a, float32_t b ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + union ui32_f32 uB; + uint_fast32_t uiB; + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; + if ( isNaNF32UI( uiA ) || isNaNF32UI( uiB ) ) { + if ( + softfloat_isSigNaNF32UI( uiA ) || softfloat_isSigNaNF32UI( uiB ) + ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + } + return false; + } + return (uiA == uiB) || ! (uint32_t) ((uiA | uiB)<<1); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_eq_signaling.c b/extern/riscv-softfloat-standalone/lib/f32_eq_signaling.c new file mode 100644 index 0000000..f5fcc82 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_eq_signaling.c @@ -0,0 +1,61 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +bool f32_eq_signaling( float32_t a, float32_t b ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + union ui32_f32 uB; + uint_fast32_t uiB; + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; + if ( isNaNF32UI( uiA ) || isNaNF32UI( uiB ) ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return false; + } + return (uiA == uiB) || ! (uint32_t) ((uiA | uiB)<<1); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_isSignalingNaN.c b/extern/riscv-softfloat-standalone/lib/f32_isSignalingNaN.c new file mode 100644 index 0000000..5004a5a --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_isSignalingNaN.c @@ -0,0 +1,51 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +bool f32_isSignalingNaN( float32_t a ) +{ + union ui32_f32 uA; + + uA.f = a; + return softfloat_isSigNaNF32UI( uA.ui ); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_le.c b/extern/riscv-softfloat-standalone/lib/f32_le.c new file mode 100644 index 0000000..77595fb --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_le.c @@ -0,0 +1,66 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +bool f32_le( float32_t a, float32_t b ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + union ui32_f32 uB; + uint_fast32_t uiB; + bool signA, signB; + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; + if ( isNaNF32UI( uiA ) || isNaNF32UI( uiB ) ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return false; + } + signA = signF32UI( uiA ); + signB = signF32UI( uiB ); + return + (signA != signB) ? signA || ! (uint32_t) ((uiA | uiB)<<1) + : (uiA == uiB) || (signA ^ (uiA < uiB)); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_le_quiet.c b/extern/riscv-softfloat-standalone/lib/f32_le_quiet.c new file mode 100644 index 0000000..1ec9101 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_le_quiet.c @@ -0,0 +1,71 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +bool f32_le_quiet( float32_t a, float32_t b ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + union ui32_f32 uB; + uint_fast32_t uiB; + bool signA, signB; + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; + if ( isNaNF32UI( uiA ) || isNaNF32UI( uiB ) ) { + if ( + softfloat_isSigNaNF32UI( uiA ) || softfloat_isSigNaNF32UI( uiB ) + ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + } + return false; + } + signA = signF32UI( uiA ); + signB = signF32UI( uiB ); + return + (signA != signB) ? signA || ! (uint32_t) ((uiA | uiB)<<1) + : (uiA == uiB) || (signA ^ (uiA < uiB)); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_lt.c b/extern/riscv-softfloat-standalone/lib/f32_lt.c new file mode 100644 index 0000000..9e12843 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_lt.c @@ -0,0 +1,66 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +bool f32_lt( float32_t a, float32_t b ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + union ui32_f32 uB; + uint_fast32_t uiB; + bool signA, signB; + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; + if ( isNaNF32UI( uiA ) || isNaNF32UI( uiB ) ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return false; + } + signA = signF32UI( uiA ); + signB = signF32UI( uiB ); + return + (signA != signB) ? signA && ((uint32_t) ((uiA | uiB)<<1) != 0) + : (uiA != uiB) && (signA ^ (uiA < uiB)); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_lt_quiet.c b/extern/riscv-softfloat-standalone/lib/f32_lt_quiet.c new file mode 100644 index 0000000..9f83b81 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_lt_quiet.c @@ -0,0 +1,71 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +bool f32_lt_quiet( float32_t a, float32_t b ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + union ui32_f32 uB; + uint_fast32_t uiB; + bool signA, signB; + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; + if ( isNaNF32UI( uiA ) || isNaNF32UI( uiB ) ) { + if ( + softfloat_isSigNaNF32UI( uiA ) || softfloat_isSigNaNF32UI( uiB ) + ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + } + return false; + } + signA = signF32UI( uiA ); + signB = signF32UI( uiB ); + return + (signA != signB) ? signA && ((uint32_t) ((uiA | uiB)<<1) != 0) + : (uiA != uiB) && (signA ^ (uiA < uiB)); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_mul.c b/extern/riscv-softfloat-standalone/lib/f32_mul.c new file mode 100644 index 0000000..a2a673f --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_mul.c @@ -0,0 +1,137 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float32_t f32_mul( float32_t a, float32_t b ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + bool signA; + int_fast16_t expA; + uint_fast32_t sigA; + union ui32_f32 uB; + uint_fast32_t uiB; + bool signB; + int_fast16_t expB; + uint_fast32_t sigB; + bool signZ; + uint_fast32_t magBits; + struct exp16_sig32 normExpSig; + int_fast16_t expZ; + uint_fast32_t sigZ, uiZ; + union ui32_f32 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + signA = signF32UI( uiA ); + expA = expF32UI( uiA ); + sigA = fracF32UI( uiA ); + uB.f = b; + uiB = uB.ui; + signB = signF32UI( uiB ); + expB = expF32UI( uiB ); + sigB = fracF32UI( uiB ); + signZ = signA ^ signB; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( expA == 0xFF ) { + if ( sigA || ((expB == 0xFF) && sigB) ) goto propagateNaN; + magBits = expB | sigB; + goto infArg; + } + if ( expB == 0xFF ) { + if ( sigB ) goto propagateNaN; + magBits = expA | sigA; + goto infArg; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! expA ) { + if ( ! sigA ) goto zero; + normExpSig = softfloat_normSubnormalF32Sig( sigA ); + expA = normExpSig.exp; + sigA = normExpSig.sig; + } + if ( ! expB ) { + if ( ! sigB ) goto zero; + normExpSig = softfloat_normSubnormalF32Sig( sigB ); + expB = normExpSig.exp; + sigB = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expZ = expA + expB - 0x7F; + sigA = (sigA | 0x00800000)<<7; + sigB = (sigB | 0x00800000)<<8; + sigZ = softfloat_shortShiftRightJam64( (uint_fast64_t) sigA * sigB, 32 ); + if ( sigZ < 0x40000000 ) { + --expZ; + sigZ <<= 1; + } + return softfloat_roundPackToF32( signZ, expZ, sigZ ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + propagateNaN: + uiZ = softfloat_propagateNaNF32UI( uiA, uiB ); + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + infArg: + if ( ! magBits ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + uiZ = defaultNaNF32UI; + } else { + uiZ = packToF32UI( signZ, 0xFF, 0 ); + } + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + zero: + uiZ = packToF32UI( signZ, 0, 0 ); + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_mulAdd.c b/extern/riscv-softfloat-standalone/lib/f32_mulAdd.c new file mode 100644 index 0000000..e98021b --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_mulAdd.c @@ -0,0 +1,60 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float32_t f32_mulAdd( float32_t a, float32_t b, float32_t c ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + union ui32_f32 uB; + uint_fast32_t uiB; + union ui32_f32 uC; + uint_fast32_t uiC; + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; + uC.f = c; + uiC = uC.ui; + return softfloat_mulAddF32( uiA, uiB, uiC, 0 ); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_rem.c b/extern/riscv-softfloat-standalone/lib/f32_rem.c new file mode 100644 index 0000000..771b1b9 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_rem.c @@ -0,0 +1,168 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float32_t f32_rem( float32_t a, float32_t b ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + bool signA; + int_fast16_t expA; + uint_fast32_t sigA; + union ui32_f32 uB; + uint_fast32_t uiB; + int_fast16_t expB; + uint_fast32_t sigB; + struct exp16_sig32 normExpSig; + uint32_t rem; + int_fast16_t expDiff; + uint32_t q, recip32, altRem, meanRem; + bool signRem; + uint_fast32_t uiZ; + union ui32_f32 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + signA = signF32UI( uiA ); + expA = expF32UI( uiA ); + sigA = fracF32UI( uiA ); + uB.f = b; + uiB = uB.ui; + expB = expF32UI( uiB ); + sigB = fracF32UI( uiB ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( expA == 0xFF ) { + if ( sigA || ((expB == 0xFF) && sigB) ) goto propagateNaN; + goto invalid; + } + if ( expB == 0xFF ) { + if ( sigB ) goto propagateNaN; + return a; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! expB ) { + if ( ! sigB ) goto invalid; + normExpSig = softfloat_normSubnormalF32Sig( sigB ); + expB = normExpSig.exp; + sigB = normExpSig.sig; + } + if ( ! expA ) { + if ( ! sigA ) return a; + normExpSig = softfloat_normSubnormalF32Sig( sigA ); + expA = normExpSig.exp; + sigA = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + rem = sigA | 0x00800000; + sigB |= 0x00800000; + expDiff = expA - expB; + if ( expDiff < 1 ) { + if ( expDiff < -1 ) return a; + sigB <<= 6; + if ( expDiff ) { + rem <<= 5; + q = 0; + } else { + rem <<= 6; + q = (sigB <= rem); + if ( q ) rem -= sigB; + } + } else { + recip32 = softfloat_approxRecip32_1( sigB<<8 ); + /*-------------------------------------------------------------------- + | Changing the shift of `rem' here requires also changing the initial + | subtraction from `expDiff'. + *--------------------------------------------------------------------*/ + rem <<= 7; + expDiff -= 31; + /*-------------------------------------------------------------------- + | The scale of `sigB' affects how many bits are obtained during each + | cycle of the loop. Currently this is 29 bits per loop iteration, + | which is believed to be the maximum possible. + *--------------------------------------------------------------------*/ + sigB <<= 6; + for (;;) { + q = (rem * (uint_fast64_t) recip32)>>32; + if ( expDiff < 0 ) break; + rem = -(q * (uint32_t) sigB); + expDiff -= 29; + } + /*-------------------------------------------------------------------- + | (`expDiff' cannot be less than -30 here.) + *--------------------------------------------------------------------*/ + q >>= ~expDiff & 31; + rem = (rem<<(expDiff + 30)) - q * (uint32_t) sigB; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + do { + altRem = rem; + ++q; + rem -= sigB; + } while ( ! (rem & 0x80000000) ); + meanRem = rem + altRem; + if ( (meanRem & 0x80000000) || (! meanRem && (q & 1)) ) rem = altRem; + signRem = signA; + if ( 0x80000000 <= rem ) { + signRem = ! signRem; + rem = -rem; + } + return softfloat_normRoundPackToF32( signRem, expB, rem ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + propagateNaN: + uiZ = softfloat_propagateNaNF32UI( uiA, uiB ); + goto uiZ; + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + uiZ = defaultNaNF32UI; + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_roundToInt.c b/extern/riscv-softfloat-standalone/lib/f32_roundToInt.c new file mode 100644 index 0000000..0861b84 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_roundToInt.c @@ -0,0 +1,112 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float32_t f32_roundToInt( float32_t a, uint_fast8_t roundingMode, bool exact ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + int_fast16_t exp; + uint_fast32_t uiZ, lastBitMask, roundBitsMask; + union ui32_f32 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + exp = expF32UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp <= 0x7E ) { + if ( ! (uint32_t) (uiA<<1) ) return a; + if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact; + uiZ = uiA & packToF32UI( 1, 0, 0 ); + switch ( roundingMode ) { + case softfloat_round_near_even: + if ( ! fracF32UI( uiA ) ) break; + case softfloat_round_near_maxMag: + if ( exp == 0x7E ) uiZ |= packToF32UI( 0, 0x7F, 0 ); + break; + case softfloat_round_min: + if ( uiZ ) uiZ = packToF32UI( 1, 0x7F, 0 ); + break; + case softfloat_round_max: + if ( ! uiZ ) uiZ = packToF32UI( 0, 0x7F, 0 ); + break; + } + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( 0x96 <= exp ) { + if ( (exp == 0xFF) && fracF32UI( uiA ) ) { + uiZ = softfloat_propagateNaNF32UI( uiA, 0 ); + goto uiZ; + } + return a; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uiZ = uiA; + lastBitMask = (uint_fast32_t) 1<<(0x96 - exp); + roundBitsMask = lastBitMask - 1; + if ( roundingMode == softfloat_round_near_maxMag ) { + uiZ += lastBitMask>>1; + } else if ( roundingMode == softfloat_round_near_even ) { + uiZ += lastBitMask>>1; + if ( ! (uiZ & roundBitsMask) ) uiZ &= ~lastBitMask; + } else if ( + roundingMode + == (signF32UI( uiZ ) ? softfloat_round_min : softfloat_round_max) + ) { + uiZ += roundBitsMask; + } + uiZ &= ~roundBitsMask; + if ( exact && (uiZ != uiA) ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_sqrt.c b/extern/riscv-softfloat-standalone/lib/f32_sqrt.c new file mode 100644 index 0000000..5ef659e --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_sqrt.c @@ -0,0 +1,121 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float32_t f32_sqrt( float32_t a ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + bool signA; + int_fast16_t expA; + uint_fast32_t sigA, uiZ; + struct exp16_sig32 normExpSig; + int_fast16_t expZ; + uint_fast32_t sigZ, shiftedSigZ; + uint32_t negRem; + union ui32_f32 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + signA = signF32UI( uiA ); + expA = expF32UI( uiA ); + sigA = fracF32UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( expA == 0xFF ) { + if ( sigA ) { + uiZ = softfloat_propagateNaNF32UI( uiA, 0 ); + goto uiZ; + } + if ( ! signA ) return a; + goto invalid; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( signA ) { + if ( ! (expA | sigA) ) return a; + goto invalid; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! expA ) { + if ( ! sigA ) return a; + normExpSig = softfloat_normSubnormalF32Sig( sigA ); + expA = normExpSig.exp; + sigA = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expZ = ((expA - 0x7F)>>1) + 0x7E; + expA &= 1; + sigA = (sigA | 0x00800000)<<8; + sigZ = + ((uint_fast64_t) sigA * softfloat_approxRecipSqrt32_1( expA, sigA )) + >>32; + if ( expA ) sigZ >>= 1; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sigZ += 2; + if ( (sigZ & 0x3F) < 2 ) { + shiftedSigZ = sigZ>>2; + negRem = shiftedSigZ * shiftedSigZ; + sigZ &= ~3; + if ( negRem & 0x80000000 ) { + sigZ |= 1; + } else { + if ( negRem ) --sigZ; + } + } + return softfloat_roundPackToF32( 0, expZ, sigZ ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + uiZ = defaultNaNF32UI; + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_sub.c b/extern/riscv-softfloat-standalone/lib/f32_sub.c new file mode 100644 index 0000000..d830738 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_sub.c @@ -0,0 +1,70 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float32_t f32_sub( float32_t a, float32_t b ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + union ui32_f32 uB; + uint_fast32_t uiB; +#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 1) + float32_t (*magsFuncPtr)( uint_fast32_t, uint_fast32_t ); +#endif + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; +#if defined INLINE_LEVEL && (1 <= INLINE_LEVEL) + if ( signF32UI( uiA ^ uiB ) ) { + return softfloat_addMagsF32( uiA, uiB ); + } else { + return softfloat_subMagsF32( uiA, uiB ); + } +#else + magsFuncPtr = + signF32UI( uiA ^ uiB ) ? softfloat_addMagsF32 : softfloat_subMagsF32; + return (*magsFuncPtr)( uiA, uiB ); +#endif + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_to_f128.c b/extern/riscv-softfloat-standalone/lib/f32_to_f128.c new file mode 100644 index 0000000..bf51926 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_to_f128.c @@ -0,0 +1,96 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float128_t f32_to_f128( float32_t a ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + bool sign; + int_fast16_t exp; + uint_fast32_t frac; + struct commonNaN commonNaN; + struct uint128 uiZ; + struct exp16_sig32 normExpSig; + union ui128_f128 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + sign = signF32UI( uiA ); + exp = expF32UI( uiA ); + frac = fracF32UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp == 0xFF ) { + if ( frac ) { + softfloat_f32UIToCommonNaN( uiA, &commonNaN ); + uiZ = softfloat_commonNaNToF128UI( &commonNaN ); + } else { + uiZ.v64 = packToF128UI64( sign, 0x7FFF, 0 ); + uiZ.v0 = 0; + } + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! exp ) { + if ( ! frac ) { + uiZ.v64 = packToF128UI64( sign, 0, 0 ); + uiZ.v0 = 0; + goto uiZ; + } + normExpSig = softfloat_normSubnormalF32Sig( frac ); + exp = normExpSig.exp - 1; + frac = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uiZ.v64 = packToF128UI64( sign, exp + 0x3F80, (uint_fast64_t) frac<<25 ); + uiZ.v0 = 0; + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_to_f16.c b/extern/riscv-softfloat-standalone/lib/f32_to_f16.c new file mode 100644 index 0000000..7a97158 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_to_f16.c @@ -0,0 +1,88 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float16_t f32_to_f16( float32_t a ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + bool sign; + int_fast16_t exp; + uint_fast32_t frac; + struct commonNaN commonNaN; + uint_fast16_t uiZ, frac16; + union ui16_f16 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + sign = signF32UI( uiA ); + exp = expF32UI( uiA ); + frac = fracF32UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp == 0xFF ) { + if ( frac ) { + softfloat_f32UIToCommonNaN( uiA, &commonNaN ); + uiZ = softfloat_commonNaNToF16UI( &commonNaN ); + } else { + uiZ = packToF16UI( sign, 0x1F, 0 ); + } + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + frac16 = frac>>9 | ((frac & 0x1FF) != 0); + if ( ! (exp | frac16) ) { + uiZ = packToF16UI( sign, 0, 0 ); + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + return softfloat_roundPackToF16( sign, exp - 0x71, frac16 | 0x4000 ); + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_to_f64.c b/extern/riscv-softfloat-standalone/lib/f32_to_f64.c new file mode 100644 index 0000000..f9e02f2 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_to_f64.c @@ -0,0 +1,93 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float64_t f32_to_f64( float32_t a ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + bool sign; + int_fast16_t exp; + uint_fast32_t frac; + struct commonNaN commonNaN; + uint_fast64_t uiZ; + struct exp16_sig32 normExpSig; + union ui64_f64 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + sign = signF32UI( uiA ); + exp = expF32UI( uiA ); + frac = fracF32UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp == 0xFF ) { + if ( frac ) { + softfloat_f32UIToCommonNaN( uiA, &commonNaN ); + uiZ = softfloat_commonNaNToF64UI( &commonNaN ); + } else { + uiZ = packToF64UI( sign, 0x7FF, 0 ); + } + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! exp ) { + if ( ! frac ) { + uiZ = packToF64UI( sign, 0, 0 ); + goto uiZ; + } + normExpSig = softfloat_normSubnormalF32Sig( frac ); + exp = normExpSig.exp - 1; + frac = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uiZ = packToF64UI( sign, exp + 0x380, (uint_fast64_t) frac<<29 ); + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_to_i16.c b/extern/riscv-softfloat-standalone/lib/f32_to_i16.c new file mode 100644 index 0000000..bde4c76 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_to_i16.c @@ -0,0 +1,57 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "specialize.h" +#include "softfloat.h" + +int_fast16_t f32_to_i16( float32_t a, uint_fast8_t roundingMode, bool exact ) +{ + uint_fast8_t old_flags = softfloat_exceptionFlags; + + int_fast32_t sig32 = f32_to_i32(a, roundingMode, exact); + + if (sig32 > INT16_MAX) { + softfloat_exceptionFlags = old_flags | softfloat_flag_invalid; + return i16_fromPosOverflow; + } else if (sig32 < INT16_MIN) { + softfloat_exceptionFlags = old_flags | softfloat_flag_invalid; + return i16_fromNegOverflow; + } else { + return sig32; + } +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_to_i32.c b/extern/riscv-softfloat-standalone/lib/f32_to_i32.c new file mode 100644 index 0000000..c9f2cf9 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_to_i32.c @@ -0,0 +1,84 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +int_fast32_t f32_to_i32( float32_t a, uint_fast8_t roundingMode, bool exact ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + bool sign; + int_fast16_t exp; + uint_fast32_t sig; + uint_fast64_t sig64; + int_fast16_t shiftDist; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + sign = signF32UI( uiA ); + exp = expF32UI( uiA ); + sig = fracF32UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ +#if (i32_fromNaN != i32_fromPosOverflow) || (i32_fromNaN != i32_fromNegOverflow) + if ( (exp == 0xFF) && sig ) { +#if (i32_fromNaN == i32_fromPosOverflow) + sign = 0; +#elif (i32_fromNaN == i32_fromNegOverflow) + sign = 1; +#else + softfloat_raiseFlags( softfloat_flag_invalid ); + return i32_fromNaN; +#endif + } +#endif + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp ) sig |= 0x00800000; + sig64 = (uint_fast64_t) sig<<32; + shiftDist = 0xAA - exp; + if ( 0 < shiftDist ) sig64 = softfloat_shiftRightJam64( sig64, shiftDist ); + return softfloat_roundToI32( sign, sig64, roundingMode, exact ); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_to_i32_r_minMag.c b/extern/riscv-softfloat-standalone/lib/f32_to_i32_r_minMag.c new file mode 100644 index 0000000..1a94dcc --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_to_i32_r_minMag.c @@ -0,0 +1,89 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +int_fast32_t f32_to_i32_r_minMag( float32_t a, bool exact ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + int_fast16_t exp; + uint_fast32_t sig; + int_fast16_t shiftDist; + bool sign; + int_fast32_t absZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + exp = expF32UI( uiA ); + sig = fracF32UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + shiftDist = 0x9E - exp; + if ( 32 <= shiftDist ) { + if ( exact && (exp | sig) ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return 0; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sign = signF32UI( uiA ); + if ( shiftDist <= 0 ) { + if ( uiA == packToF32UI( 1, 0x9E, 0 ) ) return -0x7FFFFFFF - 1; + softfloat_raiseFlags( softfloat_flag_invalid ); + return + (exp == 0xFF) && sig ? i32_fromNaN + : sign ? i32_fromNegOverflow : i32_fromPosOverflow; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sig = (sig | 0x00800000)<<8; + absZ = sig>>shiftDist; + if ( exact && ((uint_fast32_t) absZ< +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +int_fast64_t f32_to_i64( float32_t a, uint_fast8_t roundingMode, bool exact ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + bool sign; + int_fast16_t exp; + uint_fast32_t sig; + int_fast16_t shiftDist; +#ifdef SOFTFLOAT_FAST_INT64 + uint_fast64_t sig64, extra; + struct uint64_extra sig64Extra; +#else + uint32_t extSig[3]; +#endif + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + sign = signF32UI( uiA ); + exp = expF32UI( uiA ); + sig = fracF32UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + shiftDist = 0xBE - exp; + if ( shiftDist < 0 ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return + (exp == 0xFF) && sig ? i64_fromNaN + : sign ? i64_fromNegOverflow : i64_fromPosOverflow; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp ) sig |= 0x00800000; +#ifdef SOFTFLOAT_FAST_INT64 + sig64 = (uint_fast64_t) sig<<40; + extra = 0; + if ( shiftDist ) { + sig64Extra = softfloat_shiftRightJam64Extra( sig64, 0, shiftDist ); + sig64 = sig64Extra.v; + extra = sig64Extra.extra; + } + return softfloat_roundToI64( sign, sig64, extra, roundingMode, exact ); +#else + extSig[indexWord( 3, 2 )] = sig<<8; + extSig[indexWord( 3, 1 )] = 0; + extSig[indexWord( 3, 0 )] = 0; + if ( shiftDist ) softfloat_shiftRightJam96M( extSig, shiftDist, extSig ); + return softfloat_roundMToI64( sign, extSig, roundingMode, exact ); +#endif + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_to_i64_r_minMag.c b/extern/riscv-softfloat-standalone/lib/f32_to_i64_r_minMag.c new file mode 100644 index 0000000..7d336a4 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_to_i64_r_minMag.c @@ -0,0 +1,94 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +int_fast64_t f32_to_i64_r_minMag( float32_t a, bool exact ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + int_fast16_t exp; + uint_fast32_t sig; + int_fast16_t shiftDist; + bool sign; + uint_fast64_t sig64; + int_fast64_t absZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + exp = expF32UI( uiA ); + sig = fracF32UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + shiftDist = 0xBE - exp; + if ( 64 <= shiftDist ) { + if ( exact && (exp | sig) ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return 0; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sign = signF32UI( uiA ); + if ( shiftDist <= 0 ) { + if ( uiA == packToF32UI( 1, 0xBE, 0 ) ) { + return -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1; + } + softfloat_raiseFlags( softfloat_flag_invalid ); + return + (exp == 0xFF) && sig ? i64_fromNaN + : sign ? i64_fromNegOverflow : i64_fromPosOverflow; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sig |= 0x00800000; + sig64 = (uint_fast64_t) sig<<40; + absZ = sig64>>shiftDist; + shiftDist = 40 - shiftDist; + if ( exact && (shiftDist < 0) && (uint32_t) (sig<<(shiftDist & 31)) ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return sign ? -absZ : absZ; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_to_ui16.c b/extern/riscv-softfloat-standalone/lib/f32_to_ui16.c new file mode 100644 index 0000000..073492b --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_to_ui16.c @@ -0,0 +1,53 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "specialize.h" +#include "softfloat.h" + +uint_fast16_t f32_to_ui16( float32_t a, uint_fast8_t roundingMode, bool exact ) +{ + uint_fast8_t old_flags = softfloat_exceptionFlags; + + uint_fast32_t sig32 = f32_to_ui32(a, roundingMode, exact); + + if (sig32 > UINT16_MAX) { + softfloat_exceptionFlags = old_flags | softfloat_flag_invalid; + return ui16_fromPosOverflow; + } else { + return sig32; + } +} diff --git a/extern/riscv-softfloat-standalone/lib/f32_to_ui32.c b/extern/riscv-softfloat-standalone/lib/f32_to_ui32.c new file mode 100644 index 0000000..5ec279b --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_to_ui32.c @@ -0,0 +1,84 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast32_t f32_to_ui32( float32_t a, uint_fast8_t roundingMode, bool exact ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + bool sign; + int_fast16_t exp; + uint_fast32_t sig; + uint_fast64_t sig64; + int_fast16_t shiftDist; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + sign = signF32UI( uiA ); + exp = expF32UI( uiA ); + sig = fracF32UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ +#if (ui32_fromNaN != ui32_fromPosOverflow) || (ui32_fromNaN != ui32_fromNegOverflow) + if ( (exp == 0xFF) && sig ) { +#if (ui32_fromNaN == ui32_fromPosOverflow) + sign = 0; +#elif (ui32_fromNaN == ui32_fromNegOverflow) + sign = 1; +#else + softfloat_raiseFlags( softfloat_flag_invalid ); + return ui32_fromNaN; +#endif + } +#endif + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp ) sig |= 0x00800000; + sig64 = (uint_fast64_t) sig<<32; + shiftDist = 0xAA - exp; + if ( 0 < shiftDist ) sig64 = softfloat_shiftRightJam64( sig64, shiftDist ); + return softfloat_roundToUI32( sign, sig64, roundingMode, exact ); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_to_ui32_r_minMag.c b/extern/riscv-softfloat-standalone/lib/f32_to_ui32_r_minMag.c new file mode 100644 index 0000000..12f7261 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_to_ui32_r_minMag.c @@ -0,0 +1,88 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast32_t f32_to_ui32_r_minMag( float32_t a, bool exact ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + int_fast16_t exp; + uint_fast32_t sig; + int_fast16_t shiftDist; + bool sign; + uint_fast32_t z; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + exp = expF32UI( uiA ); + sig = fracF32UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + shiftDist = 0x9E - exp; + if ( 32 <= shiftDist ) { + if ( exact && (exp | sig) ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return 0; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sign = signF32UI( uiA ); + if ( sign || (shiftDist < 0) ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return + (exp == 0xFF) && sig ? ui32_fromNaN + : sign ? ui32_fromNegOverflow : ui32_fromPosOverflow; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sig = (sig | 0x00800000)<<8; + z = sig>>shiftDist; + if ( exact && (z< +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast64_t f32_to_ui64( float32_t a, uint_fast8_t roundingMode, bool exact ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + bool sign; + int_fast16_t exp; + uint_fast32_t sig; + int_fast16_t shiftDist; +#ifdef SOFTFLOAT_FAST_INT64 + uint_fast64_t sig64, extra; + struct uint64_extra sig64Extra; +#else + uint32_t extSig[3]; +#endif + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + sign = signF32UI( uiA ); + exp = expF32UI( uiA ); + sig = fracF32UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + shiftDist = 0xBE - exp; + if ( shiftDist < 0 ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return + (exp == 0xFF) && sig ? ui64_fromNaN + : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp ) sig |= 0x00800000; +#ifdef SOFTFLOAT_FAST_INT64 + sig64 = (uint_fast64_t) sig<<40; + extra = 0; + if ( shiftDist ) { + sig64Extra = softfloat_shiftRightJam64Extra( sig64, 0, shiftDist ); + sig64 = sig64Extra.v; + extra = sig64Extra.extra; + } + return softfloat_roundToUI64( sign, sig64, extra, roundingMode, exact ); +#else + extSig[indexWord( 3, 2 )] = sig<<8; + extSig[indexWord( 3, 1 )] = 0; + extSig[indexWord( 3, 0 )] = 0; + if ( shiftDist ) softfloat_shiftRightJam96M( extSig, shiftDist, extSig ); + return softfloat_roundMToUI64( sign, extSig, roundingMode, exact ); +#endif + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f32_to_ui64_r_minMag.c b/extern/riscv-softfloat-standalone/lib/f32_to_ui64_r_minMag.c new file mode 100644 index 0000000..f96f3e1 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f32_to_ui64_r_minMag.c @@ -0,0 +1,90 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast64_t f32_to_ui64_r_minMag( float32_t a, bool exact ) +{ + union ui32_f32 uA; + uint_fast32_t uiA; + int_fast16_t exp; + uint_fast32_t sig; + int_fast16_t shiftDist; + bool sign; + uint_fast64_t sig64, z; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + exp = expF32UI( uiA ); + sig = fracF32UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + shiftDist = 0xBE - exp; + if ( 64 <= shiftDist ) { + if ( exact && (exp | sig) ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return 0; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sign = signF32UI( uiA ); + if ( sign || (shiftDist < 0) ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return + (exp == 0xFF) && sig ? ui64_fromNaN + : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sig |= 0x00800000; + sig64 = (uint_fast64_t) sig<<40; + z = sig64>>shiftDist; + shiftDist = 40 - shiftDist; + if ( exact && (shiftDist < 0) && (uint32_t) (sig<<(shiftDist & 31)) ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return z; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_add.c b/extern/riscv-softfloat-standalone/lib/f64_add.c new file mode 100644 index 0000000..e9880dd --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_add.c @@ -0,0 +1,74 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float64_t f64_add( float64_t a, float64_t b ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + bool signA; + union ui64_f64 uB; + uint_fast64_t uiB; + bool signB; +#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2) + float64_t (*magsFuncPtr)( uint_fast64_t, uint_fast64_t, bool ); +#endif + + uA.f = a; + uiA = uA.ui; + signA = signF64UI( uiA ); + uB.f = b; + uiB = uB.ui; + signB = signF64UI( uiB ); +#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) + if ( signA == signB ) { + return softfloat_addMagsF64( uiA, uiB, signA ); + } else { + return softfloat_subMagsF64( uiA, uiB, signA ); + } +#else + magsFuncPtr = + (signA == signB) ? softfloat_addMagsF64 : softfloat_subMagsF64; + return (*magsFuncPtr)( uiA, uiB, signA ); +#endif + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_classify.c b/extern/riscv-softfloat-standalone/lib/f64_classify.c new file mode 100755 index 0000000..180abde --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_classify.c @@ -0,0 +1,36 @@ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast16_t f64_classify( float64_t a ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + + uA.f = a; + uiA = uA.ui; + + uint_fast16_t infOrNaN = expF64UI( uiA ) == 0x7FF; + uint_fast16_t subnormalOrZero = expF64UI( uiA ) == 0; + bool sign = signF64UI( uiA ); + bool fracZero = fracF64UI( uiA ) == 0; + bool isNaN = isNaNF64UI( uiA ); + bool isSNaN = softfloat_isSigNaNF64UI( uiA ); + + return + ( sign && infOrNaN && fracZero ) << 0 | + ( sign && !infOrNaN && !subnormalOrZero ) << 1 | + ( sign && subnormalOrZero && !fracZero ) << 2 | + ( sign && subnormalOrZero && fracZero ) << 3 | + ( !sign && infOrNaN && fracZero ) << 7 | + ( !sign && !infOrNaN && !subnormalOrZero ) << 6 | + ( !sign && subnormalOrZero && !fracZero ) << 5 | + ( !sign && subnormalOrZero && fracZero ) << 4 | + ( isNaN && isSNaN ) << 8 | + ( isNaN && !isSNaN ) << 9; +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_div.c b/extern/riscv-softfloat-standalone/lib/f64_div.c new file mode 100644 index 0000000..c5a2d4f --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_div.c @@ -0,0 +1,172 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float64_t f64_div( float64_t a, float64_t b ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + bool signA; + int_fast16_t expA; + uint_fast64_t sigA; + union ui64_f64 uB; + uint_fast64_t uiB; + bool signB; + int_fast16_t expB; + uint_fast64_t sigB; + bool signZ; + struct exp16_sig64 normExpSig; + int_fast16_t expZ; + uint32_t recip32, sig32Z, doubleTerm; + uint_fast64_t rem; + uint32_t q; + uint_fast64_t sigZ; + uint_fast64_t uiZ; + union ui64_f64 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + signA = signF64UI( uiA ); + expA = expF64UI( uiA ); + sigA = fracF64UI( uiA ); + uB.f = b; + uiB = uB.ui; + signB = signF64UI( uiB ); + expB = expF64UI( uiB ); + sigB = fracF64UI( uiB ); + signZ = signA ^ signB; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( expA == 0x7FF ) { + if ( sigA ) goto propagateNaN; + if ( expB == 0x7FF ) { + if ( sigB ) goto propagateNaN; + goto invalid; + } + goto infinity; + } + if ( expB == 0x7FF ) { + if ( sigB ) goto propagateNaN; + goto zero; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! expB ) { + if ( ! sigB ) { + if ( ! (expA | sigA) ) goto invalid; + softfloat_raiseFlags( softfloat_flag_infinite ); + goto infinity; + } + normExpSig = softfloat_normSubnormalF64Sig( sigB ); + expB = normExpSig.exp; + sigB = normExpSig.sig; + } + if ( ! expA ) { + if ( ! sigA ) goto zero; + normExpSig = softfloat_normSubnormalF64Sig( sigA ); + expA = normExpSig.exp; + sigA = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expZ = expA - expB + 0x3FE; + sigA |= UINT64_C( 0x0010000000000000 ); + sigB |= UINT64_C( 0x0010000000000000 ); + if ( sigA < sigB ) { + --expZ; + sigA <<= 11; + } else { + sigA <<= 10; + } + sigB <<= 11; + recip32 = softfloat_approxRecip32_1( sigB>>32 ) - 2; + sig32Z = ((uint32_t) (sigA>>32) * (uint_fast64_t) recip32)>>32; + doubleTerm = sig32Z<<1; + rem = + ((sigA - (uint_fast64_t) doubleTerm * (uint32_t) (sigB>>32))<<28) + - (uint_fast64_t) doubleTerm * ((uint32_t) sigB>>4); + q = (((uint32_t) (rem>>32) * (uint_fast64_t) recip32)>>32) + 4; + sigZ = ((uint_fast64_t) sig32Z<<32) + ((uint_fast64_t) q<<4); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( (sigZ & 0x1FF) < 4<<4 ) { + q &= ~7; + sigZ &= ~(uint_fast64_t) 0x7F; + doubleTerm = q<<1; + rem = + ((rem - (uint_fast64_t) doubleTerm * (uint32_t) (sigB>>32))<<28) + - (uint_fast64_t) doubleTerm * ((uint32_t) sigB>>4); + if ( rem & UINT64_C( 0x8000000000000000 ) ) { + sigZ -= 1<<7; + } else { + if ( rem ) sigZ |= 1; + } + } + return softfloat_roundPackToF64( signZ, expZ, sigZ ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + propagateNaN: + uiZ = softfloat_propagateNaNF64UI( uiA, uiB ); + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + uiZ = defaultNaNF64UI; + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + infinity: + uiZ = packToF64UI( signZ, 0x7FF, 0 ); + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + zero: + uiZ = packToF64UI( signZ, 0, 0 ); + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_eq.c b/extern/riscv-softfloat-standalone/lib/f64_eq.c new file mode 100644 index 0000000..ccb602a --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_eq.c @@ -0,0 +1,66 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +bool f64_eq( float64_t a, float64_t b ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + union ui64_f64 uB; + uint_fast64_t uiB; + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; + if ( isNaNF64UI( uiA ) || isNaNF64UI( uiB ) ) { + if ( + softfloat_isSigNaNF64UI( uiA ) || softfloat_isSigNaNF64UI( uiB ) + ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + } + return false; + } + return (uiA == uiB) || ! ((uiA | uiB) & UINT64_C( 0x7FFFFFFFFFFFFFFF )); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_eq_signaling.c b/extern/riscv-softfloat-standalone/lib/f64_eq_signaling.c new file mode 100644 index 0000000..ee5a441 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_eq_signaling.c @@ -0,0 +1,61 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +bool f64_eq_signaling( float64_t a, float64_t b ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + union ui64_f64 uB; + uint_fast64_t uiB; + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; + if ( isNaNF64UI( uiA ) || isNaNF64UI( uiB ) ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return false; + } + return (uiA == uiB) || ! ((uiA | uiB) & UINT64_C( 0x7FFFFFFFFFFFFFFF )); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_isSignalingNaN.c b/extern/riscv-softfloat-standalone/lib/f64_isSignalingNaN.c new file mode 100644 index 0000000..f55acb4 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_isSignalingNaN.c @@ -0,0 +1,51 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +bool f64_isSignalingNaN( float64_t a ) +{ + union ui64_f64 uA; + + uA.f = a; + return softfloat_isSigNaNF64UI( uA.ui ); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_le.c b/extern/riscv-softfloat-standalone/lib/f64_le.c new file mode 100644 index 0000000..91fc994 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_le.c @@ -0,0 +1,67 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +bool f64_le( float64_t a, float64_t b ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + union ui64_f64 uB; + uint_fast64_t uiB; + bool signA, signB; + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; + if ( isNaNF64UI( uiA ) || isNaNF64UI( uiB ) ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return false; + } + signA = signF64UI( uiA ); + signB = signF64UI( uiB ); + return + (signA != signB) + ? signA || ! ((uiA | uiB) & UINT64_C( 0x7FFFFFFFFFFFFFFF )) + : (uiA == uiB) || (signA ^ (uiA < uiB)); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_le_quiet.c b/extern/riscv-softfloat-standalone/lib/f64_le_quiet.c new file mode 100644 index 0000000..a5d332a --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_le_quiet.c @@ -0,0 +1,72 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +bool f64_le_quiet( float64_t a, float64_t b ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + union ui64_f64 uB; + uint_fast64_t uiB; + bool signA, signB; + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; + if ( isNaNF64UI( uiA ) || isNaNF64UI( uiB ) ) { + if ( + softfloat_isSigNaNF64UI( uiA ) || softfloat_isSigNaNF64UI( uiB ) + ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + } + return false; + } + signA = signF64UI( uiA ); + signB = signF64UI( uiB ); + return + (signA != signB) + ? signA || ! ((uiA | uiB) & UINT64_C( 0x7FFFFFFFFFFFFFFF )) + : (uiA == uiB) || (signA ^ (uiA < uiB)); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_lt.c b/extern/riscv-softfloat-standalone/lib/f64_lt.c new file mode 100644 index 0000000..abf62fd --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_lt.c @@ -0,0 +1,67 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +bool f64_lt( float64_t a, float64_t b ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + union ui64_f64 uB; + uint_fast64_t uiB; + bool signA, signB; + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; + if ( isNaNF64UI( uiA ) || isNaNF64UI( uiB ) ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return false; + } + signA = signF64UI( uiA ); + signB = signF64UI( uiB ); + return + (signA != signB) + ? signA && ((uiA | uiB) & UINT64_C( 0x7FFFFFFFFFFFFFFF )) + : (uiA != uiB) && (signA ^ (uiA < uiB)); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_lt_quiet.c b/extern/riscv-softfloat-standalone/lib/f64_lt_quiet.c new file mode 100644 index 0000000..6531f57 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_lt_quiet.c @@ -0,0 +1,72 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +bool f64_lt_quiet( float64_t a, float64_t b ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + union ui64_f64 uB; + uint_fast64_t uiB; + bool signA, signB; + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; + if ( isNaNF64UI( uiA ) || isNaNF64UI( uiB ) ) { + if ( + softfloat_isSigNaNF64UI( uiA ) || softfloat_isSigNaNF64UI( uiB ) + ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + } + return false; + } + signA = signF64UI( uiA ); + signB = signF64UI( uiB ); + return + (signA != signB) + ? signA && ((uiA | uiB) & UINT64_C( 0x7FFFFFFFFFFFFFFF )) + : (uiA != uiB) && (signA ^ (uiA < uiB)); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_mul.c b/extern/riscv-softfloat-standalone/lib/f64_mul.c new file mode 100644 index 0000000..86f6654 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_mul.c @@ -0,0 +1,150 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float64_t f64_mul( float64_t a, float64_t b ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + bool signA; + int_fast16_t expA; + uint_fast64_t sigA; + union ui64_f64 uB; + uint_fast64_t uiB; + bool signB; + int_fast16_t expB; + uint_fast64_t sigB; + bool signZ; + uint_fast64_t magBits; + struct exp16_sig64 normExpSig; + int_fast16_t expZ; +#ifdef SOFTFLOAT_FAST_INT64 + struct uint128 sig128Z; +#else + uint32_t sig128Z[4]; +#endif + uint_fast64_t sigZ, uiZ; + union ui64_f64 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + signA = signF64UI( uiA ); + expA = expF64UI( uiA ); + sigA = fracF64UI( uiA ); + uB.f = b; + uiB = uB.ui; + signB = signF64UI( uiB ); + expB = expF64UI( uiB ); + sigB = fracF64UI( uiB ); + signZ = signA ^ signB; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( expA == 0x7FF ) { + if ( sigA || ((expB == 0x7FF) && sigB) ) goto propagateNaN; + magBits = expB | sigB; + goto infArg; + } + if ( expB == 0x7FF ) { + if ( sigB ) goto propagateNaN; + magBits = expA | sigA; + goto infArg; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! expA ) { + if ( ! sigA ) goto zero; + normExpSig = softfloat_normSubnormalF64Sig( sigA ); + expA = normExpSig.exp; + sigA = normExpSig.sig; + } + if ( ! expB ) { + if ( ! sigB ) goto zero; + normExpSig = softfloat_normSubnormalF64Sig( sigB ); + expB = normExpSig.exp; + sigB = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expZ = expA + expB - 0x3FF; + sigA = (sigA | UINT64_C( 0x0010000000000000 ))<<10; + sigB = (sigB | UINT64_C( 0x0010000000000000 ))<<11; +#ifdef SOFTFLOAT_FAST_INT64 + sig128Z = softfloat_mul64To128( sigA, sigB ); + sigZ = sig128Z.v64 | (sig128Z.v0 != 0); +#else + softfloat_mul64To128M( sigA, sigB, sig128Z ); + sigZ = + (uint64_t) sig128Z[indexWord( 4, 3 )]<<32 | sig128Z[indexWord( 4, 2 )]; + if ( sig128Z[indexWord( 4, 1 )] || sig128Z[indexWord( 4, 0 )] ) sigZ |= 1; +#endif + if ( sigZ < UINT64_C( 0x4000000000000000 ) ) { + --expZ; + sigZ <<= 1; + } + return softfloat_roundPackToF64( signZ, expZ, sigZ ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + propagateNaN: + uiZ = softfloat_propagateNaNF64UI( uiA, uiB ); + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + infArg: + if ( ! magBits ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + uiZ = defaultNaNF64UI; + } else { + uiZ = packToF64UI( signZ, 0x7FF, 0 ); + } + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + zero: + uiZ = packToF64UI( signZ, 0, 0 ); + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_mulAdd.c b/extern/riscv-softfloat-standalone/lib/f64_mulAdd.c new file mode 100644 index 0000000..67fc44d --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_mulAdd.c @@ -0,0 +1,60 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float64_t f64_mulAdd( float64_t a, float64_t b, float64_t c ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + union ui64_f64 uB; + uint_fast64_t uiB; + union ui64_f64 uC; + uint_fast64_t uiC; + + uA.f = a; + uiA = uA.ui; + uB.f = b; + uiB = uB.ui; + uC.f = c; + uiC = uC.ui; + return softfloat_mulAddF64( uiA, uiB, uiC, 0 ); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_rem.c b/extern/riscv-softfloat-standalone/lib/f64_rem.c new file mode 100644 index 0000000..e917455 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_rem.c @@ -0,0 +1,189 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float64_t f64_rem( float64_t a, float64_t b ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + bool signA; + int_fast16_t expA; + uint_fast64_t sigA; + union ui64_f64 uB; + uint_fast64_t uiB; + int_fast16_t expB; + uint_fast64_t sigB; + struct exp16_sig64 normExpSig; + uint64_t rem; + int_fast16_t expDiff; + uint32_t q, recip32; + uint_fast64_t q64; + uint64_t altRem, meanRem; + bool signRem; + uint_fast64_t uiZ; + union ui64_f64 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + signA = signF64UI( uiA ); + expA = expF64UI( uiA ); + sigA = fracF64UI( uiA ); + uB.f = b; + uiB = uB.ui; + expB = expF64UI( uiB ); + sigB = fracF64UI( uiB ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( expA == 0x7FF ) { + if ( sigA || ((expB == 0x7FF) && sigB) ) goto propagateNaN; + goto invalid; + } + if ( expB == 0x7FF ) { + if ( sigB ) goto propagateNaN; + return a; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( expA < expB - 1 ) return a; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! expB ) { + if ( ! sigB ) goto invalid; + normExpSig = softfloat_normSubnormalF64Sig( sigB ); + expB = normExpSig.exp; + sigB = normExpSig.sig; + } + if ( ! expA ) { + if ( ! sigA ) return a; + normExpSig = softfloat_normSubnormalF64Sig( sigA ); + expA = normExpSig.exp; + sigA = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + rem = sigA | UINT64_C( 0x0010000000000000 ); + sigB |= UINT64_C( 0x0010000000000000 ); + expDiff = expA - expB; + if ( expDiff < 1 ) { + if ( expDiff < -1 ) return a; + sigB <<= 9; + if ( expDiff ) { + rem <<= 8; + q = 0; + } else { + rem <<= 9; + q = (sigB <= rem); + if ( q ) rem -= sigB; + } + } else { + recip32 = softfloat_approxRecip32_1( sigB>>21 ); + /*-------------------------------------------------------------------- + | Changing the shift of `rem' here requires also changing the initial + | subtraction from `expDiff'. + *--------------------------------------------------------------------*/ + rem <<= 9; + expDiff -= 30; + /*-------------------------------------------------------------------- + | The scale of `sigB' affects how many bits are obtained during each + | cycle of the loop. Currently this is 29 bits per loop iteration, + | the maximum possible. + *--------------------------------------------------------------------*/ + sigB <<= 9; + for (;;) { + q64 = (uint32_t) (rem>>32) * (uint_fast64_t) recip32; + if ( expDiff < 0 ) break; + q = (q64 + 0x80000000)>>32; +#ifdef SOFTFLOAT_FAST_INT64 + rem <<= 29; +#else + rem = (uint_fast64_t) (uint32_t) (rem>>3)<<32; +#endif + rem -= q * (uint64_t) sigB; + if ( rem & UINT64_C( 0x8000000000000000 ) ) rem += sigB; + expDiff -= 29; + } + /*-------------------------------------------------------------------- + | (`expDiff' cannot be less than -29 here.) + *--------------------------------------------------------------------*/ + q = (uint32_t) (q64>>32)>>(~expDiff & 31); + rem = (rem<<(expDiff + 30)) - q * (uint64_t) sigB; + if ( rem & UINT64_C( 0x8000000000000000 ) ) { + altRem = rem + sigB; + goto selectRem; + } + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + do { + altRem = rem; + ++q; + rem -= sigB; + } while ( ! (rem & UINT64_C( 0x8000000000000000 )) ); + selectRem: + meanRem = rem + altRem; + if ( + (meanRem & UINT64_C( 0x8000000000000000 )) || (! meanRem && (q & 1)) + ) { + rem = altRem; + } + signRem = signA; + if ( rem & UINT64_C( 0x8000000000000000 ) ) { + signRem = ! signRem; + rem = -rem; + } + return softfloat_normRoundPackToF64( signRem, expB, rem ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + propagateNaN: + uiZ = softfloat_propagateNaNF64UI( uiA, uiB ); + goto uiZ; + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + uiZ = defaultNaNF64UI; + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_roundToInt.c b/extern/riscv-softfloat-standalone/lib/f64_roundToInt.c new file mode 100644 index 0000000..7f81007 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_roundToInt.c @@ -0,0 +1,112 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float64_t f64_roundToInt( float64_t a, uint_fast8_t roundingMode, bool exact ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + int_fast16_t exp; + uint_fast64_t uiZ, lastBitMask, roundBitsMask; + union ui64_f64 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + exp = expF64UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp <= 0x3FE ) { + if ( ! (uiA & UINT64_C( 0x7FFFFFFFFFFFFFFF )) ) return a; + if ( exact ) softfloat_exceptionFlags |= softfloat_flag_inexact; + uiZ = uiA & packToF64UI( 1, 0, 0 ); + switch ( roundingMode ) { + case softfloat_round_near_even: + if ( ! fracF64UI( uiA ) ) break; + case softfloat_round_near_maxMag: + if ( exp == 0x3FE ) uiZ |= packToF64UI( 0, 0x3FF, 0 ); + break; + case softfloat_round_min: + if ( uiZ ) uiZ = packToF64UI( 1, 0x3FF, 0 ); + break; + case softfloat_round_max: + if ( ! uiZ ) uiZ = packToF64UI( 0, 0x3FF, 0 ); + break; + } + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( 0x433 <= exp ) { + if ( (exp == 0x7FF) && fracF64UI( uiA ) ) { + uiZ = softfloat_propagateNaNF64UI( uiA, 0 ); + goto uiZ; + } + return a; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uiZ = uiA; + lastBitMask = (uint_fast64_t) 1<<(0x433 - exp); + roundBitsMask = lastBitMask - 1; + if ( roundingMode == softfloat_round_near_maxMag ) { + uiZ += lastBitMask>>1; + } else if ( roundingMode == softfloat_round_near_even ) { + uiZ += lastBitMask>>1; + if ( ! (uiZ & roundBitsMask) ) uiZ &= ~lastBitMask; + } else if ( + roundingMode + == (signF64UI( uiZ ) ? softfloat_round_min : softfloat_round_max) + ) { + uiZ += roundBitsMask; + } + uiZ &= ~roundBitsMask; + if ( exact && (uiZ != uiA) ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_sqrt.c b/extern/riscv-softfloat-standalone/lib/f64_sqrt.c new file mode 100644 index 0000000..9a06cfa --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_sqrt.c @@ -0,0 +1,133 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float64_t f64_sqrt( float64_t a ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + bool signA; + int_fast16_t expA; + uint_fast64_t sigA, uiZ; + struct exp16_sig64 normExpSig; + int_fast16_t expZ; + uint32_t sig32A, recipSqrt32, sig32Z; + uint_fast64_t rem; + uint32_t q; + uint_fast64_t sigZ, shiftedSigZ; + union ui64_f64 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + signA = signF64UI( uiA ); + expA = expF64UI( uiA ); + sigA = fracF64UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( expA == 0x7FF ) { + if ( sigA ) { + uiZ = softfloat_propagateNaNF64UI( uiA, 0 ); + goto uiZ; + } + if ( ! signA ) return a; + goto invalid; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( signA ) { + if ( ! (expA | sigA) ) return a; + goto invalid; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! expA ) { + if ( ! sigA ) return a; + normExpSig = softfloat_normSubnormalF64Sig( sigA ); + expA = normExpSig.exp; + sigA = normExpSig.sig; + } + /*------------------------------------------------------------------------ + | (`sig32Z' is guaranteed to be a lower bound on the square root of + | `sig32A', which makes `sig32Z' also a lower bound on the square root of + | `sigA'.) + *------------------------------------------------------------------------*/ + expZ = ((expA - 0x3FF)>>1) + 0x3FE; + expA &= 1; + sigA |= UINT64_C( 0x0010000000000000 ); + sig32A = sigA>>21; + recipSqrt32 = softfloat_approxRecipSqrt32_1( expA, sig32A ); + sig32Z = ((uint_fast64_t) sig32A * recipSqrt32)>>32; + if ( expA ) { + sigA <<= 8; + sig32Z >>= 1; + } else { + sigA <<= 9; + } + rem = sigA - (uint_fast64_t) sig32Z * sig32Z; + q = ((uint32_t) (rem>>2) * (uint_fast64_t) recipSqrt32)>>32; + sigZ = ((uint_fast64_t) sig32Z<<32 | 1<<5) + ((uint_fast64_t) q<<3); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( (sigZ & 0x1FF) < 0x22 ) { + sigZ &= ~(uint_fast64_t) 0x3F; + shiftedSigZ = sigZ>>6; + rem = (sigA<<52) - shiftedSigZ * shiftedSigZ; + if ( rem & UINT64_C( 0x8000000000000000 ) ) { + --sigZ; + } else { + if ( rem ) sigZ |= 1; + } + } + return softfloat_roundPackToF64( 0, expZ, sigZ ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + uiZ = defaultNaNF64UI; + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_sub.c b/extern/riscv-softfloat-standalone/lib/f64_sub.c new file mode 100644 index 0000000..0e990cd --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_sub.c @@ -0,0 +1,74 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float64_t f64_sub( float64_t a, float64_t b ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + bool signA; + union ui64_f64 uB; + uint_fast64_t uiB; + bool signB; +#if ! defined INLINE_LEVEL || (INLINE_LEVEL < 2) + float64_t (*magsFuncPtr)( uint_fast64_t, uint_fast64_t, bool ); +#endif + + uA.f = a; + uiA = uA.ui; + signA = signF64UI( uiA ); + uB.f = b; + uiB = uB.ui; + signB = signF64UI( uiB ); +#if defined INLINE_LEVEL && (2 <= INLINE_LEVEL) + if ( signA == signB ) { + return softfloat_subMagsF64( uiA, uiB, signA ); + } else { + return softfloat_addMagsF64( uiA, uiB, signA ); + } +#else + magsFuncPtr = + (signA == signB) ? softfloat_subMagsF64 : softfloat_addMagsF64; + return (*magsFuncPtr)( uiA, uiB, signA ); +#endif + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_to_f128.c b/extern/riscv-softfloat-standalone/lib/f64_to_f128.c new file mode 100644 index 0000000..92c2d56 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_to_f128.c @@ -0,0 +1,98 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float128_t f64_to_f128( float64_t a ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + bool sign; + int_fast16_t exp; + uint_fast64_t frac; + struct commonNaN commonNaN; + struct uint128 uiZ; + struct exp16_sig64 normExpSig; + struct uint128 frac128; + union ui128_f128 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + sign = signF64UI( uiA ); + exp = expF64UI( uiA ); + frac = fracF64UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp == 0x7FF ) { + if ( frac ) { + softfloat_f64UIToCommonNaN( uiA, &commonNaN ); + uiZ = softfloat_commonNaNToF128UI( &commonNaN ); + } else { + uiZ.v64 = packToF128UI64( sign, 0x7FFF, 0 ); + uiZ.v0 = 0; + } + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! exp ) { + if ( ! frac ) { + uiZ.v64 = packToF128UI64( sign, 0, 0 ); + uiZ.v0 = 0; + goto uiZ; + } + normExpSig = softfloat_normSubnormalF64Sig( frac ); + exp = normExpSig.exp - 1; + frac = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + frac128 = softfloat_shortShiftLeft128( 0, frac, 60 ); + uiZ.v64 = packToF128UI64( sign, exp + 0x3C00, frac128.v64 ); + uiZ.v0 = frac128.v0; + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_to_f16.c b/extern/riscv-softfloat-standalone/lib/f64_to_f16.c new file mode 100644 index 0000000..325788c --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_to_f16.c @@ -0,0 +1,88 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float16_t f64_to_f16( float64_t a ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + bool sign; + int_fast16_t exp; + uint_fast64_t frac; + struct commonNaN commonNaN; + uint_fast16_t uiZ, frac16; + union ui16_f16 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + sign = signF64UI( uiA ); + exp = expF64UI( uiA ); + frac = fracF64UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp == 0x7FF ) { + if ( frac ) { + softfloat_f64UIToCommonNaN( uiA, &commonNaN ); + uiZ = softfloat_commonNaNToF16UI( &commonNaN ); + } else { + uiZ = packToF16UI( sign, 0x1F, 0 ); + } + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + frac16 = softfloat_shortShiftRightJam64( frac, 38 ); + if ( ! (exp | frac16) ) { + uiZ = packToF16UI( sign, 0, 0 ); + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + return softfloat_roundPackToF16( sign, exp - 0x3F1, frac16 | 0x4000 ); + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_to_f32.c b/extern/riscv-softfloat-standalone/lib/f64_to_f32.c new file mode 100644 index 0000000..99b13dd --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_to_f32.c @@ -0,0 +1,88 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float32_t f64_to_f32( float64_t a ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + bool sign; + int_fast16_t exp; + uint_fast64_t frac; + struct commonNaN commonNaN; + uint_fast32_t uiZ, frac32; + union ui32_f32 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + sign = signF64UI( uiA ); + exp = expF64UI( uiA ); + frac = fracF64UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp == 0x7FF ) { + if ( frac ) { + softfloat_f64UIToCommonNaN( uiA, &commonNaN ); + uiZ = softfloat_commonNaNToF32UI( &commonNaN ); + } else { + uiZ = packToF32UI( sign, 0xFF, 0 ); + } + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + frac32 = softfloat_shortShiftRightJam64( frac, 22 ); + if ( ! (exp | frac32) ) { + uiZ = packToF32UI( sign, 0, 0 ); + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + return softfloat_roundPackToF32( sign, exp - 0x381, frac32 | 0x40000000 ); + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_to_i32.c b/extern/riscv-softfloat-standalone/lib/f64_to_i32.c new file mode 100644 index 0000000..8712c0a --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_to_i32.c @@ -0,0 +1,82 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +int_fast32_t f64_to_i32( float64_t a, uint_fast8_t roundingMode, bool exact ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + bool sign; + int_fast16_t exp; + uint_fast64_t sig; + int_fast16_t shiftDist; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + sign = signF64UI( uiA ); + exp = expF64UI( uiA ); + sig = fracF64UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ +#if (i32_fromNaN != i32_fromPosOverflow) || (i32_fromNaN != i32_fromNegOverflow) + if ( (exp == 0x7FF) && sig ) { +#if (i32_fromNaN == i32_fromPosOverflow) + sign = 0; +#elif (i32_fromNaN == i32_fromNegOverflow) + sign = 1; +#else + softfloat_raiseFlags( softfloat_flag_invalid ); + return i32_fromNaN; +#endif + } +#endif + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp ) sig |= UINT64_C( 0x0010000000000000 ); + shiftDist = 0x427 - exp; + if ( 0 < shiftDist ) sig = softfloat_shiftRightJam64( sig, shiftDist ); + return softfloat_roundToI32( sign, sig, roundingMode, exact ); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_to_i32_r_minMag.c b/extern/riscv-softfloat-standalone/lib/f64_to_i32_r_minMag.c new file mode 100644 index 0000000..b7e1e03 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_to_i32_r_minMag.c @@ -0,0 +1,96 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +int_fast32_t f64_to_i32_r_minMag( float64_t a, bool exact ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + int_fast16_t exp; + uint_fast64_t sig; + int_fast16_t shiftDist; + bool sign; + int_fast32_t absZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + exp = expF64UI( uiA ); + sig = fracF64UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + shiftDist = 0x433 - exp; + if ( 53 <= shiftDist ) { + if ( exact && (exp | sig) ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return 0; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sign = signF64UI( uiA ); + if ( shiftDist < 22 ) { + if ( + sign && (exp == 0x41E) && (sig < UINT64_C( 0x0000000000200000 )) + ) { + if ( exact && sig ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return -0x7FFFFFFF - 1; + } + softfloat_raiseFlags( softfloat_flag_invalid ); + return + (exp == 0x7FF) && sig ? i32_fromNaN + : sign ? i32_fromNegOverflow : i32_fromPosOverflow; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sig |= UINT64_C( 0x0010000000000000 ); + absZ = sig>>shiftDist; + if ( exact && ((uint_fast64_t) (uint_fast32_t) absZ< +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +int_fast64_t f64_to_i64( float64_t a, uint_fast8_t roundingMode, bool exact ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + bool sign; + int_fast16_t exp; + uint_fast64_t sig; + int_fast16_t shiftDist; +#ifdef SOFTFLOAT_FAST_INT64 + struct uint64_extra sigExtra; +#else + uint32_t extSig[3]; +#endif + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + sign = signF64UI( uiA ); + exp = expF64UI( uiA ); + sig = fracF64UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp ) sig |= UINT64_C( 0x0010000000000000 ); + shiftDist = 0x433 - exp; +#ifdef SOFTFLOAT_FAST_INT64 + if ( shiftDist <= 0 ) { + if ( shiftDist < -11 ) goto invalid; + sigExtra.v = sig<<-shiftDist; + sigExtra.extra = 0; + } else { + sigExtra = softfloat_shiftRightJam64Extra( sig, 0, shiftDist ); + } + return + softfloat_roundToI64( + sign, sigExtra.v, sigExtra.extra, roundingMode, exact ); +#else + extSig[indexWord( 3, 0 )] = 0; + if ( shiftDist <= 0 ) { + if ( shiftDist < -11 ) goto invalid; + sig <<= -shiftDist; + extSig[indexWord( 3, 2 )] = sig>>32; + extSig[indexWord( 3, 1 )] = sig; + } else { + extSig[indexWord( 3, 2 )] = sig>>32; + extSig[indexWord( 3, 1 )] = sig; + softfloat_shiftRightJam96M( extSig, shiftDist, extSig ); + } + return softfloat_roundMToI64( sign, extSig, roundingMode, exact ); +#endif + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + return + (exp == 0x7FF) && fracF64UI( uiA ) ? i64_fromNaN + : sign ? i64_fromNegOverflow : i64_fromPosOverflow; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_to_i64_r_minMag.c b/extern/riscv-softfloat-standalone/lib/f64_to_i64_r_minMag.c new file mode 100644 index 0000000..3822606 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_to_i64_r_minMag.c @@ -0,0 +1,100 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +int_fast64_t f64_to_i64_r_minMag( float64_t a, bool exact ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + bool sign; + int_fast16_t exp; + uint_fast64_t sig; + int_fast16_t shiftDist; + int_fast64_t absZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + sign = signF64UI( uiA ); + exp = expF64UI( uiA ); + sig = fracF64UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + shiftDist = 0x433 - exp; + if ( shiftDist <= 0 ) { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( shiftDist < -10 ) { + if ( uiA == packToF64UI( 1, 0x43E, 0 ) ) { + return -INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1; + } + softfloat_raiseFlags( softfloat_flag_invalid ); + return + (exp == 0x7FF) && sig ? i64_fromNaN + : sign ? i64_fromNegOverflow : i64_fromPosOverflow; + } + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + sig |= UINT64_C( 0x0010000000000000 ); + absZ = sig<<-shiftDist; + } else { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( 53 <= shiftDist ) { + if ( exact && (exp | sig) ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return 0; + } + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + sig |= UINT64_C( 0x0010000000000000 ); + absZ = sig>>shiftDist; + if ( exact && (absZ< +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast32_t f64_to_ui32( float64_t a, uint_fast8_t roundingMode, bool exact ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + bool sign; + int_fast16_t exp; + uint_fast64_t sig; + int_fast16_t shiftDist; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + sign = signF64UI( uiA ); + exp = expF64UI( uiA ); + sig = fracF64UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ +#if (ui32_fromNaN != ui32_fromPosOverflow) || (ui32_fromNaN != ui32_fromNegOverflow) + if ( (exp == 0x7FF) && sig ) { +#if (ui32_fromNaN == ui32_fromPosOverflow) + sign = 0; +#elif (ui32_fromNaN == ui32_fromNegOverflow) + sign = 1; +#else + softfloat_raiseFlags( softfloat_flag_invalid ); + return ui32_fromNaN; +#endif + } +#endif + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp ) sig |= UINT64_C( 0x0010000000000000 ); + shiftDist = 0x427 - exp; + if ( 0 < shiftDist ) sig = softfloat_shiftRightJam64( sig, shiftDist ); + return softfloat_roundToUI32( sign, sig, roundingMode, exact ); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_to_ui32_r_minMag.c b/extern/riscv-softfloat-standalone/lib/f64_to_ui32_r_minMag.c new file mode 100644 index 0000000..11f0b05 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_to_ui32_r_minMag.c @@ -0,0 +1,88 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast32_t f64_to_ui32_r_minMag( float64_t a, bool exact ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + int_fast16_t exp; + uint_fast64_t sig; + int_fast16_t shiftDist; + bool sign; + uint_fast32_t z; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + exp = expF64UI( uiA ); + sig = fracF64UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + shiftDist = 0x433 - exp; + if ( 53 <= shiftDist ) { + if ( exact && (exp | sig) ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return 0; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sign = signF64UI( uiA ); + if ( sign || (shiftDist < 21) ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + return + (exp == 0x7FF) && sig ? ui32_fromNaN + : sign ? ui32_fromNegOverflow : ui32_fromPosOverflow; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sig |= UINT64_C( 0x0010000000000000 ); + z = sig>>shiftDist; + if ( exact && ((uint_fast64_t) z< +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast64_t f64_to_ui64( float64_t a, uint_fast8_t roundingMode, bool exact ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + bool sign; + int_fast16_t exp; + uint_fast64_t sig; + int_fast16_t shiftDist; +#ifdef SOFTFLOAT_FAST_INT64 + struct uint64_extra sigExtra; +#else + uint32_t extSig[3]; +#endif + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + sign = signF64UI( uiA ); + exp = expF64UI( uiA ); + sig = fracF64UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( exp ) sig |= UINT64_C( 0x0010000000000000 ); + shiftDist = 0x433 - exp; +#ifdef SOFTFLOAT_FAST_INT64 + if ( shiftDist <= 0 ) { + if ( shiftDist < -11 ) goto invalid; + sigExtra.v = sig<<-shiftDist; + sigExtra.extra = 0; + } else { + sigExtra = softfloat_shiftRightJam64Extra( sig, 0, shiftDist ); + } + return + softfloat_roundToUI64( + sign, sigExtra.v, sigExtra.extra, roundingMode, exact ); +#else + extSig[indexWord( 3, 0 )] = 0; + if ( shiftDist <= 0 ) { + if ( shiftDist < -11 ) goto invalid; + sig <<= -shiftDist; + extSig[indexWord( 3, 2 )] = sig>>32; + extSig[indexWord( 3, 1 )] = sig; + } else { + extSig[indexWord( 3, 2 )] = sig>>32; + extSig[indexWord( 3, 1 )] = sig; + softfloat_shiftRightJam96M( extSig, shiftDist, extSig ); + } + return softfloat_roundMToUI64( sign, extSig, roundingMode, exact ); +#endif + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + return + (exp == 0x7FF) && fracF64UI( uiA ) ? ui64_fromNaN + : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/f64_to_ui64_r_minMag.c b/extern/riscv-softfloat-standalone/lib/f64_to_ui64_r_minMag.c new file mode 100644 index 0000000..25918c4 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/f64_to_ui64_r_minMag.c @@ -0,0 +1,93 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast64_t f64_to_ui64_r_minMag( float64_t a, bool exact ) +{ + union ui64_f64 uA; + uint_fast64_t uiA; + int_fast16_t exp; + uint_fast64_t sig; + int_fast16_t shiftDist; + bool sign; + uint_fast64_t z; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + uA.f = a; + uiA = uA.ui; + exp = expF64UI( uiA ); + sig = fracF64UI( uiA ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + shiftDist = 0x433 - exp; + if ( 53 <= shiftDist ) { + if ( exact && (exp | sig) ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return 0; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sign = signF64UI( uiA ); + if ( sign ) goto invalid; + if ( shiftDist <= 0 ) { + if ( shiftDist < -11 ) goto invalid; + z = (sig | UINT64_C( 0x0010000000000000 ))<<-shiftDist; + } else { + sig |= UINT64_C( 0x0010000000000000 ); + z = sig>>shiftDist; + if ( exact && (uint64_t) (sig<<(-shiftDist & 63)) ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + } + return z; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + return + (exp == 0x7FF) && sig ? ui64_fromNaN + : sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/fall_maxmin.c b/extern/riscv-softfloat-standalone/lib/fall_maxmin.c new file mode 100644 index 0000000..32a9ade --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/fall_maxmin.c @@ -0,0 +1,81 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +#define COMPARE_MAX(a, b, bits) \ +float ## bits ## _t f ## bits ## _max( float ## bits ## _t a, float ## bits ## _t b ) \ +{ \ + bool greater = f ## bits ## _lt_quiet(b, a) || \ + (f ## bits ## _eq(b, a) && signF ## bits ## UI(b.v)); \ + \ + if (isNaNF ## bits ## UI(a.v) && isNaNF ## bits ## UI(b.v)) { \ + union ui ## bits ## _f ## bits ui; \ + ui.ui = defaultNaNF ## bits ## UI; \ + return ui.f; \ + } else { \ + return greater || isNaNF ## bits ## UI((b).v) ? a : b; \ + } \ +} + +#define COMPARE_MIN(a, b, bits) \ +float ## bits ## _t f ## bits ## _min( float ## bits ## _t a, float ## bits ## _t b ) \ +{ \ + bool less = f ## bits ## _lt_quiet(a, b) || \ + (f ## bits ## _eq(a, b) && signF ## bits ## UI(a.v)); \ + \ + if (isNaNF ## bits ## UI(a.v) && isNaNF ## bits ## UI(b.v)) { \ + union ui ## bits ## _f ## bits ui; \ + ui.ui = defaultNaNF ## bits ## UI; \ + return ui.f; \ + } else { \ + return less || isNaNF ## bits ## UI((b).v) ? a : b; \ + } \ +} + +COMPARE_MAX(a, b, 16); +COMPARE_MAX(a, b, 32); +COMPARE_MAX(a, b, 64); + +COMPARE_MIN(a, b, 16); +COMPARE_MIN(a, b, 32); +COMPARE_MIN(a, b, 64); diff --git a/extern/riscv-softfloat-standalone/lib/fall_reciprocal.c b/extern/riscv-softfloat-standalone/lib/fall_reciprocal.c new file mode 100644 index 0000000..1c96458 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/fall_reciprocal.c @@ -0,0 +1,392 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +static inline uint64_t extract64(uint64_t val, int pos, int len) +{ + assert(pos >= 0 && len > 0 && len <= 64 - pos); + return (val >> pos) & (~UINT64_C(0) >> (64 - len)); +} + +static inline uint64_t make_mask64(int pos, int len) +{ + assert(pos >= 0 && len > 0 && pos < 64 && len <= 64); + return (UINT64_MAX >> (64 - len)) << pos; +} + +//user needs to truncate output to required length +static inline uint64_t rsqrte7(uint64_t val, int e, int s, bool sub) { + uint64_t exp = extract64(val, s, e); + uint64_t sig = extract64(val, 0, s); + uint64_t sign = extract64(val, s + e, 1); + const int p = 7; + + static const uint8_t table[] = { + 52, 51, 50, 48, 47, 46, 44, 43, + 42, 41, 40, 39, 38, 36, 35, 34, + 33, 32, 31, 30, 30, 29, 28, 27, + 26, 25, 24, 23, 23, 22, 21, 20, + 19, 19, 18, 17, 16, 16, 15, 14, + 14, 13, 12, 12, 11, 10, 10, 9, + 9, 8, 7, 7, 6, 6, 5, 4, + 4, 3, 3, 2, 2, 1, 1, 0, + 127, 125, 123, 121, 119, 118, 116, 114, + 113, 111, 109, 108, 106, 105, 103, 102, + 100, 99, 97, 96, 95, 93, 92, 91, + 90, 88, 87, 86, 85, 84, 83, 82, + 80, 79, 78, 77, 76, 75, 74, 73, + 72, 71, 70, 70, 69, 68, 67, 66, + 65, 64, 63, 63, 62, 61, 60, 59, + 59, 58, 57, 56, 56, 55, 54, 53}; + + if (sub) { + while (extract64(sig, s - 1, 1) == 0) + exp--, sig <<= 1; + + sig = (sig << 1) & make_mask64(0 ,s); + } + + int idx = ((exp & 1) << (p-1)) | (sig >> (s-p+1)); + uint64_t out_sig = (uint64_t)(table[idx]) << (s-p); + uint64_t out_exp = (3 * make_mask64(0, e - 1) + ~exp) / 2; + + return (sign << (s+e)) | (out_exp << s) | out_sig; +} + +float16_t f16_rsqrte7(float16_t in) +{ + union ui16_f16 uA; + + uA.f = in; + unsigned int ret = f16_classify(in); + bool sub = false; + switch(ret) { + case 0x001: // -inf + case 0x002: // -normal + case 0x004: // -subnormal + case 0x100: // sNaN + softfloat_exceptionFlags |= softfloat_flag_invalid; + case 0x200: //qNaN + uA.ui = defaultNaNF16UI; + break; + case 0x008: // -0 + uA.ui = 0xfc00; + softfloat_exceptionFlags |= softfloat_flag_infinite; + break; + case 0x010: // +0 + uA.ui = 0x7c00; + softfloat_exceptionFlags |= softfloat_flag_infinite; + break; + case 0x080: //+inf + uA.ui = 0x0; + break; + case 0x020: //+ sub + sub = true; + default: // +num + uA.ui = rsqrte7(uA.ui, 5, 10, sub); + break; + } + + return uA.f; +} + +float32_t f32_rsqrte7(float32_t in) +{ + union ui32_f32 uA; + + uA.f = in; + unsigned int ret = f32_classify(in); + bool sub = false; + switch(ret) { + case 0x001: // -inf + case 0x002: // -normal + case 0x004: // -subnormal + case 0x100: // sNaN + softfloat_exceptionFlags |= softfloat_flag_invalid; + case 0x200: //qNaN + uA.ui = defaultNaNF32UI; + break; + case 0x008: // -0 + uA.ui = 0xff800000; + softfloat_exceptionFlags |= softfloat_flag_infinite; + break; + case 0x010: // +0 + uA.ui = 0x7f800000; + softfloat_exceptionFlags |= softfloat_flag_infinite; + break; + case 0x080: //+inf + uA.ui = 0x0; + break; + case 0x020: //+ sub + sub = true; + default: // +num + uA.ui = rsqrte7(uA.ui, 8, 23, sub); + break; + } + + return uA.f; +} + +float64_t f64_rsqrte7(float64_t in) +{ + union ui64_f64 uA; + + uA.f = in; + unsigned int ret = f64_classify(in); + bool sub = false; + switch(ret) { + case 0x001: // -inf + case 0x002: // -normal + case 0x004: // -subnormal + case 0x100: // sNaN + softfloat_exceptionFlags |= softfloat_flag_invalid; + case 0x200: //qNaN + uA.ui = defaultNaNF64UI; + break; + case 0x008: // -0 + uA.ui = 0xfff0000000000000ul; + softfloat_exceptionFlags |= softfloat_flag_infinite; + break; + case 0x010: // +0 + uA.ui = 0x7ff0000000000000ul; + softfloat_exceptionFlags |= softfloat_flag_infinite; + break; + case 0x080: //+inf + uA.ui = 0x0; + break; + case 0x020: //+ sub + sub = true; + default: // +num + uA.ui = rsqrte7(uA.ui, 11, 52, sub); + break; + } + + return uA.f; +} + +//user needs to truncate output to required length +static inline uint64_t recip7(uint64_t val, int e, int s, int rm, bool sub, + bool *round_abnormal) +{ + uint64_t exp = extract64(val, s, e); + uint64_t sig = extract64(val, 0, s); + uint64_t sign = extract64(val, s + e, 1); + const int p = 7; + + static const uint8_t table[] = { + 127, 125, 123, 121, 119, 117, 116, 114, + 112, 110, 109, 107, 105, 104, 102, 100, + 99, 97, 96, 94, 93, 91, 90, 88, + 87, 85, 84, 83, 81, 80, 79, 77, + 76, 75, 74, 72, 71, 70, 69, 68, + 66, 65, 64, 63, 62, 61, 60, 59, + 58, 57, 56, 55, 54, 53, 52, 51, + 50, 49, 48, 47, 46, 45, 44, 43, + 42, 41, 40, 40, 39, 38, 37, 36, + 35, 35, 34, 33, 32, 31, 31, 30, + 29, 28, 28, 27, 26, 25, 25, 24, + 23, 23, 22, 21, 21, 20, 19, 19, + 18, 17, 17, 16, 15, 15, 14, 14, + 13, 12, 12, 11, 11, 10, 9, 9, + 8, 8, 7, 7, 6, 5, 5, 4, + 4, 3, 3, 2, 2, 1, 1, 0}; + + if (sub) { + while (extract64(sig, s - 1, 1) == 0) + exp--, sig <<= 1; + + sig = (sig << 1) & make_mask64(0 ,s); + + if (exp != 0 && exp != UINT64_MAX) { + *round_abnormal = true; + if (rm == 1 || + (rm == 2 && !sign) || + (rm == 3 && sign)) + return ((sign << (s+e)) | make_mask64(s, e)) - 1; + else + return (sign << (s+e)) | make_mask64(s, e); + } + } + + int idx = sig >> (s-p); + uint64_t out_sig = (uint64_t)(table[idx]) << (s-p); + uint64_t out_exp = 2 * make_mask64(0, e - 1) + ~exp; + if (out_exp == 0 || out_exp == UINT64_MAX) { + out_sig = (out_sig >> 1) | make_mask64(s - 1, 1); + if (out_exp == UINT64_MAX) { + out_sig >>= 1; + out_exp = 0; + } + } + + return (sign << (s+e)) | (out_exp << s) | out_sig; +} + +float16_t f16_recip7(float16_t in) +{ + union ui16_f16 uA; + + uA.f = in; + unsigned int ret = f16_classify(in); + bool sub = false; + bool round_abnormal = false; + switch(ret) { + case 0x001: // -inf + uA.ui = 0x8000; + break; + case 0x080: //+inf + uA.ui = 0x0; + break; + case 0x008: // -0 + uA.ui = 0xfc00; + softfloat_exceptionFlags |= softfloat_flag_infinite; + break; + case 0x010: // +0 + uA.ui = 0x7c00; + softfloat_exceptionFlags |= softfloat_flag_infinite; + break; + case 0x100: // sNaN + softfloat_exceptionFlags |= softfloat_flag_invalid; + case 0x200: //qNaN + uA.ui = defaultNaNF16UI; + break; + case 0x004: // -subnormal + case 0x020: //+ sub + sub = true; + default: // +- normal + uA.ui = recip7(uA.ui, 5, 10, + softfloat_roundingMode, sub, &round_abnormal); + if (round_abnormal) + softfloat_exceptionFlags |= softfloat_flag_inexact | + softfloat_flag_overflow; + break; + } + + return uA.f; +} + +float32_t f32_recip7(float32_t in) +{ + union ui32_f32 uA; + + uA.f = in; + unsigned int ret = f32_classify(in); + bool sub = false; + bool round_abnormal = false; + switch(ret) { + case 0x001: // -inf + uA.ui = 0x80000000; + break; + case 0x080: //+inf + uA.ui = 0x0; + break; + case 0x008: // -0 + uA.ui = 0xff800000; + softfloat_exceptionFlags |= softfloat_flag_infinite; + break; + case 0x010: // +0 + uA.ui = 0x7f800000; + softfloat_exceptionFlags |= softfloat_flag_infinite; + break; + case 0x100: // sNaN + softfloat_exceptionFlags |= softfloat_flag_invalid; + case 0x200: //qNaN + uA.ui = defaultNaNF32UI; + break; + case 0x004: // -subnormal + case 0x020: //+ sub + sub = true; + default: // +- normal + uA.ui = recip7(uA.ui, 8, 23, + softfloat_roundingMode, sub, &round_abnormal); + if (round_abnormal) + softfloat_exceptionFlags |= softfloat_flag_inexact | + softfloat_flag_overflow; + break; + } + + return uA.f; +} + +float64_t f64_recip7(float64_t in) +{ + union ui64_f64 uA; + + uA.f = in; + unsigned int ret = f64_classify(in); + bool sub = false; + bool round_abnormal = false; + switch(ret) { + case 0x001: // -inf + uA.ui = 0x8000000000000000; + break; + case 0x080: //+inf + uA.ui = 0x0; + break; + case 0x008: // -0 + uA.ui = 0xfff0000000000000; + softfloat_exceptionFlags |= softfloat_flag_infinite; + break; + case 0x010: // +0 + uA.ui = 0x7ff0000000000000; + softfloat_exceptionFlags |= softfloat_flag_infinite; + break; + case 0x100: // sNaN + softfloat_exceptionFlags |= softfloat_flag_invalid; + case 0x200: //qNaN + uA.ui = defaultNaNF64UI; + break; + case 0x004: // -subnormal + case 0x020: //+ sub + sub = true; + default: // +- normal + uA.ui = recip7(uA.ui, 11, 52, + softfloat_roundingMode, sub, &round_abnormal); + if (round_abnormal) + softfloat_exceptionFlags |= softfloat_flag_inexact | + softfloat_flag_overflow; + break; + } + + return uA.f; +} diff --git a/extern/riscv-softfloat-standalone/lib/i32_to_f128.c b/extern/riscv-softfloat-standalone/lib/i32_to_f128.c new file mode 100644 index 0000000..af7268a --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/i32_to_f128.c @@ -0,0 +1,64 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float128_t i32_to_f128( int32_t a ) +{ + uint_fast64_t uiZ64; + bool sign; + uint_fast32_t absA; + int_fast8_t shiftDist; + union ui128_f128 uZ; + + uiZ64 = 0; + if ( a ) { + sign = (a < 0); + absA = sign ? -(uint_fast32_t) a : (uint_fast32_t) a; + shiftDist = softfloat_countLeadingZeros32( absA ) + 17; + uiZ64 = + packToF128UI64( + sign, 0x402E - shiftDist, (uint_fast64_t) absA< +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float16_t i32_to_f16( int32_t a ) +{ + bool sign; + uint_fast32_t absA; + int_fast8_t shiftDist; + union ui16_f16 u; + uint_fast16_t sig; + + sign = (a < 0); + absA = sign ? -(uint_fast32_t) a : (uint_fast32_t) a; + shiftDist = softfloat_countLeadingZeros32( absA ) - 21; + if ( 0 <= shiftDist ) { + u.ui = + a ? packToF16UI( + sign, 0x18 - shiftDist, (uint_fast16_t) absA<>(-shiftDist) + | ((uint32_t) (absA<<(shiftDist & 31)) != 0) + : (uint_fast16_t) absA< +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float32_t i32_to_f32( int32_t a ) +{ + bool sign; + union ui32_f32 uZ; + uint_fast32_t absA; + + sign = (a < 0); + if ( ! (a & 0x7FFFFFFF) ) { + uZ.ui = sign ? packToF32UI( 1, 0x9E, 0 ) : 0; + return uZ.f; + } + absA = sign ? -(uint_fast32_t) a : (uint_fast32_t) a; + return softfloat_normRoundPackToF32( sign, 0x9C, absA ); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/i32_to_f64.c b/extern/riscv-softfloat-standalone/lib/i32_to_f64.c new file mode 100644 index 0000000..d3901eb --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/i32_to_f64.c @@ -0,0 +1,65 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float64_t i32_to_f64( int32_t a ) +{ + uint_fast64_t uiZ; + bool sign; + uint_fast32_t absA; + int_fast8_t shiftDist; + union ui64_f64 uZ; + + if ( ! a ) { + uiZ = 0; + } else { + sign = (a < 0); + absA = sign ? -(uint_fast32_t) a : (uint_fast32_t) a; + shiftDist = softfloat_countLeadingZeros32( absA ) + 21; + uiZ = + packToF64UI( + sign, 0x432 - shiftDist, (uint_fast64_t) absA< +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float128_t i64_to_f128( int64_t a ) +{ + uint_fast64_t uiZ64, uiZ0; + bool sign; + uint_fast64_t absA; + int_fast8_t shiftDist; + struct uint128 zSig; + union ui128_f128 uZ; + + if ( ! a ) { + uiZ64 = 0; + uiZ0 = 0; + } else { + sign = (a < 0); + absA = sign ? -(uint_fast64_t) a : (uint_fast64_t) a; + shiftDist = softfloat_countLeadingZeros64( absA ) + 49; + if ( 64 <= shiftDist ) { + zSig.v64 = absA<<(shiftDist - 64); + zSig.v0 = 0; + } else { + zSig = softfloat_shortShiftLeft128( 0, absA, shiftDist ); + } + uiZ64 = packToF128UI64( sign, 0x406E - shiftDist, zSig.v64 ); + uiZ0 = zSig.v0; + } + uZ.ui.v64 = uiZ64; + uZ.ui.v0 = uiZ0; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/i64_to_f16.c b/extern/riscv-softfloat-standalone/lib/i64_to_f16.c new file mode 100644 index 0000000..56f0191 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/i64_to_f16.c @@ -0,0 +1,70 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float16_t i64_to_f16( int64_t a ) +{ + bool sign; + uint_fast64_t absA; + int_fast8_t shiftDist; + union ui16_f16 u; + uint_fast16_t sig; + + sign = (a < 0); + absA = sign ? -(uint_fast64_t) a : (uint_fast64_t) a; + shiftDist = softfloat_countLeadingZeros64( absA ) - 53; + if ( 0 <= shiftDist ) { + u.ui = + a ? packToF16UI( + sign, 0x18 - shiftDist, (uint_fast16_t) absA< +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float32_t i64_to_f32( int64_t a ) +{ + bool sign; + uint_fast64_t absA; + int_fast8_t shiftDist; + union ui32_f32 u; + uint_fast32_t sig; + + sign = (a < 0); + absA = sign ? -(uint_fast64_t) a : (uint_fast64_t) a; + shiftDist = softfloat_countLeadingZeros64( absA ) - 40; + if ( 0 <= shiftDist ) { + u.ui = + a ? packToF32UI( + sign, 0x95 - shiftDist, (uint_fast32_t) absA< +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float64_t i64_to_f64( int64_t a ) +{ + bool sign; + union ui64_f64 uZ; + uint_fast64_t absA; + + sign = (a < 0); + if ( ! (a & UINT64_C( 0x7FFFFFFFFFFFFFFF )) ) { + uZ.ui = sign ? packToF64UI( 1, 0x43E, 0 ) : 0; + return uZ.f; + } + absA = sign ? -(uint_fast64_t) a : (uint_fast64_t) a; + return softfloat_normRoundPackToF64( sign, 0x43C, absA ); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_add128.c b/extern/riscv-softfloat-standalone/lib/s_add128.c new file mode 100644 index 0000000..8065656 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_add128.c @@ -0,0 +1,55 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_add128 + +struct uint128 + softfloat_add128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ) +{ + struct uint128 z; + + z.v0 = a0 + b0; + z.v64 = a64 + b64 + (z.v0 < a0); + return z; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_add256M.c b/extern/riscv-softfloat-standalone/lib/s_add256M.c new file mode 100644 index 0000000..d07b004 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_add256M.c @@ -0,0 +1,65 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_add256M + +void + softfloat_add256M( + const uint64_t *aPtr, const uint64_t *bPtr, uint64_t *zPtr ) +{ + unsigned int index; + uint_fast8_t carry; + uint64_t wordA, wordZ; + + index = indexWordLo( 4 ); + carry = 0; + for (;;) { + wordA = aPtr[index]; + wordZ = wordA + bPtr[index] + carry; + zPtr[index] = wordZ; + if ( index == indexWordHi( 4 ) ) break; + if ( wordZ != wordA ) carry = (wordZ < wordA); + index += wordIncr; + } + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_addCarryM.c b/extern/riscv-softfloat-standalone/lib/s_addCarryM.c new file mode 100644 index 0000000..fae1db4 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_addCarryM.c @@ -0,0 +1,70 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_addCarryM + +uint_fast8_t + softfloat_addCarryM( + uint_fast8_t size_words, + const uint32_t *aPtr, + const uint32_t *bPtr, + uint_fast8_t carry, + uint32_t *zPtr + ) +{ + unsigned int index, lastIndex; + uint32_t wordA, wordZ; + + index = indexWordLo( size_words ); + lastIndex = indexWordHi( size_words ); + for (;;) { + wordA = aPtr[index]; + wordZ = wordA + bPtr[index] + carry; + zPtr[index] = wordZ; + if ( wordZ != wordA ) carry = (wordZ < wordA); + if ( index == lastIndex ) break; + index += wordIncr; + } + return carry; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_addComplCarryM.c b/extern/riscv-softfloat-standalone/lib/s_addComplCarryM.c new file mode 100644 index 0000000..02f2bce --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_addComplCarryM.c @@ -0,0 +1,70 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_addComplCarryM + +uint_fast8_t + softfloat_addComplCarryM( + uint_fast8_t size_words, + const uint32_t *aPtr, + const uint32_t *bPtr, + uint_fast8_t carry, + uint32_t *zPtr + ) +{ + unsigned int index, lastIndex; + uint32_t wordA, wordZ; + + index = indexWordLo( size_words ); + lastIndex = indexWordHi( size_words ); + for (;;) { + wordA = aPtr[index]; + wordZ = wordA + ~bPtr[index] + carry; + zPtr[index] = wordZ; + if ( wordZ != wordA ) carry = (wordZ < wordA); + if ( index == lastIndex ) break; + index += wordIncr; + } + return carry; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_addM.c b/extern/riscv-softfloat-standalone/lib/s_addM.c new file mode 100644 index 0000000..a06eda6 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_addM.c @@ -0,0 +1,70 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_addM + +void + softfloat_addM( + uint_fast8_t size_words, + const uint32_t *aPtr, + const uint32_t *bPtr, + uint32_t *zPtr + ) +{ + unsigned int index, lastIndex; + uint_fast8_t carry; + uint32_t wordA, wordZ; + + index = indexWordLo( size_words ); + lastIndex = indexWordHi( size_words ); + carry = 0; + for (;;) { + wordA = aPtr[index]; + wordZ = wordA + bPtr[index] + carry; + zPtr[index] = wordZ; + if ( index == lastIndex ) break; + if ( wordZ != wordA ) carry = (wordZ < wordA); + index += wordIncr; + } + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_addMagsF128.c b/extern/riscv-softfloat-standalone/lib/s_addMagsF128.c new file mode 100644 index 0000000..292f0aa --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_addMagsF128.c @@ -0,0 +1,154 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" + +float128_t + softfloat_addMagsF128( + uint_fast64_t uiA64, + uint_fast64_t uiA0, + uint_fast64_t uiB64, + uint_fast64_t uiB0, + bool signZ + ) +{ + int_fast32_t expA; + struct uint128 sigA; + int_fast32_t expB; + struct uint128 sigB; + int_fast32_t expDiff; + struct uint128 uiZ, sigZ; + int_fast32_t expZ; + uint_fast64_t sigZExtra; + struct uint128_extra sig128Extra; + union ui128_f128 uZ; + + expA = expF128UI64( uiA64 ); + sigA.v64 = fracF128UI64( uiA64 ); + sigA.v0 = uiA0; + expB = expF128UI64( uiB64 ); + sigB.v64 = fracF128UI64( uiB64 ); + sigB.v0 = uiB0; + expDiff = expA - expB; + if ( ! expDiff ) { + if ( expA == 0x7FFF ) { + if ( sigA.v64 | sigA.v0 | sigB.v64 | sigB.v0 ) goto propagateNaN; + uiZ.v64 = uiA64; + uiZ.v0 = uiA0; + goto uiZ; + } + sigZ = softfloat_add128( sigA.v64, sigA.v0, sigB.v64, sigB.v0 ); + if ( ! expA ) { + uiZ.v64 = packToF128UI64( signZ, 0, sigZ.v64 ); + uiZ.v0 = sigZ.v0; + goto uiZ; + } + expZ = expA; + sigZ.v64 |= UINT64_C( 0x0002000000000000 ); + sigZExtra = 0; + goto shiftRight1; + } + if ( expDiff < 0 ) { + if ( expB == 0x7FFF ) { + if ( sigB.v64 | sigB.v0 ) goto propagateNaN; + uiZ.v64 = packToF128UI64( signZ, 0x7FFF, 0 ); + uiZ.v0 = 0; + goto uiZ; + } + expZ = expB; + if ( expA ) { + sigA.v64 |= UINT64_C( 0x0001000000000000 ); + } else { + ++expDiff; + sigZExtra = 0; + if ( ! expDiff ) goto newlyAligned; + } + sig128Extra = + softfloat_shiftRightJam128Extra( sigA.v64, sigA.v0, 0, -expDiff ); + sigA = sig128Extra.v; + sigZExtra = sig128Extra.extra; + } else { + if ( expA == 0x7FFF ) { + if ( sigA.v64 | sigA.v0 ) goto propagateNaN; + uiZ.v64 = uiA64; + uiZ.v0 = uiA0; + goto uiZ; + } + expZ = expA; + if ( expB ) { + sigB.v64 |= UINT64_C( 0x0001000000000000 ); + } else { + --expDiff; + sigZExtra = 0; + if ( ! expDiff ) goto newlyAligned; + } + sig128Extra = + softfloat_shiftRightJam128Extra( sigB.v64, sigB.v0, 0, expDiff ); + sigB = sig128Extra.v; + sigZExtra = sig128Extra.extra; + } + newlyAligned: + sigZ = + softfloat_add128( + sigA.v64 | UINT64_C( 0x0001000000000000 ), + sigA.v0, + sigB.v64, + sigB.v0 + ); + --expZ; + if ( sigZ.v64 < UINT64_C( 0x0002000000000000 ) ) goto roundAndPack; + ++expZ; + shiftRight1: + sig128Extra = + softfloat_shortShiftRightJam128Extra( + sigZ.v64, sigZ.v0, sigZExtra, 1 ); + sigZ = sig128Extra.v; + sigZExtra = sig128Extra.extra; + roundAndPack: + return + softfloat_roundPackToF128( signZ, expZ, sigZ.v64, sigZ.v0, sigZExtra ); + propagateNaN: + uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, uiB64, uiB0 ); + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_addMagsF16.c b/extern/riscv-softfloat-standalone/lib/s_addMagsF16.c new file mode 100644 index 0000000..4204c1e --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_addMagsF16.c @@ -0,0 +1,183 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float16_t softfloat_addMagsF16( uint_fast16_t uiA, uint_fast16_t uiB ) +{ + int_fast8_t expA; + uint_fast16_t sigA; + int_fast8_t expB; + uint_fast16_t sigB; + int_fast8_t expDiff; + uint_fast16_t uiZ; + bool signZ; + int_fast8_t expZ; + uint_fast16_t sigZ; + uint_fast16_t sigX, sigY; + int_fast8_t shiftDist; + uint_fast32_t sig32Z; + int_fast8_t roundingMode; + union ui16_f16 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expA = expF16UI( uiA ); + sigA = fracF16UI( uiA ); + expB = expF16UI( uiB ); + sigB = fracF16UI( uiB ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expDiff = expA - expB; + if ( ! expDiff ) { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( ! expA ) { + uiZ = uiA + sigB; + goto uiZ; + } + if ( expA == 0x1F ) { + if ( sigA | sigB ) goto propagateNaN; + uiZ = uiA; + goto uiZ; + } + signZ = signF16UI( uiA ); + expZ = expA; + sigZ = 0x0800 + sigA + sigB; + if ( ! (sigZ & 1) && (expZ < 0x1E) ) { + sigZ >>= 1; + goto pack; + } + sigZ <<= 3; + } else { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + signZ = signF16UI( uiA ); + if ( expDiff < 0 ) { + /*---------------------------------------------------------------- + *----------------------------------------------------------------*/ + if ( expB == 0x1F ) { + if ( sigB ) goto propagateNaN; + uiZ = packToF16UI( signZ, 0x1F, 0 ); + goto uiZ; + } + if ( expDiff <= -13 ) { + uiZ = packToF16UI( signZ, expB, sigB ); + if ( expA | sigA ) goto addEpsilon; + goto uiZ; + } + expZ = expB; + sigX = sigB | 0x0400; + sigY = sigA + (expA ? 0x0400 : sigA); + shiftDist = 19 + expDiff; + } else { + /*---------------------------------------------------------------- + *----------------------------------------------------------------*/ + uiZ = uiA; + if ( expA == 0x1F ) { + if ( sigA ) goto propagateNaN; + goto uiZ; + } + if ( 13 <= expDiff ) { + if ( expB | sigB ) goto addEpsilon; + goto uiZ; + } + expZ = expA; + sigX = sigA | 0x0400; + sigY = sigB + (expB ? 0x0400 : sigB); + shiftDist = 19 - expDiff; + } + sig32Z = + ((uint_fast32_t) sigX<<19) + ((uint_fast32_t) sigY<>16; + if ( sig32Z & 0xFFFF ) { + sigZ |= 1; + } else { + if ( ! (sigZ & 0xF) && (expZ < 0x1E) ) { + sigZ >>= 4; + goto pack; + } + } + } + return softfloat_roundPackToF16( signZ, expZ, sigZ ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + propagateNaN: + uiZ = softfloat_propagateNaNF16UI( uiA, uiB ); + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + addEpsilon: + roundingMode = softfloat_roundingMode; + if ( roundingMode != softfloat_round_near_even ) { + if ( + roundingMode + == (signF16UI( uiZ ) ? softfloat_round_min + : softfloat_round_max) + ) { + ++uiZ; + if ( (uint16_t) (uiZ<<1) == 0xF800 ) { + softfloat_raiseFlags( + softfloat_flag_overflow | softfloat_flag_inexact ); + } + } +#ifdef SOFTFLOAT_ROUND_ODD + else if ( roundingMode == softfloat_round_odd ) { + uiZ |= 1; + } +#endif + } + softfloat_exceptionFlags |= softfloat_flag_inexact; + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + pack: + uiZ = packToF16UI( signZ, expZ, sigZ ); + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_addMagsF32.c b/extern/riscv-softfloat-standalone/lib/s_addMagsF32.c new file mode 100644 index 0000000..ba64781 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_addMagsF32.c @@ -0,0 +1,126 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" + +float32_t softfloat_addMagsF32( uint_fast32_t uiA, uint_fast32_t uiB ) +{ + int_fast16_t expA; + uint_fast32_t sigA; + int_fast16_t expB; + uint_fast32_t sigB; + int_fast16_t expDiff; + uint_fast32_t uiZ; + bool signZ; + int_fast16_t expZ; + uint_fast32_t sigZ; + union ui32_f32 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expA = expF32UI( uiA ); + sigA = fracF32UI( uiA ); + expB = expF32UI( uiB ); + sigB = fracF32UI( uiB ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expDiff = expA - expB; + if ( ! expDiff ) { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( ! expA ) { + uiZ = uiA + sigB; + goto uiZ; + } + if ( expA == 0xFF ) { + if ( sigA | sigB ) goto propagateNaN; + uiZ = uiA; + goto uiZ; + } + signZ = signF32UI( uiA ); + expZ = expA; + sigZ = 0x01000000 + sigA + sigB; + if ( ! (sigZ & 1) && (expZ < 0xFE) ) { + uiZ = packToF32UI( signZ, expZ, sigZ>>1 ); + goto uiZ; + } + sigZ <<= 6; + } else { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + signZ = signF32UI( uiA ); + sigA <<= 6; + sigB <<= 6; + if ( expDiff < 0 ) { + if ( expB == 0xFF ) { + if ( sigB ) goto propagateNaN; + uiZ = packToF32UI( signZ, 0xFF, 0 ); + goto uiZ; + } + expZ = expB; + sigA += expA ? 0x20000000 : sigA; + sigA = softfloat_shiftRightJam32( sigA, -expDiff ); + } else { + if ( expA == 0xFF ) { + if ( sigA ) goto propagateNaN; + uiZ = uiA; + goto uiZ; + } + expZ = expA; + sigB += expB ? 0x20000000 : sigB; + sigB = softfloat_shiftRightJam32( sigB, expDiff ); + } + sigZ = 0x20000000 + sigA + sigB; + if ( sigZ < 0x40000000 ) { + --expZ; + sigZ <<= 1; + } + } + return softfloat_roundPackToF32( signZ, expZ, sigZ ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + propagateNaN: + uiZ = softfloat_propagateNaNF32UI( uiA, uiB ); + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_addMagsF64.c b/extern/riscv-softfloat-standalone/lib/s_addMagsF64.c new file mode 100644 index 0000000..63e1afe --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_addMagsF64.c @@ -0,0 +1,128 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" + +float64_t + softfloat_addMagsF64( uint_fast64_t uiA, uint_fast64_t uiB, bool signZ ) +{ + int_fast16_t expA; + uint_fast64_t sigA; + int_fast16_t expB; + uint_fast64_t sigB; + int_fast16_t expDiff; + uint_fast64_t uiZ; + int_fast16_t expZ; + uint_fast64_t sigZ; + union ui64_f64 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expA = expF64UI( uiA ); + sigA = fracF64UI( uiA ); + expB = expF64UI( uiB ); + sigB = fracF64UI( uiB ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expDiff = expA - expB; + if ( ! expDiff ) { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( ! expA ) { + uiZ = uiA + sigB; + goto uiZ; + } + if ( expA == 0x7FF ) { + if ( sigA | sigB ) goto propagateNaN; + uiZ = uiA; + goto uiZ; + } + expZ = expA; + sigZ = UINT64_C( 0x0020000000000000 ) + sigA + sigB; + sigZ <<= 9; + } else { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + sigA <<= 9; + sigB <<= 9; + if ( expDiff < 0 ) { + if ( expB == 0x7FF ) { + if ( sigB ) goto propagateNaN; + uiZ = packToF64UI( signZ, 0x7FF, 0 ); + goto uiZ; + } + expZ = expB; + if ( expA ) { + sigA += UINT64_C( 0x2000000000000000 ); + } else { + sigA <<= 1; + } + sigA = softfloat_shiftRightJam64( sigA, -expDiff ); + } else { + if ( expA == 0x7FF ) { + if ( sigA ) goto propagateNaN; + uiZ = uiA; + goto uiZ; + } + expZ = expA; + if ( expB ) { + sigB += UINT64_C( 0x2000000000000000 ); + } else { + sigB <<= 1; + } + sigB = softfloat_shiftRightJam64( sigB, expDiff ); + } + sigZ = UINT64_C( 0x2000000000000000 ) + sigA + sigB; + if ( sigZ < UINT64_C( 0x4000000000000000 ) ) { + --expZ; + sigZ <<= 1; + } + } + return softfloat_roundPackToF64( signZ, expZ, sigZ ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + propagateNaN: + uiZ = softfloat_propagateNaNF64UI( uiA, uiB ); + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_approxRecip32_1.c b/extern/riscv-softfloat-standalone/lib/s_approxRecip32_1.c new file mode 100644 index 0000000..a06192e --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_approxRecip32_1.c @@ -0,0 +1,66 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" + +#ifndef softfloat_approxRecip32_1 + +extern const uint16_t softfloat_approxRecip_1k0s[16]; +extern const uint16_t softfloat_approxRecip_1k1s[16]; + +uint32_t softfloat_approxRecip32_1( uint32_t a ) +{ + int index; + uint16_t eps, r0; + uint32_t sigma0; + uint_fast32_t r; + uint32_t sqrSigma0; + + index = a>>27 & 0xF; + eps = (uint16_t) (a>>11); + r0 = softfloat_approxRecip_1k0s[index] + - ((softfloat_approxRecip_1k1s[index] * (uint_fast32_t) eps)>>20); + sigma0 = ~(uint_fast32_t) ((r0 * (uint_fast64_t) a)>>7); + r = ((uint_fast32_t) r0<<16) + ((r0 * (uint_fast64_t) sigma0)>>24); + sqrSigma0 = ((uint_fast64_t) sigma0 * sigma0)>>32; + r += ((uint32_t) r * (uint_fast64_t) sqrSigma0)>>48; + return r; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_approxRecipSqrt32_1.c b/extern/riscv-softfloat-standalone/lib/s_approxRecipSqrt32_1.c new file mode 100644 index 0000000..2ab71a2 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_approxRecipSqrt32_1.c @@ -0,0 +1,73 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" + +#ifndef softfloat_approxRecipSqrt32_1 + +extern const uint16_t softfloat_approxRecipSqrt_1k0s[]; +extern const uint16_t softfloat_approxRecipSqrt_1k1s[]; + +uint32_t softfloat_approxRecipSqrt32_1( unsigned int oddExpA, uint32_t a ) +{ + int index; + uint16_t eps, r0; + uint_fast32_t ESqrR0; + uint32_t sigma0; + uint_fast32_t r; + uint32_t sqrSigma0; + + index = (a>>27 & 0xE) + oddExpA; + eps = (uint16_t) (a>>12); + r0 = softfloat_approxRecipSqrt_1k0s[index] + - ((softfloat_approxRecipSqrt_1k1s[index] * (uint_fast32_t) eps) + >>20); + ESqrR0 = (uint_fast32_t) r0 * r0; + if ( ! oddExpA ) ESqrR0 <<= 1; + sigma0 = ~(uint_fast32_t) (((uint32_t) ESqrR0 * (uint_fast64_t) a)>>23); + r = ((uint_fast32_t) r0<<16) + ((r0 * (uint_fast64_t) sigma0)>>25); + sqrSigma0 = ((uint_fast64_t) sigma0 * sigma0)>>32; + r += ((uint32_t) ((r>>1) + (r>>3) - ((uint_fast32_t) r0<<14)) + * (uint_fast64_t) sqrSigma0) + >>48; + if ( ! (r & 0x80000000) ) r = 0x80000000; + return r; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_approxRecipSqrt_1Ks.c b/extern/riscv-softfloat-standalone/lib/s_approxRecipSqrt_1Ks.c new file mode 100644 index 0000000..a60cf82 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_approxRecipSqrt_1Ks.c @@ -0,0 +1,49 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitives.h" + +const uint16_t softfloat_approxRecipSqrt_1k0s[16] = { + 0xB4C9, 0xFFAB, 0xAA7D, 0xF11C, 0xA1C5, 0xE4C7, 0x9A43, 0xDA29, + 0x93B5, 0xD0E5, 0x8DED, 0xC8B7, 0x88C6, 0xC16D, 0x8424, 0xBAE1 +}; +const uint16_t softfloat_approxRecipSqrt_1k1s[16] = { + 0xA5A5, 0xEA42, 0x8C21, 0xC62D, 0x788F, 0xAA7F, 0x6928, 0x94B6, + 0x5CC7, 0x8335, 0x52A6, 0x74E2, 0x4A3E, 0x68FE, 0x432B, 0x5EFD +}; + diff --git a/extern/riscv-softfloat-standalone/lib/s_approxRecip_1Ks.c b/extern/riscv-softfloat-standalone/lib/s_approxRecip_1Ks.c new file mode 100644 index 0000000..1108fcb --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_approxRecip_1Ks.c @@ -0,0 +1,49 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitives.h" + +const uint16_t softfloat_approxRecip_1k0s[16] = { + 0xFFC4, 0xF0BE, 0xE363, 0xD76F, 0xCCAD, 0xC2F0, 0xBA16, 0xB201, + 0xAA97, 0xA3C6, 0x9D7A, 0x97A6, 0x923C, 0x8D32, 0x887E, 0x8417 +}; +const uint16_t softfloat_approxRecip_1k1s[16] = { + 0xF0F1, 0xD62C, 0xBFA1, 0xAC77, 0x9C0A, 0x8DDB, 0x8185, 0x76BA, + 0x6D3B, 0x64D4, 0x5D5C, 0x56B1, 0x50B6, 0x4B55, 0x4679, 0x4211 +}; + diff --git a/extern/riscv-softfloat-standalone/lib/s_commonNaNToF128UI.c b/extern/riscv-softfloat-standalone/lib/s_commonNaNToF128UI.c new file mode 100644 index 0000000..9b97f34 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_commonNaNToF128UI.c @@ -0,0 +1,56 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include "platform.h" +#include "primitiveTypes.h" + +#define softfloat_commonNaNToF128UI softfloat_commonNaNToF128UI +#include "specialize.h" + +/*---------------------------------------------------------------------------- +| Converts the common NaN pointed to by `aPtr' into a 128-bit floating-point +| NaN, and returns the bit pattern of this value as an unsigned integer. +*----------------------------------------------------------------------------*/ +struct uint128 softfloat_commonNaNToF128UI( const struct commonNaN *aPtr ) +{ + struct uint128 uiZ; + + uiZ.v64 = defaultNaNF128UI64; + uiZ.v0 = defaultNaNF128UI0; + return uiZ; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_commonNaNToF16UI.c b/extern/riscv-softfloat-standalone/lib/s_commonNaNToF16UI.c new file mode 100644 index 0000000..861b269 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_commonNaNToF16UI.c @@ -0,0 +1,5 @@ + +/*---------------------------------------------------------------------------- +| This file intentionally contains no code. +*----------------------------------------------------------------------------*/ + diff --git a/extern/riscv-softfloat-standalone/lib/s_commonNaNToF32UI.c b/extern/riscv-softfloat-standalone/lib/s_commonNaNToF32UI.c new file mode 100644 index 0000000..861b269 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_commonNaNToF32UI.c @@ -0,0 +1,5 @@ + +/*---------------------------------------------------------------------------- +| This file intentionally contains no code. +*----------------------------------------------------------------------------*/ + diff --git a/extern/riscv-softfloat-standalone/lib/s_commonNaNToF64UI.c b/extern/riscv-softfloat-standalone/lib/s_commonNaNToF64UI.c new file mode 100644 index 0000000..861b269 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_commonNaNToF64UI.c @@ -0,0 +1,5 @@ + +/*---------------------------------------------------------------------------- +| This file intentionally contains no code. +*----------------------------------------------------------------------------*/ + diff --git a/extern/riscv-softfloat-standalone/lib/s_compare128M.c b/extern/riscv-softfloat-standalone/lib/s_compare128M.c new file mode 100644 index 0000000..c2819e2 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_compare128M.c @@ -0,0 +1,62 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_compare128M + +int_fast8_t softfloat_compare128M( const uint32_t *aPtr, const uint32_t *bPtr ) +{ + unsigned int index, lastIndex; + uint32_t wordA, wordB; + + index = indexWordHi( 4 ); + lastIndex = indexWordLo( 4 ); + for (;;) { + wordA = aPtr[index]; + wordB = bPtr[index]; + if ( wordA != wordB ) return (wordA < wordB) ? -1 : 1; + if ( index == lastIndex ) break; + index -= wordIncr; + } + return 0; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_compare96M.c b/extern/riscv-softfloat-standalone/lib/s_compare96M.c new file mode 100644 index 0000000..0dc39f5 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_compare96M.c @@ -0,0 +1,62 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_compare96M + +int_fast8_t softfloat_compare96M( const uint32_t *aPtr, const uint32_t *bPtr ) +{ + unsigned int index, lastIndex; + uint32_t wordA, wordB; + + index = indexWordHi( 3 ); + lastIndex = indexWordLo( 3 ); + for (;;) { + wordA = aPtr[index]; + wordB = bPtr[index]; + if ( wordA != wordB ) return (wordA < wordB) ? -1 : 1; + if ( index == lastIndex ) break; + index -= wordIncr; + } + return 0; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_countLeadingZeros16.c b/extern/riscv-softfloat-standalone/lib/s_countLeadingZeros16.c new file mode 100644 index 0000000..950db6c --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_countLeadingZeros16.c @@ -0,0 +1,60 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" + +#ifndef softfloat_countLeadingZeros16 + +#define softfloat_countLeadingZeros16 softfloat_countLeadingZeros16 +#include "primitives.h" + +uint_fast8_t softfloat_countLeadingZeros16( uint16_t a ) +{ + uint_fast8_t count; + + count = 8; + if ( 0x100 <= a ) { + count = 0; + a >>= 8; + } + count += softfloat_countLeadingZeros8[a]; + return count; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_countLeadingZeros32.c b/extern/riscv-softfloat-standalone/lib/s_countLeadingZeros32.c new file mode 100644 index 0000000..fbf8ab6 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_countLeadingZeros32.c @@ -0,0 +1,64 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" + +#ifndef softfloat_countLeadingZeros32 + +#define softfloat_countLeadingZeros32 softfloat_countLeadingZeros32 +#include "primitives.h" + +uint_fast8_t softfloat_countLeadingZeros32( uint32_t a ) +{ + uint_fast8_t count; + + count = 0; + if ( a < 0x10000 ) { + count = 16; + a <<= 16; + } + if ( a < 0x1000000 ) { + count += 8; + a <<= 8; + } + count += softfloat_countLeadingZeros8[a>>24]; + return count; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_countLeadingZeros64.c b/extern/riscv-softfloat-standalone/lib/s_countLeadingZeros64.c new file mode 100644 index 0000000..0045741 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_countLeadingZeros64.c @@ -0,0 +1,73 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" + +#ifndef softfloat_countLeadingZeros64 + +#define softfloat_countLeadingZeros64 softfloat_countLeadingZeros64 +#include "primitives.h" + +uint_fast8_t softfloat_countLeadingZeros64( uint64_t a ) +{ + uint_fast8_t count; + uint32_t a32; + + count = 0; + a32 = a>>32; + if ( ! a32 ) { + count = 32; + a32 = a; + } + /*------------------------------------------------------------------------ + | From here, result is current count + count leading zeros of `a32'. + *------------------------------------------------------------------------*/ + if ( a32 < 0x10000 ) { + count += 16; + a32 <<= 16; + } + if ( a32 < 0x1000000 ) { + count += 8; + a32 <<= 8; + } + count += softfloat_countLeadingZeros8[a32>>24]; + return count; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_countLeadingZeros8.c b/extern/riscv-softfloat-standalone/lib/s_countLeadingZeros8.c new file mode 100644 index 0000000..1158d01 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_countLeadingZeros8.c @@ -0,0 +1,59 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitives.h" + +const uint_least8_t softfloat_countLeadingZeros8[256] = { + 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 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, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + diff --git a/extern/riscv-softfloat-standalone/lib/s_eq128.c b/extern/riscv-softfloat-standalone/lib/s_eq128.c new file mode 100644 index 0000000..625ef00 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_eq128.c @@ -0,0 +1,51 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" + +#ifndef softfloat_eq128 + +bool softfloat_eq128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ) +{ + + return (a64 == b64) && (a0 == b0); + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_f128UIToCommonNaN.c b/extern/riscv-softfloat-standalone/lib/s_f128UIToCommonNaN.c new file mode 100644 index 0000000..861b269 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_f128UIToCommonNaN.c @@ -0,0 +1,5 @@ + +/*---------------------------------------------------------------------------- +| This file intentionally contains no code. +*----------------------------------------------------------------------------*/ + diff --git a/extern/riscv-softfloat-standalone/lib/s_f16UIToCommonNaN.c b/extern/riscv-softfloat-standalone/lib/s_f16UIToCommonNaN.c new file mode 100644 index 0000000..861b269 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_f16UIToCommonNaN.c @@ -0,0 +1,5 @@ + +/*---------------------------------------------------------------------------- +| This file intentionally contains no code. +*----------------------------------------------------------------------------*/ + diff --git a/extern/riscv-softfloat-standalone/lib/s_f32UIToCommonNaN.c b/extern/riscv-softfloat-standalone/lib/s_f32UIToCommonNaN.c new file mode 100644 index 0000000..861b269 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_f32UIToCommonNaN.c @@ -0,0 +1,5 @@ + +/*---------------------------------------------------------------------------- +| This file intentionally contains no code. +*----------------------------------------------------------------------------*/ + diff --git a/extern/riscv-softfloat-standalone/lib/s_f64UIToCommonNaN.c b/extern/riscv-softfloat-standalone/lib/s_f64UIToCommonNaN.c new file mode 100644 index 0000000..861b269 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_f64UIToCommonNaN.c @@ -0,0 +1,5 @@ + +/*---------------------------------------------------------------------------- +| This file intentionally contains no code. +*----------------------------------------------------------------------------*/ + diff --git a/extern/riscv-softfloat-standalone/lib/s_le128.c b/extern/riscv-softfloat-standalone/lib/s_le128.c new file mode 100644 index 0000000..7261012 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_le128.c @@ -0,0 +1,51 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" + +#ifndef softfloat_le128 + +bool softfloat_le128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ) +{ + + return (a64 < b64) || ((a64 == b64) && (a0 <= b0)); + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_lt128.c b/extern/riscv-softfloat-standalone/lib/s_lt128.c new file mode 100644 index 0000000..0d461c3 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_lt128.c @@ -0,0 +1,51 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" + +#ifndef softfloat_lt128 + +bool softfloat_lt128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ) +{ + + return (a64 < b64) || ((a64 == b64) && (a0 < b0)); + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_mul128By32.c b/extern/riscv-softfloat-standalone/lib/s_mul128By32.c new file mode 100644 index 0000000..6e71dd0 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_mul128By32.c @@ -0,0 +1,58 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_mul128By32 + +struct uint128 softfloat_mul128By32( uint64_t a64, uint64_t a0, uint32_t b ) +{ + struct uint128 z; + uint_fast64_t mid; + uint_fast32_t carry; + + z.v0 = a0 * b; + mid = (uint_fast64_t) (uint32_t) (a0>>32) * b; + carry = (uint32_t) ((uint_fast32_t) (z.v0>>32) - (uint_fast32_t) mid); + z.v64 = a64 * b + (uint_fast32_t) ((mid + carry)>>32); + return z; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_mul128MTo256M.c b/extern/riscv-softfloat-standalone/lib/s_mul128MTo256M.c new file mode 100644 index 0000000..49a1d29 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_mul128MTo256M.c @@ -0,0 +1,100 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_mul128MTo256M + +void + softfloat_mul128MTo256M( + const uint32_t *aPtr, const uint32_t *bPtr, uint32_t *zPtr ) +{ + uint32_t *lastZPtr, wordB; + uint64_t dwordProd; + uint32_t wordZ; + uint_fast8_t carry; + + bPtr += indexWordLo( 4 ); + lastZPtr = zPtr + indexMultiwordHi( 8, 5 ); + zPtr += indexMultiwordLo( 8, 5 ); + wordB = *bPtr; + dwordProd = (uint64_t) aPtr[indexWord( 4, 0 )] * wordB; + zPtr[indexWord( 5, 0 )] = dwordProd; + dwordProd = (uint64_t) aPtr[indexWord( 4, 1 )] * wordB + (dwordProd>>32); + zPtr[indexWord( 5, 1 )] = dwordProd; + dwordProd = (uint64_t) aPtr[indexWord( 4, 2 )] * wordB + (dwordProd>>32); + zPtr[indexWord( 5, 2 )] = dwordProd; + dwordProd = (uint64_t) aPtr[indexWord( 4, 3 )] * wordB + (dwordProd>>32); + zPtr[indexWord( 5, 3 )] = dwordProd; + zPtr[indexWord( 5, 4 )] = dwordProd>>32; + do { + bPtr += wordIncr; + zPtr += wordIncr; + wordB = *bPtr; + dwordProd = (uint64_t) aPtr[indexWord( 4, 0 )] * wordB; + wordZ = zPtr[indexWord( 5, 0 )] + (uint32_t) dwordProd; + zPtr[indexWord( 5, 0 )] = wordZ; + carry = (wordZ < (uint32_t) dwordProd); + dwordProd = + (uint64_t) aPtr[indexWord( 4, 1 )] * wordB + (dwordProd>>32); + wordZ = zPtr[indexWord( 5, 1 )] + (uint32_t) dwordProd + carry; + zPtr[indexWord( 5, 1 )] = wordZ; + if ( wordZ != (uint32_t) dwordProd ) { + carry = (wordZ < (uint32_t) dwordProd); + } + dwordProd = + (uint64_t) aPtr[indexWord( 4, 2 )] * wordB + (dwordProd>>32); + wordZ = zPtr[indexWord( 5, 2 )] + (uint32_t) dwordProd + carry; + zPtr[indexWord( 5, 2 )] = wordZ; + if ( wordZ != (uint32_t) dwordProd ) { + carry = (wordZ < (uint32_t) dwordProd); + } + dwordProd = + (uint64_t) aPtr[indexWord( 4, 3 )] * wordB + (dwordProd>>32); + wordZ = zPtr[indexWord( 5, 3 )] + (uint32_t) dwordProd + carry; + zPtr[indexWord( 5, 3 )] = wordZ; + if ( wordZ != (uint32_t) dwordProd ) { + carry = (wordZ < (uint32_t) dwordProd); + } + zPtr[indexWord( 5, 4 )] = (dwordProd>>32) + carry; + } while ( zPtr != lastZPtr ); + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_mul128To256M.c b/extern/riscv-softfloat-standalone/lib/s_mul128To256M.c new file mode 100644 index 0000000..fccc2a6 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_mul128To256M.c @@ -0,0 +1,71 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" + +#ifndef softfloat_mul128To256M + +#define softfloat_mul128To256M softfloat_mul128To256M +#include "primitives.h" + +void + softfloat_mul128To256M( + uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0, uint64_t *zPtr ) +{ + struct uint128 p0, p64, p128; + uint_fast64_t z64, z128, z192; + + p0 = softfloat_mul64To128( a0, b0 ); + zPtr[indexWord( 4, 0 )] = p0.v0; + p64 = softfloat_mul64To128( a64, b0 ); + z64 = p64.v0 + p0.v64; + z128 = p64.v64 + (z64 < p64.v0); + p128 = softfloat_mul64To128( a64, b64 ); + z128 += p128.v0; + z192 = p128.v64 + (z128 < p128.v0); + p64 = softfloat_mul64To128( a0, b64 ); + z64 += p64.v0; + zPtr[indexWord( 4, 1 )] = z64; + p64.v64 += (z64 < p64.v0); + z128 += p64.v64; + zPtr[indexWord( 4, 2 )] = z128; + zPtr[indexWord( 4, 3 )] = z192 + (z128 < p64.v64); + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_mul64ByShifted32To128.c b/extern/riscv-softfloat-standalone/lib/s_mul64ByShifted32To128.c new file mode 100644 index 0000000..f7e7104 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_mul64ByShifted32To128.c @@ -0,0 +1,56 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_mul64ByShifted32To128 + +struct uint128 softfloat_mul64ByShifted32To128( uint64_t a, uint32_t b ) +{ + uint_fast64_t mid; + struct uint128 z; + + mid = (uint_fast64_t) (uint32_t) a * b; + z.v0 = mid<<32; + z.v64 = (uint_fast64_t) (uint32_t) (a>>32) * b + (mid>>32); + return z; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_mul64To128.c b/extern/riscv-softfloat-standalone/lib/s_mul64To128.c new file mode 100644 index 0000000..6620a20 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_mul64To128.c @@ -0,0 +1,66 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_mul64To128 + +struct uint128 softfloat_mul64To128( uint64_t a, uint64_t b ) +{ + uint32_t a32, a0, b32, b0; + struct uint128 z; + uint64_t mid1, mid; + + a32 = a>>32; + a0 = a; + b32 = b>>32; + b0 = b; + z.v0 = (uint_fast64_t) a0 * b0; + mid1 = (uint_fast64_t) a32 * b0; + mid = mid1 + (uint_fast64_t) a0 * b32; + z.v64 = (uint_fast64_t) a32 * b32; + z.v64 += (uint_fast64_t) (mid < mid1)<<32 | mid>>32; + mid <<= 32; + z.v0 += mid; + z.v64 += (z.v0 < mid); + return z; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_mul64To128M.c b/extern/riscv-softfloat-standalone/lib/s_mul64To128M.c new file mode 100644 index 0000000..e3f9a48 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_mul64To128M.c @@ -0,0 +1,68 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_mul64To128M + +void softfloat_mul64To128M( uint64_t a, uint64_t b, uint32_t *zPtr ) +{ + uint32_t a32, a0, b32, b0; + uint64_t z0, mid1, z64, mid; + + a32 = a>>32; + a0 = a; + b32 = b>>32; + b0 = b; + z0 = (uint64_t) a0 * b0; + mid1 = (uint64_t) a32 * b0; + mid = mid1 + (uint64_t) a0 * b32; + z64 = (uint64_t) a32 * b32; + z64 += (uint64_t) (mid < mid1)<<32 | mid>>32; + mid <<= 32; + z0 += mid; + zPtr[indexWord( 4, 1 )] = z0>>32; + zPtr[indexWord( 4, 0 )] = z0; + z64 += (z0 < mid); + zPtr[indexWord( 4, 3 )] = z64>>32; + zPtr[indexWord( 4, 2 )] = z64; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_mulAddF128.c b/extern/riscv-softfloat-standalone/lib/s_mulAddF128.c new file mode 100644 index 0000000..877b33d --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_mulAddF128.c @@ -0,0 +1,350 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float128_t + softfloat_mulAddF128( + uint_fast64_t uiA64, + uint_fast64_t uiA0, + uint_fast64_t uiB64, + uint_fast64_t uiB0, + uint_fast64_t uiC64, + uint_fast64_t uiC0, + uint_fast8_t op + ) +{ + bool signA; + int_fast32_t expA; + struct uint128 sigA; + bool signB; + int_fast32_t expB; + struct uint128 sigB; + bool signC; + int_fast32_t expC; + struct uint128 sigC; + bool signZ; + uint_fast64_t magBits; + struct uint128 uiZ; + struct exp32_sig128 normExpSig; + int_fast32_t expZ; + uint64_t sig256Z[4]; + struct uint128 sigZ; + int_fast32_t shiftDist, expDiff; + struct uint128 x128; + uint64_t sig256C[4]; + static uint64_t zero256[4] = INIT_UINTM4( 0, 0, 0, 0 ); + uint_fast64_t sigZExtra, sig256Z0; + union ui128_f128 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + signA = signF128UI64( uiA64 ); + expA = expF128UI64( uiA64 ); + sigA.v64 = fracF128UI64( uiA64 ); + sigA.v0 = uiA0; + signB = signF128UI64( uiB64 ); + expB = expF128UI64( uiB64 ); + sigB.v64 = fracF128UI64( uiB64 ); + sigB.v0 = uiB0; + signC = signF128UI64( uiC64 ) ^ (op == softfloat_mulAdd_subC); + expC = expF128UI64( uiC64 ); + sigC.v64 = fracF128UI64( uiC64 ); + sigC.v0 = uiC0; + signZ = signA ^ signB ^ (op == softfloat_mulAdd_subProd); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( expA == 0x7FFF ) { + if ( + (sigA.v64 | sigA.v0) || ((expB == 0x7FFF) && (sigB.v64 | sigB.v0)) + ) { + goto propagateNaN_ABC; + } + magBits = expB | sigB.v64 | sigB.v0; + goto infProdArg; + } + if ( expB == 0x7FFF ) { + if ( sigB.v64 | sigB.v0 ) goto propagateNaN_ABC; + magBits = expA | sigA.v64 | sigA.v0; + goto infProdArg; + } + if ( expC == 0x7FFF ) { + if ( sigC.v64 | sigC.v0 ) { + uiZ.v64 = 0; + uiZ.v0 = 0; + goto propagateNaN_ZC; + } + uiZ.v64 = uiC64; + uiZ.v0 = uiC0; + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! expA ) { + if ( ! (sigA.v64 | sigA.v0) ) goto zeroProd; + normExpSig = softfloat_normSubnormalF128Sig( sigA.v64, sigA.v0 ); + expA = normExpSig.exp; + sigA = normExpSig.sig; + } + if ( ! expB ) { + if ( ! (sigB.v64 | sigB.v0) ) goto zeroProd; + normExpSig = softfloat_normSubnormalF128Sig( sigB.v64, sigB.v0 ); + expB = normExpSig.exp; + sigB = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expZ = expA + expB - 0x3FFE; + sigA.v64 |= UINT64_C( 0x0001000000000000 ); + sigB.v64 |= UINT64_C( 0x0001000000000000 ); + sigA = softfloat_shortShiftLeft128( sigA.v64, sigA.v0, 8 ); + sigB = softfloat_shortShiftLeft128( sigB.v64, sigB.v0, 15 ); + softfloat_mul128To256M( sigA.v64, sigA.v0, sigB.v64, sigB.v0, sig256Z ); + sigZ.v64 = sig256Z[indexWord( 4, 3 )]; + sigZ.v0 = sig256Z[indexWord( 4, 2 )]; + shiftDist = 0; + if ( ! (sigZ.v64 & UINT64_C( 0x0100000000000000 )) ) { + --expZ; + shiftDist = -1; + } + if ( ! expC ) { + if ( ! (sigC.v64 | sigC.v0) ) { + shiftDist += 8; + goto sigZ; + } + normExpSig = softfloat_normSubnormalF128Sig( sigC.v64, sigC.v0 ); + expC = normExpSig.exp; + sigC = normExpSig.sig; + } + sigC.v64 |= UINT64_C( 0x0001000000000000 ); + sigC = softfloat_shortShiftLeft128( sigC.v64, sigC.v0, 8 ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expDiff = expZ - expC; + if ( expDiff < 0 ) { + expZ = expC; + if ( (signZ == signC) || (expDiff < -1) ) { + shiftDist -= expDiff; + if ( shiftDist ) { + sigZ = + softfloat_shiftRightJam128( sigZ.v64, sigZ.v0, shiftDist ); + } + } else { + if ( ! shiftDist ) { + x128 = + softfloat_shortShiftRight128( + sig256Z[indexWord( 4, 1 )], sig256Z[indexWord( 4, 0 )], + 1 + ); + sig256Z[indexWord( 4, 1 )] = (sigZ.v0<<63) | x128.v64; + sig256Z[indexWord( 4, 0 )] = x128.v0; + sigZ = softfloat_shortShiftRight128( sigZ.v64, sigZ.v0, 1 ); + sig256Z[indexWord( 4, 3 )] = sigZ.v64; + sig256Z[indexWord( 4, 2 )] = sigZ.v0; + } + } + } else { + if ( shiftDist ) softfloat_add256M( sig256Z, sig256Z, sig256Z ); + if ( ! expDiff ) { + sigZ.v64 = sig256Z[indexWord( 4, 3 )]; + sigZ.v0 = sig256Z[indexWord( 4, 2 )]; + } else { + sig256C[indexWord( 4, 3 )] = sigC.v64; + sig256C[indexWord( 4, 2 )] = sigC.v0; + sig256C[indexWord( 4, 1 )] = 0; + sig256C[indexWord( 4, 0 )] = 0; + softfloat_shiftRightJam256M( sig256C, expDiff, sig256C ); + } + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + shiftDist = 8; + if ( signZ == signC ) { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( expDiff <= 0 ) { + sigZ = softfloat_add128( sigC.v64, sigC.v0, sigZ.v64, sigZ.v0 ); + } else { + softfloat_add256M( sig256Z, sig256C, sig256Z ); + sigZ.v64 = sig256Z[indexWord( 4, 3 )]; + sigZ.v0 = sig256Z[indexWord( 4, 2 )]; + } + if ( sigZ.v64 & UINT64_C( 0x0200000000000000 ) ) { + ++expZ; + shiftDist = 9; + } + } else { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( expDiff < 0 ) { + signZ = signC; + if ( expDiff < -1 ) { + sigZ = + softfloat_sub128( sigC.v64, sigC.v0, sigZ.v64, sigZ.v0 ); + sigZExtra = + sig256Z[indexWord( 4, 1 )] | sig256Z[indexWord( 4, 0 )]; + if ( sigZExtra ) { + sigZ = softfloat_sub128( sigZ.v64, sigZ.v0, 0, 1 ); + } + if ( ! (sigZ.v64 & UINT64_C( 0x0100000000000000 )) ) { + --expZ; + shiftDist = 7; + } + goto shiftRightRoundPack; + } else { + sig256C[indexWord( 4, 3 )] = sigC.v64; + sig256C[indexWord( 4, 2 )] = sigC.v0; + sig256C[indexWord( 4, 1 )] = 0; + sig256C[indexWord( 4, 0 )] = 0; + softfloat_sub256M( sig256C, sig256Z, sig256Z ); + } + } else if ( ! expDiff ) { + sigZ = softfloat_sub128( sigZ.v64, sigZ.v0, sigC.v64, sigC.v0 ); + if ( + ! (sigZ.v64 | sigZ.v0) && ! sig256Z[indexWord( 4, 1 )] + && ! sig256Z[indexWord( 4, 0 )] + ) { + goto completeCancellation; + } + sig256Z[indexWord( 4, 3 )] = sigZ.v64; + sig256Z[indexWord( 4, 2 )] = sigZ.v0; + if ( sigZ.v64 & UINT64_C( 0x8000000000000000 ) ) { + signZ = ! signZ; + softfloat_sub256M( zero256, sig256Z, sig256Z ); + } + } else { + softfloat_sub256M( sig256Z, sig256C, sig256Z ); + if ( 1 < expDiff ) { + sigZ.v64 = sig256Z[indexWord( 4, 3 )]; + sigZ.v0 = sig256Z[indexWord( 4, 2 )]; + if ( ! (sigZ.v64 & UINT64_C( 0x0100000000000000 )) ) { + --expZ; + shiftDist = 7; + } + goto sigZ; + } + } + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + sigZ.v64 = sig256Z[indexWord( 4, 3 )]; + sigZ.v0 = sig256Z[indexWord( 4, 2 )]; + sigZExtra = sig256Z[indexWord( 4, 1 )]; + sig256Z0 = sig256Z[indexWord( 4, 0 )]; + if ( sigZ.v64 ) { + if ( sig256Z0 ) sigZExtra |= 1; + } else { + expZ -= 64; + sigZ.v64 = sigZ.v0; + sigZ.v0 = sigZExtra; + sigZExtra = sig256Z0; + if ( ! sigZ.v64 ) { + expZ -= 64; + sigZ.v64 = sigZ.v0; + sigZ.v0 = sigZExtra; + sigZExtra = 0; + if ( ! sigZ.v64 ) { + expZ -= 64; + sigZ.v64 = sigZ.v0; + sigZ.v0 = 0; + } + } + } + shiftDist = softfloat_countLeadingZeros64( sigZ.v64 ); + expZ += 7 - shiftDist; + shiftDist = 15 - shiftDist; + if ( 0 < shiftDist ) goto shiftRightRoundPack; + if ( shiftDist ) { + shiftDist = -shiftDist; + sigZ = softfloat_shortShiftLeft128( sigZ.v64, sigZ.v0, shiftDist ); + x128 = softfloat_shortShiftLeft128( 0, sigZExtra, shiftDist ); + sigZ.v0 |= x128.v64; + sigZExtra = x128.v0; + } + goto roundPack; + } + sigZ: + sigZExtra = sig256Z[indexWord( 4, 1 )] | sig256Z[indexWord( 4, 0 )]; + shiftRightRoundPack: + sigZExtra = (uint64_t) (sigZ.v0<<(64 - shiftDist)) | (sigZExtra != 0); + sigZ = softfloat_shortShiftRight128( sigZ.v64, sigZ.v0, shiftDist ); + roundPack: + return + softfloat_roundPackToF128( + signZ, expZ - 1, sigZ.v64, sigZ.v0, sigZExtra ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + propagateNaN_ABC: + uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, uiB64, uiB0 ); + goto propagateNaN_ZC; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + infProdArg: + if ( magBits ) { + uiZ.v64 = packToF128UI64( signZ, 0x7FFF, 0 ); + uiZ.v0 = 0; + if ( expC != 0x7FFF ) goto uiZ; + if ( sigC.v64 | sigC.v0 ) goto propagateNaN_ZC; + if ( signZ == signC ) goto uiZ; + } + softfloat_raiseFlags( softfloat_flag_invalid ); + uiZ.v64 = defaultNaNF128UI64; + uiZ.v0 = defaultNaNF128UI0; + propagateNaN_ZC: + uiZ = softfloat_propagateNaNF128UI( uiZ.v64, uiZ.v0, uiC64, uiC0 ); + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + zeroProd: + uiZ.v64 = uiC64; + uiZ.v0 = uiC0; + if ( ! (expC | sigC.v64 | sigC.v0) && (signZ != signC) ) { + completeCancellation: + uiZ.v64 = + packToF128UI64( + (softfloat_roundingMode == softfloat_round_min), 0, 0 ); + uiZ.v0 = 0; + } + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_mulAddF16.c b/extern/riscv-softfloat-standalone/lib/s_mulAddF16.c new file mode 100644 index 0000000..b604007 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_mulAddF16.c @@ -0,0 +1,226 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float16_t + softfloat_mulAddF16( + uint_fast16_t uiA, uint_fast16_t uiB, uint_fast16_t uiC, uint_fast8_t op ) +{ + bool signA; + int_fast8_t expA; + uint_fast16_t sigA; + bool signB; + int_fast8_t expB; + uint_fast16_t sigB; + bool signC; + int_fast8_t expC; + uint_fast16_t sigC; + bool signProd; + uint_fast16_t magBits, uiZ; + struct exp8_sig16 normExpSig; + int_fast8_t expProd; + uint_fast32_t sigProd; + bool signZ; + int_fast8_t expZ; + uint_fast16_t sigZ; + int_fast8_t expDiff; + uint_fast32_t sig32Z, sig32C; + int_fast8_t shiftDist; + union ui16_f16 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + signA = signF16UI( uiA ); + expA = expF16UI( uiA ); + sigA = fracF16UI( uiA ); + signB = signF16UI( uiB ); + expB = expF16UI( uiB ); + sigB = fracF16UI( uiB ); + signC = signF16UI( uiC ) ^ (op == softfloat_mulAdd_subC); + expC = expF16UI( uiC ); + sigC = fracF16UI( uiC ); + signProd = signA ^ signB ^ (op == softfloat_mulAdd_subProd); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( expA == 0x1F ) { + if ( sigA || ((expB == 0x1F) && sigB) ) goto propagateNaN_ABC; + magBits = expB | sigB; + goto infProdArg; + } + if ( expB == 0x1F ) { + if ( sigB ) goto propagateNaN_ABC; + magBits = expA | sigA; + goto infProdArg; + } + if ( expC == 0x1F ) { + if ( sigC ) { + uiZ = 0; + goto propagateNaN_ZC; + } + uiZ = uiC; + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! expA ) { + if ( ! sigA ) goto zeroProd; + normExpSig = softfloat_normSubnormalF16Sig( sigA ); + expA = normExpSig.exp; + sigA = normExpSig.sig; + } + if ( ! expB ) { + if ( ! sigB ) goto zeroProd; + normExpSig = softfloat_normSubnormalF16Sig( sigB ); + expB = normExpSig.exp; + sigB = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expProd = expA + expB - 0xE; + sigA = (sigA | 0x0400)<<4; + sigB = (sigB | 0x0400)<<4; + sigProd = (uint_fast32_t) sigA * sigB; + if ( sigProd < 0x20000000 ) { + --expProd; + sigProd <<= 1; + } + signZ = signProd; + if ( ! expC ) { + if ( ! sigC ) { + expZ = expProd - 1; + sigZ = sigProd>>15 | ((sigProd & 0x7FFF) != 0); + goto roundPack; + } + normExpSig = softfloat_normSubnormalF16Sig( sigC ); + expC = normExpSig.exp; + sigC = normExpSig.sig; + } + sigC = (sigC | 0x0400)<<3; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expDiff = expProd - expC; + if ( signProd == signC ) { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( expDiff <= 0 ) { + expZ = expC; + sigZ = sigC + softfloat_shiftRightJam32( sigProd, 16 - expDiff ); + } else { + expZ = expProd; + sig32Z = + sigProd + + softfloat_shiftRightJam32( + (uint_fast32_t) sigC<<16, expDiff ); + sigZ = sig32Z>>16 | ((sig32Z & 0xFFFF) != 0 ); + } + if ( sigZ < 0x4000 ) { + --expZ; + sigZ <<= 1; + } + } else { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + sig32C = (uint_fast32_t) sigC<<16; + if ( expDiff < 0 ) { + signZ = signC; + expZ = expC; + sig32Z = sig32C - softfloat_shiftRightJam32( sigProd, -expDiff ); + } else if ( ! expDiff ) { + expZ = expProd; + sig32Z = sigProd - sig32C; + if ( ! sig32Z ) goto completeCancellation; + if ( sig32Z & 0x80000000 ) { + signZ = ! signZ; + sig32Z = -sig32Z; + } + } else { + expZ = expProd; + sig32Z = sigProd - softfloat_shiftRightJam32( sig32C, expDiff ); + } + shiftDist = softfloat_countLeadingZeros32( sig32Z ) - 1; + expZ -= shiftDist; + shiftDist -= 16; + if ( shiftDist < 0 ) { + sigZ = + sig32Z>>(-shiftDist) + | ((uint32_t) (sig32Z<<(shiftDist & 31)) != 0); + } else { + sigZ = (uint_fast16_t) sig32Z< +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float32_t + softfloat_mulAddF32( + uint_fast32_t uiA, uint_fast32_t uiB, uint_fast32_t uiC, uint_fast8_t op ) +{ + bool signA; + int_fast16_t expA; + uint_fast32_t sigA; + bool signB; + int_fast16_t expB; + uint_fast32_t sigB; + bool signC; + int_fast16_t expC; + uint_fast32_t sigC; + bool signProd; + uint_fast32_t magBits, uiZ; + struct exp16_sig32 normExpSig; + int_fast16_t expProd; + uint_fast64_t sigProd; + bool signZ; + int_fast16_t expZ; + uint_fast32_t sigZ; + int_fast16_t expDiff; + uint_fast64_t sig64Z, sig64C; + int_fast8_t shiftDist; + union ui32_f32 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + signA = signF32UI( uiA ); + expA = expF32UI( uiA ); + sigA = fracF32UI( uiA ); + signB = signF32UI( uiB ); + expB = expF32UI( uiB ); + sigB = fracF32UI( uiB ); + signC = signF32UI( uiC ) ^ (op == softfloat_mulAdd_subC); + expC = expF32UI( uiC ); + sigC = fracF32UI( uiC ); + signProd = signA ^ signB ^ (op == softfloat_mulAdd_subProd); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( expA == 0xFF ) { + if ( sigA || ((expB == 0xFF) && sigB) ) goto propagateNaN_ABC; + magBits = expB | sigB; + goto infProdArg; + } + if ( expB == 0xFF ) { + if ( sigB ) goto propagateNaN_ABC; + magBits = expA | sigA; + goto infProdArg; + } + if ( expC == 0xFF ) { + if ( sigC ) { + uiZ = 0; + goto propagateNaN_ZC; + } + uiZ = uiC; + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! expA ) { + if ( ! sigA ) goto zeroProd; + normExpSig = softfloat_normSubnormalF32Sig( sigA ); + expA = normExpSig.exp; + sigA = normExpSig.sig; + } + if ( ! expB ) { + if ( ! sigB ) goto zeroProd; + normExpSig = softfloat_normSubnormalF32Sig( sigB ); + expB = normExpSig.exp; + sigB = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expProd = expA + expB - 0x7E; + sigA = (sigA | 0x00800000)<<7; + sigB = (sigB | 0x00800000)<<7; + sigProd = (uint_fast64_t) sigA * sigB; + if ( sigProd < UINT64_C( 0x2000000000000000 ) ) { + --expProd; + sigProd <<= 1; + } + signZ = signProd; + if ( ! expC ) { + if ( ! sigC ) { + expZ = expProd - 1; + sigZ = softfloat_shortShiftRightJam64( sigProd, 31 ); + goto roundPack; + } + normExpSig = softfloat_normSubnormalF32Sig( sigC ); + expC = normExpSig.exp; + sigC = normExpSig.sig; + } + sigC = (sigC | 0x00800000)<<6; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expDiff = expProd - expC; + if ( signProd == signC ) { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( expDiff <= 0 ) { + expZ = expC; + sigZ = sigC + softfloat_shiftRightJam64( sigProd, 32 - expDiff ); + } else { + expZ = expProd; + sig64Z = + sigProd + + softfloat_shiftRightJam64( + (uint_fast64_t) sigC<<32, expDiff ); + sigZ = softfloat_shortShiftRightJam64( sig64Z, 32 ); + } + if ( sigZ < 0x40000000 ) { + --expZ; + sigZ <<= 1; + } + } else { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + sig64C = (uint_fast64_t) sigC<<32; + if ( expDiff < 0 ) { + signZ = signC; + expZ = expC; + sig64Z = sig64C - softfloat_shiftRightJam64( sigProd, -expDiff ); + } else if ( ! expDiff ) { + expZ = expProd; + sig64Z = sigProd - sig64C; + if ( ! sig64Z ) goto completeCancellation; + if ( sig64Z & UINT64_C( 0x8000000000000000 ) ) { + signZ = ! signZ; + sig64Z = -sig64Z; + } + } else { + expZ = expProd; + sig64Z = sigProd - softfloat_shiftRightJam64( sig64C, expDiff ); + } + shiftDist = softfloat_countLeadingZeros64( sig64Z ) - 1; + expZ -= shiftDist; + shiftDist -= 32; + if ( shiftDist < 0 ) { + sigZ = softfloat_shortShiftRightJam64( sig64Z, -shiftDist ); + } else { + sigZ = (uint_fast32_t) sig64Z< +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +#ifdef SOFTFLOAT_FAST_INT64 + +float64_t + softfloat_mulAddF64( + uint_fast64_t uiA, uint_fast64_t uiB, uint_fast64_t uiC, uint_fast8_t op ) +{ + bool signA; + int_fast16_t expA; + uint_fast64_t sigA; + bool signB; + int_fast16_t expB; + uint_fast64_t sigB; + bool signC; + int_fast16_t expC; + uint_fast64_t sigC; + bool signZ; + uint_fast64_t magBits, uiZ; + struct exp16_sig64 normExpSig; + int_fast16_t expZ; + struct uint128 sig128Z; + uint_fast64_t sigZ; + int_fast16_t expDiff; + struct uint128 sig128C; + int_fast8_t shiftDist; + union ui64_f64 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + signA = signF64UI( uiA ); + expA = expF64UI( uiA ); + sigA = fracF64UI( uiA ); + signB = signF64UI( uiB ); + expB = expF64UI( uiB ); + sigB = fracF64UI( uiB ); + signC = signF64UI( uiC ) ^ (op == softfloat_mulAdd_subC); + expC = expF64UI( uiC ); + sigC = fracF64UI( uiC ); + signZ = signA ^ signB ^ (op == softfloat_mulAdd_subProd); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( expA == 0x7FF ) { + if ( sigA || ((expB == 0x7FF) && sigB) ) goto propagateNaN_ABC; + magBits = expB | sigB; + goto infProdArg; + } + if ( expB == 0x7FF ) { + if ( sigB ) goto propagateNaN_ABC; + magBits = expA | sigA; + goto infProdArg; + } + if ( expC == 0x7FF ) { + if ( sigC ) { + uiZ = 0; + goto propagateNaN_ZC; + } + uiZ = uiC; + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! expA ) { + if ( ! sigA ) goto zeroProd; + normExpSig = softfloat_normSubnormalF64Sig( sigA ); + expA = normExpSig.exp; + sigA = normExpSig.sig; + } + if ( ! expB ) { + if ( ! sigB ) goto zeroProd; + normExpSig = softfloat_normSubnormalF64Sig( sigB ); + expB = normExpSig.exp; + sigB = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expZ = expA + expB - 0x3FE; + sigA = (sigA | UINT64_C( 0x0010000000000000 ))<<10; + sigB = (sigB | UINT64_C( 0x0010000000000000 ))<<10; + sig128Z = softfloat_mul64To128( sigA, sigB ); + if ( sig128Z.v64 < UINT64_C( 0x2000000000000000 ) ) { + --expZ; + sig128Z = + softfloat_add128( + sig128Z.v64, sig128Z.v0, sig128Z.v64, sig128Z.v0 ); + } + if ( ! expC ) { + if ( ! sigC ) { + --expZ; + sigZ = sig128Z.v64<<1 | (sig128Z.v0 != 0); + goto roundPack; + } + normExpSig = softfloat_normSubnormalF64Sig( sigC ); + expC = normExpSig.exp; + sigC = normExpSig.sig; + } + sigC = (sigC | UINT64_C( 0x0010000000000000 ))<<9; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expDiff = expZ - expC; + if ( expDiff < 0 ) { + expZ = expC; + if ( (signZ == signC) || (expDiff < -1) ) { + sig128Z.v64 = softfloat_shiftRightJam64( sig128Z.v64, -expDiff ); + } else { + sig128Z = + softfloat_shortShiftRightJam128( sig128Z.v64, sig128Z.v0, 1 ); + } + } else if ( expDiff ) { + sig128C = softfloat_shiftRightJam128( sigC, 0, expDiff ); + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( signZ == signC ) { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( expDiff <= 0 ) { + sigZ = (sigC + sig128Z.v64) | (sig128Z.v0 != 0); + } else { + sig128Z = + softfloat_add128( + sig128Z.v64, sig128Z.v0, sig128C.v64, sig128C.v0 ); + sigZ = sig128Z.v64 | (sig128Z.v0 != 0); + } + if ( sigZ < UINT64_C( 0x4000000000000000 ) ) { + --expZ; + sigZ <<= 1; + } + } else { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( expDiff < 0 ) { + signZ = signC; + sig128Z = softfloat_sub128( sigC, 0, sig128Z.v64, sig128Z.v0 ); + } else if ( ! expDiff ) { + sig128Z.v64 = sig128Z.v64 - sigC; + if ( ! (sig128Z.v64 | sig128Z.v0) ) goto completeCancellation; + if ( sig128Z.v64 & UINT64_C( 0x8000000000000000 ) ) { + signZ = ! signZ; + sig128Z = softfloat_sub128( 0, 0, sig128Z.v64, sig128Z.v0 ); + } + } else { + sig128Z = + softfloat_sub128( + sig128Z.v64, sig128Z.v0, sig128C.v64, sig128C.v0 ); + } + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( ! sig128Z.v64 ) { + expZ -= 64; + sig128Z.v64 = sig128Z.v0; + sig128Z.v0 = 0; + } + shiftDist = softfloat_countLeadingZeros64( sig128Z.v64 ) - 1; + expZ -= shiftDist; + if ( shiftDist < 0 ) { + sigZ = softfloat_shortShiftRightJam64( sig128Z.v64, -shiftDist ); + } else { + sig128Z = + softfloat_shortShiftLeft128( + sig128Z.v64, sig128Z.v0, shiftDist ); + sigZ = sig128Z.v64; + } + sigZ |= (sig128Z.v0 != 0); + } + roundPack: + return softfloat_roundPackToF64( signZ, expZ, sigZ ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + propagateNaN_ABC: + uiZ = softfloat_propagateNaNF64UI( uiA, uiB ); + goto propagateNaN_ZC; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + infProdArg: + if ( magBits ) { + uiZ = packToF64UI( signZ, 0x7FF, 0 ); + if ( expC != 0x7FF ) goto uiZ; + if ( sigC ) goto propagateNaN_ZC; + if ( signZ == signC ) goto uiZ; + } + softfloat_raiseFlags( softfloat_flag_invalid ); + uiZ = defaultNaNF64UI; + propagateNaN_ZC: + uiZ = softfloat_propagateNaNF64UI( uiZ, uiC ); + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + zeroProd: + uiZ = uiC; + if ( ! (expC | sigC) && (signZ != signC) ) { + completeCancellation: + uiZ = + packToF64UI( + (softfloat_roundingMode == softfloat_round_min), 0, 0 ); + } + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + +#else + +float64_t + softfloat_mulAddF64( + uint_fast64_t uiA, uint_fast64_t uiB, uint_fast64_t uiC, uint_fast8_t op ) +{ + bool signA; + int_fast16_t expA; + uint64_t sigA; + bool signB; + int_fast16_t expB; + uint64_t sigB; + bool signC; + int_fast16_t expC; + uint64_t sigC; + bool signZ; + uint64_t magBits, uiZ; + struct exp16_sig64 normExpSig; + int_fast16_t expZ; + uint32_t sig128Z[4]; + uint64_t sigZ; + int_fast16_t shiftDist, expDiff; + uint32_t sig128C[4]; + union ui64_f64 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + signA = signF64UI( uiA ); + expA = expF64UI( uiA ); + sigA = fracF64UI( uiA ); + signB = signF64UI( uiB ); + expB = expF64UI( uiB ); + sigB = fracF64UI( uiB ); + signC = signF64UI( uiC ) ^ (op == softfloat_mulAdd_subC); + expC = expF64UI( uiC ); + sigC = fracF64UI( uiC ); + signZ = signA ^ signB ^ (op == softfloat_mulAdd_subProd); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( expA == 0x7FF ) { + if ( sigA || ((expB == 0x7FF) && sigB) ) goto propagateNaN_ABC; + magBits = expB | sigB; + goto infProdArg; + } + if ( expB == 0x7FF ) { + if ( sigB ) goto propagateNaN_ABC; + magBits = expA | sigA; + goto infProdArg; + } + if ( expC == 0x7FF ) { + if ( sigC ) { + uiZ = 0; + goto propagateNaN_ZC; + } + uiZ = uiC; + goto uiZ; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( ! expA ) { + if ( ! sigA ) goto zeroProd; + normExpSig = softfloat_normSubnormalF64Sig( sigA ); + expA = normExpSig.exp; + sigA = normExpSig.sig; + } + if ( ! expB ) { + if ( ! sigB ) goto zeroProd; + normExpSig = softfloat_normSubnormalF64Sig( sigB ); + expB = normExpSig.exp; + sigB = normExpSig.sig; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expZ = expA + expB - 0x3FE; + sigA = (sigA | UINT64_C( 0x0010000000000000 ))<<10; + sigB = (sigB | UINT64_C( 0x0010000000000000 ))<<11; + softfloat_mul64To128M( sigA, sigB, sig128Z ); + sigZ = + (uint64_t) sig128Z[indexWord( 4, 3 )]<<32 | sig128Z[indexWord( 4, 2 )]; + shiftDist = 0; + if ( ! (sigZ & UINT64_C( 0x4000000000000000 )) ) { + --expZ; + shiftDist = -1; + } + if ( ! expC ) { + if ( ! sigC ) { + if ( shiftDist ) sigZ <<= 1; + goto sigZ; + } + normExpSig = softfloat_normSubnormalF64Sig( sigC ); + expC = normExpSig.exp; + sigC = normExpSig.sig; + } + sigC = (sigC | UINT64_C( 0x0010000000000000 ))<<10; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expDiff = expZ - expC; + if ( expDiff < 0 ) { + expZ = expC; + if ( (signZ == signC) || (expDiff < -1) ) { + shiftDist -= expDiff; + if ( shiftDist) { + sigZ = softfloat_shiftRightJam64( sigZ, shiftDist ); + } + } else { + if ( ! shiftDist ) { + softfloat_shortShiftRight128M( sig128Z, 1, sig128Z ); + } + } + } else { + if ( shiftDist ) softfloat_add128M( sig128Z, sig128Z, sig128Z ); + if ( ! expDiff ) { + sigZ = + (uint64_t) sig128Z[indexWord( 4, 3 )]<<32 + | sig128Z[indexWord( 4, 2 )]; + } else { + sig128C[indexWord( 4, 3 )] = sigC>>32; + sig128C[indexWord( 4, 2 )] = sigC; + sig128C[indexWord( 4, 1 )] = 0; + sig128C[indexWord( 4, 0 )] = 0; + softfloat_shiftRightJam128M( sig128C, expDiff, sig128C ); + } + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( signZ == signC ) { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( expDiff <= 0 ) { + sigZ += sigC; + } else { + softfloat_add128M( sig128Z, sig128C, sig128Z ); + sigZ = + (uint64_t) sig128Z[indexWord( 4, 3 )]<<32 + | sig128Z[indexWord( 4, 2 )]; + } + if ( sigZ & UINT64_C( 0x8000000000000000 ) ) { + ++expZ; + sigZ = softfloat_shortShiftRightJam64( sigZ, 1 ); + } + } else { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( expDiff < 0 ) { + signZ = signC; + if ( expDiff < -1 ) { + sigZ = sigC - sigZ; + if ( + sig128Z[indexWord( 4, 1 )] || sig128Z[indexWord( 4, 0 )] + ) { + sigZ = (sigZ - 1) | 1; + } + if ( ! (sigZ & UINT64_C( 0x4000000000000000 )) ) { + --expZ; + sigZ <<= 1; + } + goto roundPack; + } else { + sig128C[indexWord( 4, 3 )] = sigC>>32; + sig128C[indexWord( 4, 2 )] = sigC; + sig128C[indexWord( 4, 1 )] = 0; + sig128C[indexWord( 4, 0 )] = 0; + softfloat_sub128M( sig128C, sig128Z, sig128Z ); + } + } else if ( ! expDiff ) { + sigZ -= sigC; + if ( + ! sigZ && ! sig128Z[indexWord( 4, 1 )] + && ! sig128Z[indexWord( 4, 0 )] + ) { + goto completeCancellation; + } + sig128Z[indexWord( 4, 3 )] = sigZ>>32; + sig128Z[indexWord( 4, 2 )] = sigZ; + if ( sigZ & UINT64_C( 0x8000000000000000 ) ) { + signZ = ! signZ; + softfloat_negX128M( sig128Z ); + } + } else { + softfloat_sub128M( sig128Z, sig128C, sig128Z ); + if ( 1 < expDiff ) { + sigZ = + (uint64_t) sig128Z[indexWord( 4, 3 )]<<32 + | sig128Z[indexWord( 4, 2 )]; + if ( ! (sigZ & UINT64_C( 0x4000000000000000 )) ) { + --expZ; + sigZ <<= 1; + } + goto sigZ; + } + } + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + shiftDist = 0; + sigZ = + (uint64_t) sig128Z[indexWord( 4, 3 )]<<32 + | sig128Z[indexWord( 4, 2 )]; + if ( ! sigZ ) { + shiftDist = 64; + sigZ = + (uint64_t) sig128Z[indexWord( 4, 1 )]<<32 + | sig128Z[indexWord( 4, 0 )]; + } + shiftDist += softfloat_countLeadingZeros64( sigZ ) - 1; + if ( shiftDist ) { + expZ -= shiftDist; + softfloat_shiftLeft128M( sig128Z, shiftDist, sig128Z ); + sigZ = + (uint64_t) sig128Z[indexWord( 4, 3 )]<<32 + | sig128Z[indexWord( 4, 2 )]; + } + } + sigZ: + if ( sig128Z[indexWord( 4, 1 )] || sig128Z[indexWord( 4, 0 )] ) sigZ |= 1; + roundPack: + return softfloat_roundPackToF64( signZ, expZ - 1, sigZ ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + propagateNaN_ABC: + uiZ = softfloat_propagateNaNF64UI( uiA, uiB ); + goto propagateNaN_ZC; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + infProdArg: + if ( magBits ) { + uiZ = packToF64UI( signZ, 0x7FF, 0 ); + if ( expC != 0x7FF ) goto uiZ; + if ( sigC ) goto propagateNaN_ZC; + if ( signZ == signC ) goto uiZ; + } + softfloat_raiseFlags( softfloat_flag_invalid ); + uiZ = defaultNaNF64UI; + propagateNaN_ZC: + uiZ = softfloat_propagateNaNF64UI( uiZ, uiC ); + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + zeroProd: + uiZ = uiC; + if ( ! (expC | sigC) && (signZ != signC) ) { + completeCancellation: + uiZ = + packToF64UI( + (softfloat_roundingMode == softfloat_round_min), 0, 0 ); + } + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_negXM.c b/extern/riscv-softfloat-standalone/lib/s_negXM.c new file mode 100644 index 0000000..76f110c --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_negXM.c @@ -0,0 +1,63 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_negXM + +void softfloat_negXM( uint_fast8_t size_words, uint32_t *zPtr ) +{ + unsigned int index, lastIndex; + uint_fast8_t carry; + uint32_t word; + + index = indexWordLo( size_words ); + lastIndex = indexWordHi( size_words ); + carry = 1; + for (;;) { + word = ~zPtr[index] + carry; + zPtr[index] = word; + if ( index == lastIndex ) break; + index += wordIncr; + if ( word ) carry = 0; + } + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_normRoundPackToF128.c b/extern/riscv-softfloat-standalone/lib/s_normRoundPackToF128.c new file mode 100644 index 0000000..148cb2c --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_normRoundPackToF128.c @@ -0,0 +1,81 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" + +float128_t + softfloat_normRoundPackToF128( + bool sign, int_fast32_t exp, uint_fast64_t sig64, uint_fast64_t sig0 ) +{ + int_fast8_t shiftDist; + struct uint128 sig128; + union ui128_f128 uZ; + uint_fast64_t sigExtra; + struct uint128_extra sig128Extra; + + if ( ! sig64 ) { + exp -= 64; + sig64 = sig0; + sig0 = 0; + } + shiftDist = softfloat_countLeadingZeros64( sig64 ) - 15; + exp -= shiftDist; + if ( 0 <= shiftDist ) { + if ( shiftDist ) { + sig128 = softfloat_shortShiftLeft128( sig64, sig0, shiftDist ); + sig64 = sig128.v64; + sig0 = sig128.v0; + } + if ( (uint32_t) exp < 0x7FFD ) { + uZ.ui.v64 = packToF128UI64( sign, sig64 | sig0 ? exp : 0, sig64 ); + uZ.ui.v0 = sig0; + return uZ.f; + } + sigExtra = 0; + } else { + sig128Extra = + softfloat_shortShiftRightJam128Extra( sig64, sig0, 0, -shiftDist ); + sig64 = sig128Extra.v.v64; + sig0 = sig128Extra.v.v0; + sigExtra = sig128Extra.extra; + } + return softfloat_roundPackToF128( sign, exp, sig64, sig0, sigExtra ); + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_normRoundPackToF16.c b/extern/riscv-softfloat-standalone/lib/s_normRoundPackToF16.c new file mode 100644 index 0000000..6788f2e --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_normRoundPackToF16.c @@ -0,0 +1,58 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" + +float16_t + softfloat_normRoundPackToF16( bool sign, int_fast16_t exp, uint_fast16_t sig ) +{ + int_fast8_t shiftDist; + union ui16_f16 uZ; + + shiftDist = softfloat_countLeadingZeros16( sig ) - 1; + exp -= shiftDist; + if ( (4 <= shiftDist) && ((unsigned int) exp < 0x1D) ) { + uZ.ui = packToF16UI( sign, sig ? exp : 0, sig<<(shiftDist - 4) ); + return uZ.f; + } else { + return softfloat_roundPackToF16( sign, exp, sig< +#include +#include "platform.h" +#include "internals.h" + +float32_t + softfloat_normRoundPackToF32( bool sign, int_fast16_t exp, uint_fast32_t sig ) +{ + int_fast8_t shiftDist; + union ui32_f32 uZ; + + shiftDist = softfloat_countLeadingZeros32( sig ) - 1; + exp -= shiftDist; + if ( (7 <= shiftDist) && ((unsigned int) exp < 0xFD) ) { + uZ.ui = packToF32UI( sign, sig ? exp : 0, sig<<(shiftDist - 7) ); + return uZ.f; + } else { + return softfloat_roundPackToF32( sign, exp, sig< +#include +#include "platform.h" +#include "internals.h" + +float64_t + softfloat_normRoundPackToF64( bool sign, int_fast16_t exp, uint_fast64_t sig ) +{ + int_fast8_t shiftDist; + union ui64_f64 uZ; + + shiftDist = softfloat_countLeadingZeros64( sig ) - 1; + exp -= shiftDist; + if ( (10 <= shiftDist) && ((unsigned int) exp < 0x7FD) ) { + uZ.ui = packToF64UI( sign, sig ? exp : 0, sig<<(shiftDist - 10) ); + return uZ.f; + } else { + return softfloat_roundPackToF64( sign, exp, sig< +#include "platform.h" +#include "internals.h" + +struct exp32_sig128 + softfloat_normSubnormalF128Sig( uint_fast64_t sig64, uint_fast64_t sig0 ) +{ + int_fast8_t shiftDist; + struct exp32_sig128 z; + + if ( ! sig64 ) { + shiftDist = softfloat_countLeadingZeros64( sig0 ) - 15; + z.exp = -63 - shiftDist; + if ( shiftDist < 0 ) { + z.sig.v64 = sig0>>-shiftDist; + z.sig.v0 = sig0<<(shiftDist & 63); + } else { + z.sig.v64 = sig0< +#include "platform.h" +#include "internals.h" + +struct exp8_sig16 softfloat_normSubnormalF16Sig( uint_fast16_t sig ) +{ + int_fast8_t shiftDist; + struct exp8_sig16 z; + + shiftDist = softfloat_countLeadingZeros16( sig ) - 5; + z.exp = 1 - shiftDist; + z.sig = sig< +#include "platform.h" +#include "internals.h" + +struct exp16_sig32 softfloat_normSubnormalF32Sig( uint_fast32_t sig ) +{ + int_fast8_t shiftDist; + struct exp16_sig32 z; + + shiftDist = softfloat_countLeadingZeros32( sig ) - 8; + z.exp = 1 - shiftDist; + z.sig = sig< +#include "platform.h" +#include "internals.h" + +struct exp16_sig64 softfloat_normSubnormalF64Sig( uint_fast64_t sig ) +{ + int_fast8_t shiftDist; + struct exp16_sig64 z; + + shiftDist = softfloat_countLeadingZeros64( sig ) - 11; + z.exp = 1 - shiftDist; + z.sig = sig< +#include "platform.h" +#include "primitiveTypes.h" +#include "specialize.h" +#include "softfloat.h" + +/*---------------------------------------------------------------------------- +| Interpreting the unsigned integer formed from concatenating `uiA64' and +| `uiA0' as a 128-bit floating-point value, and likewise interpreting the +| unsigned integer formed from concatenating `uiB64' and `uiB0' as another +| 128-bit floating-point value, and assuming at least on of these floating- +| point values is a NaN, returns the bit pattern of the combined NaN result. +| If either original floating-point value is a signaling NaN, the invalid +| exception is raised. +*----------------------------------------------------------------------------*/ +struct uint128 + softfloat_propagateNaNF128UI( + uint_fast64_t uiA64, + uint_fast64_t uiA0, + uint_fast64_t uiB64, + uint_fast64_t uiB0 + ) +{ + struct uint128 uiZ; + + if ( + softfloat_isSigNaNF128UI( uiA64, uiA0 ) + || softfloat_isSigNaNF128UI( uiB64, uiB0 ) + ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + } + uiZ.v64 = defaultNaNF128UI64; + uiZ.v0 = defaultNaNF128UI0; + return uiZ; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_propagateNaNF16UI.c b/extern/riscv-softfloat-standalone/lib/s_propagateNaNF16UI.c new file mode 100644 index 0000000..3ecd4c9 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_propagateNaNF16UI.c @@ -0,0 +1,58 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "specialize.h" +#include "softfloat.h" + +/*---------------------------------------------------------------------------- +| Interpreting `uiA' and `uiB' as the bit patterns of two 16-bit floating- +| point values, at least one of which is a NaN, returns the bit pattern of +| the combined NaN result. If either `uiA' or `uiB' has the pattern of a +| signaling NaN, the invalid exception is raised. +*----------------------------------------------------------------------------*/ +uint_fast16_t + softfloat_propagateNaNF16UI( uint_fast16_t uiA, uint_fast16_t uiB ) +{ + + if ( softfloat_isSigNaNF16UI( uiA ) || softfloat_isSigNaNF16UI( uiB ) ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + } + return defaultNaNF16UI; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_propagateNaNF32UI.c b/extern/riscv-softfloat-standalone/lib/s_propagateNaNF32UI.c new file mode 100644 index 0000000..b97fa41 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_propagateNaNF32UI.c @@ -0,0 +1,58 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "specialize.h" +#include "softfloat.h" + +/*---------------------------------------------------------------------------- +| Interpreting `uiA' and `uiB' as the bit patterns of two 32-bit floating- +| point values, at least one of which is a NaN, returns the bit pattern of +| the combined NaN result. If either `uiA' or `uiB' has the pattern of a +| signaling NaN, the invalid exception is raised. +*----------------------------------------------------------------------------*/ +uint_fast32_t + softfloat_propagateNaNF32UI( uint_fast32_t uiA, uint_fast32_t uiB ) +{ + + if ( softfloat_isSigNaNF32UI( uiA ) || softfloat_isSigNaNF32UI( uiB ) ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + } + return defaultNaNF32UI; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_propagateNaNF64UI.c b/extern/riscv-softfloat-standalone/lib/s_propagateNaNF64UI.c new file mode 100644 index 0000000..9c2d359 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_propagateNaNF64UI.c @@ -0,0 +1,58 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "specialize.h" +#include "softfloat.h" + +/*---------------------------------------------------------------------------- +| Interpreting `uiA' and `uiB' as the bit patterns of two 64-bit floating- +| point values, at least one of which is a NaN, returns the bit pattern of +| the combined NaN result. If either `uiA' or `uiB' has the pattern of a +| signaling NaN, the invalid exception is raised. +*----------------------------------------------------------------------------*/ +uint_fast64_t + softfloat_propagateNaNF64UI( uint_fast64_t uiA, uint_fast64_t uiB ) +{ + + if ( softfloat_isSigNaNF64UI( uiA ) || softfloat_isSigNaNF64UI( uiB ) ) { + softfloat_raiseFlags( softfloat_flag_invalid ); + } + return defaultNaNF64UI; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_remStepMBy32.c b/extern/riscv-softfloat-standalone/lib/s_remStepMBy32.c new file mode 100644 index 0000000..fe787a4 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_remStepMBy32.c @@ -0,0 +1,86 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_remStepMBy32 + +void + softfloat_remStepMBy32( + uint_fast8_t size_words, + const uint32_t *remPtr, + uint_fast8_t dist, + const uint32_t *bPtr, + uint32_t q, + uint32_t *zPtr + ) +{ + unsigned int index, lastIndex; + uint64_t dwordProd; + uint32_t wordRem, wordShiftedRem, wordProd; + uint_fast8_t uNegDist, borrow; + + index = indexWordLo( size_words ); + lastIndex = indexWordHi( size_words ); + dwordProd = (uint64_t) bPtr[index] * q; + wordRem = remPtr[index]; + wordShiftedRem = wordRem<>(uNegDist & 31); + index += wordIncr; + dwordProd = (uint64_t) bPtr[index] * q + (dwordProd>>32); + wordRem = remPtr[index]; + wordShiftedRem |= wordRem< +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +int_fast64_t + softfloat_roundMToI64( + bool sign, uint32_t *extSigPtr, uint_fast8_t roundingMode, bool exact ) +{ + bool roundNearEven; + uint32_t sigExtra; + bool doIncrement; + uint64_t sig; + union { uint64_t ui; int64_t i; } uZ; + int64_t z; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + roundNearEven = (roundingMode == softfloat_round_near_even); + sigExtra = extSigPtr[indexWordLo( 3 )]; + doIncrement = (0x80000000 <= sigExtra); + if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { + doIncrement = + (roundingMode + == (sign ? softfloat_round_min : softfloat_round_max)) + && sigExtra; + } + sig = + (uint64_t) extSigPtr[indexWord( 3, 2 )]<<32 + | extSigPtr[indexWord( 3, 1 )]; + if ( doIncrement ) { + ++sig; + if ( ! sig ) goto invalid; + if ( ! (sigExtra & 0x7FFFFFFF) && roundNearEven ) sig &= ~1; + } + uZ.ui = sign ? -sig : sig; + z = uZ.i; + if ( z && ((z < 0) ^ sign) ) goto invalid; + if ( exact && sigExtra ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return z; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + return sign ? i64_fromNegOverflow : i64_fromPosOverflow; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_roundMToUI64.c b/extern/riscv-softfloat-standalone/lib/s_roundMToUI64.c new file mode 100644 index 0000000..0377c5b --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_roundMToUI64.c @@ -0,0 +1,84 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast64_t + softfloat_roundMToUI64( + bool sign, uint32_t *extSigPtr, uint_fast8_t roundingMode, bool exact ) +{ + bool roundNearEven; + uint32_t sigExtra; + bool doIncrement; + uint64_t sig; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + roundNearEven = (roundingMode == softfloat_round_near_even); + sigExtra = extSigPtr[indexWordLo( 3 )]; + doIncrement = (0x80000000 <= sigExtra); + if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { + doIncrement = + (roundingMode + == (sign ? softfloat_round_min : softfloat_round_max)) + && sigExtra; + } + sig = + (uint64_t) extSigPtr[indexWord( 3, 2 )]<<32 + | extSigPtr[indexWord( 3, 1 )]; + if ( doIncrement ) { + ++sig; + if ( ! sig ) goto invalid; + if ( ! (sigExtra & 0x7FFFFFFF) && roundNearEven ) sig &= ~1; + } + if ( sign && sig ) goto invalid; + if ( exact && sigExtra ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return sig; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + return sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_roundPackMToI64.c b/extern/riscv-softfloat-standalone/lib/s_roundPackMToI64.c new file mode 100644 index 0000000..4d5efbb --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_roundPackMToI64.c @@ -0,0 +1,88 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3a+, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +int_fast64_t + softfloat_roundPackMToI64( + bool sign, uint32_t *extSigPtr, uint_fast8_t roundingMode, bool exact ) +{ + bool roundNearEven; + uint32_t sigExtra; + bool doIncrement; + uint64_t sig; + union { uint64_t ui; int64_t i; } uZ; + int64_t z; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + roundNearEven = (roundingMode == softfloat_round_near_even); + sigExtra = extSigPtr[indexWordLo( 3 )]; + doIncrement = (0x80000000 <= sigExtra); + if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { + doIncrement = + (roundingMode + == (sign ? softfloat_round_min : softfloat_round_max)) + && sigExtra; + } + sig = + (uint64_t) extSigPtr[indexWord( 3, 2 )]<<32 + | extSigPtr[indexWord( 3, 1 )]; + if ( doIncrement ) { + ++sig; + if ( ! sig ) goto invalid; + if ( ! (sigExtra & 0x7FFFFFFF) && roundNearEven ) sig &= ~1; + } + uZ.ui = sign ? -sig : sig; + z = uZ.i; + if ( z && ((z < 0) ^ sign) ) goto invalid; + if ( exact && sigExtra ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return z; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + return sign ? i64_fromNegOverflow : i64_fromPosOverflow; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_roundPackMToUI64.c b/extern/riscv-softfloat-standalone/lib/s_roundPackMToUI64.c new file mode 100644 index 0000000..1a64fdf --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_roundPackMToUI64.c @@ -0,0 +1,84 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3a+, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast64_t + softfloat_roundPackMToUI64( + bool sign, uint32_t *extSigPtr, uint_fast8_t roundingMode, bool exact ) +{ + bool roundNearEven; + uint32_t sigExtra; + bool doIncrement; + uint64_t sig; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + roundNearEven = (roundingMode == softfloat_round_near_even); + sigExtra = extSigPtr[indexWordLo( 3 )]; + doIncrement = (0x80000000 <= sigExtra); + if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { + doIncrement = + (roundingMode + == (sign ? softfloat_round_min : softfloat_round_max)) + && sigExtra; + } + sig = + (uint64_t) extSigPtr[indexWord( 3, 2 )]<<32 + | extSigPtr[indexWord( 3, 1 )]; + if ( doIncrement ) { + ++sig; + if ( ! sig ) goto invalid; + if ( ! (sigExtra & 0x7FFFFFFF) && roundNearEven ) sig &= ~1; + } + if ( sign && sig ) goto invalid; + if ( exact && sigExtra ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return sig; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + return sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_roundPackToF128.c b/extern/riscv-softfloat-standalone/lib/s_roundPackToF128.c new file mode 100644 index 0000000..eaaa375 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_roundPackToF128.c @@ -0,0 +1,171 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float128_t + softfloat_roundPackToF128( + bool sign, + int_fast32_t exp, + uint_fast64_t sig64, + uint_fast64_t sig0, + uint_fast64_t sigExtra + ) +{ + uint_fast8_t roundingMode; + bool roundNearEven, doIncrement, isTiny; + struct uint128_extra sig128Extra; + uint_fast64_t uiZ64, uiZ0; + struct uint128 sig128; + union ui128_f128 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + roundingMode = softfloat_roundingMode; + roundNearEven = (roundingMode == softfloat_round_near_even); + doIncrement = (UINT64_C( 0x8000000000000000 ) <= sigExtra); + if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { + doIncrement = + (roundingMode + == (sign ? softfloat_round_min : softfloat_round_max)) + && sigExtra; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( 0x7FFD <= (uint32_t) exp ) { + if ( exp < 0 ) { + /*---------------------------------------------------------------- + *----------------------------------------------------------------*/ + isTiny = + (softfloat_detectTininess + == softfloat_tininess_beforeRounding) + || (exp < -1) + || ! doIncrement + || softfloat_lt128( + sig64, + sig0, + UINT64_C( 0x0001FFFFFFFFFFFF ), + UINT64_C( 0xFFFFFFFFFFFFFFFF ) + ); + sig128Extra = + softfloat_shiftRightJam128Extra( sig64, sig0, sigExtra, -exp ); + sig64 = sig128Extra.v.v64; + sig0 = sig128Extra.v.v0; + sigExtra = sig128Extra.extra; + exp = 0; + if ( isTiny && sigExtra ) { + softfloat_raiseFlags( softfloat_flag_underflow ); + } + doIncrement = (UINT64_C( 0x8000000000000000 ) <= sigExtra); + if ( + ! roundNearEven + && (roundingMode != softfloat_round_near_maxMag) + ) { + doIncrement = + (roundingMode + == (sign ? softfloat_round_min : softfloat_round_max)) + && sigExtra; + } + } else if ( + (0x7FFD < exp) + || ((exp == 0x7FFD) + && softfloat_eq128( + sig64, + sig0, + UINT64_C( 0x0001FFFFFFFFFFFF ), + UINT64_C( 0xFFFFFFFFFFFFFFFF ) + ) + && doIncrement) + ) { + /*---------------------------------------------------------------- + *----------------------------------------------------------------*/ + softfloat_raiseFlags( + softfloat_flag_overflow | softfloat_flag_inexact ); + if ( + roundNearEven + || (roundingMode == softfloat_round_near_maxMag) + || (roundingMode + == (sign ? softfloat_round_min : softfloat_round_max)) + ) { + uiZ64 = packToF128UI64( sign, 0x7FFF, 0 ); + uiZ0 = 0; + } else { + uiZ64 = + packToF128UI64( + sign, 0x7FFE, UINT64_C( 0x0000FFFFFFFFFFFF ) ); + uiZ0 = UINT64_C( 0xFFFFFFFFFFFFFFFF ); + } + goto uiZ; + } + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( sigExtra ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; +#ifdef SOFTFLOAT_ROUND_ODD + if ( roundingMode == softfloat_round_odd ) { + sig0 |= 1; + goto packReturn; + } +#endif + } + if ( doIncrement ) { + sig128 = softfloat_add128( sig64, sig0, 0, 1 ); + sig64 = sig128.v64; + sig0 = + sig128.v0 + & ~(uint64_t) + (! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF )) + & roundNearEven); + } else { + if ( ! (sig64 | sig0) ) exp = 0; + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + packReturn: + uiZ64 = packToF128UI64( sign, exp, sig64 ); + uiZ0 = sig0; + uiZ: + uZ.ui.v64 = uiZ64; + uZ.ui.v0 = uiZ0; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_roundPackToF16.c b/extern/riscv-softfloat-standalone/lib/s_roundPackToF16.c new file mode 100644 index 0000000..0eaa73a --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_roundPackToF16.c @@ -0,0 +1,113 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float16_t + softfloat_roundPackToF16( bool sign, int_fast16_t exp, uint_fast16_t sig ) +{ + uint_fast8_t roundingMode; + bool roundNearEven; + uint_fast8_t roundIncrement, roundBits; + bool isTiny; + uint_fast16_t uiZ; + union ui16_f16 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + roundingMode = softfloat_roundingMode; + roundNearEven = (roundingMode == softfloat_round_near_even); + roundIncrement = 0x8; + if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { + roundIncrement = + (roundingMode + == (sign ? softfloat_round_min : softfloat_round_max)) + ? 0xF + : 0; + } + roundBits = sig & 0xF; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( 0x1D <= (unsigned int) exp ) { + if ( exp < 0 ) { + /*---------------------------------------------------------------- + *----------------------------------------------------------------*/ + isTiny = + (softfloat_detectTininess == softfloat_tininess_beforeRounding) + || (exp < -1) || (sig + roundIncrement < 0x8000); + sig = softfloat_shiftRightJam32( sig, -exp ); + exp = 0; + roundBits = sig & 0xF; + if ( isTiny && roundBits ) { + softfloat_raiseFlags( softfloat_flag_underflow ); + } + } else if ( (0x1D < exp) || (0x8000 <= sig + roundIncrement) ) { + /*---------------------------------------------------------------- + *----------------------------------------------------------------*/ + softfloat_raiseFlags( + softfloat_flag_overflow | softfloat_flag_inexact ); + uiZ = packToF16UI( sign, 0x1F, 0 ) - ! roundIncrement; + goto uiZ; + } + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sig = (sig + roundIncrement)>>4; + if ( roundBits ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; +#ifdef SOFTFLOAT_ROUND_ODD + if ( roundingMode == softfloat_round_odd ) { + sig |= 1; + goto packReturn; + } +#endif + } + sig &= ~(uint_fast16_t) (! (roundBits ^ 8) & roundNearEven); + if ( ! sig ) exp = 0; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + packReturn: + uiZ = packToF16UI( sign, exp, sig ); + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_roundPackToF32.c b/extern/riscv-softfloat-standalone/lib/s_roundPackToF32.c new file mode 100644 index 0000000..cc34508 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_roundPackToF32.c @@ -0,0 +1,113 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float32_t + softfloat_roundPackToF32( bool sign, int_fast16_t exp, uint_fast32_t sig ) +{ + uint_fast8_t roundingMode; + bool roundNearEven; + uint_fast8_t roundIncrement, roundBits; + bool isTiny; + uint_fast32_t uiZ; + union ui32_f32 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + roundingMode = softfloat_roundingMode; + roundNearEven = (roundingMode == softfloat_round_near_even); + roundIncrement = 0x40; + if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { + roundIncrement = + (roundingMode + == (sign ? softfloat_round_min : softfloat_round_max)) + ? 0x7F + : 0; + } + roundBits = sig & 0x7F; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( 0xFD <= (unsigned int) exp ) { + if ( exp < 0 ) { + /*---------------------------------------------------------------- + *----------------------------------------------------------------*/ + isTiny = + (softfloat_detectTininess == softfloat_tininess_beforeRounding) + || (exp < -1) || (sig + roundIncrement < 0x80000000); + sig = softfloat_shiftRightJam32( sig, -exp ); + exp = 0; + roundBits = sig & 0x7F; + if ( isTiny && roundBits ) { + softfloat_raiseFlags( softfloat_flag_underflow ); + } + } else if ( (0xFD < exp) || (0x80000000 <= sig + roundIncrement) ) { + /*---------------------------------------------------------------- + *----------------------------------------------------------------*/ + softfloat_raiseFlags( + softfloat_flag_overflow | softfloat_flag_inexact ); + uiZ = packToF32UI( sign, 0xFF, 0 ) - ! roundIncrement; + goto uiZ; + } + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sig = (sig + roundIncrement)>>7; + if ( roundBits ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; +#ifdef SOFTFLOAT_ROUND_ODD + if ( roundingMode == softfloat_round_odd ) { + sig |= 1; + goto packReturn; + } +#endif + } + sig &= ~(uint_fast32_t) (! (roundBits ^ 0x40) & roundNearEven); + if ( ! sig ) exp = 0; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + packReturn: + uiZ = packToF32UI( sign, exp, sig ); + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_roundPackToF64.c b/extern/riscv-softfloat-standalone/lib/s_roundPackToF64.c new file mode 100644 index 0000000..aaff008 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_roundPackToF64.c @@ -0,0 +1,117 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float64_t + softfloat_roundPackToF64( bool sign, int_fast16_t exp, uint_fast64_t sig ) +{ + uint_fast8_t roundingMode; + bool roundNearEven; + uint_fast16_t roundIncrement, roundBits; + bool isTiny; + uint_fast64_t uiZ; + union ui64_f64 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + roundingMode = softfloat_roundingMode; + roundNearEven = (roundingMode == softfloat_round_near_even); + roundIncrement = 0x200; + if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { + roundIncrement = + (roundingMode + == (sign ? softfloat_round_min : softfloat_round_max)) + ? 0x3FF + : 0; + } + roundBits = sig & 0x3FF; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + if ( 0x7FD <= (uint16_t) exp ) { + if ( exp < 0 ) { + /*---------------------------------------------------------------- + *----------------------------------------------------------------*/ + isTiny = + (softfloat_detectTininess == softfloat_tininess_beforeRounding) + || (exp < -1) + || (sig + roundIncrement < UINT64_C( 0x8000000000000000 )); + sig = softfloat_shiftRightJam64( sig, -exp ); + exp = 0; + roundBits = sig & 0x3FF; + if ( isTiny && roundBits ) { + softfloat_raiseFlags( softfloat_flag_underflow ); + } + } else if ( + (0x7FD < exp) + || (UINT64_C( 0x8000000000000000 ) <= sig + roundIncrement) + ) { + /*---------------------------------------------------------------- + *----------------------------------------------------------------*/ + softfloat_raiseFlags( + softfloat_flag_overflow | softfloat_flag_inexact ); + uiZ = packToF64UI( sign, 0x7FF, 0 ) - ! roundIncrement; + goto uiZ; + } + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + sig = (sig + roundIncrement)>>10; + if ( roundBits ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; +#ifdef SOFTFLOAT_ROUND_ODD + if ( roundingMode == softfloat_round_odd ) { + sig |= 1; + goto packReturn; + } +#endif + } + sig &= ~(uint_fast64_t) (! (roundBits ^ 0x200) & roundNearEven); + if ( ! sig ) exp = 0; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + packReturn: + uiZ = packToF64UI( sign, exp, sig ); + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_roundPackToI32.c b/extern/riscv-softfloat-standalone/lib/s_roundPackToI32.c new file mode 100644 index 0000000..3ece8f0 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_roundPackToI32.c @@ -0,0 +1,84 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3a+, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +int_fast32_t + softfloat_roundPackToI32( + bool sign, uint_fast64_t sig, uint_fast8_t roundingMode, bool exact ) +{ + bool roundNearEven; + uint_fast8_t roundIncrement, roundBits; + uint_fast32_t sig32; + union { uint32_t ui; int32_t i; } uZ; + int_fast32_t z; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + roundNearEven = (roundingMode == softfloat_round_near_even); + roundIncrement = 0x40; + if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { + roundIncrement = + (roundingMode + == (sign ? softfloat_round_min : softfloat_round_max)) + ? 0x7F + : 0; + } + roundBits = sig & 0x7F; + sig += roundIncrement; + if ( sig & UINT64_C( 0xFFFFFF8000000000 ) ) goto invalid; + sig32 = sig>>7; + sig32 &= ~(uint_fast32_t) (! (roundBits ^ 0x40) & roundNearEven); + uZ.ui = sign ? -sig32 : sig32; + z = uZ.i; + if ( z && ((z < 0) ^ sign) ) goto invalid; + if ( exact && roundBits ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return z; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + return sign ? i32_fromNegOverflow : i32_fromPosOverflow; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_roundPackToI64.c b/extern/riscv-softfloat-standalone/lib/s_roundPackToI64.c new file mode 100644 index 0000000..ebef7f3 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_roundPackToI64.c @@ -0,0 +1,89 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3a+, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +int_fast64_t + softfloat_roundPackToI64( + bool sign, + uint_fast64_t sig, + uint_fast64_t sigExtra, + uint_fast8_t roundingMode, + bool exact + ) +{ + bool roundNearEven, doIncrement; + union { uint64_t ui; int64_t i; } uZ; + int_fast64_t z; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + roundNearEven = (roundingMode == softfloat_round_near_even); + doIncrement = (UINT64_C( 0x8000000000000000 ) <= sigExtra); + if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { + doIncrement = + (roundingMode + == (sign ? softfloat_round_min : softfloat_round_max)) + && sigExtra; + } + if ( doIncrement ) { + ++sig; + if ( ! sig ) goto invalid; + sig &= + ~(uint_fast64_t) + (! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF )) + & roundNearEven); + } + uZ.ui = sign ? -sig : sig; + z = uZ.i; + if ( z && ((z < 0) ^ sign) ) goto invalid; + if ( exact && sigExtra ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return z; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + return sign ? i64_fromNegOverflow : i64_fromPosOverflow; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_roundPackToUI32.c b/extern/riscv-softfloat-standalone/lib/s_roundPackToUI32.c new file mode 100644 index 0000000..f0021fe --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_roundPackToUI32.c @@ -0,0 +1,80 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3a+, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast32_t + softfloat_roundPackToUI32( + bool sign, uint_fast64_t sig, uint_fast8_t roundingMode, bool exact ) +{ + bool roundNearEven; + uint_fast8_t roundIncrement, roundBits; + uint_fast32_t z; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + roundNearEven = (roundingMode == softfloat_round_near_even); + roundIncrement = 0x40; + if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { + roundIncrement = + (roundingMode + == (sign ? softfloat_round_min : softfloat_round_max)) + ? 0x7F + : 0; + } + roundBits = sig & 0x7F; + sig += roundIncrement; + if ( sig & UINT64_C( 0xFFFFFF8000000000 ) ) goto invalid; + z = sig>>7; + z &= ~(uint_fast32_t) (! (roundBits ^ 0x40) & roundNearEven); + if ( sign && z ) goto invalid; + if ( exact && roundBits ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return z; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + return sign ? ui32_fromNegOverflow : ui32_fromPosOverflow; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_roundPackToUI64.c b/extern/riscv-softfloat-standalone/lib/s_roundPackToUI64.c new file mode 100644 index 0000000..fada184 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_roundPackToUI64.c @@ -0,0 +1,85 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3a+, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast64_t + softfloat_roundPackToUI64( + bool sign, + uint_fast64_t sig, + uint_fast64_t sigExtra, + uint_fast8_t roundingMode, + bool exact + ) +{ + bool roundNearEven, doIncrement; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + roundNearEven = (roundingMode == softfloat_round_near_even); + doIncrement = (UINT64_C( 0x8000000000000000 ) <= sigExtra); + if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { + doIncrement = + (roundingMode + == (sign ? softfloat_round_min : softfloat_round_max)) + && sigExtra; + } + if ( doIncrement ) { + ++sig; + if ( ! sig ) goto invalid; + sig &= + ~(uint_fast64_t) + (! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF )) + & roundNearEven); + } + if ( sign && sig ) goto invalid; + if ( exact && sigExtra ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return sig; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + return sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_roundToI32.c b/extern/riscv-softfloat-standalone/lib/s_roundToI32.c new file mode 100644 index 0000000..20a3ff4 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_roundToI32.c @@ -0,0 +1,84 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +int_fast32_t + softfloat_roundToI32( + bool sign, uint_fast64_t sig, uint_fast8_t roundingMode, bool exact ) +{ + bool roundNearEven; + uint_fast16_t roundIncrement, roundBits; + uint_fast32_t sig32; + union { uint32_t ui; int32_t i; } uZ; + int_fast32_t z; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + roundNearEven = (roundingMode == softfloat_round_near_even); + roundIncrement = 0x800; + if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { + roundIncrement = + (roundingMode + == (sign ? softfloat_round_min : softfloat_round_max)) + ? 0xFFF + : 0; + } + roundBits = sig & 0xFFF; + sig += roundIncrement; + if ( sig & UINT64_C( 0xFFFFF00000000000 ) ) goto invalid; + sig32 = sig>>12; + sig32 &= ~(uint_fast32_t) (! (roundBits ^ 0x800) & roundNearEven); + uZ.ui = sign ? -sig32 : sig32; + z = uZ.i; + if ( z && ((z < 0) ^ sign) ) goto invalid; + if ( exact && roundBits ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return z; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + return sign ? i32_fromNegOverflow : i32_fromPosOverflow; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_roundToI64.c b/extern/riscv-softfloat-standalone/lib/s_roundToI64.c new file mode 100644 index 0000000..fcddbc2 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_roundToI64.c @@ -0,0 +1,89 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +int_fast64_t + softfloat_roundToI64( + bool sign, + uint_fast64_t sig, + uint_fast64_t sigExtra, + uint_fast8_t roundingMode, + bool exact + ) +{ + bool roundNearEven, doIncrement; + union { uint64_t ui; int64_t i; } uZ; + int_fast64_t z; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + roundNearEven = (roundingMode == softfloat_round_near_even); + doIncrement = (UINT64_C( 0x8000000000000000 ) <= sigExtra); + if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { + doIncrement = + (roundingMode + == (sign ? softfloat_round_min : softfloat_round_max)) + && sigExtra; + } + if ( doIncrement ) { + ++sig; + if ( ! sig ) goto invalid; + sig &= + ~(uint_fast64_t) + (! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF )) + & roundNearEven); + } + uZ.ui = sign ? -sig : sig; + z = uZ.i; + if ( z && ((z < 0) ^ sign) ) goto invalid; + if ( exact && sigExtra ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return z; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + return sign ? i64_fromNegOverflow : i64_fromPosOverflow; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_roundToUI32.c b/extern/riscv-softfloat-standalone/lib/s_roundToUI32.c new file mode 100644 index 0000000..180899b --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_roundToUI32.c @@ -0,0 +1,80 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast32_t + softfloat_roundToUI32( + bool sign, uint_fast64_t sig, uint_fast8_t roundingMode, bool exact ) +{ + bool roundNearEven; + uint_fast16_t roundIncrement, roundBits; + uint_fast32_t z; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + roundNearEven = (roundingMode == softfloat_round_near_even); + roundIncrement = 0x800; + if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { + roundIncrement = + (roundingMode + == (sign ? softfloat_round_min : softfloat_round_max)) + ? 0xFFF + : 0; + } + roundBits = sig & 0xFFF; + sig += roundIncrement; + if ( sig & UINT64_C( 0xFFFFF00000000000 ) ) goto invalid; + z = sig>>12; + z &= ~(uint_fast32_t) (! (roundBits ^ 0x800) & roundNearEven); + if ( sign && z ) goto invalid; + if ( exact && roundBits ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return z; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + return sign ? ui32_fromNegOverflow : ui32_fromPosOverflow; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_roundToUI64.c b/extern/riscv-softfloat-standalone/lib/s_roundToUI64.c new file mode 100644 index 0000000..de35b5e --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_roundToUI64.c @@ -0,0 +1,85 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +uint_fast64_t + softfloat_roundToUI64( + bool sign, + uint_fast64_t sig, + uint_fast64_t sigExtra, + uint_fast8_t roundingMode, + bool exact + ) +{ + bool roundNearEven, doIncrement; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + roundNearEven = (roundingMode == softfloat_round_near_even); + doIncrement = (UINT64_C( 0x8000000000000000 ) <= sigExtra); + if ( ! roundNearEven && (roundingMode != softfloat_round_near_maxMag) ) { + doIncrement = + (roundingMode + == (sign ? softfloat_round_min : softfloat_round_max)) + && sigExtra; + } + if ( doIncrement ) { + ++sig; + if ( ! sig ) goto invalid; + sig &= + ~(uint_fast64_t) + (! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF )) + & roundNearEven); + } + if ( sign && sig ) goto invalid; + if ( exact && sigExtra ) { + softfloat_exceptionFlags |= softfloat_flag_inexact; + } + return sig; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + invalid: + softfloat_raiseFlags( softfloat_flag_invalid ); + return sign ? ui64_fromNegOverflow : ui64_fromPosOverflow; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_shiftRightJam128.c b/extern/riscv-softfloat-standalone/lib/s_shiftRightJam128.c new file mode 100644 index 0000000..8d2b91e --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_shiftRightJam128.c @@ -0,0 +1,69 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_shiftRightJam128 + +struct uint128 + softfloat_shiftRightJam128( uint64_t a64, uint64_t a0, uint_fast32_t dist ) +{ + uint_fast8_t u8NegDist; + struct uint128 z; + + if ( dist < 64 ) { + u8NegDist = -dist; + z.v64 = a64>>dist; + z.v0 = + a64<<(u8NegDist & 63) | a0>>dist + | ((uint64_t) (a0<<(u8NegDist & 63)) != 0); + } else { + z.v64 = 0; + z.v0 = + (dist < 127) + ? a64>>(dist & 63) + | (((a64 & (((uint_fast64_t) 1<<(dist & 63)) - 1)) | a0) + != 0) + : ((a64 | a0) != 0); + } + return z; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_shiftRightJam128Extra.c b/extern/riscv-softfloat-standalone/lib/s_shiftRightJam128Extra.c new file mode 100644 index 0000000..4e1293c --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_shiftRightJam128Extra.c @@ -0,0 +1,77 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_shiftRightJam128Extra + +struct uint128_extra + softfloat_shiftRightJam128Extra( + uint64_t a64, uint64_t a0, uint64_t extra, uint_fast32_t dist ) +{ + uint_fast8_t u8NegDist; + struct uint128_extra z; + + u8NegDist = -dist; + if ( dist < 64 ) { + z.v.v64 = a64>>dist; + z.v.v0 = a64<<(u8NegDist & 63) | a0>>dist; + z.extra = a0<<(u8NegDist & 63); + } else { + z.v.v64 = 0; + if ( dist == 64 ) { + z.v.v0 = a64; + z.extra = a0; + } else { + extra |= a0; + if ( dist < 128 ) { + z.v.v0 = a64>>(dist & 63); + z.extra = a64<<(u8NegDist & 63); + } else { + z.v.v0 = 0; + z.extra = (dist == 128) ? a64 : (a64 != 0); + } + } + } + z.extra |= (extra != 0); + return z; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_shiftRightJam256M.c b/extern/riscv-softfloat-standalone/lib/s_shiftRightJam256M.c new file mode 100644 index 0000000..04cd1e5 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_shiftRightJam256M.c @@ -0,0 +1,126 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_shiftRightJam256M + +static + void + softfloat_shortShiftRightJamM( + uint_fast8_t size_words, + const uint64_t *aPtr, + uint_fast8_t dist, + uint64_t *zPtr + ) +{ + uint_fast8_t uNegDist; + unsigned int index, lastIndex; + uint64_t partWordZ, wordA; + + uNegDist = -dist; + index = indexWordLo( size_words ); + lastIndex = indexWordHi( size_words ); + wordA = aPtr[index]; + partWordZ = wordA>>dist; + if ( partWordZ<>dist; + } + zPtr[index] = partWordZ; + +} + +void + softfloat_shiftRightJam256M( + const uint64_t *aPtr, uint_fast32_t dist, uint64_t *zPtr ) +{ + uint64_t wordJam; + uint_fast32_t wordDist; + uint64_t *ptr; + uint_fast8_t i, innerDist; + + wordJam = 0; + wordDist = dist>>6; + if ( wordDist ) { + if ( 4 < wordDist ) wordDist = 4; + ptr = (uint64_t *) (aPtr + indexMultiwordLo( 4, wordDist )); + i = wordDist; + do { + wordJam = *ptr++; + if ( wordJam ) break; + --i; + } while ( i ); + ptr = zPtr; + } + if ( wordDist < 4 ) { + aPtr += indexMultiwordHiBut( 4, wordDist ); + innerDist = dist & 63; + if ( innerDist ) { + softfloat_shortShiftRightJamM( + 4 - wordDist, + aPtr, + innerDist, + zPtr + indexMultiwordLoBut( 4, wordDist ) + ); + if ( ! wordDist ) goto wordJam; + } else { + aPtr += indexWordLo( 4 - wordDist ); + ptr = zPtr + indexWordLo( 4 ); + for ( i = 4 - wordDist; i; --i ) { + *ptr = *aPtr; + aPtr += wordIncr; + ptr += wordIncr; + } + } + ptr = zPtr + indexMultiwordHi( 4, wordDist ); + } + do { + *ptr++ = 0; + --wordDist; + } while ( wordDist ); + wordJam: + if ( wordJam ) zPtr[indexWordLo( 4 )] |= 1; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_shiftRightJam32.c b/extern/riscv-softfloat-standalone/lib/s_shiftRightJam32.c new file mode 100644 index 0000000..fbc3aa0 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_shiftRightJam32.c @@ -0,0 +1,51 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" + +#ifndef softfloat_shiftRightJam32 + +uint32_t softfloat_shiftRightJam32( uint32_t a, uint_fast16_t dist ) +{ + + return + (dist < 31) ? a>>dist | ((uint32_t) (a<<(-dist & 31)) != 0) : (a != 0); + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_shiftRightJam64.c b/extern/riscv-softfloat-standalone/lib/s_shiftRightJam64.c new file mode 100644 index 0000000..34edd7b --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_shiftRightJam64.c @@ -0,0 +1,51 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" + +#ifndef softfloat_shiftRightJam64 + +uint64_t softfloat_shiftRightJam64( uint64_t a, uint_fast32_t dist ) +{ + + return + (dist < 63) ? a>>dist | ((uint64_t) (a<<(-dist & 63)) != 0) : (a != 0); + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_shiftRightJam64Extra.c b/extern/riscv-softfloat-standalone/lib/s_shiftRightJam64Extra.c new file mode 100644 index 0000000..4d78712 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_shiftRightJam64Extra.c @@ -0,0 +1,62 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_shiftRightJam64Extra + +struct uint64_extra + softfloat_shiftRightJam64Extra( + uint64_t a, uint64_t extra, uint_fast32_t dist ) +{ + struct uint64_extra z; + + if ( dist < 64 ) { + z.v = a>>dist; + z.extra = a<<(-dist & 63); + } else { + z.v = 0; + z.extra = (dist == 64) ? a : (a != 0); + } + z.extra |= (extra != 0); + return z; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_shortShiftLeft128.c b/extern/riscv-softfloat-standalone/lib/s_shortShiftLeft128.c new file mode 100644 index 0000000..9b7c067 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_shortShiftLeft128.c @@ -0,0 +1,55 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_shortShiftLeft128 + +struct uint128 + softfloat_shortShiftLeft128( uint64_t a64, uint64_t a0, uint_fast8_t dist ) +{ + struct uint128 z; + + z.v64 = a64<>(-dist & 63); + z.v0 = a0< +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_shortShiftLeft64To96M + +void + softfloat_shortShiftLeft64To96M( + uint64_t a, uint_fast8_t dist, uint32_t *zPtr ) +{ + + zPtr[indexWord( 3, 0 )] = (uint32_t) a<>= 32 - dist; + zPtr[indexWord( 3, 2 )] = a>>32; + zPtr[indexWord( 3, 1 )] = a; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_shortShiftRight128.c b/extern/riscv-softfloat-standalone/lib/s_shortShiftRight128.c new file mode 100644 index 0000000..28c39bb --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_shortShiftRight128.c @@ -0,0 +1,55 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_shortShiftRight128 + +struct uint128 + softfloat_shortShiftRight128( uint64_t a64, uint64_t a0, uint_fast8_t dist ) +{ + struct uint128 z; + + z.v64 = a64>>dist; + z.v0 = a64<<(-dist & 63) | a0>>dist; + return z; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_shortShiftRightExtendM.c b/extern/riscv-softfloat-standalone/lib/s_shortShiftRightExtendM.c new file mode 100644 index 0000000..309188c --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_shortShiftRightExtendM.c @@ -0,0 +1,73 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_shortShiftRightExtendM + +void + softfloat_shortShiftRightExtendM( + uint_fast8_t size_words, + const uint32_t *aPtr, + uint_fast8_t dist, + uint32_t *zPtr + ) +{ + uint_fast8_t uNegDist; + unsigned int indexA, lastIndexA; + uint32_t partWordZ, wordA; + + uNegDist = -dist; + indexA = indexWordLo( size_words ); + lastIndexA = indexWordHi( size_words ); + zPtr += indexWordLo( size_words + 1 ); + partWordZ = 0; + for (;;) { + wordA = aPtr[indexA]; + *zPtr = wordA<<(uNegDist & 31) | partWordZ; + zPtr += wordIncr; + partWordZ = wordA>>dist; + if ( indexA == lastIndexA ) break; + indexA += wordIncr; + } + *zPtr = partWordZ; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_shortShiftRightJam128.c b/extern/riscv-softfloat-standalone/lib/s_shortShiftRightJam128.c new file mode 100644 index 0000000..3eb0dd4 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_shortShiftRightJam128.c @@ -0,0 +1,60 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_shortShiftRightJam128 + +struct uint128 + softfloat_shortShiftRightJam128( + uint64_t a64, uint64_t a0, uint_fast8_t dist ) +{ + uint_fast8_t uNegDist; + struct uint128 z; + + uNegDist = -dist; + z.v64 = a64>>dist; + z.v0 = + a64<<(uNegDist & 63) | a0>>dist + | ((uint64_t) (a0<<(uNegDist & 63)) != 0); + return z; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_shortShiftRightJam128Extra.c b/extern/riscv-softfloat-standalone/lib/s_shortShiftRightJam128Extra.c new file mode 100644 index 0000000..13692a0 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_shortShiftRightJam128Extra.c @@ -0,0 +1,59 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_shortShiftRightJam128Extra + +struct uint128_extra + softfloat_shortShiftRightJam128Extra( + uint64_t a64, uint64_t a0, uint64_t extra, uint_fast8_t dist ) +{ + uint_fast8_t uNegDist; + struct uint128_extra z; + + uNegDist = -dist; + z.v.v64 = a64>>dist; + z.v.v0 = a64<<(uNegDist & 63) | a0>>dist; + z.extra = a0<<(uNegDist & 63) | (extra != 0); + return z; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_shortShiftRightJam64.c b/extern/riscv-softfloat-standalone/lib/s_shortShiftRightJam64.c new file mode 100644 index 0000000..7e93cd4 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_shortShiftRightJam64.c @@ -0,0 +1,50 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" + +#ifndef softfloat_shortShiftRightJam64 + +uint64_t softfloat_shortShiftRightJam64( uint64_t a, uint_fast8_t dist ) +{ + + return a>>dist | ((a & (((uint_fast64_t) 1< +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_shortShiftRightJam64Extra + +struct uint64_extra + softfloat_shortShiftRightJam64Extra( + uint64_t a, uint64_t extra, uint_fast8_t dist ) +{ + struct uint64_extra z; + + z.v = a>>dist; + z.extra = a<<(-dist & 63) | (extra != 0); + return z; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_shortShiftRightM.c b/extern/riscv-softfloat-standalone/lib/s_shortShiftRightM.c new file mode 100644 index 0000000..308ad59 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_shortShiftRightM.c @@ -0,0 +1,70 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_shortShiftRightM + +void + softfloat_shortShiftRightM( + uint_fast8_t size_words, + const uint32_t *aPtr, + uint_fast8_t dist, + uint32_t *zPtr + ) +{ + uint_fast8_t uNegDist; + unsigned int index, lastIndex; + uint32_t partWordZ, wordA; + + uNegDist = -dist; + index = indexWordLo( size_words ); + lastIndex = indexWordHi( size_words ); + partWordZ = aPtr[index]>>dist; + while ( index != lastIndex ) { + wordA = aPtr[index + wordIncr]; + zPtr[index] = wordA<<(uNegDist & 31) | partWordZ; + index += wordIncr; + partWordZ = wordA>>dist; + } + zPtr[index] = partWordZ; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_sub128.c b/extern/riscv-softfloat-standalone/lib/s_sub128.c new file mode 100644 index 0000000..ed86e10 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_sub128.c @@ -0,0 +1,55 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_sub128 + +struct uint128 + softfloat_sub128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ) +{ + struct uint128 z; + + z.v0 = a0 - b0; + z.v64 = a64 - b64 - (a0 < b0); + return z; + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_sub1XM.c b/extern/riscv-softfloat-standalone/lib/s_sub1XM.c new file mode 100644 index 0000000..73773e5 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_sub1XM.c @@ -0,0 +1,60 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_sub1XM + +void softfloat_sub1XM( uint_fast8_t size_words, uint32_t *zPtr ) +{ + unsigned int index, lastIndex; + uint32_t wordA; + + index = indexWordLo( size_words ); + lastIndex = indexWordHi( size_words ); + for (;;) { + wordA = zPtr[index]; + zPtr[index] = wordA - 1; + if ( wordA || (index == lastIndex) ) break; + index += wordIncr; + } + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_sub256M.c b/extern/riscv-softfloat-standalone/lib/s_sub256M.c new file mode 100644 index 0000000..c07b45e --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_sub256M.c @@ -0,0 +1,65 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_sub256M + +void + softfloat_sub256M( + const uint64_t *aPtr, const uint64_t *bPtr, uint64_t *zPtr ) +{ + unsigned int index; + uint_fast8_t borrow; + uint64_t wordA, wordB; + + index = indexWordLo( 4 ); + borrow = 0; + for (;;) { + wordA = aPtr[index]; + wordB = bPtr[index]; + zPtr[index] = wordA - wordB - borrow; + if ( index == indexWordHi( 4 ) ) break; + borrow = borrow ? (wordA <= wordB) : (wordA < wordB); + index += wordIncr; + } + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_subM.c b/extern/riscv-softfloat-standalone/lib/s_subM.c new file mode 100644 index 0000000..003f699 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_subM.c @@ -0,0 +1,70 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "primitiveTypes.h" + +#ifndef softfloat_subM + +void + softfloat_subM( + uint_fast8_t size_words, + const uint32_t *aPtr, + const uint32_t *bPtr, + uint32_t *zPtr + ) +{ + unsigned int index, lastIndex; + uint_fast8_t borrow; + uint32_t wordA, wordB; + + index = indexWordLo( size_words ); + lastIndex = indexWordHi( size_words ); + borrow = 0; + for (;;) { + wordA = aPtr[index]; + wordB = bPtr[index]; + zPtr[index] = wordA - wordB - borrow; + if ( index == lastIndex ) break; + borrow = borrow ? (wordA <= wordB) : (wordA < wordB); + index += wordIncr; + } + +} + +#endif + diff --git a/extern/riscv-softfloat-standalone/lib/s_subMagsF128.c b/extern/riscv-softfloat-standalone/lib/s_subMagsF128.c new file mode 100644 index 0000000..c4264d5 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_subMagsF128.c @@ -0,0 +1,139 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float128_t + softfloat_subMagsF128( + uint_fast64_t uiA64, + uint_fast64_t uiA0, + uint_fast64_t uiB64, + uint_fast64_t uiB0, + bool signZ + ) +{ + int_fast32_t expA; + struct uint128 sigA; + int_fast32_t expB; + struct uint128 sigB, sigZ; + int_fast32_t expDiff, expZ; + struct uint128 uiZ; + union ui128_f128 uZ; + + expA = expF128UI64( uiA64 ); + sigA.v64 = fracF128UI64( uiA64 ); + sigA.v0 = uiA0; + expB = expF128UI64( uiB64 ); + sigB.v64 = fracF128UI64( uiB64 ); + sigB.v0 = uiB0; + sigA = softfloat_shortShiftLeft128( sigA.v64, sigA.v0, 4 ); + sigB = softfloat_shortShiftLeft128( sigB.v64, sigB.v0, 4 ); + expDiff = expA - expB; + if ( 0 < expDiff ) goto expABigger; + if ( expDiff < 0 ) goto expBBigger; + if ( expA == 0x7FFF ) { + if ( sigA.v64 | sigA.v0 | sigB.v64 | sigB.v0 ) goto propagateNaN; + softfloat_raiseFlags( softfloat_flag_invalid ); + uiZ.v64 = defaultNaNF128UI64; + uiZ.v0 = defaultNaNF128UI0; + goto uiZ; + } + expZ = expA; + if ( ! expZ ) expZ = 1; + if ( sigB.v64 < sigA.v64 ) goto aBigger; + if ( sigA.v64 < sigB.v64 ) goto bBigger; + if ( sigB.v0 < sigA.v0 ) goto aBigger; + if ( sigA.v0 < sigB.v0 ) goto bBigger; + uiZ.v64 = + packToF128UI64( + (softfloat_roundingMode == softfloat_round_min), 0, 0 ); + uiZ.v0 = 0; + goto uiZ; + expBBigger: + if ( expB == 0x7FFF ) { + if ( sigB.v64 | sigB.v0 ) goto propagateNaN; + uiZ.v64 = packToF128UI64( signZ ^ 1, 0x7FFF, 0 ); + uiZ.v0 = 0; + goto uiZ; + } + if ( expA ) { + sigA.v64 |= UINT64_C( 0x0010000000000000 ); + } else { + ++expDiff; + if ( ! expDiff ) goto newlyAlignedBBigger; + } + sigA = softfloat_shiftRightJam128( sigA.v64, sigA.v0, -expDiff ); + newlyAlignedBBigger: + expZ = expB; + sigB.v64 |= UINT64_C( 0x0010000000000000 ); + bBigger: + signZ = ! signZ; + sigZ = softfloat_sub128( sigB.v64, sigB.v0, sigA.v64, sigA.v0 ); + goto normRoundPack; + expABigger: + if ( expA == 0x7FFF ) { + if ( sigA.v64 | sigA.v0 ) goto propagateNaN; + uiZ.v64 = uiA64; + uiZ.v0 = uiA0; + goto uiZ; + } + if ( expB ) { + sigB.v64 |= UINT64_C( 0x0010000000000000 ); + } else { + --expDiff; + if ( ! expDiff ) goto newlyAlignedABigger; + } + sigB = softfloat_shiftRightJam128( sigB.v64, sigB.v0, expDiff ); + newlyAlignedABigger: + expZ = expA; + sigA.v64 |= UINT64_C( 0x0010000000000000 ); + aBigger: + sigZ = softfloat_sub128( sigA.v64, sigA.v0, sigB.v64, sigB.v0 ); + normRoundPack: + return softfloat_normRoundPackToF128( signZ, expZ - 5, sigZ.v64, sigZ.v0 ); + propagateNaN: + uiZ = softfloat_propagateNaNF128UI( uiA64, uiA0, uiB64, uiB0 ); + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_subMagsF16.c b/extern/riscv-softfloat-standalone/lib/s_subMagsF16.c new file mode 100644 index 0000000..5ec579e --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_subMagsF16.c @@ -0,0 +1,187 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float16_t softfloat_subMagsF16( uint_fast16_t uiA, uint_fast16_t uiB ) +{ + int_fast8_t expA; + uint_fast16_t sigA; + int_fast8_t expB; + uint_fast16_t sigB; + int_fast8_t expDiff; + uint_fast16_t uiZ; + int_fast16_t sigDiff; + bool signZ; + int_fast8_t shiftDist, expZ; + uint_fast16_t sigZ, sigX, sigY; + uint_fast32_t sig32Z; + int_fast8_t roundingMode; + union ui16_f16 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expA = expF16UI( uiA ); + sigA = fracF16UI( uiA ); + expB = expF16UI( uiB ); + sigB = fracF16UI( uiB ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expDiff = expA - expB; + if ( ! expDiff ) { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( expA == 0x1F ) { + if ( sigA | sigB ) goto propagateNaN; + softfloat_raiseFlags( softfloat_flag_invalid ); + uiZ = defaultNaNF16UI; + goto uiZ; + } + sigDiff = sigA - sigB; + if ( ! sigDiff ) { + uiZ = + packToF16UI( + (softfloat_roundingMode == softfloat_round_min), 0, 0 ); + goto uiZ; + } + if ( expA ) --expA; + signZ = signF16UI( uiA ); + if ( sigDiff < 0 ) { + signZ = ! signZ; + sigDiff = -sigDiff; + } + shiftDist = softfloat_countLeadingZeros16( sigDiff ) - 5; + expZ = expA - shiftDist; + if ( expZ < 0 ) { + shiftDist = expA; + expZ = 0; + } + sigZ = sigDiff<>16; + if ( sig32Z & 0xFFFF ) { + sigZ |= 1; + } else { + if ( ! (sigZ & 0xF) && ((unsigned int) expZ < 0x1E) ) { + sigZ >>= 4; + goto pack; + } + } + return softfloat_roundPackToF16( signZ, expZ, sigZ ); + } + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + propagateNaN: + uiZ = softfloat_propagateNaNF16UI( uiA, uiB ); + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + subEpsilon: + roundingMode = softfloat_roundingMode; + if ( roundingMode != softfloat_round_near_even ) { + if ( + (roundingMode == softfloat_round_minMag) + || (roundingMode + == (signF16UI( uiZ ) ? softfloat_round_max + : softfloat_round_min)) + ) { + --uiZ; + } +#ifdef SOFTFLOAT_ROUND_ODD + else if ( roundingMode == softfloat_round_odd ) { + uiZ = (uiZ - 1) | 1; + } +#endif + } + softfloat_exceptionFlags |= softfloat_flag_inexact; + goto uiZ; + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + pack: + uiZ = packToF16UI( signZ, expZ, sigZ ); + uiZ: + uZ.ui = uiZ; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/s_subMagsF32.c b/extern/riscv-softfloat-standalone/lib/s_subMagsF32.c new file mode 100644 index 0000000..86e89f2 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/s_subMagsF32.c @@ -0,0 +1,143 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float32_t softfloat_subMagsF32( uint_fast32_t uiA, uint_fast32_t uiB ) +{ + int_fast16_t expA; + uint_fast32_t sigA; + int_fast16_t expB; + uint_fast32_t sigB; + int_fast16_t expDiff; + uint_fast32_t uiZ; + int_fast32_t sigDiff; + bool signZ; + int_fast8_t shiftDist; + int_fast16_t expZ; + uint_fast32_t sigX, sigY; + union ui32_f32 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expA = expF32UI( uiA ); + sigA = fracF32UI( uiA ); + expB = expF32UI( uiB ); + sigB = fracF32UI( uiB ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expDiff = expA - expB; + if ( ! expDiff ) { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( expA == 0xFF ) { + if ( sigA | sigB ) goto propagateNaN; + softfloat_raiseFlags( softfloat_flag_invalid ); + uiZ = defaultNaNF32UI; + goto uiZ; + } + sigDiff = sigA - sigB; + if ( ! sigDiff ) { + uiZ = + packToF32UI( + (softfloat_roundingMode == softfloat_round_min), 0, 0 ); + goto uiZ; + } + if ( expA ) --expA; + signZ = signF32UI( uiA ); + if ( sigDiff < 0 ) { + signZ = ! signZ; + sigDiff = -sigDiff; + } + shiftDist = softfloat_countLeadingZeros32( sigDiff ) - 8; + expZ = expA - shiftDist; + if ( expZ < 0 ) { + shiftDist = expA; + expZ = 0; + } + uiZ = packToF32UI( signZ, expZ, sigDiff< +#include +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +float64_t + softfloat_subMagsF64( uint_fast64_t uiA, uint_fast64_t uiB, bool signZ ) +{ + int_fast16_t expA; + uint_fast64_t sigA; + int_fast16_t expB; + uint_fast64_t sigB; + int_fast16_t expDiff; + uint_fast64_t uiZ; + int_fast64_t sigDiff; + int_fast8_t shiftDist; + int_fast16_t expZ; + uint_fast64_t sigZ; + union ui64_f64 uZ; + + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expA = expF64UI( uiA ); + sigA = fracF64UI( uiA ); + expB = expF64UI( uiB ); + sigB = fracF64UI( uiB ); + /*------------------------------------------------------------------------ + *------------------------------------------------------------------------*/ + expDiff = expA - expB; + if ( ! expDiff ) { + /*-------------------------------------------------------------------- + *--------------------------------------------------------------------*/ + if ( expA == 0x7FF ) { + if ( sigA | sigB ) goto propagateNaN; + softfloat_raiseFlags( softfloat_flag_invalid ); + uiZ = defaultNaNF64UI; + goto uiZ; + } + sigDiff = sigA - sigB; + if ( ! sigDiff ) { + uiZ = + packToF64UI( + (softfloat_roundingMode == softfloat_round_min), 0, 0 ); + goto uiZ; + } + if ( expA ) --expA; + if ( sigDiff < 0 ) { + signZ = ! signZ; + sigDiff = -sigDiff; + } + shiftDist = softfloat_countLeadingZeros64( sigDiff ) - 11; + expZ = expA - shiftDist; + if ( expZ < 0 ) { + shiftDist = expA; + expZ = 0; + } + uiZ = packToF64UI( signZ, expZ, sigDiff< +#include "platform.h" +#include "internals.h" +#include "specialize.h" +#include "softfloat.h" + +#ifndef THREAD_LOCAL +#define THREAD_LOCAL +#endif + +THREAD_LOCAL uint_fast8_t softfloat_roundingMode = softfloat_round_near_even; +THREAD_LOCAL uint_fast8_t softfloat_detectTininess = init_detectTininess; +THREAD_LOCAL uint_fast8_t softfloat_exceptionFlags = 0; + +THREAD_LOCAL uint_fast8_t extF80_roundingPrecision = 80; + diff --git a/extern/riscv-softfloat-standalone/lib/ui32_to_f128.c b/extern/riscv-softfloat-standalone/lib/ui32_to_f128.c new file mode 100644 index 0000000..78d3eb6 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/ui32_to_f128.c @@ -0,0 +1,60 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All Rights Reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float128_t ui32_to_f128( uint32_t a ) +{ + uint_fast64_t uiZ64; + int_fast8_t shiftDist; + union ui128_f128 uZ; + + uiZ64 = 0; + if ( a ) { + shiftDist = softfloat_countLeadingZeros32( a ) + 17; + uiZ64 = + packToF128UI64( + 0, 0x402E - shiftDist, (uint_fast64_t) a< +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float16_t ui32_to_f16( uint32_t a ) +{ + int_fast8_t shiftDist; + union ui16_f16 u; + uint_fast16_t sig; + + shiftDist = softfloat_countLeadingZeros32( a ) - 21; + if ( 0 <= shiftDist ) { + u.ui = + a ? packToF16UI( + 0, 0x18 - shiftDist, (uint_fast16_t) a<>(-shiftDist) | ((uint32_t) (a<<(shiftDist & 31)) != 0) + : (uint_fast16_t) a< +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float32_t ui32_to_f32( uint32_t a ) +{ + union ui32_f32 uZ; + + if ( ! a ) { + uZ.ui = 0; + return uZ.f; + } + if ( a & 0x80000000 ) { + return softfloat_roundPackToF32( 0, 0x9D, a>>1 | (a & 1) ); + } else { + return softfloat_normRoundPackToF32( 0, 0x9C, a ); + } + +} + diff --git a/extern/riscv-softfloat-standalone/lib/ui32_to_f64.c b/extern/riscv-softfloat-standalone/lib/ui32_to_f64.c new file mode 100644 index 0000000..5e5f843 --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/ui32_to_f64.c @@ -0,0 +1,59 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All Rights Reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float64_t ui32_to_f64( uint32_t a ) +{ + uint_fast64_t uiZ; + int_fast8_t shiftDist; + union ui64_f64 uZ; + + if ( ! a ) { + uiZ = 0; + } else { + shiftDist = softfloat_countLeadingZeros32( a ) + 21; + uiZ = + packToF64UI( 0, 0x432 - shiftDist, (uint_fast64_t) a< +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float128_t ui64_to_f128( uint64_t a ) +{ + uint_fast64_t uiZ64, uiZ0; + int_fast8_t shiftDist; + struct uint128 zSig; + union ui128_f128 uZ; + + if ( ! a ) { + uiZ64 = 0; + uiZ0 = 0; + } else { + shiftDist = softfloat_countLeadingZeros64( a ) + 49; + if ( 64 <= shiftDist ) { + zSig.v64 = a<<(shiftDist - 64); + zSig.v0 = 0; + } else { + zSig = softfloat_shortShiftLeft128( 0, a, shiftDist ); + } + uiZ64 = packToF128UI64( 0, 0x406E - shiftDist, zSig.v64 ); + uiZ0 = zSig.v0; + } + uZ.ui.v64 = uiZ64; + uZ.ui.v0 = uiZ0; + return uZ.f; + +} + diff --git a/extern/riscv-softfloat-standalone/lib/ui64_to_f16.c b/extern/riscv-softfloat-standalone/lib/ui64_to_f16.c new file mode 100644 index 0000000..ecca02b --- /dev/null +++ b/extern/riscv-softfloat-standalone/lib/ui64_to_f16.c @@ -0,0 +1,64 @@ + +/*============================================================================ + +This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic +Package, Release 3d, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All Rights Reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float16_t ui64_to_f16( uint64_t a ) +{ + int_fast8_t shiftDist; + union ui16_f16 u; + uint_fast16_t sig; + + shiftDist = softfloat_countLeadingZeros64( a ) - 53; + if ( 0 <= shiftDist ) { + u.ui = + a ? packToF16UI( + 0, 0x18 - shiftDist, (uint_fast16_t) a< +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float32_t ui64_to_f32( uint64_t a ) +{ + int_fast8_t shiftDist; + union ui32_f32 u; + uint_fast32_t sig; + + shiftDist = softfloat_countLeadingZeros64( a ) - 40; + if ( 0 <= shiftDist ) { + u.ui = + a ? packToF32UI( + 0, 0x95 - shiftDist, (uint_fast32_t) a< +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float64_t ui64_to_f64( uint64_t a ) +{ + union ui64_f64 uZ; + + if ( ! a ) { + uZ.ui = 0; + return uZ.f; + } + if ( a & UINT64_C( 0x8000000000000000 ) ) { + return + softfloat_roundPackToF64( + 0, 0x43D, softfloat_shortShiftRightJam64( a, 1 ) ); + } else { + return softfloat_normRoundPackToF64( 0, 0x43C, a ); + } + +} + diff --git a/graph.png b/graph.png new file mode 100644 index 0000000..d90a2a1 Binary files /dev/null and b/graph.png differ diff --git a/include/Basic.hpp b/include/Basic.hpp new file mode 100644 index 0000000..46d1fbb --- /dev/null +++ b/include/Basic.hpp @@ -0,0 +1,261 @@ +// Basic.hpp +/* +This file declares the base class of basic components of the graph - Value and +Operator. + +Value is the basic node type of the graph, with informations of +- type attributes: data width, sew, lmul +- strings used for code generation: typeID, id, dataTypeID +- linkages to other Values: currently using std::vector as the container + +Operator is derived from value becuase it also needs all of the informations +above. Aside from that, an operator will have restrictions of the types of its +input and output, and the attributes of that operator (e.g. whether the +intrinsic function of this operator has an 'vl' as the last parameter, whether +the operator is masked). +*/ +#ifndef RIF_BASIC_HPP +#define RIF_BASIC_HPP + +#include +#include +#include +#include +#include +#include +#include + +#include "TypeInfo.hpp" + +#include "softfloat.h" + +namespace RIF { + +struct ValueBase; +struct OperatorBase; + +enum CustomValType { +// Derived Value +#define CUSTOM_ONE_D_TYPE(CUSTOM_NAME, ...) OneD##CUSTOM_NAME, +#include "CustomValue.def" +#undef CUSTOM_ONE_D_TYPE +#undef CUSTOM_SCALAR_TYPE + +#define CUSTOM_SCALAR_TYPE(CUSTOM_NAME, ...) Scalar##CUSTOM_NAME, +#include "CustomValue.def" +#undef CUSTOM_ONE_D_TYPE +#undef CUSTOM_SCALAR_TYPE + NumberOfValTypes, + // Derived Operator + Initialize, +#define CUSTOM_OP_TYPE(OP_TYPE, ...) OP_TYPE, +#include "CustomOperator.def" +#undef CUSTOM_OP_TYPE + NumberOfOpTypes, +}; + +enum DataTypeEnum { + Uint8_t, + Uint16_t, + Uint32_t, + Uint64_t, + Int8_t, + Int16_t, + Int32_t, + Int64_t, + Float16_t, + Float32_t, + Float64_t, + Ptrdiff_t, + Size_t, + Not_set // Don't set for `Operator` +}; + +DataTypeEnum getDataTypeEnum(const char *dataTypeString); +bool isIntegral(DataTypeEnum dt); + +struct ValueBase { + // ctor for derived Value + ValueBase(const CustomValType &type, const std::string &typeID, + const std::string &id, const std::string &dataTypeID, + const int length, TypeClass typeClass, int dataWidth, LmulType lmul) + : type(type), typeID(typeID), id(id), dataTypeID(dataTypeID), + length(length), inputs(1, nullptr), + typeInfo(TypeInfo::create(lmul, SewType{dataWidth}, typeClass)), + dt(getDataTypeEnum(dataTypeID.c_str())) {} + + // ctor for derived Operator + ValueBase(const CustomValType &type, const std::string &typeID, + const std::string &id, const unsigned numOfInputs, + TypeClass typeClass, int dataWidth, LmulType lmul) + : type(type), typeID(typeID), id(id), dataTypeID(""), length(0), + inputs(numOfInputs, nullptr), outputs(1, nullptr), + typeInfo(TypeInfo::create(lmul, SewType{dataWidth}, typeClass)), + dt(DataTypeEnum::Not_set) {} + + virtual ~ValueBase() = default; + + std::string getNameWithType() const; + + virtual void generateCCode(std::ostream &os) = 0; + virtual void generateData() = 0; + + const CustomValType type; + const std::string typeID; + const std::string id; + const std::string dataTypeID; + + std::vector inputs; + std::vector outputs; + + int length; + TypeInfo *typeInfo; + DataTypeEnum dt; +}; + +bool isScalarValue(const ValueBase *value); +bool isOneDValue(const ValueBase *value); + +using OperatorAttrT = uint32_t; +enum OperatorAttr : OperatorAttrT { + HaveVLParameter = 1, + NoVLParameter = 1 << 1, + MaskedOperation = 1 << 2, + NonmaskedOperation = 1 << 3, + MulAddOperation = 1 << 4, + MergeOperation = 1 << 5, + ReductionOperation = 1 << 6, + LogicalMaskOperation = 1 << 7, + NoInputOperation = 1 << 8, + LoadOperation = 1 << 9, + StoreOperation = 1 << 10, + VoidOperation = 1 << 11, + WideningOperation = 1 << 12, + NarrowingOperation = 1 << 13, + NoMaskedOff = 1 << 14, + ExtensionOperation = 1 << 15, + TailAgnostic = 1 << 16, + TailUndisturbed = 1 << 17, + MaskAgnostic = 1 << 18, + MaskUndisturbed = 1 << 19, +}; + +struct OperatorBase : ValueBase { + + OperatorBase(const CustomValType &type, const std::string &typeID, + const std::string &id, const OperatorAttrT opAttr, + const unsigned numOfInputs, + const std::initializer_list inputTypes, + const CustomValType outputType, int dataWidth, LmulType lmul, + TypeClass typeClass) + : ValueBase(type, typeID, id, numOfInputs, typeClass, dataWidth, lmul), + opAttr(opAttr), inputTypes(inputTypes), outputType(outputType) {} + + virtual ~OperatorBase() = default; + + // returns 1 if fail + int addInput(int inputIdx, ValueBase *input) { + if (inputIdx >= inputs.size()) { + std::cerr << "addInput: inputIdx is out of range, abort.\n"; + return 1; + } + if (inputTypes[inputIdx] != input->type) { + std::cerr << "addInput: Encounter mismatch type when adding input " + << inputIdx << " of operator " << id << "\n"; + return 1; + } + if (input->type >= NumberOfValTypes) { + std::cerr << "addInput: Adding a non-value node of type '" + << input->typeID << "' as an input\n"; + return 1; + } + if (inputs[inputIdx] != nullptr) + std::cerr << "Warning: setting input of index " << inputIdx + << "that is already occupied.\n"; + + inputs[inputIdx] = input; + input->outputs.push_back(this); + return 0; + } + // return 1 if fail + int addOutput(ValueBase *output) { + if (outputType != output->type && type != Initialize) { + std::cerr << "addOutput: Encounter mismatch type for operator " << id + << "\n"; + return 1; + } + if (output->type >= NumberOfValTypes) { + std::cerr << "addOutput: Adding a non-value node of type '" + << output->typeID << "' as an output\n"; + return 1; + } + assert(outputs.size() == 1 && output->inputs.size() == 1); + if (outputs[0] != nullptr) + std::cerr << "Warning: setting output that is already occupied\n"; + + outputs[0] = output; + output->inputs[0] = this; + return 0; + } + + const OperatorAttrT opAttr; + + const std::vector inputTypes; + const CustomValType outputType; +}; + +// Utility (sugar) functions for readability +bool hasMask(const OperatorBase *op); +bool hasNonmask(const OperatorBase *op); +bool hasTA(const OperatorBase *op); +bool hasTU(const OperatorBase *op); +bool hasMA(const OperatorBase *op); +bool hasMU(const OperatorBase *op); +bool hasTAMA(const OperatorBase *op); +bool hasTAMU(const OperatorBase *op); +bool hasTUMA(const OperatorBase *op); +bool hasTUMU(const OperatorBase *op); +bool isExplicitPolicy(OperatorBase *op); +bool haveTailPolicy(OperatorBase *op); +bool haveMaskPolicy(OperatorBase *op); + +bool isMaskOfOperator(OperatorBase *op, ValueBase *value); +bool isMaskedoffOfOperator(OperatorBase *op, ValueBase *value); +bool isVs2OfOperator(OperatorBase *op, ValueBase *value); +bool isVs1OfOperator(OperatorBase *op, ValueBase *value); +bool isExistVs1Rs1(OperatorBase *op); +bool isWideningOperator(OperatorBase *op); +bool isNarrowingOperator(OperatorBase *op); +bool isWideningValue(ValueBase *x, ValueBase *y); // is X Widen of Y +bool isNarrowingValue(ValueBase *x, ValueBase *y); // is X Narrow of Y + +// Getters for input/output of an Operator +ValueBase *getVd(OperatorBase *op); +ValueBase *getMask(OperatorBase *op); +ValueBase *getMaskedoff(OperatorBase *op); +ValueBase *getVs2(OperatorBase *op); +ValueBase *getVs1(OperatorBase *op); + +/* +Set all inputs/outputs to LMUL of `op`. + +This function is called "exactly" before the actual code generation. +The adjustment of an Operator and its used/defined Value-s will be +suitable for exactly when it is code generated. Therefore this function +is called in FusedGraphs::generateCCode (before calling +FuseGraph::generateCCode) and called in Graph::generateCCode (before calling +Operator::generateCCode). +*/ +void initializeLmul(OperatorBase *op); + +// String utility +bool ends_with(std::string const &value, std::string const &ending); + +// LMUL utility +// Returns an LmulType (LmulType::mf8 = 0, LmulType::mf4 = 1, ..., +// LmulType::m8 = 6) Example: When value's sew = 8, its lowest LMUL possible +// will be: log2(8) - 3 = 0 = mf8 +LmulType getSmallestLmulForSew(SewType sew); + +} // namespace RIF +#endif // #define RIF_BASIC_HPP diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt new file mode 100644 index 0000000..e69de29 diff --git a/include/CustomOperator.def b/include/CustomOperator.def new file mode 100644 index 0000000..a3ea38c --- /dev/null +++ b/include/CustomOperator.def @@ -0,0 +1,14091 @@ +// CustomOperator.def +/* +The CUSTOM_OP_TYPE(OP_TYPE, OP_ID, SEW, TYPE_CLASS, OP_ATTR, OUTPUT_TYPE, +NUM_OF_INPUTS, INPUT_TYPE(S)...) macro is unrolled in Basic.hpp, Operator.hpp, +Graph.hpp + +Assumes NUM_OF_OUTPUTS = 1 +*/ +CUSTOM_OP_TYPE(AddVV8VInt8, add_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(AddVX8VInt8, add_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(AddVV16VInt16, add_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(AddVX16VInt16, add_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(AddVV32VInt32, add_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(AddVX32VInt32, add_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(AddVV64VInt64, add_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(AddVX64VInt64, add_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(AddVV8VUInt8, add_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(AddVX8VUInt8, add_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(AddVV16VUInt16, add_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(AddVX16VUInt16, add_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(AddVV32VUInt32, add_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(AddVX32VUInt32, add_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(AddVV64VUInt64, add_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(AddVX64VUInt64, add_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(SubVV8VInt8, sub_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(SubVX8VInt8, sub_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(SubVV16VInt16, sub_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(SubVX16VInt16, sub_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(SubVV32VInt32, sub_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(SubVX32VInt32, sub_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(SubVV64VInt64, sub_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(SubVX64VInt64, sub_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(SubVV8VUInt8, sub_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(SubVX8VUInt8, sub_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(SubVV16VUInt16, sub_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(SubVX16VUInt16, sub_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(SubVV32VUInt32, sub_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(SubVX32VUInt32, sub_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(SubVV64VUInt64, sub_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(SubVX64VUInt64, sub_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(RsubVX8VInt8, rsub_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(RsubVX16VInt16, rsub_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(RsubVX32VInt32, rsub_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(RsubVX64VInt64, rsub_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(RsubVX8VUInt8, rsub_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(RsubVX16VUInt16, rsub_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(RsubVX32VUInt32, rsub_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(RsubVX64VUInt64, rsub_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(AddVV8VInt8_m, add_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(AddVX8VInt8_m, add_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(AddVV16VInt16_m, add_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(AddVX16VInt16_m, add_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(AddVV32VInt32_m, add_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(AddVX32VInt32_m, add_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(AddVV64VInt64_m, add_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(AddVX64VInt64_m, add_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(AddVV8VUInt8_m, add_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(AddVX8VUInt8_m, add_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(AddVV16VUInt16_m, add_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(AddVX16VUInt16_m, add_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(AddVV32VUInt32_m, add_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(AddVX32VUInt32_m, add_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(AddVV64VUInt64_m, add_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(AddVX64VUInt64_m, add_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(SubVV8VInt8_m, sub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(SubVX8VInt8_m, sub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(SubVV16VInt16_m, sub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(SubVX16VInt16_m, sub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(SubVV32VInt32_m, sub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(SubVX32VInt32_m, sub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(SubVV64VInt64_m, sub_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(SubVX64VInt64_m, sub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(SubVV8VUInt8_m, sub_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(SubVX8VUInt8_m, sub_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(SubVV16VUInt16_m, sub_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(SubVX16VUInt16_m, sub_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(SubVV32VUInt32_m, sub_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(SubVX32VUInt32_m, sub_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(SubVV64VUInt64_m, sub_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(SubVX64VUInt64_m, sub_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(RsubVX8VInt8_m, rsub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(RsubVX16VInt16_m, rsub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(RsubVX32VInt32_m, rsub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(RsubVX64VInt64_m, rsub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(RsubVX8VUInt8_m, rsub_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(RsubVX16VUInt16_m, rsub_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(RsubVX32VUInt32_m, rsub_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(RsubVX64VUInt64_m, rsub_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(AndVV8VInt8, and_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(AndVX8VInt8, and_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(AndVV16VInt16, and_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(AndVX16VInt16, and_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(AndVV32VInt32, and_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(AndVX32VInt32, and_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(AndVV64VInt64, and_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(AndVX64VInt64, and_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(AndVV8VUInt8, and_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(AndVX8VUInt8, and_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(AndVV16VUInt16, and_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(AndVX16VUInt16, and_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(AndVV32VUInt32, and_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(AndVX32VUInt32, and_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(AndVV64VUInt64, and_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(AndVX64VUInt64, and_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(OrVV8VInt8, or_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(OrVX8VInt8, or_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(OrVV16VInt16, or_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(OrVX16VInt16, or_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(OrVV32VInt32, or_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(OrVX32VInt32, or_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(OrVV64VInt64, or_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(OrVX64VInt64, or_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(OrVV8VUInt8, or_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(OrVX8VUInt8, or_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(OrVV16VUInt16, or_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(OrVX16VUInt16, or_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(OrVV32VUInt32, or_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(OrVX32VUInt32, or_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(OrVV64VUInt64, or_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(OrVX64VUInt64, or_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(XorVV8VInt8, xor_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(XorVX8VInt8, xor_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(XorVV16VInt16, xor_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(XorVX16VInt16, xor_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(XorVV32VInt32, xor_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(XorVX32VInt32, xor_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(XorVV64VInt64, xor_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(XorVX64VInt64, xor_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(XorVV8VUInt8, xor_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(XorVX8VUInt8, xor_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(XorVV16VUInt16, xor_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(XorVX16VUInt16, xor_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(XorVV32VUInt32, xor_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(XorVX32VUInt32, xor_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(XorVV64VUInt64, xor_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(XorVX64VUInt64, xor_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(AndVV8VInt8_m, and_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(AndVX8VInt8_m, and_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(AndVV16VInt16_m, and_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(AndVX16VInt16_m, and_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(AndVV32VInt32_m, and_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(AndVX32VInt32_m, and_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(AndVV64VInt64_m, and_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(AndVX64VInt64_m, and_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(AndVV8VUInt8_m, and_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(AndVX8VUInt8_m, and_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(AndVV16VUInt16_m, and_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(AndVX16VUInt16_m, and_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(AndVV32VUInt32_m, and_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(AndVX32VUInt32_m, and_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(AndVV64VUInt64_m, and_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(AndVX64VUInt64_m, and_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(OrVV8VInt8_m, or_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(OrVX8VInt8_m, or_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(OrVV16VInt16_m, or_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(OrVX16VInt16_m, or_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(OrVV32VInt32_m, or_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(OrVX32VInt32_m, or_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(OrVV64VInt64_m, or_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(OrVX64VInt64_m, or_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(OrVV8VUInt8_m, or_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(OrVX8VUInt8_m, or_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(OrVV16VUInt16_m, or_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(OrVX16VUInt16_m, or_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(OrVV32VUInt32_m, or_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(OrVX32VUInt32_m, or_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(OrVV64VUInt64_m, or_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(OrVX64VUInt64_m, or_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(XorVV8VInt8_m, xor_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(XorVX8VInt8_m, xor_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(XorVV16VInt16_m, xor_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(XorVX16VInt16_m, xor_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(XorVV32VInt32_m, xor_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(XorVX32VInt32_m, xor_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(XorVV64VInt64_m, xor_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(XorVX64VInt64_m, xor_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(XorVV8VUInt8_m, xor_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(XorVX8VUInt8_m, xor_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(XorVV16VUInt16_m, xor_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(XorVX16VUInt16_m, xor_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(XorVV32VUInt32_m, xor_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(XorVX32VUInt32_m, xor_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(XorVV64VUInt64_m, xor_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(XorVX64VUInt64_m, xor_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(SllVV8VInt8, sll_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, OneDUInt8) +CUSTOM_OP_TYPE(SllVX8VInt8, sll_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, ScalarUInt32) +CUSTOM_OP_TYPE(SllVV16VInt16, sll_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, OneDUInt16) +CUSTOM_OP_TYPE(SllVX16VInt16, sll_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, ScalarUInt32) +CUSTOM_OP_TYPE(SllVV32VInt32, sll_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, OneDUInt32) +CUSTOM_OP_TYPE(SllVX32VInt32, sll_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, ScalarUInt32) +CUSTOM_OP_TYPE(SllVV64VInt64, sll_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, OneDUInt64) +CUSTOM_OP_TYPE(SllVX64VInt64, sll_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, ScalarUInt32) +CUSTOM_OP_TYPE(SllVV8VUInt8, sll_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(SllVX8VUInt8, sll_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, ScalarUInt32) +CUSTOM_OP_TYPE(SllVV16VUInt16, sll_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(SllVX16VUInt16, sll_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, ScalarUInt32) +CUSTOM_OP_TYPE(SllVV32VUInt32, sll_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(SllVX32VUInt32, sll_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(SllVV64VUInt64, sll_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(SllVX64VUInt64, sll_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, ScalarUInt32) +CUSTOM_OP_TYPE(SraVV8VInt8, sra_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, OneDUInt8) +CUSTOM_OP_TYPE(SraVX8VInt8, sra_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, ScalarUInt32) +CUSTOM_OP_TYPE(SraVV16VInt16, sra_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, OneDUInt16) +CUSTOM_OP_TYPE(SraVX16VInt16, sra_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, ScalarUInt32) +CUSTOM_OP_TYPE(SraVV32VInt32, sra_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, OneDUInt32) +CUSTOM_OP_TYPE(SraVX32VInt32, sra_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, ScalarUInt32) +CUSTOM_OP_TYPE(SraVV64VInt64, sra_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, OneDUInt64) +CUSTOM_OP_TYPE(SraVX64VInt64, sra_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, ScalarUInt32) +CUSTOM_OP_TYPE(SllVV8VInt8_m, sll_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +CUSTOM_OP_TYPE(SllVX8VInt8_m, sll_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarUInt32) +CUSTOM_OP_TYPE(SllVV16VInt16_m, sll_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +CUSTOM_OP_TYPE(SllVX16VInt16_m, sll_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarUInt32) +CUSTOM_OP_TYPE(SllVV32VInt32_m, sll_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +CUSTOM_OP_TYPE(SllVX32VInt32_m, sll_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarUInt32) +CUSTOM_OP_TYPE(SllVV64VInt64_m, sll_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +CUSTOM_OP_TYPE(SllVX64VInt64_m, sll_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarUInt32) +CUSTOM_OP_TYPE(SllVV8VUInt8_m, sll_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(SllVX8VUInt8_m, sll_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt32) +CUSTOM_OP_TYPE(SllVV16VUInt16_m, sll_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(SllVX16VUInt16_m, sll_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt32) +CUSTOM_OP_TYPE(SllVV32VUInt32_m, sll_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(SllVX32VUInt32_m, sll_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(SllVV64VUInt64_m, sll_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(SllVX64VUInt64_m, sll_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt32) +CUSTOM_OP_TYPE(SraVV8VInt8_m, sra_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +CUSTOM_OP_TYPE(SraVX8VInt8_m, sra_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarUInt32) +CUSTOM_OP_TYPE(SraVV16VInt16_m, sra_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +CUSTOM_OP_TYPE(SraVX16VInt16_m, sra_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarUInt32) +CUSTOM_OP_TYPE(SraVV32VInt32_m, sra_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +CUSTOM_OP_TYPE(SraVX32VInt32_m, sra_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarUInt32) +CUSTOM_OP_TYPE(SraVV64VInt64_m, sra_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +CUSTOM_OP_TYPE(SraVX64VInt64_m, sra_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarUInt32) + +CUSTOM_OP_TYPE(WaddWVV8VInt16, wadd_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt16, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(WaddWVX8VInt16, wadd_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt16, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(WaddWWV8VInt16, wadd_wv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt16, 2, OneDInt16, OneDInt8) +CUSTOM_OP_TYPE(WaddWWX8VInt16, wadd_wx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt16, 2, OneDInt16, ScalarInt8) +CUSTOM_OP_TYPE(WaddWVV16VInt32, wadd_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt32, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(WaddWVX16VInt32, wadd_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt32, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(WaddWWV16VInt32, wadd_wv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt32, 2, OneDInt32, OneDInt16) +CUSTOM_OP_TYPE(WaddWWX16VInt32, wadd_wx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt32, 2, OneDInt32, ScalarInt16) +CUSTOM_OP_TYPE(WaddWVV32VInt64, wadd_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt64, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(WaddWVX32VInt64, wadd_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt64, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(WaddWWV32VInt64, wadd_wv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt64, 2, OneDInt64, OneDInt32) +CUSTOM_OP_TYPE(WaddWWX32VInt64, wadd_wx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt64, 2, OneDInt64, ScalarInt32) +CUSTOM_OP_TYPE(WadduWVV8VUInt16, waddu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt16, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(WadduWVX8VUInt16, waddu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt16, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(WadduWWV8VUInt16, waddu_wv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt16, 2, OneDUInt16, OneDUInt8) +CUSTOM_OP_TYPE(WadduWWX8VUInt16, waddu_wx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt16, 2, OneDUInt16, ScalarUInt8) +CUSTOM_OP_TYPE(WadduWVV16VUInt32, waddu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt32, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(WadduWVX16VUInt32, waddu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt32, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(WadduWWV16VUInt32, waddu_wv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt32, 2, OneDUInt32, OneDUInt16) +CUSTOM_OP_TYPE(WadduWWX16VUInt32, waddu_wx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt32, 2, OneDUInt32, ScalarUInt16) +CUSTOM_OP_TYPE(WadduWVV32VUInt64, waddu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt64, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(WadduWVX32VUInt64, waddu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt64, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(WadduWWV32VUInt64, waddu_wv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt64, 2, OneDUInt64, OneDUInt32) +CUSTOM_OP_TYPE(WadduWWX32VUInt64, waddu_wx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt64, 2, OneDUInt64, ScalarUInt32) +CUSTOM_OP_TYPE(WsubWVV8VInt16, wsub_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt16, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(WsubWVX8VInt16, wsub_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt16, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(WsubWWV8VInt16, wsub_wv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt16, 2, OneDInt16, OneDInt8) +CUSTOM_OP_TYPE(WsubWWX8VInt16, wsub_wx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt16, 2, OneDInt16, ScalarInt8) +CUSTOM_OP_TYPE(WsubWVV16VInt32, wsub_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt32, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(WsubWVX16VInt32, wsub_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt32, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(WsubWWV16VInt32, wsub_wv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt32, 2, OneDInt32, OneDInt16) +CUSTOM_OP_TYPE(WsubWWX16VInt32, wsub_wx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt32, 2, OneDInt32, ScalarInt16) +CUSTOM_OP_TYPE(WsubWVV32VInt64, wsub_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt64, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(WsubWVX32VInt64, wsub_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt64, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(WsubWWV32VInt64, wsub_wv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt64, 2, OneDInt64, OneDInt32) +CUSTOM_OP_TYPE(WsubWWX32VInt64, wsub_wx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt64, 2, OneDInt64, ScalarInt32) +CUSTOM_OP_TYPE(WsubuWVV8VUInt16, wsubu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt16, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(WsubuWVX8VUInt16, wsubu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt16, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(WsubuWWV8VUInt16, wsubu_wv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt16, 2, OneDUInt16, OneDUInt8) +CUSTOM_OP_TYPE(WsubuWWX8VUInt16, wsubu_wx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt16, 2, OneDUInt16, ScalarUInt8) +CUSTOM_OP_TYPE(WsubuWVV16VUInt32, wsubu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt32, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(WsubuWVX16VUInt32, wsubu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt32, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(WsubuWWV16VUInt32, wsubu_wv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt32, 2, OneDUInt32, OneDUInt16) +CUSTOM_OP_TYPE(WsubuWWX16VUInt32, wsubu_wx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt32, 2, OneDUInt32, ScalarUInt16) +CUSTOM_OP_TYPE(WsubuWVV32VUInt64, wsubu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt64, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(WsubuWVX32VUInt64, wsubu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt64, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(WsubuWWV32VUInt64, wsubu_wv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt64, 2, OneDUInt64, OneDUInt32) +CUSTOM_OP_TYPE(WsubuWWX32VUInt64, wsubu_wx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt64, 2, OneDUInt64, ScalarUInt32) +CUSTOM_OP_TYPE(WaddWVV8VInt16_m, wadd_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(WaddWVX8VInt16_m, wadd_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(WaddWWV8VInt16_m, wadd_wv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt8) +CUSTOM_OP_TYPE(WaddWWX8VInt16_m, wadd_wx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt8) +CUSTOM_OP_TYPE(WaddWVV16VInt32_m, wadd_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(WaddWVX16VInt32_m, wadd_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(WaddWWV16VInt32_m, wadd_wv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt16) +CUSTOM_OP_TYPE(WaddWWX16VInt32_m, wadd_wx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt16) +CUSTOM_OP_TYPE(WaddWVV32VInt64_m, wadd_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(WaddWVX32VInt64_m, wadd_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(WaddWWV32VInt64_m, wadd_wv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt32) +CUSTOM_OP_TYPE(WaddWWX32VInt64_m, wadd_wx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt32) +CUSTOM_OP_TYPE(WadduWVV8VUInt16_m, waddu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(WadduWVX8VUInt16_m, waddu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(WadduWWV8VUInt16_m, waddu_wv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt8) +CUSTOM_OP_TYPE(WadduWWX8VUInt16_m, waddu_wx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt8) +CUSTOM_OP_TYPE(WadduWVV16VUInt32_m, waddu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(WadduWVX16VUInt32_m, waddu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(WadduWWV16VUInt32_m, waddu_wv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt16) +CUSTOM_OP_TYPE(WadduWWX16VUInt32_m, waddu_wx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt16) +CUSTOM_OP_TYPE(WadduWVV32VUInt64_m, waddu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(WadduWVX32VUInt64_m, waddu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(WadduWWV32VUInt64_m, waddu_wv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt32) +CUSTOM_OP_TYPE(WadduWWX32VUInt64_m, waddu_wx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt32) +CUSTOM_OP_TYPE(WsubWVV8VInt16_m, wsub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(WsubWVX8VInt16_m, wsub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(WsubWWV8VInt16_m, wsub_wv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt8) +CUSTOM_OP_TYPE(WsubWWX8VInt16_m, wsub_wx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt8) +CUSTOM_OP_TYPE(WsubWVV16VInt32_m, wsub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(WsubWVX16VInt32_m, wsub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(WsubWWV16VInt32_m, wsub_wv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt16) +CUSTOM_OP_TYPE(WsubWWX16VInt32_m, wsub_wx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt16) +CUSTOM_OP_TYPE(WsubWVV32VInt64_m, wsub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(WsubWVX32VInt64_m, wsub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(WsubWWV32VInt64_m, wsub_wv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt32) +CUSTOM_OP_TYPE(WsubWWX32VInt64_m, wsub_wx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt32) +CUSTOM_OP_TYPE(WsubuWVV8VUInt16_m, wsubu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(WsubuWVX8VUInt16_m, wsubu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(WsubuWWV8VUInt16_m, wsubu_wv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt8) +CUSTOM_OP_TYPE(WsubuWWX8VUInt16_m, wsubu_wx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt8) +CUSTOM_OP_TYPE(WsubuWVV16VUInt32_m, wsubu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(WsubuWVX16VUInt32_m, wsubu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(WsubuWWV16VUInt32_m, wsubu_wv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt16) +CUSTOM_OP_TYPE(WsubuWWX16VUInt32_m, wsubu_wx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt16) +CUSTOM_OP_TYPE(WsubuWVV32VUInt64_m, wsubu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(WsubuWVX32VUInt64_m, wsubu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(WsubuWWV32VUInt64_m, wsubu_wv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt32) +CUSTOM_OP_TYPE(WsubuWWX32VUInt64_m, wsubu_wx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt32) + +CUSTOM_OP_TYPE(MaccVV8VInt8, macc_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(MaccVX8VInt8, macc_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt8, 3, OneDInt8, ScalarInt8, OneDInt8) +CUSTOM_OP_TYPE(MaccVV16VInt16, macc_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(MaccVX16VInt16, macc_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt16, 3, OneDInt16, ScalarInt16, OneDInt16) +CUSTOM_OP_TYPE(MaccVV32VInt32, macc_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(MaccVX32VInt32, macc_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt32, 3, OneDInt32, ScalarInt32, OneDInt32) +CUSTOM_OP_TYPE(MaccVV64VInt64, macc_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(MaccVX64VInt64, macc_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt64, 3, OneDInt64, ScalarInt64, OneDInt64) +// CUSTOM_OP_TYPE(MaccVV8VUInt8, macc_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// CUSTOM_OP_TYPE(MaccVX8VUInt8, macc_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt8, 3, OneDUInt8, ScalarUInt8, OneDUInt8) +// CUSTOM_OP_TYPE(MaccVV16VUInt16, macc_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// CUSTOM_OP_TYPE(MaccVX16VUInt16, macc_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt16, 3, OneDUInt16, ScalarUInt16, OneDUInt16) +// CUSTOM_OP_TYPE(MaccVV32VUInt32, macc_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// CUSTOM_OP_TYPE(MaccVX32VUInt32, macc_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt32, 3, OneDUInt32, ScalarUInt32, OneDUInt32) +// CUSTOM_OP_TYPE(MaccVV64VUInt64, macc_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// CUSTOM_OP_TYPE(MaccVX64VUInt64, macc_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt64, 3, OneDUInt64, ScalarUInt64, OneDUInt64) +CUSTOM_OP_TYPE(NmsacVV8VInt8, nmsac_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(NmsacVX8VInt8, nmsac_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt8, 3, OneDInt8, ScalarInt8, OneDInt8) +CUSTOM_OP_TYPE(NmsacVV16VInt16, nmsac_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(NmsacVX16VInt16, nmsac_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt16, 3, OneDInt16, ScalarInt16, OneDInt16) +CUSTOM_OP_TYPE(NmsacVV32VInt32, nmsac_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(NmsacVX32VInt32, nmsac_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt32, 3, OneDInt32, ScalarInt32, OneDInt32) +CUSTOM_OP_TYPE(NmsacVV64VInt64, nmsac_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(NmsacVX64VInt64, nmsac_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt64, 3, OneDInt64, ScalarInt64, OneDInt64) +// CUSTOM_OP_TYPE(NmsacVV8VUInt8, nmsac_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// CUSTOM_OP_TYPE(NmsacVX8VUInt8, nmsac_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt8, 3, OneDUInt8, ScalarUInt8, OneDUInt8) +// CUSTOM_OP_TYPE(NmsacVV16VUInt16, nmsac_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// CUSTOM_OP_TYPE(NmsacVX16VUInt16, nmsac_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt16, 3, OneDUInt16, ScalarUInt16, OneDUInt16) +// CUSTOM_OP_TYPE(NmsacVV32VUInt32, nmsac_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// CUSTOM_OP_TYPE(NmsacVX32VUInt32, nmsac_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt32, 3, OneDUInt32, ScalarUInt32, OneDUInt32) +// CUSTOM_OP_TYPE(NmsacVV64VUInt64, nmsac_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// CUSTOM_OP_TYPE(NmsacVX64VUInt64, nmsac_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt64, 3, OneDUInt64, ScalarUInt64, OneDUInt64) +CUSTOM_OP_TYPE(MaddVV8VInt8, madd_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(MaddVX8VInt8, madd_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt8, 3, OneDInt8, ScalarInt8, OneDInt8) +CUSTOM_OP_TYPE(MaddVV16VInt16, madd_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(MaddVX16VInt16, madd_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt16, 3, OneDInt16, ScalarInt16, OneDInt16) +CUSTOM_OP_TYPE(MaddVV32VInt32, madd_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(MaddVX32VInt32, madd_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt32, 3, OneDInt32, ScalarInt32, OneDInt32) +CUSTOM_OP_TYPE(MaddVV64VInt64, madd_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(MaddVX64VInt64, madd_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt64, 3, OneDInt64, ScalarInt64, OneDInt64) +// CUSTOM_OP_TYPE(MaddVV8VUInt8, madd_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// CUSTOM_OP_TYPE(MaddVX8VUInt8, madd_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt8, 3, OneDUInt8, ScalarUInt8, OneDUInt8) +// CUSTOM_OP_TYPE(MaddVV16VUInt16, madd_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// CUSTOM_OP_TYPE(MaddVX16VUInt16, madd_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt16, 3, OneDUInt16, ScalarUInt16, OneDUInt16) +// CUSTOM_OP_TYPE(MaddVV32VUInt32, madd_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// CUSTOM_OP_TYPE(MaddVX32VUInt32, madd_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt32, 3, OneDUInt32, ScalarUInt32, OneDUInt32) +// CUSTOM_OP_TYPE(MaddVV64VUInt64, madd_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// CUSTOM_OP_TYPE(MaddVX64VUInt64, madd_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt64, 3, OneDUInt64, ScalarUInt64, OneDUInt64) +CUSTOM_OP_TYPE(NmsubVV8VInt8, nmsub_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(NmsubVX8VInt8, nmsub_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt8, 3, OneDInt8, ScalarInt8, OneDInt8) +CUSTOM_OP_TYPE(NmsubVV16VInt16, nmsub_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(NmsubVX16VInt16, nmsub_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt16, 3, OneDInt16, ScalarInt16, OneDInt16) +CUSTOM_OP_TYPE(NmsubVV32VInt32, nmsub_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(NmsubVX32VInt32, nmsub_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt32, 3, OneDInt32, ScalarInt32, OneDInt32) +CUSTOM_OP_TYPE(NmsubVV64VInt64, nmsub_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(NmsubVX64VInt64, nmsub_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDInt64, 3, OneDInt64, ScalarInt64, OneDInt64) +// CUSTOM_OP_TYPE(NmsubVV8VUInt8, nmsub_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// CUSTOM_OP_TYPE(NmsubVX8VUInt8, nmsub_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt8, 3, OneDUInt8, ScalarUInt8, OneDUInt8) +// CUSTOM_OP_TYPE(NmsubVV16VUInt16, nmsub_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// CUSTOM_OP_TYPE(NmsubVX16VUInt16, nmsub_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt16, 3, OneDUInt16, ScalarUInt16, OneDUInt16) +// CUSTOM_OP_TYPE(NmsubVV32VUInt32, nmsub_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// CUSTOM_OP_TYPE(NmsubVX32VUInt32, nmsub_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt32, 3, OneDUInt32, ScalarUInt32, OneDUInt32) +// CUSTOM_OP_TYPE(NmsubVV64VUInt64, nmsub_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// CUSTOM_OP_TYPE(NmsubVX64VUInt64, nmsub_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDUInt64, 3, OneDUInt64, ScalarUInt64, OneDUInt64) +CUSTOM_OP_TYPE(MaccVV8VInt8_m, macc_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(MaccVX8VInt8_m, macc_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt8, 4, OneDBool, OneDInt8, ScalarInt8, OneDInt8) +CUSTOM_OP_TYPE(MaccVV16VInt16_m, macc_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(MaccVX16VInt16_m, macc_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt16, OneDInt16) +CUSTOM_OP_TYPE(MaccVV32VInt32_m, macc_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(MaccVX32VInt32_m, macc_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt32, OneDInt32) +CUSTOM_OP_TYPE(MaccVV64VInt64_m, macc_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(MaccVX64VInt64_m, macc_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt64, OneDInt64) +// CUSTOM_OP_TYPE(MaccVV8VUInt8_m, macc_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// CUSTOM_OP_TYPE(MaccVX8VUInt8_m, macc_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt8, 4, OneDBool, OneDUInt8, ScalarUInt8, OneDUInt8) +// CUSTOM_OP_TYPE(MaccVV16VUInt16_m, macc_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// CUSTOM_OP_TYPE(MaccVX16VUInt16_m, macc_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt16, OneDUInt16) +// CUSTOM_OP_TYPE(MaccVV32VUInt32_m, macc_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// CUSTOM_OP_TYPE(MaccVX32VUInt32_m, macc_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt32, OneDUInt32) +// CUSTOM_OP_TYPE(MaccVV64VUInt64_m, macc_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// CUSTOM_OP_TYPE(MaccVX64VUInt64_m, macc_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt64, OneDUInt64) +CUSTOM_OP_TYPE(NmsacVV8VInt8_m, nmsac_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(NmsacVX8VInt8_m, nmsac_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt8, 4, OneDBool, OneDInt8, ScalarInt8, OneDInt8) +CUSTOM_OP_TYPE(NmsacVV16VInt16_m, nmsac_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(NmsacVX16VInt16_m, nmsac_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt16, OneDInt16) +CUSTOM_OP_TYPE(NmsacVV32VInt32_m, nmsac_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(NmsacVX32VInt32_m, nmsac_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt32, OneDInt32) +CUSTOM_OP_TYPE(NmsacVV64VInt64_m, nmsac_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(NmsacVX64VInt64_m, nmsac_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt64, OneDInt64) +// CUSTOM_OP_TYPE(NmsacVV8VUInt8_m, nmsac_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// CUSTOM_OP_TYPE(NmsacVX8VUInt8_m, nmsac_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt8, 4, OneDBool, OneDUInt8, ScalarUInt8, OneDUInt8) +// CUSTOM_OP_TYPE(NmsacVV16VUInt16_m, nmsac_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// CUSTOM_OP_TYPE(NmsacVX16VUInt16_m, nmsac_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt16, OneDUInt16) +// CUSTOM_OP_TYPE(NmsacVV32VUInt32_m, nmsac_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// CUSTOM_OP_TYPE(NmsacVX32VUInt32_m, nmsac_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt32, OneDUInt32) +// CUSTOM_OP_TYPE(NmsacVV64VUInt64_m, nmsac_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// CUSTOM_OP_TYPE(NmsacVX64VUInt64_m, nmsac_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt64, OneDUInt64) +CUSTOM_OP_TYPE(MaddVV8VInt8_m, madd_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(MaddVX8VInt8_m, madd_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt8, 4, OneDBool, OneDInt8, ScalarInt8, OneDInt8) +CUSTOM_OP_TYPE(MaddVV16VInt16_m, madd_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(MaddVX16VInt16_m, madd_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt16, OneDInt16) +CUSTOM_OP_TYPE(MaddVV32VInt32_m, madd_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(MaddVX32VInt32_m, madd_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt32, OneDInt32) +CUSTOM_OP_TYPE(MaddVV64VInt64_m, madd_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(MaddVX64VInt64_m, madd_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt64, OneDInt64) +// CUSTOM_OP_TYPE(MaddVV8VUInt8_m, madd_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// CUSTOM_OP_TYPE(MaddVX8VUInt8_m, madd_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt8, 4, OneDBool, OneDUInt8, ScalarUInt8, OneDUInt8) +// CUSTOM_OP_TYPE(MaddVV16VUInt16_m, madd_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// CUSTOM_OP_TYPE(MaddVX16VUInt16_m, madd_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt16, OneDUInt16) +// CUSTOM_OP_TYPE(MaddVV32VUInt32_m, madd_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// CUSTOM_OP_TYPE(MaddVX32VUInt32_m, madd_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt32, OneDUInt32) +// CUSTOM_OP_TYPE(MaddVV64VUInt64_m, madd_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// CUSTOM_OP_TYPE(MaddVX64VUInt64_m, madd_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt64, OneDUInt64) +CUSTOM_OP_TYPE(NmsubVV8VInt8_m, nmsub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(NmsubVX8VInt8_m, nmsub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt8, 4, OneDBool, OneDInt8, ScalarInt8, OneDInt8) +CUSTOM_OP_TYPE(NmsubVV16VInt16_m, nmsub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(NmsubVX16VInt16_m, nmsub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt16, OneDInt16) +CUSTOM_OP_TYPE(NmsubVV32VInt32_m, nmsub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(NmsubVX32VInt32_m, nmsub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt32, OneDInt32) +CUSTOM_OP_TYPE(NmsubVV64VInt64_m, nmsub_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(NmsubVX64VInt64_m, nmsub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt64, OneDInt64) +// CUSTOM_OP_TYPE(NmsubVV8VUInt8_m, nmsub_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// CUSTOM_OP_TYPE(NmsubVX8VUInt8_m, nmsub_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt8, 4, OneDBool, OneDUInt8, ScalarUInt8, OneDUInt8) +// CUSTOM_OP_TYPE(NmsubVV16VUInt16_m, nmsub_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// CUSTOM_OP_TYPE(NmsubVX16VUInt16_m, nmsub_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt16, OneDUInt16) +// CUSTOM_OP_TYPE(NmsubVV32VUInt32_m, nmsub_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// CUSTOM_OP_TYPE(NmsubVX32VUInt32_m, nmsub_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt32, OneDUInt32) +// CUSTOM_OP_TYPE(NmsubVV64VUInt64_m, nmsub_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// CUSTOM_OP_TYPE(NmsubVX64VUInt64_m, nmsub_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt64, OneDUInt64) +CUSTOM_OP_TYPE(WmaccVV8VInt16, wmacc_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDInt16, 3, OneDInt16, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(WmaccVX8VInt16, wmacc_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDInt16, 3, OneDInt16, ScalarInt8, OneDInt8) +CUSTOM_OP_TYPE(WmaccVV16VInt32, wmacc_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDInt32, 3, OneDInt32, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(WmaccVX16VInt32, wmacc_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDInt32, 3, OneDInt32, ScalarInt16, OneDInt16) +CUSTOM_OP_TYPE(WmaccVV32VInt64, wmacc_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDInt64, 3, OneDInt64, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(WmaccVX32VInt64, wmacc_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDInt64, 3, OneDInt64, ScalarInt32, OneDInt32) +// CUSTOM_OP_TYPE(WmaccVV8VUInt16, wmacc_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDUInt16, 3, OneDUInt16, OneDUInt8, OneDUInt8) +// CUSTOM_OP_TYPE(WmaccVX8VUInt16, wmacc_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDUInt16, 3, OneDUInt16, ScalarUInt8, OneDUInt8) +// CUSTOM_OP_TYPE(WmaccVV16VUInt32, wmacc_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDUInt32, 3, OneDUInt32, OneDUInt16, OneDUInt16) +// CUSTOM_OP_TYPE(WmaccVX16VUInt32, wmacc_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDUInt32, 3, OneDUInt32, ScalarUInt16, OneDUInt16) +// CUSTOM_OP_TYPE(WmaccVV32VUInt64, wmacc_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDUInt64, 3, OneDUInt64, OneDUInt32, OneDUInt32) +// CUSTOM_OP_TYPE(WmaccVX32VUInt64, wmacc_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDUInt64, 3, OneDUInt64, ScalarUInt32, OneDUInt32) +CUSTOM_OP_TYPE(WmaccsuVV8VInt16, wmaccsu_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDInt16, 3, OneDInt16, OneDInt8, OneDUInt8) +CUSTOM_OP_TYPE(WmaccsuVX8VInt16, wmaccsu_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDInt16, 3, OneDInt16, ScalarInt8, OneDUInt8) +CUSTOM_OP_TYPE(WmaccsuVV16VInt32, wmaccsu_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDInt32, 3, OneDInt32, OneDInt16, OneDUInt16) +CUSTOM_OP_TYPE(WmaccsuVX16VInt32, wmaccsu_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDInt32, 3, OneDInt32, ScalarInt16, OneDUInt16) +CUSTOM_OP_TYPE(WmaccsuVV32VInt64, wmaccsu_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDInt64, 3, OneDInt64, OneDInt32, OneDUInt32) +CUSTOM_OP_TYPE(WmaccsuVX32VInt64, wmaccsu_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDInt64, 3, OneDInt64, ScalarInt32, OneDUInt32) +CUSTOM_OP_TYPE(WmaccusVX8VInt16, wmaccus_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDInt16, 3, OneDInt16, ScalarUInt8, OneDInt8) +CUSTOM_OP_TYPE(WmaccusVX16VInt32, wmaccus_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDInt32, 3, OneDInt32, ScalarUInt16, OneDInt16) +CUSTOM_OP_TYPE(WmaccusVX32VInt64, wmaccus_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDInt64, 3, OneDInt64, ScalarUInt32, OneDInt32) +CUSTOM_OP_TYPE(WmaccVV8VInt16_m, wmacc_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(WmaccVX8VInt16_m, wmacc_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt8, OneDInt8) +CUSTOM_OP_TYPE(WmaccVV16VInt32_m, wmacc_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(WmaccVX16VInt32_m, wmacc_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt16, OneDInt16) +CUSTOM_OP_TYPE(WmaccVV32VInt64_m, wmacc_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(WmaccVX32VInt64_m, wmacc_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt32, OneDInt32) +// CUSTOM_OP_TYPE(WmaccVV8VUInt16_m, wmacc_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, OneDUInt8) +// CUSTOM_OP_TYPE(WmaccVX8VUInt16_m, wmacc_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt8, OneDUInt8) +// CUSTOM_OP_TYPE(WmaccVV16VUInt32_m, wmacc_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, OneDUInt16) +// CUSTOM_OP_TYPE(WmaccVX16VUInt32_m, wmacc_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt16, OneDUInt16) +// CUSTOM_OP_TYPE(WmaccVV32VUInt64_m, wmacc_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, OneDUInt32) +// CUSTOM_OP_TYPE(WmaccVX32VUInt64_m, wmacc_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt32, OneDUInt32) +CUSTOM_OP_TYPE(WmaccsuVV8VInt16_m, wmaccsu_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDUInt8) +CUSTOM_OP_TYPE(WmaccsuVX8VInt16_m, wmaccsu_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt8, OneDUInt8) +CUSTOM_OP_TYPE(WmaccsuVV16VInt32_m, wmaccsu_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDUInt16) +CUSTOM_OP_TYPE(WmaccsuVX16VInt32_m, wmaccsu_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt16, OneDUInt16) +CUSTOM_OP_TYPE(WmaccsuVV32VInt64_m, wmaccsu_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDUInt32) +CUSTOM_OP_TYPE(WmaccsuVX32VInt64_m, wmaccsu_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt32, OneDUInt32) +CUSTOM_OP_TYPE(WmaccusVX8VInt16_m, wmaccus_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDInt16, 4, OneDBool, OneDInt16, ScalarUInt8, OneDInt8) +CUSTOM_OP_TYPE(WmaccusVX16VInt32_m, wmaccus_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDInt32, 4, OneDBool, OneDInt32, ScalarUInt16, OneDInt16) +CUSTOM_OP_TYPE(WmaccusVX32VInt64_m, wmaccus_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDInt64, 4, OneDBool, OneDInt64, ScalarUInt32, OneDInt32) + +CUSTOM_OP_TYPE(MseqVV8VBool, mseq_vv, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(MseqVX8VBool, mseq_vx, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(MseqVV16VBool, mseq_vv, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(MseqVX16VBool, mseq_vx, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(MseqVV32VBool, mseq_vv, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(MseqVX32VBool, mseq_vx, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(MseqVV64VBool, mseq_vv, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(MseqVX64VBool, mseq_vx, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt64, ScalarInt64) +// CUSTOM_OP_TYPE(MseqVV8VBool, mseq_vv, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt8, OneDUInt8) +// CUSTOM_OP_TYPE(MseqVX8VBool, mseq_vx, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt8, ScalarUInt8) +// CUSTOM_OP_TYPE(MseqVV16VBool, mseq_vv, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt16, OneDUInt16) +// CUSTOM_OP_TYPE(MseqVX16VBool, mseq_vx, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt16, ScalarUInt16) +// CUSTOM_OP_TYPE(MseqVV32VBool, mseq_vv, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt32, OneDUInt32) +// CUSTOM_OP_TYPE(MseqVX32VBool, mseq_vx, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt32, ScalarUInt32) +// CUSTOM_OP_TYPE(MseqVV64VBool, mseq_vv, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt64, OneDUInt64) +// CUSTOM_OP_TYPE(MseqVX64VBool, mseq_vx, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(MsneVV8VBool, msne_vv, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(MsneVX8VBool, msne_vx, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(MsneVV16VBool, msne_vv, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(MsneVX16VBool, msne_vx, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(MsneVV32VBool, msne_vv, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(MsneVX32VBool, msne_vx, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(MsneVV64VBool, msne_vv, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(MsneVX64VBool, msne_vx, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt64, ScalarInt64) +// CUSTOM_OP_TYPE(MsneVV8VBool, msne_vv, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt8, OneDUInt8) +// CUSTOM_OP_TYPE(MsneVX8VBool, msne_vx, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt8, ScalarUInt8) +// CUSTOM_OP_TYPE(MsneVV16VBool, msne_vv, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt16, OneDUInt16) +// CUSTOM_OP_TYPE(MsneVX16VBool, msne_vx, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt16, ScalarUInt16) +// CUSTOM_OP_TYPE(MsneVV32VBool, msne_vv, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt32, OneDUInt32) +// CUSTOM_OP_TYPE(MsneVX32VBool, msne_vx, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt32, ScalarUInt32) +// CUSTOM_OP_TYPE(MsneVV64VBool, msne_vv, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt64, OneDUInt64) +// CUSTOM_OP_TYPE(MsneVX64VBool, msne_vx, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(MsltVV8VBool, mslt_vv, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(MsltVX8VBool, mslt_vx, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(MsltVV16VBool, mslt_vv, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(MsltVX16VBool, mslt_vx, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(MsltVV32VBool, mslt_vv, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(MsltVX32VBool, mslt_vx, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(MsltVV64VBool, mslt_vv, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(MsltVX64VBool, mslt_vx, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(MsltuVV8VBool, msltu_vv, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(MsltuVX8VBool, msltu_vx, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(MsltuVV16VBool, msltu_vv, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(MsltuVX16VBool, msltu_vx, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(MsltuVV32VBool, msltu_vv, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(MsltuVX32VBool, msltu_vx, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(MsltuVV64VBool, msltu_vv, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(MsltuVX64VBool, msltu_vx, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(MsleVV8VBool, msle_vv, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(MsleVX8VBool, msle_vx, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(MsleVV16VBool, msle_vv, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(MsleVX16VBool, msle_vx, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(MsleVV32VBool, msle_vv, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(MsleVX32VBool, msle_vx, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(MsleVV64VBool, msle_vv, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(MsleVX64VBool, msle_vx, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(MsleuVV8VBool, msleu_vv, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(MsleuVX8VBool, msleu_vx, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(MsleuVV16VBool, msleu_vv, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(MsleuVX16VBool, msleu_vx, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(MsleuVV32VBool, msleu_vv, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(MsleuVX32VBool, msleu_vx, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(MsleuVV64VBool, msleu_vv, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(MsleuVX64VBool, msleu_vx, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(MsgtVV8VBool, msgt_vv, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(MsgtVX8VBool, msgt_vx, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(MsgtVV16VBool, msgt_vv, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(MsgtVX16VBool, msgt_vx, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(MsgtVV32VBool, msgt_vv, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(MsgtVX32VBool, msgt_vx, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(MsgtVV64VBool, msgt_vv, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(MsgtVX64VBool, msgt_vx, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(MsgtuVV8VBool, msgtu_vv, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(MsgtuVX8VBool, msgtu_vx, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(MsgtuVV16VBool, msgtu_vv, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(MsgtuVX16VBool, msgtu_vx, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(MsgtuVV32VBool, msgtu_vv, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(MsgtuVX32VBool, msgtu_vx, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(MsgtuVV64VBool, msgtu_vv, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(MsgtuVX64VBool, msgtu_vx, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(MsgeVV8VBool, msge_vv, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(MsgeVX8VBool, msge_vx, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(MsgeVV16VBool, msge_vv, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(MsgeVX16VBool, msge_vx, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(MsgeVV32VBool, msge_vv, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(MsgeVX32VBool, msge_vx, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(MsgeVV64VBool, msge_vv, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(MsgeVX64VBool, msge_vx, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(MsgeuVV8VBool, msgeu_vv, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(MsgeuVX8VBool, msgeu_vx, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(MsgeuVV16VBool, msgeu_vv, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(MsgeuVX16VBool, msgeu_vx, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(MsgeuVV32VBool, msgeu_vv, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(MsgeuVX32VBool, msgeu_vx, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(MsgeuVV64VBool, msgeu_vv, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(MsgeuVX64VBool, msgeu_vx, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt64, ScalarUInt64) + +CUSTOM_OP_TYPE(MinVV8VInt8, min_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(MinVX8VInt8, min_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(MinVV16VInt16, min_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(MinVX16VInt16, min_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(MinVV32VInt32, min_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(MinVX32VInt32, min_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(MinVV64VInt64, min_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(MinVX64VInt64, min_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(MinuVV8VUInt8, minu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(MinuVX8VUInt8, minu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(MinuVV16VUInt16, minu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(MinuVX16VUInt16, minu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(MinuVV32VUInt32, minu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(MinuVX32VUInt32, minu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(MinuVV64VUInt64, minu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(MinuVX64VUInt64, minu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(MaxVV8VInt8, max_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(MaxVX8VInt8, max_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(MaxVV16VInt16, max_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(MaxVX16VInt16, max_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(MaxVV32VInt32, max_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(MaxVX32VInt32, max_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(MaxVV64VInt64, max_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(MaxVX64VInt64, max_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(MaxuVV8VUInt8, maxu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(MaxuVX8VUInt8, maxu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(MaxuVV16VUInt16, maxu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(MaxuVX16VUInt16, maxu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(MaxuVV32VUInt32, maxu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(MaxuVX32VUInt32, maxu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(MaxuVV64VUInt64, maxu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(MaxuVX64VUInt64, maxu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(MinVV8VInt8_m, min_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(MinVX8VInt8_m, min_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(MinVV16VInt16_m, min_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(MinVX16VInt16_m, min_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(MinVV32VInt32_m, min_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(MinVX32VInt32_m, min_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(MinVV64VInt64_m, min_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(MinVX64VInt64_m, min_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(MinuVV8VUInt8_m, minu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(MinuVX8VUInt8_m, minu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(MinuVV16VUInt16_m, minu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(MinuVX16VUInt16_m, minu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(MinuVV32VUInt32_m, minu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(MinuVX32VUInt32_m, minu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(MinuVV64VUInt64_m, minu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(MinuVX64VUInt64_m, minu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(MaxVV8VInt8_m, max_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(MaxVX8VInt8_m, max_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(MaxVV16VInt16_m, max_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(MaxVX16VInt16_m, max_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(MaxVV32VInt32_m, max_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(MaxVX32VInt32_m, max_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(MaxVV64VInt64_m, max_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(MaxVX64VInt64_m, max_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(MaxuVV8VUInt8_m, maxu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(MaxuVX8VUInt8_m, maxu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(MaxuVV16VUInt16_m, maxu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(MaxuVX16VUInt16_m, maxu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(MaxuVV32VUInt32_m, maxu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(MaxuVX32VUInt32_m, maxu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(MaxuVV64VUInt64_m, maxu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(MaxuVX64VUInt64_m, maxu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) + +CUSTOM_OP_TYPE(SrlVV8VUInt8, srl_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(SrlVX8VUInt8, srl_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, ScalarUInt32) +CUSTOM_OP_TYPE(SrlVV16VUInt16, srl_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(SrlVX16VUInt16, srl_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, ScalarUInt32) +CUSTOM_OP_TYPE(SrlVV32VUInt32, srl_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(SrlVX32VUInt32, srl_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(SrlVV64VUInt64, srl_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(SrlVX64VUInt64, srl_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, ScalarUInt32) +CUSTOM_OP_TYPE(SrlVV8VUInt8_m, srl_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(SrlVX8VUInt8_m, srl_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt32) +CUSTOM_OP_TYPE(SrlVV16VUInt16_m, srl_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(SrlVX16VUInt16_m, srl_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt32) +CUSTOM_OP_TYPE(SrlVV32VUInt32_m, srl_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(SrlVX32VUInt32_m, srl_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(SrlVV64VUInt64_m, srl_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(SrlVX64VUInt64_m, srl_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt32) + +CUSTOM_OP_TYPE(NsrlWV8VUInt8, nsrl_wv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDUInt8, 2, OneDUInt16, OneDUInt8) +CUSTOM_OP_TYPE(NsrlWX8VUInt8, nsrl_wx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDUInt8, 2, OneDUInt16, ScalarUInt32) +CUSTOM_OP_TYPE(NsrlWV16VUInt16, nsrl_wv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDUInt16, 2, OneDUInt32, OneDUInt16) +CUSTOM_OP_TYPE(NsrlWX16VUInt16, nsrl_wx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDUInt16, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(NsrlWV32VUInt32, nsrl_wv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDUInt32, 2, OneDUInt64, OneDUInt32) +CUSTOM_OP_TYPE(NsrlWX32VUInt32, nsrl_wx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDUInt32, 2, OneDUInt64, ScalarUInt32) +CUSTOM_OP_TYPE(NsraWV8VInt8, nsra_wv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDInt8, 2, OneDInt16, OneDUInt8) +CUSTOM_OP_TYPE(NsraWX8VInt8, nsra_wx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDInt8, 2, OneDInt16, ScalarUInt32) +CUSTOM_OP_TYPE(NsraWV16VInt16, nsra_wv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDInt16, 2, OneDInt32, OneDUInt16) +CUSTOM_OP_TYPE(NsraWX16VInt16, nsra_wx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDInt16, 2, OneDInt32, ScalarUInt32) +CUSTOM_OP_TYPE(NsraWV32VInt32, nsra_wv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDInt32, 2, OneDInt64, OneDUInt32) +CUSTOM_OP_TYPE(NsraWX32VInt32, nsra_wx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDInt32, 2, OneDInt64, ScalarUInt32) +CUSTOM_OP_TYPE(NsrlWV8VUInt8_m, nsrl_wv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt16, OneDUInt8) +CUSTOM_OP_TYPE(NsrlWX8VUInt8_m, nsrl_wx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt16, ScalarUInt32) +CUSTOM_OP_TYPE(NsrlWV16VUInt16_m, nsrl_wv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt32, OneDUInt16) +CUSTOM_OP_TYPE(NsrlWX16VUInt16_m, nsrl_wx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(NsrlWV32VUInt32_m, nsrl_wv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt64, OneDUInt32) +CUSTOM_OP_TYPE(NsrlWX32VUInt32_m, nsrl_wx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt64, ScalarUInt32) +CUSTOM_OP_TYPE(NsraWV8VInt8_m, nsra_wv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt16, OneDUInt8) +CUSTOM_OP_TYPE(NsraWX8VInt8_m, nsra_wx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt16, ScalarUInt32) +CUSTOM_OP_TYPE(NsraWV16VInt16_m, nsra_wv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt32, OneDUInt16) +CUSTOM_OP_TYPE(NsraWX16VInt16_m, nsra_wx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt32, ScalarUInt32) +CUSTOM_OP_TYPE(NsraWV32VInt32_m, nsra_wv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt64, OneDUInt32) +CUSTOM_OP_TYPE(NsraWX32VInt32_m, nsra_wx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt64, ScalarUInt32) + +CUSTOM_OP_TYPE(MulVV8VInt8, mul_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(MulVX8VInt8, mul_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(MulVV16VInt16, mul_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(MulVX16VInt16, mul_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(MulVV32VInt32, mul_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(MulVX32VInt32, mul_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(MulVV64VInt64, mul_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(MulVX64VInt64, mul_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(MulVV8VUInt8, mul_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(MulVX8VUInt8, mul_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(MulVV16VUInt16, mul_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(MulVX16VUInt16, mul_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(MulVV32VUInt32, mul_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(MulVX32VUInt32, mul_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(MulVV64VUInt64, mul_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(MulVX64VUInt64, mul_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(MulhVV8VInt8, mulh_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(MulhVX8VInt8, mulh_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(MulhVV16VInt16, mulh_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(MulhVX16VInt16, mulh_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(MulhVV32VInt32, mulh_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(MulhVX32VInt32, mulh_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(MulhVV64VInt64, mulh_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(MulhVX64VInt64, mulh_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(MulhuVV8VUInt8, mulhu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(MulhuVX8VUInt8, mulhu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(MulhuVV16VUInt16, mulhu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(MulhuVX16VUInt16, mulhu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(MulhuVV32VUInt32, mulhu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(MulhuVX32VUInt32, mulhu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(MulhuVV64VUInt64, mulhu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(MulhuVX64VUInt64, mulhu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(MulhsuVV8VInt8, mulhsu_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, OneDUInt8) +CUSTOM_OP_TYPE(MulhsuVX8VInt8, mulhsu_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, ScalarUInt8) +CUSTOM_OP_TYPE(MulhsuVV16VInt16, mulhsu_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, OneDUInt16) +CUSTOM_OP_TYPE(MulhsuVX16VInt16, mulhsu_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, ScalarUInt16) +CUSTOM_OP_TYPE(MulhsuVV32VInt32, mulhsu_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, OneDUInt32) +CUSTOM_OP_TYPE(MulhsuVX32VInt32, mulhsu_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, ScalarUInt32) +CUSTOM_OP_TYPE(MulhsuVV64VInt64, mulhsu_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, OneDUInt64) +CUSTOM_OP_TYPE(MulhsuVX64VInt64, mulhsu_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, ScalarUInt64) +CUSTOM_OP_TYPE(MulVV8VInt8_m, mul_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(MulVX8VInt8_m, mul_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(MulVV16VInt16_m, mul_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(MulVX16VInt16_m, mul_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(MulVV32VInt32_m, mul_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(MulVX32VInt32_m, mul_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(MulVV64VInt64_m, mul_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(MulVX64VInt64_m, mul_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(MulVV8VUInt8_m, mul_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(MulVX8VUInt8_m, mul_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(MulVV16VUInt16_m, mul_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(MulVX16VUInt16_m, mul_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(MulVV32VUInt32_m, mul_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(MulVX32VUInt32_m, mul_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(MulVV64VUInt64_m, mul_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(MulVX64VUInt64_m, mul_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(MulhVV8VInt8_m, mulh_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(MulhVX8VInt8_m, mulh_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(MulhVV16VInt16_m, mulh_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(MulhVX16VInt16_m, mulh_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(MulhVV32VInt32_m, mulh_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(MulhVX32VInt32_m, mulh_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(MulhVV64VInt64_m, mulh_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(MulhVX64VInt64_m, mulh_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(MulhuVV8VUInt8_m, mulhu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(MulhuVX8VUInt8_m, mulhu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(MulhuVV16VUInt16_m, mulhu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(MulhuVX16VUInt16_m, mulhu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(MulhuVV32VUInt32_m, mulhu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(MulhuVX32VUInt32_m, mulhu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(MulhuVV64VUInt64_m, mulhu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(MulhuVX64VUInt64_m, mulhu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(MulhsuVV8VInt8_m, mulhsu_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +CUSTOM_OP_TYPE(MulhsuVX8VInt8_m, mulhsu_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarUInt8) +CUSTOM_OP_TYPE(MulhsuVV16VInt16_m, mulhsu_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +CUSTOM_OP_TYPE(MulhsuVX16VInt16_m, mulhsu_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarUInt16) +CUSTOM_OP_TYPE(MulhsuVV32VInt32_m, mulhsu_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +CUSTOM_OP_TYPE(MulhsuVX32VInt32_m, mulhsu_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarUInt32) +CUSTOM_OP_TYPE(MulhsuVV64VInt64_m, mulhsu_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +CUSTOM_OP_TYPE(MulhsuVX64VInt64_m, mulhsu_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarUInt64) + +CUSTOM_OP_TYPE(WmulVV8VInt16, wmul_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt16, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(WmulVX8VInt16, wmul_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt16, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(WmulVV16VInt32, wmul_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt32, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(WmulVX16VInt32, wmul_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt32, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(WmulVV32VInt64, wmul_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt64, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(WmulVX32VInt64, wmul_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt64, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(WmuluVV8VUInt16, wmulu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt16, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(WmuluVX8VUInt16, wmulu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt16, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(WmuluVV16VUInt32, wmulu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt32, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(WmuluVX16VUInt32, wmulu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt32, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(WmuluVV32VUInt64, wmulu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt64, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(WmuluVX32VUInt64, wmulu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt64, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(WmulsuVV8VInt16, wmulsu_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt16, 2, OneDInt8, OneDUInt8) +CUSTOM_OP_TYPE(WmulsuVX8VInt16, wmulsu_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt16, 2, OneDInt8, ScalarUInt8) +CUSTOM_OP_TYPE(WmulsuVV16VInt32, wmulsu_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt32, 2, OneDInt16, OneDUInt16) +CUSTOM_OP_TYPE(WmulsuVX16VInt32, wmulsu_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt32, 2, OneDInt16, ScalarUInt16) +CUSTOM_OP_TYPE(WmulsuVV32VInt64, wmulsu_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt64, 2, OneDInt32, OneDUInt32) +CUSTOM_OP_TYPE(WmulsuVX32VInt64, wmulsu_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt64, 2, OneDInt32, ScalarUInt32) +CUSTOM_OP_TYPE(WmulVV8VInt16_m, wmul_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(WmulVX8VInt16_m, wmul_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(WmulVV16VInt32_m, wmul_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(WmulVX16VInt32_m, wmul_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(WmulVV32VInt64_m, wmul_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(WmulVX32VInt64_m, wmul_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(WmuluVV8VUInt16_m, wmulu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(WmuluVX8VUInt16_m, wmulu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(WmuluVV16VUInt32_m, wmulu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(WmuluVX16VUInt32_m, wmulu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(WmuluVV32VUInt64_m, wmulu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(WmuluVX32VUInt64_m, wmulu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(WmulsuVV8VInt16_m, wmulsu_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDUInt8) +CUSTOM_OP_TYPE(WmulsuVX8VInt16_m, wmulsu_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, ScalarUInt8) +CUSTOM_OP_TYPE(WmulsuVV16VInt32_m, wmulsu_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDUInt16) +CUSTOM_OP_TYPE(WmulsuVX16VInt32_m, wmulsu_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, ScalarUInt16) +CUSTOM_OP_TYPE(WmulsuVV32VInt64_m, wmulsu_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDUInt32) +CUSTOM_OP_TYPE(WmulsuVX32VInt64_m, wmulsu_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, ScalarUInt32) + +CUSTOM_OP_TYPE(MvV8VInt8, mv_v_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 1, OneDInt8) +CUSTOM_OP_TYPE(MvX8VInt8, mv_v_x, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 1, ScalarInt8) +CUSTOM_OP_TYPE(MvV16VInt16, mv_v_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 1, OneDInt16) +CUSTOM_OP_TYPE(MvX16VInt16, mv_v_x, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 1, ScalarInt16) +CUSTOM_OP_TYPE(MvV32VInt32, mv_v_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 1, OneDInt32) +CUSTOM_OP_TYPE(MvX32VInt32, mv_v_x, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 1, ScalarInt32) +CUSTOM_OP_TYPE(MvV64VInt64, mv_v_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 1, OneDInt64) +CUSTOM_OP_TYPE(MvX64VInt64, mv_v_x, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 1, ScalarInt64) +CUSTOM_OP_TYPE(MvV8VUInt8, mv_v_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 1, OneDUInt8) +CUSTOM_OP_TYPE(MvX8VUInt8, mv_v_x, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 1, ScalarUInt8) +CUSTOM_OP_TYPE(MvV16VUInt16, mv_v_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 1, OneDUInt16) +CUSTOM_OP_TYPE(MvX16VUInt16, mv_v_x, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 1, ScalarUInt16) +CUSTOM_OP_TYPE(MvV32VUInt32, mv_v_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 1, OneDUInt32) +CUSTOM_OP_TYPE(MvX32VUInt32, mv_v_x, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 1, ScalarUInt32) +CUSTOM_OP_TYPE(MvV64VUInt64, mv_v_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 1, OneDUInt64) +CUSTOM_OP_TYPE(MvX64VUInt64, mv_v_x, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 1, ScalarUInt64) +// FIXME: Seems like this is for tail policy??? +// CUSTOM_OP_TYPE(MvV8VInt8, mv_v_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, OneDInt8) +// CUSTOM_OP_TYPE(MvX8VInt8, mv_v_x, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, ScalarInt8) +// CUSTOM_OP_TYPE(MvV16VInt16, mv_v_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, OneDInt16) +// CUSTOM_OP_TYPE(MvX16VInt16, mv_v_x, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, ScalarInt16) +// CUSTOM_OP_TYPE(MvV32VInt32, mv_v_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, OneDInt32) +// CUSTOM_OP_TYPE(MvX32VInt32, mv_v_x, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, ScalarInt32) +// CUSTOM_OP_TYPE(MvV64VInt64, mv_v_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, OneDInt64) +// CUSTOM_OP_TYPE(MvX64VInt64, mv_v_x, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, ScalarInt64) +// CUSTOM_OP_TYPE(MvV8VUInt8, mv_v_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// CUSTOM_OP_TYPE(MvX8VUInt8, mv_v_x, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +// CUSTOM_OP_TYPE(MvV16VUInt16, mv_v_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// CUSTOM_OP_TYPE(MvX16VUInt16, mv_v_x, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +// CUSTOM_OP_TYPE(MvV32VUInt32, mv_v_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// CUSTOM_OP_TYPE(MvX32VUInt32, mv_v_x, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +// CUSTOM_OP_TYPE(MvV64VUInt64, mv_v_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// CUSTOM_OP_TYPE(MvX64VUInt64, mv_v_x, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, ScalarUInt64) + +CUSTOM_OP_TYPE(AdcVVM8VInt8VIVIVB, adc_vvm, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 3, OneDInt8, OneDInt8, OneDBool) +CUSTOM_OP_TYPE(AdcVXM8VInt8VISIVB, adc_vxm, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 3, OneDInt8, ScalarInt8, OneDBool) +CUSTOM_OP_TYPE(AdcVVM16VInt16VIVIVB, adc_vvm, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 3, OneDInt16, OneDInt16, OneDBool) +CUSTOM_OP_TYPE(AdcVXM16VInt16VISIVB, adc_vxm, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 3, OneDInt16, ScalarInt16, OneDBool) +CUSTOM_OP_TYPE(AdcVVM32VInt32VIVIVB, adc_vvm, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 3, OneDInt32, OneDInt32, OneDBool) +CUSTOM_OP_TYPE(AdcVXM32VInt32VISIVB, adc_vxm, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 3, OneDInt32, ScalarInt32, OneDBool) +CUSTOM_OP_TYPE(AdcVVM64VInt64VIVIVB, adc_vvm, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 3, OneDInt64, OneDInt64, OneDBool) +CUSTOM_OP_TYPE(AdcVXM64VInt64VISIVB, adc_vxm, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 3, OneDInt64, ScalarInt64, OneDBool) +CUSTOM_OP_TYPE(AdcVVM8VUInt8VUVUVB, adc_vvm, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDBool) +CUSTOM_OP_TYPE(AdcVXM8VUInt8VUSUVB, adc_vxm, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 3, OneDUInt8, ScalarUInt8, OneDBool) +CUSTOM_OP_TYPE(AdcVVM16VUInt16VUVUVB, adc_vvm, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDBool) +CUSTOM_OP_TYPE(AdcVXM16VUInt16VUSUVB, adc_vxm, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 3, OneDUInt16, ScalarUInt16, OneDBool) +CUSTOM_OP_TYPE(AdcVVM32VUInt32VUVUVB, adc_vvm, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDBool) +CUSTOM_OP_TYPE(AdcVXM32VUInt32VUSUVB, adc_vxm, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 3, OneDUInt32, ScalarUInt32, OneDBool) +CUSTOM_OP_TYPE(AdcVVM64VUInt64VUVUVB, adc_vvm, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDBool) +CUSTOM_OP_TYPE(AdcVXM64VUInt64VUSUVB, adc_vxm, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 3, OneDUInt64, ScalarUInt64, OneDBool) +CUSTOM_OP_TYPE(SbcVVM8VInt8VIVIVB, sbc_vvm, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 3, OneDInt8, OneDInt8, OneDBool) +CUSTOM_OP_TYPE(SbcVXM8VInt8VISIVB, sbc_vxm, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 3, OneDInt8, ScalarInt8, OneDBool) +CUSTOM_OP_TYPE(SbcVVM16VInt16VIVIVB, sbc_vvm, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 3, OneDInt16, OneDInt16, OneDBool) +CUSTOM_OP_TYPE(SbcVXM16VInt16VISIVB, sbc_vxm, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 3, OneDInt16, ScalarInt16, OneDBool) +CUSTOM_OP_TYPE(SbcVVM32VInt32VIVIVB, sbc_vvm, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 3, OneDInt32, OneDInt32, OneDBool) +CUSTOM_OP_TYPE(SbcVXM32VInt32VISIVB, sbc_vxm, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 3, OneDInt32, ScalarInt32, OneDBool) +CUSTOM_OP_TYPE(SbcVVM64VInt64VIVIVB, sbc_vvm, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 3, OneDInt64, OneDInt64, OneDBool) +CUSTOM_OP_TYPE(SbcVXM64VInt64VISIVB, sbc_vxm, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 3, OneDInt64, ScalarInt64, OneDBool) +CUSTOM_OP_TYPE(SbcVVM8VUInt8VUVUVB, sbc_vvm, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDBool) +CUSTOM_OP_TYPE(SbcVXM8VUInt8VUSUVB, sbc_vxm, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 3, OneDUInt8, ScalarUInt8, OneDBool) +CUSTOM_OP_TYPE(SbcVVM16VUInt16VUVUVB, sbc_vvm, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDBool) +CUSTOM_OP_TYPE(SbcVXM16VUInt16VUSUVB, sbc_vxm, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 3, OneDUInt16, ScalarUInt16, OneDBool) +CUSTOM_OP_TYPE(SbcVVM32VUInt32VUVUVB, sbc_vvm, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDBool) +CUSTOM_OP_TYPE(SbcVXM32VUInt32VUSUVB, sbc_vxm, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 3, OneDUInt32, ScalarUInt32, OneDBool) +CUSTOM_OP_TYPE(SbcVVM64VUInt64VUVUVB, sbc_vvm, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDBool) +CUSTOM_OP_TYPE(SbcVXM64VUInt64VUSUVB, sbc_vxm, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 3, OneDUInt64, ScalarUInt64, OneDBool) +CUSTOM_OP_TYPE(MadcVVM8VBoolVIVIVB, madc_vvm, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDInt8, OneDInt8, OneDBool) +CUSTOM_OP_TYPE(MadcVXM8VBoolVISIVB, madc_vxm, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDInt8, ScalarInt8, OneDBool) +CUSTOM_OP_TYPE(MadcVV8VBoolVIVI, madc_vv, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(MadcVX8VBoolVISI, madc_vx, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(MadcVVM16VBoolVIVIVB, madc_vvm, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDInt16, OneDInt16, OneDBool) +CUSTOM_OP_TYPE(MadcVXM16VBoolVISIVB, madc_vxm, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDInt16, ScalarInt16, OneDBool) +CUSTOM_OP_TYPE(MadcVV16VBoolVIVI, madc_vv, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(MadcVX16VBoolVISI, madc_vx, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(MadcVVM32VBoolVIVIVB, madc_vvm, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDInt32, OneDInt32, OneDBool) +CUSTOM_OP_TYPE(MadcVXM32VBoolVISIVB, madc_vxm, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDInt32, ScalarInt32, OneDBool) +CUSTOM_OP_TYPE(MadcVV32VBoolVIVI, madc_vv, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(MadcVX32VBoolVISI, madc_vx, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(MadcVVM64VBoolVIVIVB, madc_vvm, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDInt64, OneDInt64, OneDBool) +CUSTOM_OP_TYPE(MadcVXM64VBoolVISIVB, madc_vxm, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDInt64, ScalarInt64, OneDBool) +CUSTOM_OP_TYPE(MadcVV64VBoolVIVI, madc_vv, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(MadcVX64VBoolVISI, madc_vx, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(MadcVVM8VBoolVUVUVB, madc_vvm, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDUInt8, OneDUInt8, OneDBool) +CUSTOM_OP_TYPE(MadcVXM8VBoolVUSUVB, madc_vxm, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDUInt8, ScalarUInt8, OneDBool) +CUSTOM_OP_TYPE(MadcVV8VBoolVUVU, madc_vv, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(MadcVX8VBoolVUSU, madc_vx, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(MadcVVM16VBoolVUVUVB, madc_vvm, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDUInt16, OneDUInt16, OneDBool) +CUSTOM_OP_TYPE(MadcVXM16VBoolVUSUVB, madc_vxm, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDUInt16, ScalarUInt16, OneDBool) +CUSTOM_OP_TYPE(MadcVV16VBoolVUVU, madc_vv, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(MadcVX16VBoolVUSU, madc_vx, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(MadcVVM32VBoolVUVUVB, madc_vvm, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDUInt32, OneDUInt32, OneDBool) +CUSTOM_OP_TYPE(MadcVXM32VBoolVUSUVB, madc_vxm, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDUInt32, ScalarUInt32, OneDBool) +CUSTOM_OP_TYPE(MadcVV32VBoolVUVU, madc_vv, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(MadcVX32VBoolVUSU, madc_vx, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(MadcVVM64VBoolVUVUVB, madc_vvm, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDUInt64, OneDUInt64, OneDBool) +CUSTOM_OP_TYPE(MadcVXM64VBoolVUSUVB, madc_vxm, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDUInt64, ScalarUInt64, OneDBool) +CUSTOM_OP_TYPE(MadcVV64VBoolVUVU, madc_vv, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(MadcVX64VBoolVUSU, madc_vx, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(MsbcVVM8VBoolVIVIVB, msbc_vvm, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDInt8, OneDInt8, OneDBool) +CUSTOM_OP_TYPE(MsbcVXM8VBoolVISIVB, msbc_vxm, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDInt8, ScalarInt8, OneDBool) +CUSTOM_OP_TYPE(MsbcVV8VBoolVIVI, msbc_vv, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(MsbcVX8VBoolVISI, msbc_vx, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(MsbcVVM16VBoolVIVIVB, msbc_vvm, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDInt16, OneDInt16, OneDBool) +CUSTOM_OP_TYPE(MsbcVXM16VBoolVISIVB, msbc_vxm, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDInt16, ScalarInt16, OneDBool) +CUSTOM_OP_TYPE(MsbcVV16VBoolVIVI, msbc_vv, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(MsbcVX16VBoolVISI, msbc_vx, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(MsbcVVM32VBoolVIVIVB, msbc_vvm, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDInt32, OneDInt32, OneDBool) +CUSTOM_OP_TYPE(MsbcVXM32VBoolVISIVB, msbc_vxm, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDInt32, ScalarInt32, OneDBool) +CUSTOM_OP_TYPE(MsbcVV32VBoolVIVI, msbc_vv, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(MsbcVX32VBoolVISI, msbc_vx, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(MsbcVVM64VBoolVIVIVB, msbc_vvm, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDInt64, OneDInt64, OneDBool) +CUSTOM_OP_TYPE(MsbcVXM64VBoolVISIVB, msbc_vxm, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDInt64, ScalarInt64, OneDBool) +CUSTOM_OP_TYPE(MsbcVV64VBoolVIVI, msbc_vv, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(MsbcVX64VBoolVISI, msbc_vx, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(MsbcVVM8VBoolVUVUVB, msbc_vvm, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDUInt8, OneDUInt8, OneDBool) +CUSTOM_OP_TYPE(MsbcVXM8VBoolVUSUVB, msbc_vxm, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDUInt8, ScalarUInt8, OneDBool) +CUSTOM_OP_TYPE(MsbcVV8VBoolVUVU, msbc_vv, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(MsbcVX8VBoolVUSU, msbc_vx, 8, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(MsbcVVM16VBoolVUVUVB, msbc_vvm, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDUInt16, OneDUInt16, OneDBool) +CUSTOM_OP_TYPE(MsbcVXM16VBoolVUSUVB, msbc_vxm, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDUInt16, ScalarUInt16, OneDBool) +CUSTOM_OP_TYPE(MsbcVV16VBoolVUVU, msbc_vv, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(MsbcVX16VBoolVUSU, msbc_vx, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(MsbcVVM32VBoolVUVUVB, msbc_vvm, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDUInt32, OneDUInt32, OneDBool) +CUSTOM_OP_TYPE(MsbcVXM32VBoolVUSUVB, msbc_vxm, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDUInt32, ScalarUInt32, OneDBool) +CUSTOM_OP_TYPE(MsbcVV32VBoolVUVU, msbc_vv, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(MsbcVX32VBoolVUSU, msbc_vx, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(MsbcVVM64VBoolVUVUVB, msbc_vvm, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDUInt64, OneDUInt64, OneDBool) +CUSTOM_OP_TYPE(MsbcVXM64VBoolVUSUVB, msbc_vxm, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 3, OneDUInt64, ScalarUInt64, OneDBool) +CUSTOM_OP_TYPE(MsbcVV64VBoolVUVU, msbc_vv, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(MsbcVX64VBoolVUSU, msbc_vx, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDUInt64, ScalarUInt64) + +CUSTOM_OP_TYPE(NegV8VInt8VI, neg_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 1, OneDInt8) +CUSTOM_OP_TYPE(NegV16VInt16VI, neg_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 1, OneDInt16) +CUSTOM_OP_TYPE(NegV32VInt32VI, neg_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 1, OneDInt32) +CUSTOM_OP_TYPE(NegV64VInt64VI, neg_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 1, OneDInt64) +CUSTOM_OP_TYPE(NegV8VInt8VBVIVI_m, neg_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(NegV16VInt16VBVIVI_m, neg_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(NegV32VInt32VBVIVI_m, neg_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(NegV64VInt64VBVIVI_m, neg_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) + +CUSTOM_OP_TYPE(NotV8VInt8VI, not_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 1, OneDInt8) +CUSTOM_OP_TYPE(NotV16VInt16VI, not_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 1, OneDInt16) +CUSTOM_OP_TYPE(NotV32VInt32VI, not_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 1, OneDInt32) +CUSTOM_OP_TYPE(NotV64VInt64VI, not_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 1, OneDInt64) +CUSTOM_OP_TYPE(NotV8VUInt8VU, not_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 1, OneDUInt8) +CUSTOM_OP_TYPE(NotV16VUInt16VU, not_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 1, OneDUInt16) +CUSTOM_OP_TYPE(NotV32VUInt32VU, not_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 1, OneDUInt32) +CUSTOM_OP_TYPE(NotV64VUInt64VU, not_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 1, OneDUInt64) +CUSTOM_OP_TYPE(NotV8VInt8VBVIVI_m, not_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(NotV16VInt16VBVIVI_m, not_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(NotV32VInt32VBVIVI_m, not_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(NotV64VInt64VBVIVI_m, not_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(NotV8VUInt8VBVUVU_m, not_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(NotV16VUInt16VBVUVU_m, not_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(NotV32VUInt32VBVUVU_m, not_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(NotV64VUInt64VBVUVU_m, not_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) + +CUSTOM_OP_TYPE(MergeVVM8VInt8VBVIVI, merge_vvm, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(MergeVXM8VInt8VBVISI, merge_vxm, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation, OneDInt8, 3, OneDBool, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(MergeVVM16VInt16VBVIVI, merge_vvm, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(MergeVXM16VInt16VBVISI, merge_vxm, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation, OneDInt16, 3, OneDBool, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(MergeVVM32VInt32VBVIVI, merge_vvm, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(MergeVXM32VInt32VBVISI, merge_vxm, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation, OneDInt32, 3, OneDBool, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(MergeVVM64VInt64VBVIVI, merge_vvm, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(MergeVXM64VInt64VBVISI, merge_vxm, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation, OneDInt64, 3, OneDBool, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(MergeVVM8VUInt8VBVUVU, merge_vvm, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(MergeVXM8VUInt8VBVUSU, merge_vxm, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation, OneDUInt8, 3, OneDBool, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(MergeVVM16VUInt16VBVUVU, merge_vvm, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(MergeVXM16VUInt16VBVUSU, merge_vxm, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(MergeVVM32VUInt32VBVUVU, merge_vvm, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(MergeVXM32VUInt32VBVUSU, merge_vxm, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(MergeVVM64VUInt64VBVUVU, merge_vvm, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(MergeVXM64VUInt64VBVUSU, merge_vxm, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarUInt64) + +CUSTOM_OP_TYPE(Vzext_vf2V16VUInt16VU, zext_vf2, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation, OneDUInt16, 1, OneDUInt8) +CUSTOM_OP_TYPE(Vzext_vf4V32VUInt32VU, zext_vf4, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation, OneDUInt32, 1, OneDUInt8) +CUSTOM_OP_TYPE(Vzext_vf8V64VUInt64VU, zext_vf8, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation, OneDUInt64, 1, OneDUInt8) +CUSTOM_OP_TYPE(Vzext_vf2V32VUInt32VU, zext_vf2, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation, OneDUInt32, 1, OneDUInt16) +CUSTOM_OP_TYPE(Vzext_vf4V64VUInt64VU, zext_vf4, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation, OneDUInt64, 1, OneDUInt16) +CUSTOM_OP_TYPE(Vzext_vf2V64VUInt64VU, zext_vf2, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation, OneDUInt64, 1, OneDUInt32) +CUSTOM_OP_TYPE(Vsext_vf2V16VInt16VI, sext_vf2, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation, OneDInt16, 1, OneDInt8) +CUSTOM_OP_TYPE(Vsext_vf4V32VInt32VI, sext_vf4, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation, OneDInt32, 1, OneDInt8) +CUSTOM_OP_TYPE(Vsext_vf8V64VInt64VI, sext_vf8, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation, OneDInt64, 1, OneDInt8) +CUSTOM_OP_TYPE(Vsext_vf2V32VInt32VI, sext_vf2, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation, OneDInt32, 1, OneDInt16) +CUSTOM_OP_TYPE(Vsext_vf4V64VInt64VI, sext_vf4, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation, OneDInt64, 1, OneDInt16) +CUSTOM_OP_TYPE(Vsext_vf2V64VInt64VI, sext_vf2, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation, OneDInt64, 1, OneDInt32) +CUSTOM_OP_TYPE(Vzext_vf2V16VUInt16VBVUVU_m, zext_vf2, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt8) +CUSTOM_OP_TYPE(Vzext_vf4V32VUInt32VBVUVU_m, zext_vf4, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt8) +CUSTOM_OP_TYPE(Vzext_vf8V64VUInt64VBVUVU_m, zext_vf8, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt8) +CUSTOM_OP_TYPE(Vzext_vf2V32VUInt32VBVUVU_m, zext_vf2, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt16) +CUSTOM_OP_TYPE(Vzext_vf4V64VUInt64VBVUVU_m, zext_vf4, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt16) +CUSTOM_OP_TYPE(Vzext_vf2V64VUInt64VBVUVU_m, zext_vf2, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt32) +CUSTOM_OP_TYPE(Vsext_vf2V16VInt16VBVIVI_m, sext_vf2, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDInt8) +CUSTOM_OP_TYPE(Vsext_vf4V32VInt32VBVIVI_m, sext_vf4, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDInt8) +CUSTOM_OP_TYPE(Vsext_vf8V64VInt64VBVIVI_m, sext_vf8, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDInt8) +CUSTOM_OP_TYPE(Vsext_vf2V32VInt32VBVIVI_m, sext_vf2, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDInt16) +CUSTOM_OP_TYPE(Vsext_vf4V64VInt64VBVIVI_m, sext_vf4, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDInt16) +CUSTOM_OP_TYPE(Vsext_vf2V64VInt64VBVIVI_m, sext_vf2, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDInt32) + +CUSTOM_OP_TYPE(WcvtV8VInt16VI, wcvt_x_x_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt16, 1, OneDInt8) +CUSTOM_OP_TYPE(WcvtuV8VUInt16VU, wcvtu_x_x_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt16, 1, OneDUInt8) +CUSTOM_OP_TYPE(WcvtV16VInt32VI, wcvt_x_x_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt32, 1, OneDInt16) +CUSTOM_OP_TYPE(WcvtuV16VUInt32VU, wcvtu_x_x_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt32, 1, OneDUInt16) +CUSTOM_OP_TYPE(WcvtV32VInt64VI, wcvt_x_x_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt64, 1, OneDInt32) +CUSTOM_OP_TYPE(WcvtuV32VUInt64VU, wcvtu_x_x_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt64, 1, OneDUInt32) +CUSTOM_OP_TYPE(WcvtV8VInt16VBVIVI_m, wcvt_x_x_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDInt8) +CUSTOM_OP_TYPE(WcvtuV8VUInt16VBVUVU_m, wcvtu_x_x_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt8) +CUSTOM_OP_TYPE(WcvtV16VInt32VBVIVI_m, wcvt_x_x_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDInt16) +CUSTOM_OP_TYPE(WcvtuV16VUInt32VBVUVU_m, wcvtu_x_x_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt16) +CUSTOM_OP_TYPE(WcvtV32VInt64VBVIVI_m, wcvt_x_x_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDInt32) +CUSTOM_OP_TYPE(WcvtuV32VUInt64VBVUVU_m, wcvtu_x_x_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt32) +CUSTOM_OP_TYPE(NcvtV16VInt8VI, ncvt_x_x_w, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDInt8, 1, OneDInt16) +CUSTOM_OP_TYPE(NcvtV16VUInt8VU, ncvt_x_x_w, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDUInt8, 1, OneDUInt16) +CUSTOM_OP_TYPE(NcvtV32VInt16VI, ncvt_x_x_w, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDInt16, 1, OneDInt32) +CUSTOM_OP_TYPE(NcvtV32VUInt16VU, ncvt_x_x_w, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDUInt16, 1, OneDUInt32) +CUSTOM_OP_TYPE(NcvtV64VInt32VI, ncvt_x_x_w, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDInt32, 1, OneDInt64) +CUSTOM_OP_TYPE(NcvtV64VUInt32VU, ncvt_x_x_w, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDUInt32, 1, OneDUInt64) +CUSTOM_OP_TYPE(NcvtV16VInt8VBVIVI_m, ncvt_x_x_w, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDInt8, 3, OneDBool, OneDInt8, OneDInt16) +CUSTOM_OP_TYPE(NcvtV16VUInt8VBVUVU_m, ncvt_x_x_w, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt16) +CUSTOM_OP_TYPE(NcvtV32VInt16VBVIVI_m, ncvt_x_x_w, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDInt32) +CUSTOM_OP_TYPE(NcvtV32VUInt16VBVUVU_m, ncvt_x_x_w, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt32) +CUSTOM_OP_TYPE(NcvtV64VInt32VBVIVI_m, ncvt_x_x_w, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDInt64) +CUSTOM_OP_TYPE(NcvtV64VUInt32VBVUVU_m, ncvt_x_x_w, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt64) + +CUSTOM_OP_TYPE(SaddVV8VInt8VIVI, sadd_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(SaddVX8VInt8VISI, sadd_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(SaddVV16VInt16VIVI, sadd_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(SaddVX16VInt16VISI, sadd_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(SaddVV32VInt32VIVI, sadd_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(SaddVX32VInt32VISI, sadd_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(SaddVV64VInt64VIVI, sadd_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(SaddVX64VInt64VISI, sadd_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(SadduVV8VUInt8VUVU, saddu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(SadduVX8VUInt8VUSU, saddu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(SadduVV16VUInt16VUVU, saddu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(SadduVX16VUInt16VUSU, saddu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(SadduVV32VUInt32VUVU, saddu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(SadduVX32VUInt32VUSU, saddu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(SadduVV64VUInt64VUVU, saddu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(SadduVX64VUInt64VUSU, saddu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(SsubVV8VInt8VIVI, ssub_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(SsubVX8VInt8VISI, ssub_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(SsubVV16VInt16VIVI, ssub_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(SsubVX16VInt16VISI, ssub_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(SsubVV32VInt32VIVI, ssub_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(SsubVX32VInt32VISI, ssub_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(SsubVV64VInt64VIVI, ssub_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(SsubVX64VInt64VISI, ssub_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(SsubuVV8VUInt8VUVU, ssubu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(SsubuVX8VUInt8VUSU, ssubu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(SsubuVV16VUInt16VUVU, ssubu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(SsubuVX16VUInt16VUSU, ssubu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(SsubuVV32VUInt32VUVU, ssubu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(SsubuVX32VUInt32VUSU, ssubu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(SsubuVV64VUInt64VUVU, ssubu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(SsubuVX64VUInt64VUSU, ssubu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(SaddVV8VInt8VBVIVIVI_m, sadd_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(SaddVX8VInt8VBVIVISI_m, sadd_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(SaddVV16VInt16VBVIVIVI_m, sadd_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(SaddVX16VInt16VBVIVISI_m, sadd_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(SaddVV32VInt32VBVIVIVI_m, sadd_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(SaddVX32VInt32VBVIVISI_m, sadd_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(SaddVV64VInt64VBVIVIVI_m, sadd_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(SaddVX64VInt64VBVIVISI_m, sadd_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(SadduVV8VUInt8VBVUVUVU_m, saddu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(SadduVX8VUInt8VBVUVUSU_m, saddu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(SadduVV16VUInt16VBVUVUVU_m, saddu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(SadduVX16VUInt16VBVUVUSU_m, saddu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(SadduVV32VUInt32VBVUVUVU_m, saddu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(SadduVX32VUInt32VBVUVUSU_m, saddu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(SadduVV64VUInt64VBVUVUVU_m, saddu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(SadduVX64VUInt64VBVUVUSU_m, saddu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(SsubVV8VInt8VBVIVIVI_m, ssub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(SsubVX8VInt8VBVIVISI_m, ssub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(SsubVV16VInt16VBVIVIVI_m, ssub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(SsubVX16VInt16VBVIVISI_m, ssub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(SsubVV32VInt32VBVIVIVI_m, ssub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(SsubVX32VInt32VBVIVISI_m, ssub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(SsubVV64VInt64VBVIVIVI_m, ssub_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(SsubVX64VInt64VBVIVISI_m, ssub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(SsubuVV8VUInt8VBVUVUVU_m, ssubu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(SsubuVX8VUInt8VBVUVUSU_m, ssubu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(SsubuVV16VUInt16VBVUVUVU_m, ssubu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(SsubuVX16VUInt16VBVUVUSU_m, ssubu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(SsubuVV32VUInt32VBVUVUVU_m, ssubu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(SsubuVX32VUInt32VBVUVUSU_m, ssubu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(SsubuVV64VUInt64VBVUVUVU_m, ssubu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(SsubuVX64VUInt64VBVUVUSU_m, ssubu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) + +CUSTOM_OP_TYPE(SmulVV8VInt8VIVI, smul_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(SmulVX8VInt8VISI, smul_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(SmulVV16VInt16VIVI, smul_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(SmulVX16VInt16VISI, smul_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(SmulVV32VInt32VIVI, smul_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(SmulVX32VInt32VISI, smul_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(SmulVV64VInt64VIVI, smul_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(SmulVX64VInt64VISI, smul_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(SmulVV8VInt8VBVIVIVI_m, smul_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(SmulVX8VInt8VBVIVISI_m, smul_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(SmulVV16VInt16VBVIVIVI_m, smul_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(SmulVX16VInt16VBVIVISI_m, smul_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(SmulVV32VInt32VBVIVIVI_m, smul_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(SmulVX32VInt32VBVIVISI_m, smul_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(SmulVV64VInt64VBVIVIVI_m, smul_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(SmulVX64VInt64VBVIVISI_m, smul_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) + +CUSTOM_OP_TYPE(SsrlVV8VUInt8VUVU, ssrl_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(SsrlVX8VUInt8VUSU, ssrl_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, ScalarUInt32) +CUSTOM_OP_TYPE(SsrlVV16VUInt16VUVU, ssrl_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(SsrlVX16VUInt16VUSU, ssrl_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, ScalarUInt32) +CUSTOM_OP_TYPE(SsrlVV32VUInt32VUVU, ssrl_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(SsrlVX32VUInt32VUSU, ssrl_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(SsrlVV64VUInt64VUVU, ssrl_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(SsrlVX64VUInt64VUSU, ssrl_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, ScalarUInt32) +CUSTOM_OP_TYPE(SsraVV8VInt8VIVU, ssra_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, OneDUInt8) +CUSTOM_OP_TYPE(SsraVX8VInt8VISU, ssra_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, ScalarUInt32) +CUSTOM_OP_TYPE(SsraVV16VInt16VIVU, ssra_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, OneDUInt16) +CUSTOM_OP_TYPE(SsraVX16VInt16VISU, ssra_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, ScalarUInt32) +CUSTOM_OP_TYPE(SsraVV32VInt32VIVU, ssra_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, OneDUInt32) +CUSTOM_OP_TYPE(SsraVX32VInt32VISU, ssra_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, ScalarUInt32) +CUSTOM_OP_TYPE(SsraVV64VInt64VIVU, ssra_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, OneDUInt64) +CUSTOM_OP_TYPE(SsraVX64VInt64VISU, ssra_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, ScalarUInt32) +CUSTOM_OP_TYPE(SsrlVV8VUInt8VBVUVUVU_m, ssrl_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(SsrlVX8VUInt8VBVUVUSU_m, ssrl_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt32) +CUSTOM_OP_TYPE(SsrlVV16VUInt16VBVUVUVU_m, ssrl_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(SsrlVX16VUInt16VBVUVUSU_m, ssrl_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt32) +CUSTOM_OP_TYPE(SsrlVV32VUInt32VBVUVUVU_m, ssrl_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(SsrlVX32VUInt32VBVUVUSU_m, ssrl_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(SsrlVV64VUInt64VBVUVUVU_m, ssrl_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(SsrlVX64VUInt64VBVUVUSU_m, ssrl_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt32) +CUSTOM_OP_TYPE(SsraVV8VInt8VBVIVIVU_m, ssra_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +CUSTOM_OP_TYPE(SsraVX8VInt8VBVIVISU_m, ssra_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarUInt32) +CUSTOM_OP_TYPE(SsraVV16VInt16VBVIVIVU_m, ssra_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +CUSTOM_OP_TYPE(SsraVX16VInt16VBVIVISU_m, ssra_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarUInt32) +CUSTOM_OP_TYPE(SsraVV32VInt32VBVIVIVU_m, ssra_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +CUSTOM_OP_TYPE(SsraVX32VInt32VBVIVISU_m, ssra_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarUInt32) +CUSTOM_OP_TYPE(SsraVV64VInt64VBVIVIVU_m, ssra_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +CUSTOM_OP_TYPE(SsraVX64VInt64VBVIVISU_m, ssra_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarUInt32) + +CUSTOM_OP_TYPE(AaddVV8VInt8VIVI, aadd_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(AaddVX8VInt8VISI, aadd_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(AaddVV16VInt16VIVI, aadd_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(AaddVX16VInt16VISI, aadd_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(AaddVV32VInt32VIVI, aadd_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(AaddVX32VInt32VISI, aadd_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(AaddVV64VInt64VIVI, aadd_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(AaddVX64VInt64VISI, aadd_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(AadduVV8VUInt8VUVU, aaddu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(AadduVX8VUInt8VUSU, aaddu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(AadduVV16VUInt16VUVU, aaddu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(AadduVX16VUInt16VUSU, aaddu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(AadduVV32VUInt32VUVU, aaddu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(AadduVX32VUInt32VUSU, aaddu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(AadduVV64VUInt64VUVU, aaddu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(AadduVX64VUInt64VUSU, aaddu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(AsubVV8VInt8VIVI, asub_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(AsubVX8VInt8VISI, asub_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt8, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(AsubVV16VInt16VIVI, asub_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(AsubVX16VInt16VISI, asub_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(AsubVV32VInt32VIVI, asub_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(AsubVX32VInt32VISI, asub_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(AsubVV64VInt64VIVI, asub_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(AsubVX64VInt64VISI, asub_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 2, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(AsubuVV8VUInt8VUVU, asubu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(AsubuVX8VUInt8VUSU, asubu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(AsubuVV16VUInt16VUVU, asubu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(AsubuVX16VUInt16VUSU, asubu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(AsubuVV32VUInt32VUVU, asubu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(AsubuVX32VUInt32VUSU, asubu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(AsubuVV64VUInt64VUVU, asubu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(AsubuVX64VUInt64VUSU, asubu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(AaddVV8VInt8VBVIVIVI_m, aadd_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(AaddVX8VInt8VBVIVISI_m, aadd_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(AaddVV16VInt16VBVIVIVI_m, aadd_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(AaddVX16VInt16VBVIVISI_m, aadd_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(AaddVV32VInt32VBVIVIVI_m, aadd_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(AaddVX32VInt32VBVIVISI_m, aadd_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(AaddVV64VInt64VBVIVIVI_m, aadd_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(AaddVX64VInt64VBVIVISI_m, aadd_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(AadduVV8VUInt8VBVUVUVU_m, aaddu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(AadduVX8VUInt8VBVUVUSU_m, aaddu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(AadduVV16VUInt16VBVUVUVU_m, aaddu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(AadduVX16VUInt16VBVUVUSU_m, aaddu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(AadduVV32VUInt32VBVUVUVU_m, aaddu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(AadduVX32VUInt32VBVUVUSU_m, aaddu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(AadduVV64VUInt64VBVUVUVU_m, aaddu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(AadduVX64VUInt64VBVUVUSU_m, aaddu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +CUSTOM_OP_TYPE(AsubVV8VInt8VBVIVIVI_m, asub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(AsubVX8VInt8VBVIVISI_m, asub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(AsubVV16VInt16VBVIVIVI_m, asub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(AsubVX16VInt16VBVIVISI_m, asub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(AsubVV32VInt32VBVIVIVI_m, asub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(AsubVX32VInt32VBVIVISI_m, asub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(AsubVV64VInt64VBVIVIVI_m, asub_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(AsubVX64VInt64VBVIVISI_m, asub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(AsubuVV8VUInt8VBVUVUVU_m, asubu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(AsubuVX8VUInt8VBVUVUSU_m, asubu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(AsubuVV16VUInt16VBVUVUVU_m, asubu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(AsubuVX16VUInt16VBVUVUSU_m, asubu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(AsubuVV32VUInt32VBVUVUVU_m, asubu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(AsubuVX32VUInt32VBVUVUSU_m, asubu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(AsubuVV64VUInt64VBVUVUVU_m, asubu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(AsubuVX64VUInt64VBVUVUSU_m, asubu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) + +CUSTOM_OP_TYPE(NclipWV8VInt8VIVU, nclip_wv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDInt8, 2, OneDInt16, OneDUInt8) +CUSTOM_OP_TYPE(NclipWX8VInt8VISU, nclip_wx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDInt8, 2, OneDInt16, ScalarUInt32) +CUSTOM_OP_TYPE(NclipWV16VInt16VIVU, nclip_wv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDInt16, 2, OneDInt32, OneDUInt16) +CUSTOM_OP_TYPE(NclipWX16VInt16VISU, nclip_wx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDInt16, 2, OneDInt32, ScalarUInt32) +CUSTOM_OP_TYPE(NclipWV32VInt32VIVU, nclip_wv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDInt32, 2, OneDInt64, OneDUInt32) +CUSTOM_OP_TYPE(NclipWX32VInt32VISU, nclip_wx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDInt32, 2, OneDInt64, ScalarUInt32) +CUSTOM_OP_TYPE(NclipuWV8VUInt8VUVU, nclipu_wv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDUInt8, 2, OneDUInt16, OneDUInt8) +CUSTOM_OP_TYPE(NclipuWX8VUInt8VUSU, nclipu_wx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDUInt8, 2, OneDUInt16, ScalarUInt32) +CUSTOM_OP_TYPE(NclipuWV16VUInt16VUVU, nclipu_wv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDUInt16, 2, OneDUInt32, OneDUInt16) +CUSTOM_OP_TYPE(NclipuWX16VUInt16VUSU, nclipu_wx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDUInt16, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(NclipuWV32VUInt32VUVU, nclipu_wv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDUInt32, 2, OneDUInt64, OneDUInt32) +CUSTOM_OP_TYPE(NclipuWX32VUInt32VUSU, nclipu_wx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDUInt32, 2, OneDUInt64, ScalarUInt32) +CUSTOM_OP_TYPE(NclipWV8VInt8VBVIVIVU_m, nclip_wv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt16, OneDUInt8) +CUSTOM_OP_TYPE(NclipWX8VInt8VBVIVISU_m, nclip_wx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt16, ScalarUInt32) +CUSTOM_OP_TYPE(NclipWV16VInt16VBVIVIVU_m, nclip_wv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt32, OneDUInt16) +CUSTOM_OP_TYPE(NclipWX16VInt16VBVIVISU_m, nclip_wx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt32, ScalarUInt32) +CUSTOM_OP_TYPE(NclipWV32VInt32VBVIVIVU_m, nclip_wv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt64, OneDUInt32) +CUSTOM_OP_TYPE(NclipWX32VInt32VBVIVISU_m, nclip_wx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt64, ScalarUInt32) +CUSTOM_OP_TYPE(NclipuWV8VUInt8VBVUVUVU_m, nclipu_wv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt16, OneDUInt8) +CUSTOM_OP_TYPE(NclipuWX8VUInt8VBVUVUSU_m, nclipu_wx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt16, ScalarUInt32) +CUSTOM_OP_TYPE(NclipuWV16VUInt16VBVUVUVU_m, nclipu_wv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt32, OneDUInt16) +CUSTOM_OP_TYPE(NclipuWX16VUInt16VBVUVUSU_m, nclipu_wx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(NclipuWV32VUInt32VBVUVUVU_m, nclipu_wv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt64, OneDUInt32) +CUSTOM_OP_TYPE(NclipuWX32VUInt32VBVUVUSU_m, nclipu_wx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt64, ScalarUInt32) + +CUSTOM_OP_TYPE(FaddVV16VFloat16VFVF, fadd_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 2, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FaddVF16VFloat16VFSF, fadd_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 2, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FaddVV32VFloat32VFVF, fadd_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 2, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FaddVF32VFloat32VFSF, fadd_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 2, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FaddVV64VFloat64VFVF, fadd_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 2, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FaddVF64VFloat64VFSF, fadd_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 2, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(FsubVV16VFloat16VFVF, fsub_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 2, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FsubVF16VFloat16VFSF, fsub_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 2, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FsubVV32VFloat32VFVF, fsub_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 2, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FsubVF32VFloat32VFSF, fsub_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 2, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FsubVV64VFloat64VFVF, fsub_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 2, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FsubVF64VFloat64VFSF, fsub_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 2, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(FrsubVF16VFloat16VFSF, frsub_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 2, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FrsubVF32VFloat32VFSF, frsub_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 2, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FrsubVF64VFloat64VFSF, frsub_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 2, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(FaddVV16VFloat16VBVFVFVF_m, fadd_vv, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FaddVF16VFloat16VBVFVFSF_m, fadd_vf, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FaddVV32VFloat32VBVFVFVF_m, fadd_vv, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FaddVF32VFloat32VBVFVFSF_m, fadd_vf, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FaddVV64VFloat64VBVFVFVF_m, fadd_vv, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FaddVF64VFloat64VBVFVFSF_m, fadd_vf, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(FsubVV16VFloat16VBVFVFVF_m, fsub_vv, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FsubVF16VFloat16VBVFVFSF_m, fsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FsubVV32VFloat32VBVFVFVF_m, fsub_vv, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FsubVF32VFloat32VBVFVFSF_m, fsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FsubVV64VFloat64VBVFVFVF_m, fsub_vv, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FsubVF64VFloat64VBVFVFSF_m, fsub_vf, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(FrsubVF16VFloat16VBVFVFSF_m, frsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FrsubVF32VFloat32VBVFVFSF_m, frsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FrsubVF64VFloat64VBVFVFSF_m, frsub_vf, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) + +CUSTOM_OP_TYPE(FnegV16VFloat16VF, fneg_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 1, OneDFloat16) +CUSTOM_OP_TYPE(FnegV32VFloat32VF, fneg_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 1, OneDFloat32) +CUSTOM_OP_TYPE(FnegV64VFloat64VF, fneg_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 1, OneDFloat64) +CUSTOM_OP_TYPE(FnegV16VFloat16VBVFVF_m, fneg_v, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FnegV32VFloat32VBVFVF_m, fneg_v, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FnegV64VFloat64VBVFVF_m, fneg_v, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) + +CUSTOM_OP_TYPE(FsgnjVV16VFloat16VFVF, fsgnj_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 2, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FsgnjVF16VFloat16VFSF, fsgnj_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 2, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FsgnjVV32VFloat32VFVF, fsgnj_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 2, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FsgnjVF32VFloat32VFSF, fsgnj_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 2, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FsgnjVV64VFloat64VFVF, fsgnj_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 2, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FsgnjVF64VFloat64VFSF, fsgnj_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 2, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(FsgnjnVV16VFloat16VFVF, fsgnjn_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 2, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FsgnjnVF16VFloat16VFSF, fsgnjn_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 2, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FsgnjnVV32VFloat32VFVF, fsgnjn_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 2, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FsgnjnVF32VFloat32VFSF, fsgnjn_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 2, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FsgnjnVV64VFloat64VFVF, fsgnjn_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 2, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FsgnjnVF64VFloat64VFSF, fsgnjn_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 2, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(FsgnjxVV16VFloat16VFVF, fsgnjx_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 2, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FsgnjxVF16VFloat16VFSF, fsgnjx_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 2, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FsgnjxVV32VFloat32VFVF, fsgnjx_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 2, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FsgnjxVF32VFloat32VFSF, fsgnjx_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 2, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FsgnjxVV64VFloat64VFVF, fsgnjx_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 2, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FsgnjxVF64VFloat64VFSF, fsgnjx_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 2, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(FsgnjVV16VFloat16VBVFVFVF_m, fsgnj_vv, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FsgnjVF16VFloat16VBVFVFSF_m, fsgnj_vf, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FsgnjVV32VFloat32VBVFVFVF_m, fsgnj_vv, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FsgnjVF32VFloat32VBVFVFSF_m, fsgnj_vf, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FsgnjVV64VFloat64VBVFVFVF_m, fsgnj_vv, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FsgnjVF64VFloat64VBVFVFSF_m, fsgnj_vf, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(FsgnjnVV16VFloat16VBVFVFVF_m, fsgnjn_vv, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FsgnjnVF16VFloat16VBVFVFSF_m, fsgnjn_vf, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FsgnjnVV32VFloat32VBVFVFVF_m, fsgnjn_vv, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FsgnjnVF32VFloat32VBVFVFSF_m, fsgnjn_vf, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FsgnjnVV64VFloat64VBVFVFVF_m, fsgnjn_vv, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FsgnjnVF64VFloat64VBVFVFSF_m, fsgnjn_vf, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(FsgnjxVV16VFloat16VBVFVFVF_m, fsgnjx_vv, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FsgnjxVF16VFloat16VBVFVFSF_m, fsgnjx_vf, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FsgnjxVV32VFloat32VBVFVFVF_m, fsgnjx_vv, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FsgnjxVF32VFloat32VBVFVFSF_m, fsgnjx_vf, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FsgnjxVV64VFloat64VBVFVFVF_m, fsgnjx_vv, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FsgnjxVF64VFloat64VBVFVFSF_m, fsgnjx_vf, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) + +CUSTOM_OP_TYPE(FabsV16VFloat16VF, fabs_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 1, OneDFloat16) +CUSTOM_OP_TYPE(FabsV32VFloat32VF, fabs_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 1, OneDFloat32) +CUSTOM_OP_TYPE(FabsV64VFloat64VF, fabs_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 1, OneDFloat64) +CUSTOM_OP_TYPE(FabsV16VFloat16VBVFVF_m, fabs_v, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FabsV32VFloat32VBVFVF_m, fabs_v, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FabsV64VFloat64VBVFVF_m, fabs_v, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) + +CUSTOM_OP_TYPE(FmulVV16VFloat16VFVF, fmul_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 2, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FmulVF16VFloat16VFSF, fmul_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 2, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FmulVV32VFloat32VFVF, fmul_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 2, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FmulVF32VFloat32VFSF, fmul_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 2, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FmulVV64VFloat64VFVF, fmul_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 2, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FmulVF64VFloat64VFSF, fmul_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 2, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(FdivVV16VFloat16VFVF, fdiv_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 2, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FdivVF16VFloat16VFSF, fdiv_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 2, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FdivVV32VFloat32VFVF, fdiv_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 2, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FdivVF32VFloat32VFSF, fdiv_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 2, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FdivVV64VFloat64VFVF, fdiv_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 2, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FdivVF64VFloat64VFSF, fdiv_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 2, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(FrdivVF16VFloat16VFSF, frdiv_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 2, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FrdivVF32VFloat32VFSF, frdiv_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 2, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FrdivVF64VFloat64VFSF, frdiv_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 2, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(FmulVV16VFloat16VBVFVFVF_m, fmul_vv, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FmulVF16VFloat16VBVFVFSF_m, fmul_vf, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FmulVV32VFloat32VBVFVFVF_m, fmul_vv, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FmulVF32VFloat32VBVFVFSF_m, fmul_vf, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FmulVV64VFloat64VBVFVFVF_m, fmul_vv, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FmulVF64VFloat64VBVFVFSF_m, fmul_vf, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(FdivVV16VFloat16VBVFVFVF_m, fdiv_vv, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FdivVF16VFloat16VBVFVFSF_m, fdiv_vf, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FdivVV32VFloat32VBVFVFVF_m, fdiv_vv, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FdivVF32VFloat32VBVFVFSF_m, fdiv_vf, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FdivVV64VFloat64VBVFVFVF_m, fdiv_vv, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FdivVF64VFloat64VBVFVFSF_m, fdiv_vf, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) + +CUSTOM_OP_TYPE(FwaddVV16VFloat32VFVF, fwadd_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat32, 2, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FwaddVF16VFloat32VFSF, fwadd_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat32, 2, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FwaddWV16VFloat32VFVF, fwadd_wv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat32, 2, OneDFloat32, OneDFloat16) +CUSTOM_OP_TYPE(FwaddWX16VFloat32VFSF, fwadd_wf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat32, 2, OneDFloat32, ScalarFloat16) +CUSTOM_OP_TYPE(FwaddVV32VFloat64VFVF, fwadd_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat64, 2, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FwaddVF32VFloat64VFSF, fwadd_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat64, 2, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FwaddWV32VFloat64VFVF, fwadd_wv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat64, 2, OneDFloat64, OneDFloat32) +CUSTOM_OP_TYPE(FwaddWX32VFloat64VFSF, fwadd_wf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat64, 2, OneDFloat64, ScalarFloat32) +CUSTOM_OP_TYPE(FwsubVV16VFloat32VFVF, fwsub_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat32, 2, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FwsubVF16VFloat32VFSF, fwsub_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat32, 2, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FwsubWV16VFloat32VFVF, fwsub_wv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat32, 2, OneDFloat32, OneDFloat16) +CUSTOM_OP_TYPE(FwsubWX16VFloat32VFSF, fwsub_wf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat32, 2, OneDFloat32, ScalarFloat16) +CUSTOM_OP_TYPE(FwsubVV32VFloat64VFVF, fwsub_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat64, 2, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FwsubVF32VFloat64VFSF, fwsub_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat64, 2, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FwsubWV32VFloat64VFVF, fwsub_wv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat64, 2, OneDFloat64, OneDFloat32) +CUSTOM_OP_TYPE(FwsubWX32VFloat64VFSF, fwsub_wf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat64, 2, OneDFloat64, ScalarFloat32) +CUSTOM_OP_TYPE(FwaddVV16VFloat32VBVFVFVF_m, fwadd_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FwaddVF16VFloat32VBVFVFSF_m, fwadd_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FwaddWV16VFloat32VBVFVFVF_m, fwadd_wv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat16) +CUSTOM_OP_TYPE(FwaddWX16VFloat32VBVFVFSF_m, fwadd_wf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat16) +CUSTOM_OP_TYPE(FwaddVV32VFloat64VBVFVFVF_m, fwadd_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FwaddVF32VFloat64VBVFVFSF_m, fwadd_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FwaddWV32VFloat64VBVFVFVF_m, fwadd_wv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat32) +CUSTOM_OP_TYPE(FwaddWX32VFloat64VBVFVFSF_m, fwadd_wf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat32) +CUSTOM_OP_TYPE(FwsubVV16VFloat32VBVFVFVF_m, fwsub_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FwsubVF16VFloat32VBVFVFSF_m, fwsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FwsubWV16VFloat32VBVFVFVF_m, fwsub_wv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat16) +CUSTOM_OP_TYPE(FwsubWX16VFloat32VBVFVFSF_m, fwsub_wf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat16) +CUSTOM_OP_TYPE(FwsubVV32VFloat64VBVFVFVF_m, fwsub_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FwsubVF32VFloat64VBVFVFSF_m, fwsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FwsubWV32VFloat64VBVFVFVF_m, fwsub_wv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat32) +CUSTOM_OP_TYPE(FwsubWX32VFloat64VBVFVFSF_m, fwsub_wf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat32) + +CUSTOM_OP_TYPE(FwmulVV16VFloat32VFVF, fwmul_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat32, 2, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FwmulVF16VFloat32VFSF, fwmul_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat32, 2, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FwmulVV32VFloat64VFVF, fwmul_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat64, 2, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FwmulVF32VFloat64VFSF, fwmul_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat64, 2, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FwmulVV16VFloat32VBVFVFVF_m, fwmul_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FwmulVF16VFloat32VBVFVFSF_m, fwmul_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FwmulVV32VFloat64VBVFVFVF_m, fwmul_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FwmulVF32VFloat64VBVFVFSF_m, fwmul_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, ScalarFloat32) + +CUSTOM_OP_TYPE(FsqrtV16VFloat16VF, fsqrt_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 1, OneDFloat16) +CUSTOM_OP_TYPE(FsqrtV32VFloat32VF, fsqrt_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 1, OneDFloat32) +CUSTOM_OP_TYPE(FsqrtV64VFloat64VF, fsqrt_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 1, OneDFloat64) +CUSTOM_OP_TYPE(FsqrtV16VFloat16VBVFVF_m, fsqrt_v, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FsqrtV32VFloat32VBVFVF_m, fsqrt_v, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FsqrtV64VFloat64VBVFVF_m, fsqrt_v, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(Frsqrt7V16VFloat16VF, frsqrt7_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 1, OneDFloat16) +CUSTOM_OP_TYPE(Frsqrt7V32VFloat32VF, frsqrt7_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 1, OneDFloat32) +CUSTOM_OP_TYPE(Frsqrt7V64VFloat64VF, frsqrt7_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 1, OneDFloat64) +CUSTOM_OP_TYPE(Frsqrt7V16VFloat16VBVFVF_m, frsqrt7_v, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(Frsqrt7V32VFloat32VBVFVF_m, frsqrt7_v, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(Frsqrt7V64VFloat64VBVFVF_m, frsqrt7_v, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) + +CUSTOM_OP_TYPE(FmaccVV16VFloat16VFVFVF, fmacc_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FmaccVF16VFloat16VFSFVF, fmacc_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FmaccVV32VFloat32VFVFVF, fmacc_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FmaccVF32VFloat32VFSFVF, fmacc_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FmaccVV64VFloat64VFVFVF, fmacc_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FmaccVF64VFloat64VFSFVF, fmacc_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FnmaccVV16VFloat16VFVFVF, fnmacc_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FnmaccVF16VFloat16VFSFVF, fnmacc_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FnmaccVV32VFloat32VFVFVF, fnmacc_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FnmaccVF32VFloat32VFSFVF, fnmacc_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FnmaccVV64VFloat64VFVFVF, fnmacc_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FnmaccVF64VFloat64VFSFVF, fnmacc_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FmsacVV16VFloat16VFVFVF, fmsac_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FmsacVF16VFloat16VFSFVF, fmsac_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FmsacVV32VFloat32VFVFVF, fmsac_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FmsacVF32VFloat32VFSFVF, fmsac_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FmsacVV64VFloat64VFVFVF, fmsac_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FmsacVF64VFloat64VFSFVF, fmsac_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FnmsacVV16VFloat16VFVFVF, fnmsac_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FnmsacVF16VFloat16VFSFVF, fnmsac_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FnmsacVV32VFloat32VFVFVF, fnmsac_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FnmsacVF32VFloat32VFSFVF, fnmsac_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FnmsacVV64VFloat64VFVFVF, fnmsac_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FnmsacVF64VFloat64VFSFVF, fnmsac_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FmaddVV16VFloat16VFVFVF, fmadd_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FmaddVF16VFloat16VFSFVF, fmadd_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FmaddVV32VFloat32VFVFVF, fmadd_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FmaddVF32VFloat32VFSFVF, fmadd_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FmaddVV64VFloat64VFVFVF, fmadd_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FmaddVF64VFloat64VFSFVF, fmadd_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FnmaddVV16VFloat16VFVFVF, fnmadd_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FnmaddVF16VFloat16VFSFVF, fnmadd_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FnmaddVV32VFloat32VFVFVF, fnmadd_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FnmaddVF32VFloat32VFSFVF, fnmadd_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FnmaddVV64VFloat64VFVFVF, fnmadd_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FnmaddVF64VFloat64VFSFVF, fnmadd_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FmsubVV16VFloat16VFVFVF, fmsub_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FmsubVF16VFloat16VFSFVF, fmsub_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FmsubVV32VFloat32VFVFVF, fmsub_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FmsubVF32VFloat32VFSFVF, fmsub_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FmsubVV64VFloat64VFVFVF, fmsub_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FmsubVF64VFloat64VFSFVF, fmsub_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FnmsubVV16VFloat16VFVFVF, fnmsub_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FnmsubVF16VFloat16VFSFVF, fnmsub_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FnmsubVV32VFloat32VFVFVF, fnmsub_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FnmsubVF32VFloat32VFSFVF, fnmsub_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FnmsubVV64VFloat64VFVFVF, fnmsub_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FnmsubVF64VFloat64VFSFVF, fnmsub_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FmaccVV16VFloat16VBVFVFVF_m, fmacc_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FmaccVF16VFloat16VBVFSFVF_m, fmacc_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FmaccVV32VFloat32VBVFVFVF_m, fmacc_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FmaccVF32VFloat32VBVFSFVF_m, fmacc_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FmaccVV64VFloat64VBVFVFVF_m, fmacc_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FmaccVF64VFloat64VBVFSFVF_m, fmacc_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FnmaccVV16VFloat16VBVFVFVF_m, fnmacc_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FnmaccVF16VFloat16VBVFSFVF_m, fnmacc_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FnmaccVV32VFloat32VBVFVFVF_m, fnmacc_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FnmaccVF32VFloat32VBVFSFVF_m, fnmacc_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FnmaccVV64VFloat64VBVFVFVF_m, fnmacc_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FnmaccVF64VFloat64VBVFSFVF_m, fnmacc_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FmsacVV16VFloat16VBVFVFVF_m, fmsac_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FmsacVF16VFloat16VBVFSFVF_m, fmsac_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FmsacVV32VFloat32VBVFVFVF_m, fmsac_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FmsacVF32VFloat32VBVFSFVF_m, fmsac_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FmsacVV64VFloat64VBVFVFVF_m, fmsac_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FmsacVF64VFloat64VBVFSFVF_m, fmsac_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FnmsacVV16VFloat16VBVFVFVF_m, fnmsac_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FnmsacVF16VFloat16VBVFSFVF_m, fnmsac_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FnmsacVV32VFloat32VBVFVFVF_m, fnmsac_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FnmsacVF32VFloat32VBVFSFVF_m, fnmsac_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FnmsacVV64VFloat64VBVFVFVF_m, fnmsac_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FnmsacVF64VFloat64VBVFSFVF_m, fnmsac_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FmaddVV16VFloat16VBVFVFVF_m, fmadd_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FmaddVF16VFloat16VBVFSFVF_m, fmadd_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FmaddVV32VFloat32VBVFVFVF_m, fmadd_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FmaddVF32VFloat32VBVFSFVF_m, fmadd_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FmaddVV64VFloat64VBVFVFVF_m, fmadd_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FmaddVF64VFloat64VBVFSFVF_m, fmadd_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FnmaddVV16VFloat16VBVFVFVF_m, fnmadd_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FnmaddVF16VFloat16VBVFSFVF_m, fnmadd_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FnmaddVV32VFloat32VBVFVFVF_m, fnmadd_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FnmaddVF32VFloat32VBVFSFVF_m, fnmadd_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FnmaddVV64VFloat64VBVFVFVF_m, fnmadd_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FnmaddVF64VFloat64VBVFSFVF_m, fnmadd_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FmsubVV16VFloat16VBVFVFVF_m, fmsub_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FmsubVF16VFloat16VBVFSFVF_m, fmsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FmsubVV32VFloat32VBVFVFVF_m, fmsub_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FmsubVF32VFloat32VBVFSFVF_m, fmsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FmsubVV64VFloat64VBVFVFVF_m, fmsub_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FmsubVF64VFloat64VBVFSFVF_m, fmsub_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FnmsubVV16VFloat16VBVFVFVF_m, fnmsub_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FnmsubVF16VFloat16VBVFSFVF_m, fnmsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FnmsubVV32VFloat32VBVFVFVF_m, fnmsub_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FnmsubVF32VFloat32VBVFSFVF_m, fnmsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FnmsubVV64VFloat64VBVFVFVF_m, fnmsub_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FnmsubVF64VFloat64VBVFSFVF_m, fnmsub_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) + +CUSTOM_OP_TYPE(FwmaccVV16VFloat32VFVFVF, fwmacc_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDFloat32, 3, OneDFloat32, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FwmaccVF16VFloat32VFSFVF, fwmacc_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDFloat32, 3, OneDFloat32, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FwmaccVV32VFloat64VFVFVF, fwmacc_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDFloat64, 3, OneDFloat64, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FwmaccVF32VFloat64VFSFVF, fwmacc_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDFloat64, 3, OneDFloat64, ScalarFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FwnmaccVV16VFloat32VFVFVF, fwnmacc_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDFloat32, 3, OneDFloat32, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FwnmaccVF16VFloat32VFSFVF, fwnmacc_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDFloat32, 3, OneDFloat32, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FwnmaccVV32VFloat64VFVFVF, fwnmacc_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDFloat64, 3, OneDFloat64, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FwnmaccVF32VFloat64VFSFVF, fwnmacc_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDFloat64, 3, OneDFloat64, ScalarFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FwmsacVV16VFloat32VFVFVF, fwmsac_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDFloat32, 3, OneDFloat32, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FwmsacVF16VFloat32VFSFVF, fwmsac_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDFloat32, 3, OneDFloat32, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FwmsacVV32VFloat64VFVFVF, fwmsac_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDFloat64, 3, OneDFloat64, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FwmsacVF32VFloat64VFSFVF, fwmsac_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDFloat64, 3, OneDFloat64, ScalarFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FwnmsacVV16VFloat32VFVFVF, fwnmsac_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDFloat32, 3, OneDFloat32, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FwnmsacVF16VFloat32VFSFVF, fwnmsac_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDFloat32, 3, OneDFloat32, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FwnmsacVV32VFloat64VFVFVF, fwnmsac_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDFloat64, 3, OneDFloat64, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FwnmsacVF32VFloat64VFSFVF, fwnmsac_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | WideningOperation, OneDFloat64, 3, OneDFloat64, ScalarFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FwmaccVV16VFloat32VBVFVFVF_m, fwmacc_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FwmaccVF16VFloat32VBVFSFVF_m, fwmacc_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FwmaccVV32VFloat64VBVFVFVF_m, fwmacc_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FwmaccVF32VFloat64VBVFSFVF_m, fwmacc_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FwnmaccVV16VFloat32VBVFVFVF_m, fwnmacc_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FwnmaccVF16VFloat32VBVFSFVF_m, fwnmacc_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FwnmaccVV32VFloat64VBVFVFVF_m, fwnmacc_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FwnmaccVF32VFloat64VBVFSFVF_m, fwnmacc_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FwmsacVV16VFloat32VBVFVFVF_m, fwmsac_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FwmsacVF16VFloat32VBVFSFVF_m, fwmsac_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FwmsacVV32VFloat64VBVFVFVF_m, fwmsac_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FwmsacVF32VFloat64VBVFSFVF_m, fwmsac_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FwnmsacVV16VFloat32VBVFVFVF_m, fwnmsac_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FwnmsacVF16VFloat32VBVFSFVF_m, fwnmsac_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FwnmsacVV32VFloat64VBVFVFVF_m, fwnmsac_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FwnmsacVF32VFloat64VBVFSFVF_m, fwnmsac_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | WideningOperation, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat32, OneDFloat32) + +CUSTOM_OP_TYPE(FminVV16VFloat16VFVF, fmin_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 2, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FminVF16VFloat16VFSF, fmin_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 2, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FminVV32VFloat32VFVF, fmin_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 2, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FminVF32VFloat32VFSF, fmin_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 2, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FminVV64VFloat64VFVF, fmin_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 2, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FminVF64VFloat64VFSF, fmin_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 2, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(FmaxVV16VFloat16VFVF, fmax_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 2, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FmaxVF16VFloat16VFSF, fmax_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 2, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FmaxVV32VFloat32VFVF, fmax_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 2, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FmaxVF32VFloat32VFSF, fmax_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 2, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FmaxVV64VFloat64VFVF, fmax_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 2, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FmaxVF64VFloat64VFSF, fmax_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 2, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(FminVV16VFloat16VBVFVFVF_m, fmin_vv, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FminVF16VFloat16VBVFVFSF_m, fmin_vf, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FminVV32VFloat32VBVFVFVF_m, fmin_vv, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FminVF32VFloat32VBVFVFSF_m, fmin_vf, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FminVV64VFloat64VBVFVFVF_m, fmin_vv, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FminVF64VFloat64VBVFVFSF_m, fmin_vf, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(FmaxVV16VFloat16VBVFVFVF_m, fmax_vv, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FmaxVF16VFloat16VBVFVFSF_m, fmax_vf, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(FmaxVV32VFloat32VBVFVFVF_m, fmax_vv, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FmaxVF32VFloat32VBVFVFSF_m, fmax_vf, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(FmaxVV64VFloat64VBVFVFVF_m, fmax_vv, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FmaxVF64VFloat64VBVFVFSF_m, fmax_vf, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) + +CUSTOM_OP_TYPE(MergeVVM16VFloat16VBVFVF, merge_vvm, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MergeOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(FmergeVFM16VFloat16VBVFSF, fmerge_vfm, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MergeOperation, OneDFloat16, 3, OneDBool, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(MergeVVM32VFloat32VBVFVF, merge_vvm, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MergeOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(FmergeVFM32VFloat32VBVFSF, fmerge_vfm, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MergeOperation, OneDFloat32, 3, OneDBool, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(MergeVVM64VFloat64VBVFVF, merge_vvm, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MergeOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(FmergeVFM64VFloat64VBVFSF, fmerge_vfm, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MergeOperation, OneDFloat64, 3, OneDBool, OneDFloat64, ScalarFloat64) + +CUSTOM_OP_TYPE(MfeqVV16VBoolVFVF, mfeq_vv, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(MfeqVF16VBoolVFSF, mfeq_vf, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(MfeqVV32VBoolVFVF, mfeq_vv, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(MfeqVF32VBoolVFSF, mfeq_vf, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(MfeqVV64VBoolVFVF, mfeq_vv, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(MfeqVF64VBoolVFSF, mfeq_vf, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(MfneVV16VBoolVFVF, mfne_vv, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(MfneVF16VBoolVFSF, mfne_vf, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(MfneVV32VBoolVFVF, mfne_vv, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(MfneVF32VBoolVFSF, mfne_vf, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(MfneVV64VBoolVFVF, mfne_vv, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(MfneVF64VBoolVFSF, mfne_vf, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(MfltVV16VBoolVFVF, mflt_vv, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(MfltVF16VBoolVFSF, mflt_vf, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(MfltVV32VBoolVFVF, mflt_vv, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(MfltVF32VBoolVFSF, mflt_vf, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(MfltVV64VBoolVFVF, mflt_vv, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(MfltVF64VBoolVFSF, mflt_vf, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(MfleVV16VBoolVFVF, mfle_vv, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(MfleVF16VBoolVFSF, mfle_vf, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(MfleVV32VBoolVFVF, mfle_vv, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(MfleVF32VBoolVFSF, mfle_vf, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(MfleVV64VBoolVFVF, mfle_vv, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(MfleVF64VBoolVFSF, mfle_vf, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(MfgtVV16VBoolVFVF, mfgt_vv, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(MfgtVF16VBoolVFSF, mfgt_vf, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(MfgtVV32VBoolVFVF, mfgt_vv, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(MfgtVF32VBoolVFSF, mfgt_vf, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(MfgtVV64VBoolVFVF, mfgt_vv, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(MfgtVF64VBoolVFSF, mfgt_vf, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(MfgeVV16VBoolVFVF, mfge_vv, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(MfgeVF16VBoolVFSF, mfge_vf, 16, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(MfgeVV32VBoolVFVF, mfge_vv, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(MfgeVF32VBoolVFSF, mfge_vf, 32, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(MfgeVV64VBoolVFVF, mfge_vv, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(MfgeVF64VBoolVFSF, mfge_vf, 64, BOOL, HaveVLParameter | NonmaskedOperation, OneDBool, 2, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(MfeqVV16VBoolVBVBVFVF_m, mfeq_vv, 16, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(MfeqVF16VBoolVBVBVFSF_m, mfeq_vf, 16, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(MfeqVV32VBoolVBVBVFVF_m, mfeq_vv, 32, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(MfeqVF32VBoolVBVBVFSF_m, mfeq_vf, 32, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(MfeqVV64VBoolVBVBVFVF_m, mfeq_vv, 64, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(MfeqVF64VBoolVBVBVFSF_m, mfeq_vf, 64, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(MfneVV16VBoolVBVBVFVF_m, mfne_vv, 16, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(MfneVF16VBoolVBVBVFSF_m, mfne_vf, 16, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(MfneVV32VBoolVBVBVFVF_m, mfne_vv, 32, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(MfneVF32VBoolVBVBVFSF_m, mfne_vf, 32, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(MfneVV64VBoolVBVBVFVF_m, mfne_vv, 64, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(MfneVF64VBoolVBVBVFSF_m, mfne_vf, 64, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(MfltVV16VBoolVBVBVFVF_m, mflt_vv, 16, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(MfltVF16VBoolVBVBVFSF_m, mflt_vf, 16, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(MfltVV32VBoolVBVBVFVF_m, mflt_vv, 32, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(MfltVF32VBoolVBVBVFSF_m, mflt_vf, 32, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(MfltVV64VBoolVBVBVFVF_m, mflt_vv, 64, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(MfltVF64VBoolVBVBVFSF_m, mflt_vf, 64, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(MfleVV16VBoolVBVBVFVF_m, mfle_vv, 16, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(MfleVF16VBoolVBVBVFSF_m, mfle_vf, 16, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(MfleVV32VBoolVBVBVFVF_m, mfle_vv, 32, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(MfleVF32VBoolVBVBVFSF_m, mfle_vf, 32, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(MfleVV64VBoolVBVBVFVF_m, mfle_vv, 64, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(MfleVF64VBoolVBVBVFSF_m, mfle_vf, 64, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(MfgtVV16VBoolVBVBVFVF_m, mfgt_vv, 16, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(MfgtVF16VBoolVBVBVFSF_m, mfgt_vf, 16, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(MfgtVV32VBoolVBVBVFVF_m, mfgt_vv, 32, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(MfgtVF32VBoolVBVBVFSF_m, mfgt_vf, 32, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(MfgtVV64VBoolVBVBVFVF_m, mfgt_vv, 64, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(MfgtVF64VBoolVBVBVFSF_m, mfgt_vf, 64, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, ScalarFloat64) +CUSTOM_OP_TYPE(MfgeVV16VBoolVBVBVFVF_m, mfge_vv, 16, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(MfgeVF16VBoolVBVBVFSF_m, mfge_vf, 16, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, ScalarFloat16) +CUSTOM_OP_TYPE(MfgeVV32VBoolVBVBVFVF_m, mfge_vv, 32, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(MfgeVF32VBoolVBVBVFSF_m, mfge_vf, 32, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, ScalarFloat32) +CUSTOM_OP_TYPE(MfgeVV64VBoolVBVBVFVF_m, mfge_vv, 64, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, OneDFloat64) +CUSTOM_OP_TYPE(MfgeVF64VBoolVBVBVFSF_m, mfge_vf, 64, BOOL, HaveVLParameter | MaskedOperation, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, ScalarFloat64) + +CUSTOM_OP_TYPE(FclassV16VUInt16VF, fclass_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 1, OneDFloat16) +CUSTOM_OP_TYPE(FclassV32VUInt32VF, fclass_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 1, OneDFloat32) +CUSTOM_OP_TYPE(FclassV64VUInt64VF, fclass_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 1, OneDFloat64) +CUSTOM_OP_TYPE(FclassV16VUInt16VBVUVF_m, fclass_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDFloat16) +CUSTOM_OP_TYPE(FclassV32VUInt32VBVUVF_m, fclass_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat32) +CUSTOM_OP_TYPE(FclassV64VUInt64VBVUVF_m, fclass_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDFloat64) + +CUSTOM_OP_TYPE(FcvtV16VInt16VF, fcvt_x_f_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 1, OneDFloat16) +CUSTOM_OP_TYPE(Fcvt_rtzV16VInt16VF, fcvt_rtz_x_f_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt16, 1, OneDFloat16) +CUSTOM_OP_TYPE(FcvtV16VUInt16VF, fcvt_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 1, OneDFloat16) +CUSTOM_OP_TYPE(Fcvt_rtzV16VUInt16VF, fcvt_rtz_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 1, OneDFloat16) +CUSTOM_OP_TYPE(FcvtV16VFloat16VI, fcvt_f_x_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 1, OneDInt16) +CUSTOM_OP_TYPE(FcvtV16VFloat16VU, fcvt_f_xu_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 1, OneDUInt16) +CUSTOM_OP_TYPE(FcvtV32VInt32VF, fcvt_x_f_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 1, OneDFloat32) +CUSTOM_OP_TYPE(Fcvt_rtzV32VInt32VF, fcvt_rtz_x_f_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt32, 1, OneDFloat32) +CUSTOM_OP_TYPE(FcvtV32VUInt32VF, fcvt_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 1, OneDFloat32) +CUSTOM_OP_TYPE(Fcvt_rtzV32VUInt32VF, fcvt_rtz_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 1, OneDFloat32) +CUSTOM_OP_TYPE(FcvtV32VFloat32VI, fcvt_f_x_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 1, OneDInt32) +CUSTOM_OP_TYPE(FcvtV32VFloat32VU, fcvt_f_xu_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 1, OneDUInt32) +CUSTOM_OP_TYPE(FcvtV64VInt64VF, fcvt_x_f_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 1, OneDFloat64) +CUSTOM_OP_TYPE(Fcvt_rtzV64VInt64VF, fcvt_rtz_x_f_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDInt64, 1, OneDFloat64) +CUSTOM_OP_TYPE(FcvtV64VUInt64VF, fcvt_xu_f_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 1, OneDFloat64) +CUSTOM_OP_TYPE(Fcvt_rtzV64VUInt64VF, fcvt_rtz_xu_f_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 1, OneDFloat64) +CUSTOM_OP_TYPE(FcvtV64VFloat64VI, fcvt_f_x_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 1, OneDInt64) +CUSTOM_OP_TYPE(FcvtV64VFloat64VU, fcvt_f_xu_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 1, OneDUInt64) +CUSTOM_OP_TYPE(FcvtV16VInt16VBVIVF_m, fcvt_x_f_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDFloat16) +CUSTOM_OP_TYPE(Fcvt_rtzV16VInt16VBVIVF_m, fcvt_rtz_x_f_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDFloat16) +CUSTOM_OP_TYPE(FcvtV16VUInt16VBVUVF_m, fcvt_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDFloat16) +CUSTOM_OP_TYPE(Fcvt_rtzV16VUInt16VBVUVF_m, fcvt_rtz_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDFloat16) +CUSTOM_OP_TYPE(FcvtV16VFloat16VBVFVI_m, fcvt_f_x_v, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDInt16) +CUSTOM_OP_TYPE(FcvtV16VFloat16VBVFVU_m, fcvt_f_xu_v, 16, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt16) +CUSTOM_OP_TYPE(FcvtV32VInt32VBVIVF_m, fcvt_x_f_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat32) +CUSTOM_OP_TYPE(Fcvt_rtzV32VInt32VBVIVF_m, fcvt_rtz_x_f_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat32) +CUSTOM_OP_TYPE(FcvtV32VUInt32VBVUVF_m, fcvt_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat32) +CUSTOM_OP_TYPE(Fcvt_rtzV32VUInt32VBVUVF_m, fcvt_rtz_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat32) +CUSTOM_OP_TYPE(FcvtV32VFloat32VBVFVI_m, fcvt_f_x_v, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDInt32) +CUSTOM_OP_TYPE(FcvtV32VFloat32VBVFVU_m, fcvt_f_xu_v, 32, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt32) +CUSTOM_OP_TYPE(FcvtV64VInt64VBVIVF_m, fcvt_x_f_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDFloat64) +CUSTOM_OP_TYPE(Fcvt_rtzV64VInt64VBVIVF_m, fcvt_rtz_x_f_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDFloat64) +CUSTOM_OP_TYPE(FcvtV64VUInt64VBVUVF_m, fcvt_xu_f_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDFloat64) +CUSTOM_OP_TYPE(Fcvt_rtzV64VUInt64VBVUVF_m, fcvt_rtz_xu_f_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDFloat64) +CUSTOM_OP_TYPE(FcvtV64VFloat64VBVFVI_m, fcvt_f_x_v, 64, FLOAT, HaveVLParameter | MaskedOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDInt64) + +CUSTOM_OP_TYPE(FwcvtV8VFloat16VI, fwcvt_f_x_v, 8, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat16, 1, OneDInt8) +CUSTOM_OP_TYPE(FwcvtV8VFloat16VU, fwcvt_f_xu_v, 8, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat16, 1, OneDUInt8) +CUSTOM_OP_TYPE(FwcvtV16VInt32VF, fwcvt_x_f_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt32, 1, OneDFloat16) +CUSTOM_OP_TYPE(Fwcvt_rtzV16VInt32VF, fwcvt_rtz_x_f_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt32, 1, OneDFloat16) +CUSTOM_OP_TYPE(FwcvtV16VUInt32VF, fwcvt_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt32, 1, OneDFloat16) +CUSTOM_OP_TYPE(Fwcvt_rtzV16VUInt32VF, fwcvt_rtz_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt32, 1, OneDFloat16) +CUSTOM_OP_TYPE(FwcvtV16VFloat32VI, fwcvt_f_x_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat32, 1, OneDInt16) +CUSTOM_OP_TYPE(FwcvtV16VFloat32VU, fwcvt_f_xu_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat32, 1, OneDUInt16) +CUSTOM_OP_TYPE(FwcvtV16VFloat32VF, fwcvt_f_f_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat32, 1, OneDFloat16) +CUSTOM_OP_TYPE(FwcvtV32VInt64VF, fwcvt_x_f_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt64, 1, OneDFloat32) +CUSTOM_OP_TYPE(Fwcvt_rtzV32VInt64VF, fwcvt_rtz_x_f_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDInt64, 1, OneDFloat32) +CUSTOM_OP_TYPE(FwcvtV32VUInt64VF, fwcvt_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt64, 1, OneDFloat32) +CUSTOM_OP_TYPE(Fwcvt_rtzV32VUInt64VF, fwcvt_rtz_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDUInt64, 1, OneDFloat32) +CUSTOM_OP_TYPE(FwcvtV32VFloat64VI, fwcvt_f_x_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat64, 1, OneDInt32) +CUSTOM_OP_TYPE(FwcvtV32VFloat64VU, fwcvt_f_xu_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat64, 1, OneDUInt32) +CUSTOM_OP_TYPE(FwcvtV32VFloat64VF, fwcvt_f_f_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation, OneDFloat64, 1, OneDFloat32) +CUSTOM_OP_TYPE(FwcvtV8VFloat16VBVFVI_m, fwcvt_f_x_v, 8, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDInt8) +CUSTOM_OP_TYPE(FwcvtV8VFloat16VBVFVU_m, fwcvt_f_xu_v, 8, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt8) +CUSTOM_OP_TYPE(FwcvtV16VInt32VBVIVF_m, fwcvt_x_f_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat16) +CUSTOM_OP_TYPE(Fwcvt_rtzV16VInt32VBVIVF_m, fwcvt_rtz_x_f_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat16) +CUSTOM_OP_TYPE(FwcvtV16VUInt32VBVUVF_m, fwcvt_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat16) +CUSTOM_OP_TYPE(Fwcvt_rtzV16VUInt32VBVUVF_m, fwcvt_rtz_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat16) +CUSTOM_OP_TYPE(FwcvtV16VFloat32VBVFVI_m, fwcvt_f_x_v, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDInt16) +CUSTOM_OP_TYPE(FwcvtV16VFloat32VBVFVU_m, fwcvt_f_xu_v, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt16) +CUSTOM_OP_TYPE(FwcvtV16VFloat32VBVFVF_m, fwcvt_f_f_v, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat16) +CUSTOM_OP_TYPE(FwcvtV32VInt64VBVIVF_m, fwcvt_x_f_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDFloat32) +CUSTOM_OP_TYPE(Fwcvt_rtzV32VInt64VBVIVF_m, fwcvt_rtz_x_f_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDFloat32) +CUSTOM_OP_TYPE(FwcvtV32VUInt64VBVUVF_m, fwcvt_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDFloat32) +CUSTOM_OP_TYPE(Fwcvt_rtzV32VUInt64VBVUVF_m, fwcvt_rtz_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDFloat32) +CUSTOM_OP_TYPE(FwcvtV32VFloat64VBVFVI_m, fwcvt_f_x_v, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDInt32) +CUSTOM_OP_TYPE(FwcvtV32VFloat64VBVFVU_m, fwcvt_f_xu_v, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDUInt32) +CUSTOM_OP_TYPE(FwcvtV32VFloat64VBVFVF_m, fwcvt_f_f_v, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat32) + +CUSTOM_OP_TYPE(FncvtV16VInt8VF, fncvt_x_f_w, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDInt8, 1, OneDFloat16) +CUSTOM_OP_TYPE(Fncvt_rtzV16VInt8VF, fncvt_rtz_x_f_w, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDInt8, 1, OneDFloat16) +CUSTOM_OP_TYPE(FncvtV16VUInt8VF, fncvt_xu_f_w, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDUInt8, 1, OneDFloat16) +CUSTOM_OP_TYPE(Fncvt_rtzV16VUInt8VF, fncvt_rtz_xu_f_w, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDUInt8, 1, OneDFloat16) +CUSTOM_OP_TYPE(FncvtV32VInt16VF, fncvt_x_f_w, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDInt16, 1, OneDFloat32) +CUSTOM_OP_TYPE(Fncvt_rtzV32VInt16VF, fncvt_rtz_x_f_w, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDInt16, 1, OneDFloat32) +CUSTOM_OP_TYPE(FncvtV32VUInt16VF, fncvt_xu_f_w, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDUInt16, 1, OneDFloat32) +CUSTOM_OP_TYPE(Fncvt_rtzV32VUInt16VF, fncvt_rtz_xu_f_w, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDUInt16, 1, OneDFloat32) +CUSTOM_OP_TYPE(FncvtV32VFloat16VI, fncvt_f_x_w, 32, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDFloat16, 1, OneDInt32) +CUSTOM_OP_TYPE(FncvtV32VFloat16VU, fncvt_f_xu_w, 32, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDFloat16, 1, OneDUInt32) +CUSTOM_OP_TYPE(FncvtV32VFloat16VF, fncvt_f_f_w, 32, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDFloat16, 1, OneDFloat32) +CUSTOM_OP_TYPE(Fncvt_rodV32VFloat16VF, fncvt_rod_f_f_w, 32, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDFloat16, 1, OneDFloat32) +CUSTOM_OP_TYPE(FncvtV64VInt32VF, fncvt_x_f_w, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDInt32, 1, OneDFloat64) +CUSTOM_OP_TYPE(Fncvt_rtzV64VInt32VF, fncvt_rtz_x_f_w, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDInt32, 1, OneDFloat64) +CUSTOM_OP_TYPE(FncvtV64VUInt32VF, fncvt_xu_f_w, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDUInt32, 1, OneDFloat64) +CUSTOM_OP_TYPE(Fncvt_rtzV64VUInt32VF, fncvt_rtz_xu_f_w, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDUInt32, 1, OneDFloat64) +CUSTOM_OP_TYPE(FncvtV64VFloat32VI, fncvt_f_x_w, 64, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDFloat32, 1, OneDInt64) +CUSTOM_OP_TYPE(FncvtV64VFloat32VU, fncvt_f_xu_w, 64, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDFloat32, 1, OneDUInt64) +CUSTOM_OP_TYPE(FncvtV64VFloat32VF, fncvt_f_f_w, 64, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDFloat32, 1, OneDFloat64) +CUSTOM_OP_TYPE(Fncvt_rodV64VFloat32VF, fncvt_rod_f_f_w, 64, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation, OneDFloat32, 1, OneDFloat64) +CUSTOM_OP_TYPE(FncvtV16VInt8VBVIVF_m, fncvt_x_f_w, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDInt8, 3, OneDBool, OneDInt8, OneDFloat16) +CUSTOM_OP_TYPE(Fncvt_rtzV16VInt8VBVIVF_m, fncvt_rtz_x_f_w, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDInt8, 3, OneDBool, OneDInt8, OneDFloat16) +CUSTOM_OP_TYPE(FncvtV16VUInt8VBVUVF_m, fncvt_xu_f_w, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDUInt8, 3, OneDBool, OneDUInt8, OneDFloat16) +CUSTOM_OP_TYPE(Fncvt_rtzV16VUInt8VBVUVF_m, fncvt_rtz_xu_f_w, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDUInt8, 3, OneDBool, OneDUInt8, OneDFloat16) +CUSTOM_OP_TYPE(FncvtV32VInt16VBVIVF_m, fncvt_x_f_w, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDFloat32) +CUSTOM_OP_TYPE(Fncvt_rtzV32VInt16VBVIVF_m, fncvt_rtz_x_f_w, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDFloat32) +CUSTOM_OP_TYPE(FncvtV32VUInt16VBVUVF_m, fncvt_xu_f_w, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDFloat32) +CUSTOM_OP_TYPE(Fncvt_rtzV32VUInt16VBVUVF_m, fncvt_rtz_xu_f_w, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDFloat32) +CUSTOM_OP_TYPE(FncvtV32VFloat16VBVFVI_m, fncvt_f_x_w, 32, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDInt32) +CUSTOM_OP_TYPE(FncvtV32VFloat16VBVFVU_m, fncvt_f_xu_w, 32, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt32) +CUSTOM_OP_TYPE(FncvtV32VFloat16VBVFVF_m, fncvt_f_f_w, 32, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat32) +CUSTOM_OP_TYPE(Fncvt_rodV32VFloat16VBVFVF_m, fncvt_rod_f_f_w, 32, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat32) +CUSTOM_OP_TYPE(FncvtV64VInt32VBVIVF_m, fncvt_x_f_w, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat64) +CUSTOM_OP_TYPE(Fncvt_rtzV64VInt32VBVIVF_m, fncvt_rtz_x_f_w, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat64) +CUSTOM_OP_TYPE(FncvtV64VUInt32VBVUVF_m, fncvt_xu_f_w, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat64) +CUSTOM_OP_TYPE(Fncvt_rtzV64VUInt32VBVUVF_m, fncvt_rtz_xu_f_w, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat64) +CUSTOM_OP_TYPE(FncvtV64VFloat32VBVFVI_m, fncvt_f_x_w, 64, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDInt64) +CUSTOM_OP_TYPE(FncvtV64VFloat32VBVFVU_m, fncvt_f_xu_w, 64, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt64) +CUSTOM_OP_TYPE(FncvtV64VFloat32VBVFVF_m, fncvt_f_f_w, 64, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat64) +CUSTOM_OP_TYPE(Fncvt_rodV64VFloat32VBVFVF_m, fncvt_rod_f_f_w, 64, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat64) + +CUSTOM_OP_TYPE(FmvF16VFloat16SF, fmv_v_f, 16, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat16, 1, ScalarFloat16) +CUSTOM_OP_TYPE(FmvF32VFloat32SF, fmv_v_f, 32, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat32, 1, ScalarFloat32) +CUSTOM_OP_TYPE(FmvF64VFloat64SF, fmv_v_f, 64, FLOAT, HaveVLParameter | NonmaskedOperation, OneDFloat64, 1, ScalarFloat64) + +CUSTOM_OP_TYPE(RedsumVS8SInt8VI, redsum_vs, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt8, 1, OneDInt8) +CUSTOM_OP_TYPE(RedsumVS16SInt16VI, redsum_vs, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt16, 1, OneDInt16) +CUSTOM_OP_TYPE(RedsumVS32SInt32VI, redsum_vs, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt32, 1, OneDInt32) +CUSTOM_OP_TYPE(RedsumVS64SInt64VI, redsum_vs, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt64, 1, OneDInt64) +CUSTOM_OP_TYPE(RedsumVS8SUInt8VU, redsum_vs, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt8, 1, OneDUInt8) +CUSTOM_OP_TYPE(RedsumVS16SUInt16VU, redsum_vs, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt16, 1, OneDUInt16) +CUSTOM_OP_TYPE(RedsumVS32SUInt32VU, redsum_vs, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt32, 1, OneDUInt32) +CUSTOM_OP_TYPE(RedsumVS64SUInt64VU, redsum_vs, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt64, 1, OneDUInt64) +CUSTOM_OP_TYPE(RedmaxVS8SInt8VI, redmax_vs, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt8, 1, OneDInt8) +CUSTOM_OP_TYPE(RedmaxVS16SInt16VI, redmax_vs, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt16, 1, OneDInt16) +CUSTOM_OP_TYPE(RedmaxVS32SInt32VI, redmax_vs, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt32, 1, OneDInt32) +CUSTOM_OP_TYPE(RedmaxVS64SInt64VI, redmax_vs, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt64, 1, OneDInt64) +CUSTOM_OP_TYPE(RedmaxuVS8SUInt8VU, redmaxu_vs, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt8, 1, OneDUInt8) +CUSTOM_OP_TYPE(RedmaxuVS16SUInt16VU, redmaxu_vs, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt16, 1, OneDUInt16) +CUSTOM_OP_TYPE(RedmaxuVS32SUInt32VU, redmaxu_vs, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt32, 1, OneDUInt32) +CUSTOM_OP_TYPE(RedmaxuVS64SUInt64VU, redmaxu_vs, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt64, 1, OneDUInt64) +CUSTOM_OP_TYPE(RedminVS8SInt8VI, redmin_vs, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt8, 1, OneDInt8) +CUSTOM_OP_TYPE(RedminVS16SInt16VI, redmin_vs, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt16, 1, OneDInt16) +CUSTOM_OP_TYPE(RedminVS32SInt32VI, redmin_vs, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt32, 1, OneDInt32) +CUSTOM_OP_TYPE(RedminVS64SInt64VI, redmin_vs, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt64, 1, OneDInt64) +CUSTOM_OP_TYPE(RedminuVS8SUInt8VU, redminu_vs, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt8, 1, OneDUInt8) +CUSTOM_OP_TYPE(RedminuVS16SUInt16VU, redminu_vs, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt16, 1, OneDUInt16) +CUSTOM_OP_TYPE(RedminuVS32SUInt32VU, redminu_vs, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt32, 1, OneDUInt32) +CUSTOM_OP_TYPE(RedminuVS64SUInt64VU, redminu_vs, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt64, 1, OneDUInt64) +CUSTOM_OP_TYPE(RedandVS8SInt8VI, redand_vs, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt8, 1, OneDInt8) +CUSTOM_OP_TYPE(RedandVS16SInt16VI, redand_vs, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt16, 1, OneDInt16) +CUSTOM_OP_TYPE(RedandVS32SInt32VI, redand_vs, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt32, 1, OneDInt32) +CUSTOM_OP_TYPE(RedandVS64SInt64VI, redand_vs, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt64, 1, OneDInt64) +CUSTOM_OP_TYPE(RedandVS8SUInt8VU, redand_vs, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt8, 1, OneDUInt8) +CUSTOM_OP_TYPE(RedandVS16SUInt16VU, redand_vs, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt16, 1, OneDUInt16) +CUSTOM_OP_TYPE(RedandVS32SUInt32VU, redand_vs, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt32, 1, OneDUInt32) +CUSTOM_OP_TYPE(RedandVS64SUInt64VU, redand_vs, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt64, 1, OneDUInt64) +CUSTOM_OP_TYPE(RedorVS8SInt8VI, redor_vs, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt8, 1, OneDInt8) +CUSTOM_OP_TYPE(RedorVS16SInt16VI, redor_vs, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt16, 1, OneDInt16) +CUSTOM_OP_TYPE(RedorVS32SInt32VI, redor_vs, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt32, 1, OneDInt32) +CUSTOM_OP_TYPE(RedorVS64SInt64VI, redor_vs, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt64, 1, OneDInt64) +CUSTOM_OP_TYPE(RedorVS8SUInt8VU, redor_vs, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt8, 1, OneDUInt8) +CUSTOM_OP_TYPE(RedorVS16SUInt16VU, redor_vs, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt16, 1, OneDUInt16) +CUSTOM_OP_TYPE(RedorVS32SUInt32VU, redor_vs, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt32, 1, OneDUInt32) +CUSTOM_OP_TYPE(RedorVS64SUInt64VU, redor_vs, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt64, 1, OneDUInt64) +CUSTOM_OP_TYPE(RedxorVS8SInt8VI, redxor_vs, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt8, 1, OneDInt8) +CUSTOM_OP_TYPE(RedxorVS16SInt16VI, redxor_vs, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt16, 1, OneDInt16) +CUSTOM_OP_TYPE(RedxorVS32SInt32VI, redxor_vs, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt32, 1, OneDInt32) +CUSTOM_OP_TYPE(RedxorVS64SInt64VI, redxor_vs, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt64, 1, OneDInt64) +CUSTOM_OP_TYPE(RedxorVS8SUInt8VU, redxor_vs, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt8, 1, OneDUInt8) +CUSTOM_OP_TYPE(RedxorVS16SUInt16VU, redxor_vs, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt16, 1, OneDUInt16) +CUSTOM_OP_TYPE(RedxorVS32SUInt32VU, redxor_vs, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt32, 1, OneDUInt32) +CUSTOM_OP_TYPE(RedxorVS64SUInt64VU, redxor_vs, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt64, 1, OneDUInt64) +CUSTOM_OP_TYPE(RedsumVS8SInt8VBVI_m, redsum_vs, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt8, 2, OneDBool, OneDInt8) +CUSTOM_OP_TYPE(RedsumVS16SInt16VBVI_m, redsum_vs, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt16, 2, OneDBool, OneDInt16) +CUSTOM_OP_TYPE(RedsumVS32SInt32VBVI_m, redsum_vs, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt32, 2, OneDBool, OneDInt32) +CUSTOM_OP_TYPE(RedsumVS64SInt64VBVI_m, redsum_vs, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt64, 2, OneDBool, OneDInt64) +CUSTOM_OP_TYPE(RedsumVS8SUInt8VBVU_m, redsum_vs, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt8, 2, OneDBool, OneDUInt8) +CUSTOM_OP_TYPE(RedsumVS16SUInt16VBVU_m, redsum_vs, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt16, 2, OneDBool, OneDUInt16) +CUSTOM_OP_TYPE(RedsumVS32SUInt32VBVU_m, redsum_vs, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt32, 2, OneDBool, OneDUInt32) +CUSTOM_OP_TYPE(RedsumVS64SUInt64VBVU_m, redsum_vs, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt64, 2, OneDBool, OneDUInt64) +CUSTOM_OP_TYPE(RedmaxVS8SInt8VBVI_m, redmax_vs, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt8, 2, OneDBool, OneDInt8) +CUSTOM_OP_TYPE(RedmaxVS16SInt16VBVI_m, redmax_vs, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt16, 2, OneDBool, OneDInt16) +CUSTOM_OP_TYPE(RedmaxVS32SInt32VBVI_m, redmax_vs, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt32, 2, OneDBool, OneDInt32) +CUSTOM_OP_TYPE(RedmaxVS64SInt64VBVI_m, redmax_vs, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt64, 2, OneDBool, OneDInt64) +CUSTOM_OP_TYPE(RedmaxuVS8SUInt8VBVU_m, redmaxu_vs, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt8, 2, OneDBool, OneDUInt8) +CUSTOM_OP_TYPE(RedmaxuVS16SUInt16VBVU_m, redmaxu_vs, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt16, 2, OneDBool, OneDUInt16) +CUSTOM_OP_TYPE(RedmaxuVS32SUInt32VBVU_m, redmaxu_vs, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt32, 2, OneDBool, OneDUInt32) +CUSTOM_OP_TYPE(RedmaxuVS64SUInt64VBVU_m, redmaxu_vs, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt64, 2, OneDBool, OneDUInt64) +CUSTOM_OP_TYPE(RedminVS8SInt8VBVI_m, redmin_vs, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt8, 2, OneDBool, OneDInt8) +CUSTOM_OP_TYPE(RedminVS16SInt16VBVI_m, redmin_vs, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt16, 2, OneDBool, OneDInt16) +CUSTOM_OP_TYPE(RedminVS32SInt32VBVI_m, redmin_vs, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt32, 2, OneDBool, OneDInt32) +CUSTOM_OP_TYPE(RedminVS64SInt64VBVI_m, redmin_vs, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt64, 2, OneDBool, OneDInt64) +CUSTOM_OP_TYPE(RedminuVS8SUInt8VBVU_m, redminu_vs, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt8, 2, OneDBool, OneDUInt8) +CUSTOM_OP_TYPE(RedminuVS16SUInt16VBVU_m, redminu_vs, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt16, 2, OneDBool, OneDUInt16) +CUSTOM_OP_TYPE(RedminuVS32SUInt32VBVU_m, redminu_vs, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt32, 2, OneDBool, OneDUInt32) +CUSTOM_OP_TYPE(RedminuVS64SUInt64VBVU_m, redminu_vs, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt64, 2, OneDBool, OneDUInt64) +CUSTOM_OP_TYPE(RedandVS8SInt8VBVI_m, redand_vs, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt8, 2, OneDBool, OneDInt8) +CUSTOM_OP_TYPE(RedandVS16SInt16VBVI_m, redand_vs, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt16, 2, OneDBool, OneDInt16) +CUSTOM_OP_TYPE(RedandVS32SInt32VBVI_m, redand_vs, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt32, 2, OneDBool, OneDInt32) +CUSTOM_OP_TYPE(RedandVS64SInt64VBVI_m, redand_vs, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt64, 2, OneDBool, OneDInt64) +CUSTOM_OP_TYPE(RedandVS8SUInt8VBVU_m, redand_vs, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt8, 2, OneDBool, OneDUInt8) +CUSTOM_OP_TYPE(RedandVS16SUInt16VBVU_m, redand_vs, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt16, 2, OneDBool, OneDUInt16) +CUSTOM_OP_TYPE(RedandVS32SUInt32VBVU_m, redand_vs, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt32, 2, OneDBool, OneDUInt32) +CUSTOM_OP_TYPE(RedandVS64SUInt64VBVU_m, redand_vs, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt64, 2, OneDBool, OneDUInt64) +CUSTOM_OP_TYPE(RedorVS8SInt8VBVI_m, redor_vs, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt8, 2, OneDBool, OneDInt8) +CUSTOM_OP_TYPE(RedorVS16SInt16VBVI_m, redor_vs, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt16, 2, OneDBool, OneDInt16) +CUSTOM_OP_TYPE(RedorVS32SInt32VBVI_m, redor_vs, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt32, 2, OneDBool, OneDInt32) +CUSTOM_OP_TYPE(RedorVS64SInt64VBVI_m, redor_vs, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt64, 2, OneDBool, OneDInt64) +CUSTOM_OP_TYPE(RedorVS8SUInt8VBVU_m, redor_vs, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt8, 2, OneDBool, OneDUInt8) +CUSTOM_OP_TYPE(RedorVS16SUInt16VBVU_m, redor_vs, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt16, 2, OneDBool, OneDUInt16) +CUSTOM_OP_TYPE(RedorVS32SUInt32VBVU_m, redor_vs, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt32, 2, OneDBool, OneDUInt32) +CUSTOM_OP_TYPE(RedorVS64SUInt64VBVU_m, redor_vs, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt64, 2, OneDBool, OneDUInt64) +CUSTOM_OP_TYPE(RedxorVS8SInt8VBVI_m, redxor_vs, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt8, 2, OneDBool, OneDInt8) +CUSTOM_OP_TYPE(RedxorVS16SInt16VBVI_m, redxor_vs, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt16, 2, OneDBool, OneDInt16) +CUSTOM_OP_TYPE(RedxorVS32SInt32VBVI_m, redxor_vs, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt32, 2, OneDBool, OneDInt32) +CUSTOM_OP_TYPE(RedxorVS64SInt64VBVI_m, redxor_vs, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt64, 2, OneDBool, OneDInt64) +CUSTOM_OP_TYPE(RedxorVS8SUInt8VBVU_m, redxor_vs, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt8, 2, OneDBool, OneDUInt8) +CUSTOM_OP_TYPE(RedxorVS16SUInt16VBVU_m, redxor_vs, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt16, 2, OneDBool, OneDUInt16) +CUSTOM_OP_TYPE(RedxorVS32SUInt32VBVU_m, redxor_vs, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt32, 2, OneDBool, OneDUInt32) +CUSTOM_OP_TYPE(RedxorVS64SUInt64VBVU_m, redxor_vs, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt64, 2, OneDBool, OneDUInt64) + +CUSTOM_OP_TYPE(FredosumVS16SFloat16VF, fredosum_vs, 16, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarFloat16, 1, OneDFloat16) +CUSTOM_OP_TYPE(FredosumVS32SFloat32VF, fredosum_vs, 32, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarFloat32, 1, OneDFloat32) +CUSTOM_OP_TYPE(FredosumVS64SFloat64VF, fredosum_vs, 64, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarFloat64, 1, OneDFloat64) +CUSTOM_OP_TYPE(FredusumVS16SFloat16VF, fredusum_vs, 16, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarFloat16, 1, OneDFloat16) +CUSTOM_OP_TYPE(FredusumVS32SFloat32VF, fredusum_vs, 32, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarFloat32, 1, OneDFloat32) +CUSTOM_OP_TYPE(FredusumVS64SFloat64VF, fredusum_vs, 64, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarFloat64, 1, OneDFloat64) +CUSTOM_OP_TYPE(FredmaxVS16SFloat16VF, fredmax_vs, 16, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarFloat16, 1, OneDFloat16) +CUSTOM_OP_TYPE(FredmaxVS32SFloat32VF, fredmax_vs, 32, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarFloat32, 1, OneDFloat32) +CUSTOM_OP_TYPE(FredmaxVS64SFloat64VF, fredmax_vs, 64, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarFloat64, 1, OneDFloat64) +CUSTOM_OP_TYPE(FredminVS16SFloat16VF, fredmin_vs, 16, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarFloat16, 1, OneDFloat16) +CUSTOM_OP_TYPE(FredminVS32SFloat32VF, fredmin_vs, 32, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarFloat32, 1, OneDFloat32) +CUSTOM_OP_TYPE(FredminVS64SFloat64VF, fredmin_vs, 64, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarFloat64, 1, OneDFloat64) +CUSTOM_OP_TYPE(FredosumVS16SFloat16VBVF_m, fredosum_vs, 16, FLOAT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarFloat16, 2, OneDBool, OneDFloat16) +CUSTOM_OP_TYPE(FredosumVS32SFloat32VBVF_m, fredosum_vs, 32, FLOAT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarFloat32, 2, OneDBool, OneDFloat32) +CUSTOM_OP_TYPE(FredosumVS64SFloat64VBVF_m, fredosum_vs, 64, FLOAT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarFloat64, 2, OneDBool, OneDFloat64) +CUSTOM_OP_TYPE(FredusumVS16SFloat16VBVF_m, fredusum_vs, 16, FLOAT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarFloat16, 2, OneDBool, OneDFloat16) +CUSTOM_OP_TYPE(FredusumVS32SFloat32VBVF_m, fredusum_vs, 32, FLOAT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarFloat32, 2, OneDBool, OneDFloat32) +CUSTOM_OP_TYPE(FredusumVS64SFloat64VBVF_m, fredusum_vs, 64, FLOAT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarFloat64, 2, OneDBool, OneDFloat64) +CUSTOM_OP_TYPE(FredmaxVS16SFloat16VBVF_m, fredmax_vs, 16, FLOAT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarFloat16, 2, OneDBool, OneDFloat16) +CUSTOM_OP_TYPE(FredmaxVS32SFloat32VBVF_m, fredmax_vs, 32, FLOAT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarFloat32, 2, OneDBool, OneDFloat32) +CUSTOM_OP_TYPE(FredmaxVS64SFloat64VBVF_m, fredmax_vs, 64, FLOAT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarFloat64, 2, OneDBool, OneDFloat64) +CUSTOM_OP_TYPE(FredminVS16SFloat16VBVF_m, fredmin_vs, 16, FLOAT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarFloat16, 2, OneDBool, OneDFloat16) +CUSTOM_OP_TYPE(FredminVS32SFloat32VBVF_m, fredmin_vs, 32, FLOAT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarFloat32, 2, OneDBool, OneDFloat32) +CUSTOM_OP_TYPE(FredminVS64SFloat64VBVF_m, fredmin_vs, 64, FLOAT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarFloat64, 2, OneDBool, OneDFloat64) + +CUSTOM_OP_TYPE(WredsumVS8SInt16VI, wredsum_vs, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt16, 1, OneDInt8) +CUSTOM_OP_TYPE(WredsumVS16SInt32VI, wredsum_vs, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt32, 1, OneDInt16) +CUSTOM_OP_TYPE(WredsumVS32SInt64VI, wredsum_vs, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarInt64, 1, OneDInt32) +CUSTOM_OP_TYPE(WredsumuVS8SUInt16VU, wredsumu_vs, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt16, 1, OneDUInt8) +CUSTOM_OP_TYPE(WredsumuVS16SUInt32VU, wredsumu_vs, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt32, 1, OneDUInt16) +CUSTOM_OP_TYPE(WredsumuVS32SUInt64VU, wredsumu_vs, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarUInt64, 1, OneDUInt32) +CUSTOM_OP_TYPE(WredsumVS8SInt16VBVI_m, wredsum_vs, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt16, 2, OneDBool, OneDInt8) +CUSTOM_OP_TYPE(WredsumVS16SInt32VBVI_m, wredsum_vs, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt32, 2, OneDBool, OneDInt16) +CUSTOM_OP_TYPE(WredsumVS32SInt64VBVI_m, wredsum_vs, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarInt64, 2, OneDBool, OneDInt32) +CUSTOM_OP_TYPE(WredsumuVS8SUInt16VBVU_m, wredsumu_vs, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt16, 2, OneDBool, OneDUInt8) +CUSTOM_OP_TYPE(WredsumuVS16SUInt32VBVU_m, wredsumu_vs, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt32, 2, OneDBool, OneDUInt16) +CUSTOM_OP_TYPE(WredsumuVS32SUInt64VBVU_m, wredsumu_vs, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarUInt64, 2, OneDBool, OneDUInt32) + +CUSTOM_OP_TYPE(FwredosumVS16SFloat32VF, fwredosum_vs, 16, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarFloat32, 1, OneDFloat16) +CUSTOM_OP_TYPE(FwredosumVS32SFloat64VF, fwredosum_vs, 32, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarFloat64, 1, OneDFloat32) +CUSTOM_OP_TYPE(FwredusumVS16SFloat32VF, fwredusum_vs, 16, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarFloat32, 1, OneDFloat16) +CUSTOM_OP_TYPE(FwredusumVS32SFloat64VF, fwredusum_vs, 32, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation, ScalarFloat64, 1, OneDFloat32) +CUSTOM_OP_TYPE(FwredosumVS16SFloat32VBVF_m, fwredosum_vs, 16, FLOAT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarFloat32, 2, OneDBool, OneDFloat16) +CUSTOM_OP_TYPE(FwredosumVS32SFloat64VBVF_m, fwredosum_vs, 32, FLOAT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarFloat64, 2, OneDBool, OneDFloat32) +CUSTOM_OP_TYPE(FwredusumVS16SFloat32VBVF_m, fwredusum_vs, 16, FLOAT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarFloat32, 2, OneDBool, OneDFloat16) +CUSTOM_OP_TYPE(FwredusumVS32SFloat64VBVF_m, fwredusum_vs, 32, FLOAT, HaveVLParameter | MaskedOperation | ReductionOperation, ScalarFloat64, 2, OneDBool, OneDFloat32) + +CUSTOM_OP_TYPE(MandMMVBoolVBVB, mand_mm, 8, BOOL, HaveVLParameter | NonmaskedOperation | LogicalMaskOperation, OneDBool, 2, OneDBool, OneDBool) +CUSTOM_OP_TYPE(MnandMMVBoolVBVB, mnand_mm, 8, BOOL, HaveVLParameter | NonmaskedOperation | LogicalMaskOperation, OneDBool, 2, OneDBool, OneDBool) +CUSTOM_OP_TYPE(MandnMMVBoolVBVB, mandn_mm, 8, BOOL, HaveVLParameter | NonmaskedOperation | LogicalMaskOperation, OneDBool, 2, OneDBool, OneDBool) +CUSTOM_OP_TYPE(MxorMMVBoolVBVB, mxor_mm, 8, BOOL, HaveVLParameter | NonmaskedOperation | LogicalMaskOperation, OneDBool, 2, OneDBool, OneDBool) +CUSTOM_OP_TYPE(MorMMVBoolVBVB, mor_mm, 8, BOOL, HaveVLParameter | NonmaskedOperation | LogicalMaskOperation, OneDBool, 2, OneDBool, OneDBool) +CUSTOM_OP_TYPE(MnorMMVBoolVBVB, mnor_mm, 8, BOOL, HaveVLParameter | NonmaskedOperation | LogicalMaskOperation, OneDBool, 2, OneDBool, OneDBool) +CUSTOM_OP_TYPE(MornMMVBoolVBVB, morn_mm, 8, BOOL, HaveVLParameter | NonmaskedOperation | LogicalMaskOperation, OneDBool, 2, OneDBool, OneDBool) +CUSTOM_OP_TYPE(MxnorMMVBoolVBVB, mxnor_mm, 8, BOOL, HaveVLParameter | NonmaskedOperation | LogicalMaskOperation, OneDBool, 2, OneDBool, OneDBool) + +CUSTOM_OP_TYPE(MmvMVBoolVB, mmv_m, 8, BOOL, HaveVLParameter | NonmaskedOperation | LogicalMaskOperation, OneDBool, 1, OneDBool) +CUSTOM_OP_TYPE(MnotMVBoolVB, mnot_m, 8, BOOL, HaveVLParameter | NonmaskedOperation | LogicalMaskOperation, OneDBool, 1, OneDBool) +CUSTOM_OP_TYPE(MclrMVBool, mclr_m, 8, BOOL, HaveVLParameter | NonmaskedOperation | LogicalMaskOperation | NoInputOperation, OneDBool, 0,) +CUSTOM_OP_TYPE(MsetMVBool, mset_m, 8, BOOL, HaveVLParameter | NonmaskedOperation | LogicalMaskOperation | NoInputOperation, OneDBool, 0,) + +CUSTOM_OP_TYPE(CpopMSUInt32VB, cpop_m, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, ScalarUInt32, 1, OneDBool) +CUSTOM_OP_TYPE(CpopMSUInt32VBVB_m, cpop_m, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, ScalarUInt32, 2, OneDBool, OneDBool) +CUSTOM_OP_TYPE(FirstMSInt32VB, first_m, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation, ScalarInt32, 1, OneDBool) +CUSTOM_OP_TYPE(FirstMSInt32VBVB_m, first_m, 8, SIGNED_INT, HaveVLParameter | MaskedOperation, ScalarInt32, 2, OneDBool, OneDBool) +CUSTOM_OP_TYPE(MsbfMVBoolVB, msbf_m, 8, BOOL, HaveVLParameter | NonmaskedOperation | LogicalMaskOperation, OneDBool, 1, OneDBool) +CUSTOM_OP_TYPE(MsbfMVBoolVBVBVB_m, msbf_m, 8, BOOL, HaveVLParameter | MaskedOperation | LogicalMaskOperation, OneDBool, 3, OneDBool, OneDBool, OneDBool) +CUSTOM_OP_TYPE(MsifMVBoolVB, msif_m, 8, BOOL, HaveVLParameter | NonmaskedOperation | LogicalMaskOperation, OneDBool, 1, OneDBool) +CUSTOM_OP_TYPE(MsifMVBoolVBVBVB_m, msif_m, 8, BOOL, HaveVLParameter | MaskedOperation | LogicalMaskOperation, OneDBool, 3, OneDBool, OneDBool, OneDBool) +CUSTOM_OP_TYPE(MsofMVBoolVB, msof_m, 8, BOOL, HaveVLParameter | NonmaskedOperation | LogicalMaskOperation, OneDBool, 1, OneDBool) +CUSTOM_OP_TYPE(MsofMVBoolVBVBVB_m, msof_m, 8, BOOL, HaveVLParameter | MaskedOperation | LogicalMaskOperation, OneDBool, 3, OneDBool, OneDBool, OneDBool) + +CUSTOM_OP_TYPE(IotaM8VUInt8VB, iota_m, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 1, OneDBool) +CUSTOM_OP_TYPE(IotaM16VUInt16VB, iota_m, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 1, OneDBool) +CUSTOM_OP_TYPE(IotaM32VUInt32VB, iota_m, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 1, OneDBool) +CUSTOM_OP_TYPE(IotaM64VUInt64VB, iota_m, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 1, OneDBool) +CUSTOM_OP_TYPE(IotaM8VUInt8VBVUVB_m, iota_m, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 3, OneDBool, OneDUInt8, OneDBool) +CUSTOM_OP_TYPE(IotaM16VUInt16VBVUVB_m, iota_m, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDBool) +CUSTOM_OP_TYPE(IotaM32VUInt32VBVUVB_m, iota_m, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDBool) +CUSTOM_OP_TYPE(IotaM64VUInt64VBVUVB_m, iota_m, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDBool) + +CUSTOM_OP_TYPE(IdM8VUInt8, id_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt8, 0, ) +CUSTOM_OP_TYPE(IdM16VUInt16, id_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt16, 0, ) +CUSTOM_OP_TYPE(IdM32VUInt32, id_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt32, 0, ) +CUSTOM_OP_TYPE(IdM64VUInt64, id_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation, OneDUInt64, 0, ) +CUSTOM_OP_TYPE(IdM8VUInt8VBVU_m, id_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt8, 2, OneDBool, OneDUInt8) +CUSTOM_OP_TYPE(IdM16VUInt16VBVU_m, id_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt16, 2, OneDBool, OneDUInt16) +CUSTOM_OP_TYPE(IdM32VUInt32VBVU_m, id_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt32, 2, OneDBool, OneDUInt32) +CUSTOM_OP_TYPE(IdM64VUInt64VBVU_m, id_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation, OneDUInt64, 2, OneDBool, OneDUInt64) + +CUSTOM_OP_TYPE(Vle8X8VInt8SI, le8_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt8, 1, OneDInt8) +CUSTOM_OP_TYPE(Vle16X16VInt16SI, le16_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt16, 1, OneDInt16) +CUSTOM_OP_TYPE(Vle32X32VInt32SI, le32_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt32, 1, OneDInt32) +CUSTOM_OP_TYPE(Vle64X64VInt64SI, le64_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt64, 1, OneDInt64) +CUSTOM_OP_TYPE(Vle8X8VUInt8SU, le8_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt8, 1, OneDUInt8) +CUSTOM_OP_TYPE(Vle16X16VUInt16SU, le16_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt16, 1, OneDUInt16) +CUSTOM_OP_TYPE(Vle32X32VUInt32SU, le32_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt32, 1, OneDUInt32) +CUSTOM_OP_TYPE(Vle64X64VUInt64SU, le64_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt64, 1, OneDUInt64) +CUSTOM_OP_TYPE(Vle16X16VFloat16SF, le16_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat16, 1, OneDFloat16) +CUSTOM_OP_TYPE(Vle32X32VFloat32SF, le32_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat32, 1, OneDFloat32) +CUSTOM_OP_TYPE(Vle64X64VFloat64SF, le64_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat64, 1, OneDFloat64) +CUSTOM_OP_TYPE(Vle8X8VInt8VBVISI_m, le8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(Vle16X16VInt16VBVISI_m, le16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(Vle32X32VInt32VBVISI_m, le32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(Vle64X64VInt64VBVISI_m, le64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(Vle8X8VUInt8VBVUSU_m, le8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(Vle16X16VUInt16VBVUSU_m, le16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(Vle32X32VUInt32VBVUSU_m, le32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(Vle64X64VUInt64VBVUSU_m, le64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(Vle16X16VFloat16VBVFSF_m, le16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +CUSTOM_OP_TYPE(Vle32X32VFloat32VBVFSF_m, le32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +CUSTOM_OP_TYPE(Vle64X64VFloat64VBVFSF_m, le64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) + +CUSTOM_OP_TYPE(Vse8X8VoidSIVI, se8_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | StoreOperation | VoidOperation, OneDInt8, 1, OneDInt8) +CUSTOM_OP_TYPE(Vse16X16VoidSIVI, se16_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | StoreOperation | VoidOperation, OneDInt16, 1, OneDInt16) +CUSTOM_OP_TYPE(Vse32X32VoidSIVI, se32_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | StoreOperation | VoidOperation, OneDInt32, 1, OneDInt32) +CUSTOM_OP_TYPE(Vse64X64VoidSIVI, se64_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | StoreOperation | VoidOperation, OneDInt64, 1, OneDInt64) +CUSTOM_OP_TYPE(Vse8X8VoidSUVU, se8_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | StoreOperation | VoidOperation, OneDUInt8, 1, OneDUInt8) +CUSTOM_OP_TYPE(Vse16X16VoidSUVU, se16_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | StoreOperation | VoidOperation, OneDUInt16, 1, OneDUInt16) +CUSTOM_OP_TYPE(Vse32X32VoidSUVU, se32_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | StoreOperation | VoidOperation, OneDUInt32, 1, OneDUInt32) +CUSTOM_OP_TYPE(Vse64X64VoidSUVU, se64_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | StoreOperation | VoidOperation, OneDUInt64, 1, OneDUInt64) +CUSTOM_OP_TYPE(Vse16X16VoidSFVF, se16_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | StoreOperation | VoidOperation, OneDFloat16, 1, OneDFloat16) +CUSTOM_OP_TYPE(Vse32X32VoidSFVF, se32_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | StoreOperation | VoidOperation, OneDFloat32, 1, OneDFloat32) +CUSTOM_OP_TYPE(Vse64X64VoidSFVF, se64_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | StoreOperation | VoidOperation, OneDFloat64, 1, OneDFloat64) +CUSTOM_OP_TYPE(Vse8X8VoidVBSIVI_m, se8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | StoreOperation | VoidOperation, OneDInt8, 2, OneDBool, OneDInt8) +CUSTOM_OP_TYPE(Vse16X16VoidVBSIVI_m, se16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | StoreOperation | VoidOperation, OneDInt16, 2, OneDBool, OneDInt16) +CUSTOM_OP_TYPE(Vse32X32VoidVBSIVI_m, se32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | StoreOperation | VoidOperation, OneDInt32, 2, OneDBool, OneDInt32) +CUSTOM_OP_TYPE(Vse64X64VoidVBSIVI_m, se64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | StoreOperation | VoidOperation, OneDInt64, 2, OneDBool, OneDInt64) +CUSTOM_OP_TYPE(Vse8X8VoidVBSUVU_m, se8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | StoreOperation | VoidOperation, OneDUInt8, 2, OneDBool, OneDUInt8) +CUSTOM_OP_TYPE(Vse16X16VoidVBSUVU_m, se16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | StoreOperation | VoidOperation, OneDUInt16, 2, OneDBool, OneDUInt16) +CUSTOM_OP_TYPE(Vse32X32VoidVBSUVU_m, se32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | StoreOperation | VoidOperation, OneDUInt32, 2, OneDBool, OneDUInt32) +CUSTOM_OP_TYPE(Vse64X64VoidVBSUVU_m, se64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | StoreOperation | VoidOperation, OneDUInt64, 2, OneDBool, OneDUInt64) +CUSTOM_OP_TYPE(Vse16X16VoidVBSFVF_m, se16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | StoreOperation | VoidOperation, OneDFloat16, 2, OneDBool, OneDFloat16) +CUSTOM_OP_TYPE(Vse32X32VoidVBSFVF_m, se32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | StoreOperation | VoidOperation, OneDFloat32, 2, OneDBool, OneDFloat32) +CUSTOM_OP_TYPE(Vse64X64VoidVBSFVF_m, se64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | StoreOperation | VoidOperation, OneDFloat64, 2, OneDBool, OneDFloat64) + +CUSTOM_OP_TYPE(Vloxei8V8VInt8SIVU, loxei8_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt8, 2, OneDInt8, OneDUInt8) +CUSTOM_OP_TYPE(Vloxei16V8VInt8SIVU, loxei16_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt8, 2, OneDInt8, OneDUInt16) +CUSTOM_OP_TYPE(Vloxei32V8VInt8SIVU, loxei32_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt8, 2, OneDInt8, OneDUInt32) +CUSTOM_OP_TYPE(Vloxei64V8VInt8SIVU, loxei64_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt8, 2, OneDInt8, OneDUInt64) +CUSTOM_OP_TYPE(Vloxei8V16VInt16SIVU, loxei8_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt16, 2, OneDInt16, OneDUInt8) +CUSTOM_OP_TYPE(Vloxei16V16VInt16SIVU, loxei16_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt16, 2, OneDInt16, OneDUInt16) +CUSTOM_OP_TYPE(Vloxei32V16VInt16SIVU, loxei32_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt16, 2, OneDInt16, OneDUInt32) +CUSTOM_OP_TYPE(Vloxei64V16VInt16SIVU, loxei64_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt16, 2, OneDInt16, OneDUInt64) +CUSTOM_OP_TYPE(Vloxei8V32VInt32SIVU, loxei8_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt32, 2, OneDInt32, OneDUInt8) +CUSTOM_OP_TYPE(Vloxei16V32VInt32SIVU, loxei16_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt32, 2, OneDInt32, OneDUInt16) +CUSTOM_OP_TYPE(Vloxei32V32VInt32SIVU, loxei32_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt32, 2, OneDInt32, OneDUInt32) +CUSTOM_OP_TYPE(Vloxei64V32VInt32SIVU, loxei64_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt32, 2, OneDInt32, OneDUInt64) +CUSTOM_OP_TYPE(Vloxei8V64VInt64SIVU, loxei8_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt64, 2, OneDInt64, OneDUInt8) +CUSTOM_OP_TYPE(Vloxei16V64VInt64SIVU, loxei16_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt64, 2, OneDInt64, OneDUInt16) +CUSTOM_OP_TYPE(Vloxei32V64VInt64SIVU, loxei32_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt64, 2, OneDInt64, OneDUInt32) +CUSTOM_OP_TYPE(Vloxei64V64VInt64SIVU, loxei64_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt64, 2, OneDInt64, OneDUInt64) +CUSTOM_OP_TYPE(Vloxei8V8VUInt8SUVU, loxei8_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt8, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(Vloxei16V8VUInt8SUVU, loxei16_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt8, 2, OneDUInt8, OneDUInt16) +CUSTOM_OP_TYPE(Vloxei32V8VUInt8SUVU, loxei32_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt8, 2, OneDUInt8, OneDUInt32) +CUSTOM_OP_TYPE(Vloxei64V8VUInt8SUVU, loxei64_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt8, 2, OneDUInt8, OneDUInt64) +CUSTOM_OP_TYPE(Vloxei8V16VUInt16SUVU, loxei8_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt16, 2, OneDUInt16, OneDUInt8) +CUSTOM_OP_TYPE(Vloxei16V16VUInt16SUVU, loxei16_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt16, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(Vloxei32V16VUInt16SUVU, loxei32_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt16, 2, OneDUInt16, OneDUInt32) +CUSTOM_OP_TYPE(Vloxei64V16VUInt16SUVU, loxei64_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt16, 2, OneDUInt16, OneDUInt64) +CUSTOM_OP_TYPE(Vloxei8V32VUInt32SUVU, loxei8_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt32, 2, OneDUInt32, OneDUInt8) +CUSTOM_OP_TYPE(Vloxei16V32VUInt32SUVU, loxei16_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt32, 2, OneDUInt32, OneDUInt16) +CUSTOM_OP_TYPE(Vloxei32V32VUInt32SUVU, loxei32_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt32, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(Vloxei64V32VUInt32SUVU, loxei64_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt32, 2, OneDUInt32, OneDUInt64) +CUSTOM_OP_TYPE(Vloxei8V64VUInt64SUVU, loxei8_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt64, 2, OneDUInt64, OneDUInt8) +CUSTOM_OP_TYPE(Vloxei16V64VUInt64SUVU, loxei16_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt64, 2, OneDUInt64, OneDUInt16) +CUSTOM_OP_TYPE(Vloxei32V64VUInt64SUVU, loxei32_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt64, 2, OneDUInt64, OneDUInt32) +CUSTOM_OP_TYPE(Vloxei64V64VUInt64SUVU, loxei64_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt64, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(Vloxei8V16VFloat16SFVU, loxei8_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat16, 2, OneDFloat16, OneDUInt8) +CUSTOM_OP_TYPE(Vloxei16V16VFloat16SFVU, loxei16_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat16, 2, OneDFloat16, OneDUInt16) +CUSTOM_OP_TYPE(Vloxei32V16VFloat16SFVU, loxei32_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat16, 2, OneDFloat16, OneDUInt32) +CUSTOM_OP_TYPE(Vloxei64V16VFloat16SFVU, loxei64_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat16, 2, OneDFloat16, OneDUInt64) +CUSTOM_OP_TYPE(Vloxei8V32VFloat32SFVU, loxei8_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat32, 2, OneDFloat32, OneDUInt8) +CUSTOM_OP_TYPE(Vloxei16V32VFloat32SFVU, loxei16_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat32, 2, OneDFloat32, OneDUInt16) +CUSTOM_OP_TYPE(Vloxei32V32VFloat32SFVU, loxei32_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat32, 2, OneDFloat32, OneDUInt32) +CUSTOM_OP_TYPE(Vloxei64V32VFloat32SFVU, loxei64_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat32, 2, OneDFloat32, OneDUInt64) +CUSTOM_OP_TYPE(Vloxei8V64VFloat64SFVU, loxei8_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat64, 2, OneDFloat64, OneDUInt8) +CUSTOM_OP_TYPE(Vloxei16V64VFloat64SFVU, loxei16_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat64, 2, OneDFloat64, OneDUInt16) +CUSTOM_OP_TYPE(Vloxei32V64VFloat64SFVU, loxei32_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat64, 2, OneDFloat64, OneDUInt32) +CUSTOM_OP_TYPE(Vloxei64V64VFloat64SFVU, loxei64_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat64, 2, OneDFloat64, OneDUInt64) +CUSTOM_OP_TYPE(Vluxei8V8VInt8SIVU, luxei8_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt8, 2, OneDInt8, OneDUInt8) +CUSTOM_OP_TYPE(Vluxei16V8VInt8SIVU, luxei16_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt8, 2, OneDInt8, OneDUInt16) +CUSTOM_OP_TYPE(Vluxei32V8VInt8SIVU, luxei32_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt8, 2, OneDInt8, OneDUInt32) +CUSTOM_OP_TYPE(Vluxei64V8VInt8SIVU, luxei64_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt8, 2, OneDInt8, OneDUInt64) +CUSTOM_OP_TYPE(Vluxei8V16VInt16SIVU, luxei8_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt16, 2, OneDInt16, OneDUInt8) +CUSTOM_OP_TYPE(Vluxei16V16VInt16SIVU, luxei16_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt16, 2, OneDInt16, OneDUInt16) +CUSTOM_OP_TYPE(Vluxei32V16VInt16SIVU, luxei32_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt16, 2, OneDInt16, OneDUInt32) +CUSTOM_OP_TYPE(Vluxei64V16VInt16SIVU, luxei64_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt16, 2, OneDInt16, OneDUInt64) +CUSTOM_OP_TYPE(Vluxei8V32VInt32SIVU, luxei8_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt32, 2, OneDInt32, OneDUInt8) +CUSTOM_OP_TYPE(Vluxei16V32VInt32SIVU, luxei16_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt32, 2, OneDInt32, OneDUInt16) +CUSTOM_OP_TYPE(Vluxei32V32VInt32SIVU, luxei32_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt32, 2, OneDInt32, OneDUInt32) +CUSTOM_OP_TYPE(Vluxei64V32VInt32SIVU, luxei64_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt32, 2, OneDInt32, OneDUInt64) +CUSTOM_OP_TYPE(Vluxei8V64VInt64SIVU, luxei8_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt64, 2, OneDInt64, OneDUInt8) +CUSTOM_OP_TYPE(Vluxei16V64VInt64SIVU, luxei16_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt64, 2, OneDInt64, OneDUInt16) +CUSTOM_OP_TYPE(Vluxei32V64VInt64SIVU, luxei32_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt64, 2, OneDInt64, OneDUInt32) +CUSTOM_OP_TYPE(Vluxei64V64VInt64SIVU, luxei64_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt64, 2, OneDInt64, OneDUInt64) +CUSTOM_OP_TYPE(Vluxei8V8VUInt8SUVU, luxei8_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt8, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(Vluxei16V8VUInt8SUVU, luxei16_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt8, 2, OneDUInt8, OneDUInt16) +CUSTOM_OP_TYPE(Vluxei32V8VUInt8SUVU, luxei32_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt8, 2, OneDUInt8, OneDUInt32) +CUSTOM_OP_TYPE(Vluxei64V8VUInt8SUVU, luxei64_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt8, 2, OneDUInt8, OneDUInt64) +CUSTOM_OP_TYPE(Vluxei8V16VUInt16SUVU, luxei8_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt16, 2, OneDUInt16, OneDUInt8) +CUSTOM_OP_TYPE(Vluxei16V16VUInt16SUVU, luxei16_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt16, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(Vluxei32V16VUInt16SUVU, luxei32_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt16, 2, OneDUInt16, OneDUInt32) +CUSTOM_OP_TYPE(Vluxei64V16VUInt16SUVU, luxei64_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt16, 2, OneDUInt16, OneDUInt64) +CUSTOM_OP_TYPE(Vluxei8V32VUInt32SUVU, luxei8_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt32, 2, OneDUInt32, OneDUInt8) +CUSTOM_OP_TYPE(Vluxei16V32VUInt32SUVU, luxei16_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt32, 2, OneDUInt32, OneDUInt16) +CUSTOM_OP_TYPE(Vluxei32V32VUInt32SUVU, luxei32_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt32, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(Vluxei64V32VUInt32SUVU, luxei64_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt32, 2, OneDUInt32, OneDUInt64) +CUSTOM_OP_TYPE(Vluxei8V64VUInt64SUVU, luxei8_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt64, 2, OneDUInt64, OneDUInt8) +CUSTOM_OP_TYPE(Vluxei16V64VUInt64SUVU, luxei16_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt64, 2, OneDUInt64, OneDUInt16) +CUSTOM_OP_TYPE(Vluxei32V64VUInt64SUVU, luxei32_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt64, 2, OneDUInt64, OneDUInt32) +CUSTOM_OP_TYPE(Vluxei64V64VUInt64SUVU, luxei64_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt64, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(Vluxei8V16VFloat16SFVU, luxei8_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat16, 2, OneDFloat16, OneDUInt8) +CUSTOM_OP_TYPE(Vluxei16V16VFloat16SFVU, luxei16_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat16, 2, OneDFloat16, OneDUInt16) +CUSTOM_OP_TYPE(Vluxei32V16VFloat16SFVU, luxei32_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat16, 2, OneDFloat16, OneDUInt32) +CUSTOM_OP_TYPE(Vluxei64V16VFloat16SFVU, luxei64_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat16, 2, OneDFloat16, OneDUInt64) +CUSTOM_OP_TYPE(Vluxei8V32VFloat32SFVU, luxei8_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat32, 2, OneDFloat32, OneDUInt8) +CUSTOM_OP_TYPE(Vluxei16V32VFloat32SFVU, luxei16_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat32, 2, OneDFloat32, OneDUInt16) +CUSTOM_OP_TYPE(Vluxei32V32VFloat32SFVU, luxei32_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat32, 2, OneDFloat32, OneDUInt32) +CUSTOM_OP_TYPE(Vluxei64V32VFloat32SFVU, luxei64_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat32, 2, OneDFloat32, OneDUInt64) +CUSTOM_OP_TYPE(Vluxei8V64VFloat64SFVU, luxei8_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat64, 2, OneDFloat64, OneDUInt8) +CUSTOM_OP_TYPE(Vluxei16V64VFloat64SFVU, luxei16_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat64, 2, OneDFloat64, OneDUInt16) +CUSTOM_OP_TYPE(Vluxei32V64VFloat64SFVU, luxei32_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat64, 2, OneDFloat64, OneDUInt32) +CUSTOM_OP_TYPE(Vluxei64V64VFloat64SFVU, luxei64_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat64, 2, OneDFloat64, OneDUInt64) +CUSTOM_OP_TYPE(Vloxei8V8VInt8VBVISIVU_m, loxei8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +CUSTOM_OP_TYPE(Vloxei16V8VInt8VBVISIVU_m, loxei16_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt16) +CUSTOM_OP_TYPE(Vloxei32V8VInt8VBVISIVU_m, loxei32_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt32) +CUSTOM_OP_TYPE(Vloxei64V8VInt8VBVISIVU_m, loxei64_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt64) +CUSTOM_OP_TYPE(Vloxei8V16VInt16VBVISIVU_m, loxei8_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt8) +CUSTOM_OP_TYPE(Vloxei16V16VInt16VBVISIVU_m, loxei16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +CUSTOM_OP_TYPE(Vloxei32V16VInt16VBVISIVU_m, loxei32_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt32) +CUSTOM_OP_TYPE(Vloxei64V16VInt16VBVISIVU_m, loxei64_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt64) +CUSTOM_OP_TYPE(Vloxei8V32VInt32VBVISIVU_m, loxei8_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt8) +CUSTOM_OP_TYPE(Vloxei16V32VInt32VBVISIVU_m, loxei16_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt16) +CUSTOM_OP_TYPE(Vloxei32V32VInt32VBVISIVU_m, loxei32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +CUSTOM_OP_TYPE(Vloxei64V32VInt32VBVISIVU_m, loxei64_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt64) +CUSTOM_OP_TYPE(Vloxei8V64VInt64VBVISIVU_m, loxei8_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt8) +CUSTOM_OP_TYPE(Vloxei16V64VInt64VBVISIVU_m, loxei16_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt16) +CUSTOM_OP_TYPE(Vloxei32V64VInt64VBVISIVU_m, loxei32_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt32) +CUSTOM_OP_TYPE(Vloxei64V64VInt64VBVISIVU_m, loxei64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +CUSTOM_OP_TYPE(Vloxei8V8VUInt8VBVUSUVU_m, loxei8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(Vloxei16V8VUInt8VBVUSUVU_m, loxei16_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt16) +CUSTOM_OP_TYPE(Vloxei32V8VUInt8VBVUSUVU_m, loxei32_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt32) +CUSTOM_OP_TYPE(Vloxei64V8VUInt8VBVUSUVU_m, loxei64_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt64) +CUSTOM_OP_TYPE(Vloxei8V16VUInt16VBVUSUVU_m, loxei8_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt8) +CUSTOM_OP_TYPE(Vloxei16V16VUInt16VBVUSUVU_m, loxei16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(Vloxei32V16VUInt16VBVUSUVU_m, loxei32_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt32) +CUSTOM_OP_TYPE(Vloxei64V16VUInt16VBVUSUVU_m, loxei64_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt64) +CUSTOM_OP_TYPE(Vloxei8V32VUInt32VBVUSUVU_m, loxei8_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt8) +CUSTOM_OP_TYPE(Vloxei16V32VUInt32VBVUSUVU_m, loxei16_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt16) +CUSTOM_OP_TYPE(Vloxei32V32VUInt32VBVUSUVU_m, loxei32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(Vloxei64V32VUInt32VBVUSUVU_m, loxei64_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt64) +CUSTOM_OP_TYPE(Vloxei8V64VUInt64VBVUSUVU_m, loxei8_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt8) +CUSTOM_OP_TYPE(Vloxei16V64VUInt64VBVUSUVU_m, loxei16_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt16) +CUSTOM_OP_TYPE(Vloxei32V64VUInt64VBVUSUVU_m, loxei32_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt32) +CUSTOM_OP_TYPE(Vloxei64V64VUInt64VBVUSUVU_m, loxei64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(Vloxei8V16VFloat16VBVFSFVU_m, loxei8_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt8) +CUSTOM_OP_TYPE(Vloxei16V16VFloat16VBVFSFVU_m, loxei16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt16) +CUSTOM_OP_TYPE(Vloxei32V16VFloat16VBVFSFVU_m, loxei32_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt32) +CUSTOM_OP_TYPE(Vloxei64V16VFloat16VBVFSFVU_m, loxei64_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt64) +CUSTOM_OP_TYPE(Vloxei8V32VFloat32VBVFSFVU_m, loxei8_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt8) +CUSTOM_OP_TYPE(Vloxei16V32VFloat32VBVFSFVU_m, loxei16_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt16) +CUSTOM_OP_TYPE(Vloxei32V32VFloat32VBVFSFVU_m, loxei32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt32) +CUSTOM_OP_TYPE(Vloxei64V32VFloat32VBVFSFVU_m, loxei64_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt64) +CUSTOM_OP_TYPE(Vloxei8V64VFloat64VBVFSFVU_m, loxei8_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt8) +CUSTOM_OP_TYPE(Vloxei16V64VFloat64VBVFSFVU_m, loxei16_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt16) +CUSTOM_OP_TYPE(Vloxei32V64VFloat64VBVFSFVU_m, loxei32_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt32) +CUSTOM_OP_TYPE(Vloxei64V64VFloat64VBVFSFVU_m, loxei64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt64) +CUSTOM_OP_TYPE(Vluxei8V8VInt8VBVISIVU_m, luxei8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +CUSTOM_OP_TYPE(Vluxei16V8VInt8VBVISIVU_m, luxei16_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt16) +CUSTOM_OP_TYPE(Vluxei32V8VInt8VBVISIVU_m, luxei32_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt32) +CUSTOM_OP_TYPE(Vluxei64V8VInt8VBVISIVU_m, luxei64_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt64) +CUSTOM_OP_TYPE(Vluxei8V16VInt16VBVISIVU_m, luxei8_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt8) +CUSTOM_OP_TYPE(Vluxei16V16VInt16VBVISIVU_m, luxei16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +CUSTOM_OP_TYPE(Vluxei32V16VInt16VBVISIVU_m, luxei32_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt32) +CUSTOM_OP_TYPE(Vluxei64V16VInt16VBVISIVU_m, luxei64_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt64) +CUSTOM_OP_TYPE(Vluxei8V32VInt32VBVISIVU_m, luxei8_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt8) +CUSTOM_OP_TYPE(Vluxei16V32VInt32VBVISIVU_m, luxei16_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt16) +CUSTOM_OP_TYPE(Vluxei32V32VInt32VBVISIVU_m, luxei32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +CUSTOM_OP_TYPE(Vluxei64V32VInt32VBVISIVU_m, luxei64_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt64) +CUSTOM_OP_TYPE(Vluxei8V64VInt64VBVISIVU_m, luxei8_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt8) +CUSTOM_OP_TYPE(Vluxei16V64VInt64VBVISIVU_m, luxei16_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt16) +CUSTOM_OP_TYPE(Vluxei32V64VInt64VBVISIVU_m, luxei32_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt32) +CUSTOM_OP_TYPE(Vluxei64V64VInt64VBVISIVU_m, luxei64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +CUSTOM_OP_TYPE(Vluxei8V8VUInt8VBVUSUVU_m, luxei8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(Vluxei16V8VUInt8VBVUSUVU_m, luxei16_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt16) +CUSTOM_OP_TYPE(Vluxei32V8VUInt8VBVUSUVU_m, luxei32_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt32) +CUSTOM_OP_TYPE(Vluxei64V8VUInt8VBVUSUVU_m, luxei64_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt64) +CUSTOM_OP_TYPE(Vluxei8V16VUInt16VBVUSUVU_m, luxei8_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt8) +CUSTOM_OP_TYPE(Vluxei16V16VUInt16VBVUSUVU_m, luxei16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(Vluxei32V16VUInt16VBVUSUVU_m, luxei32_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt32) +CUSTOM_OP_TYPE(Vluxei64V16VUInt16VBVUSUVU_m, luxei64_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt64) +CUSTOM_OP_TYPE(Vluxei8V32VUInt32VBVUSUVU_m, luxei8_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt8) +CUSTOM_OP_TYPE(Vluxei16V32VUInt32VBVUSUVU_m, luxei16_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt16) +CUSTOM_OP_TYPE(Vluxei32V32VUInt32VBVUSUVU_m, luxei32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(Vluxei64V32VUInt32VBVUSUVU_m, luxei64_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt64) +CUSTOM_OP_TYPE(Vluxei8V64VUInt64VBVUSUVU_m, luxei8_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt8) +CUSTOM_OP_TYPE(Vluxei16V64VUInt64VBVUSUVU_m, luxei16_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt16) +CUSTOM_OP_TYPE(Vluxei32V64VUInt64VBVUSUVU_m, luxei32_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt32) +CUSTOM_OP_TYPE(Vluxei64V64VUInt64VBVUSUVU_m, luxei64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(Vluxei8V16VFloat16VBVFSFVU_m, luxei8_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt8) +CUSTOM_OP_TYPE(Vluxei16V16VFloat16VBVFSFVU_m, luxei16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt16) +CUSTOM_OP_TYPE(Vluxei32V16VFloat16VBVFSFVU_m, luxei32_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt32) +CUSTOM_OP_TYPE(Vluxei64V16VFloat16VBVFSFVU_m, luxei64_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt64) +CUSTOM_OP_TYPE(Vluxei8V32VFloat32VBVFSFVU_m, luxei8_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt8) +CUSTOM_OP_TYPE(Vluxei16V32VFloat32VBVFSFVU_m, luxei16_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt16) +CUSTOM_OP_TYPE(Vluxei32V32VFloat32VBVFSFVU_m, luxei32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt32) +CUSTOM_OP_TYPE(Vluxei64V32VFloat32VBVFSFVU_m, luxei64_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt64) +CUSTOM_OP_TYPE(Vluxei8V64VFloat64VBVFSFVU_m, luxei8_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt8) +CUSTOM_OP_TYPE(Vluxei16V64VFloat64VBVFSFVU_m, luxei16_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt16) +CUSTOM_OP_TYPE(Vluxei32V64VFloat64VBVFSFVU_m, luxei32_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt32) +CUSTOM_OP_TYPE(Vluxei64V64VFloat64VBVFSFVU_m, luxei64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt64) + +CUSTOM_OP_TYPE(Vsoxei8V8VoidVUVI, soxei8_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt8, 2, OneDInt8, OneDUInt8) +CUSTOM_OP_TYPE(Vsoxei16V8VoidVUVI, soxei16_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt8, 2, OneDInt8, OneDUInt16) +CUSTOM_OP_TYPE(Vsoxei32V8VoidVUVI, soxei32_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt8, 2, OneDInt8, OneDUInt32) +CUSTOM_OP_TYPE(Vsoxei64V8VoidVUVI, soxei64_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt8, 2, OneDInt8, OneDUInt64) +CUSTOM_OP_TYPE(Vsoxei8V16VoidVUVI, soxei8_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt16, 2, OneDInt16, OneDUInt8) +CUSTOM_OP_TYPE(Vsoxei16V16VoidVUVI, soxei16_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt16, 2, OneDInt16, OneDUInt16) +CUSTOM_OP_TYPE(Vsoxei32V16VoidVUVI, soxei32_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt16, 2, OneDInt16, OneDUInt32) +CUSTOM_OP_TYPE(Vsoxei64V16VoidVUVI, soxei64_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt16, 2, OneDInt16, OneDUInt64) +CUSTOM_OP_TYPE(Vsoxei8V32VoidVUVI, soxei8_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt32, 2, OneDInt32, OneDUInt8) +CUSTOM_OP_TYPE(Vsoxei16V32VoidVUVI, soxei16_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt32, 2, OneDInt32, OneDUInt16) +CUSTOM_OP_TYPE(Vsoxei32V32VoidVUVI, soxei32_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt32, 2, OneDInt32, OneDUInt32) +CUSTOM_OP_TYPE(Vsoxei64V32VoidVUVI, soxei64_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt32, 2, OneDInt32, OneDUInt64) +CUSTOM_OP_TYPE(Vsoxei8V64VoidVUVI, soxei8_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt64, 2, OneDInt64, OneDUInt8) +CUSTOM_OP_TYPE(Vsoxei16V64VoidVUVI, soxei16_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt64, 2, OneDInt64, OneDUInt16) +CUSTOM_OP_TYPE(Vsoxei32V64VoidVUVI, soxei32_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt64, 2, OneDInt64, OneDUInt32) +CUSTOM_OP_TYPE(Vsoxei64V64VoidVUVI, soxei64_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt64, 2, OneDInt64, OneDUInt64) +CUSTOM_OP_TYPE(Vsoxei8V8VoidVUVU, soxei8_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt8, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(Vsoxei16V8VoidVUVU, soxei16_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt8, 2, OneDUInt8, OneDUInt16) +CUSTOM_OP_TYPE(Vsoxei32V8VoidVUVU, soxei32_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt8, 2, OneDUInt8, OneDUInt32) +CUSTOM_OP_TYPE(Vsoxei64V8VoidVUVU, soxei64_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt8, 2, OneDUInt8, OneDUInt64) +CUSTOM_OP_TYPE(Vsoxei8V16VoidVUVU, soxei8_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt16, 2, OneDUInt16, OneDUInt8) +CUSTOM_OP_TYPE(Vsoxei16V16VoidVUVU, soxei16_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt16, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(Vsoxei32V16VoidVUVU, soxei32_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt16, 2, OneDUInt16, OneDUInt32) +CUSTOM_OP_TYPE(Vsoxei64V16VoidVUVU, soxei64_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt16, 2, OneDUInt16, OneDUInt64) +CUSTOM_OP_TYPE(Vsoxei8V32VoidVUVU, soxei8_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt32, 2, OneDUInt32, OneDUInt8) +CUSTOM_OP_TYPE(Vsoxei16V32VoidVUVU, soxei16_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt32, 2, OneDUInt32, OneDUInt16) +CUSTOM_OP_TYPE(Vsoxei32V32VoidVUVU, soxei32_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt32, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(Vsoxei64V32VoidVUVU, soxei64_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt32, 2, OneDUInt32, OneDUInt64) +CUSTOM_OP_TYPE(Vsoxei8V64VoidVUVU, soxei8_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt64, 2, OneDUInt64, OneDUInt8) +CUSTOM_OP_TYPE(Vsoxei16V64VoidVUVU, soxei16_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt64, 2, OneDUInt64, OneDUInt16) +CUSTOM_OP_TYPE(Vsoxei32V64VoidVUVU, soxei32_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt64, 2, OneDUInt64, OneDUInt32) +CUSTOM_OP_TYPE(Vsoxei64V64VoidVUVU, soxei64_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt64, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(Vsoxei8V16VoidVUVF, soxei8_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat16, 2, OneDFloat16, OneDUInt8) +CUSTOM_OP_TYPE(Vsoxei16V16VoidVUVF, soxei16_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat16, 2, OneDFloat16, OneDUInt16) +CUSTOM_OP_TYPE(Vsoxei32V16VoidVUVF, soxei32_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat16, 2, OneDFloat16, OneDUInt32) +CUSTOM_OP_TYPE(Vsoxei64V16VoidVUVF, soxei64_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat16, 2, OneDFloat16, OneDUInt64) +CUSTOM_OP_TYPE(Vsoxei8V32VoidVUVF, soxei8_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat32, 2, OneDFloat32, OneDUInt8) +CUSTOM_OP_TYPE(Vsoxei16V32VoidVUVF, soxei16_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat32, 2, OneDFloat32, OneDUInt16) +CUSTOM_OP_TYPE(Vsoxei32V32VoidVUVF, soxei32_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat32, 2, OneDFloat32, OneDUInt32) +CUSTOM_OP_TYPE(Vsoxei64V32VoidVUVF, soxei64_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat32, 2, OneDFloat32, OneDUInt64) +CUSTOM_OP_TYPE(Vsoxei8V64VoidVUVF, soxei8_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat64, 2, OneDFloat64, OneDUInt8) +CUSTOM_OP_TYPE(Vsoxei16V64VoidVUVF, soxei16_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat64, 2, OneDFloat64, OneDUInt16) +CUSTOM_OP_TYPE(Vsoxei32V64VoidVUVF, soxei32_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat64, 2, OneDFloat64, OneDUInt32) +CUSTOM_OP_TYPE(Vsoxei64V64VoidVUVF, soxei64_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat64, 2, OneDFloat64, OneDUInt64) +CUSTOM_OP_TYPE(Vsuxei8V8VoidVUVI, suxei8_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt8, 2, OneDInt8, OneDUInt8) +CUSTOM_OP_TYPE(Vsuxei16V8VoidVUVI, suxei16_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt8, 2, OneDInt8, OneDUInt16) +CUSTOM_OP_TYPE(Vsuxei32V8VoidVUVI, suxei32_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt8, 2, OneDInt8, OneDUInt32) +CUSTOM_OP_TYPE(Vsuxei64V8VoidVUVI, suxei64_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt8, 2, OneDInt8, OneDUInt64) +CUSTOM_OP_TYPE(Vsuxei8V16VoidVUVI, suxei8_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt16, 2, OneDInt16, OneDUInt8) +CUSTOM_OP_TYPE(Vsuxei16V16VoidVUVI, suxei16_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt16, 2, OneDInt16, OneDUInt16) +CUSTOM_OP_TYPE(Vsuxei32V16VoidVUVI, suxei32_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt16, 2, OneDInt16, OneDUInt32) +CUSTOM_OP_TYPE(Vsuxei64V16VoidVUVI, suxei64_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt16, 2, OneDInt16, OneDUInt64) +CUSTOM_OP_TYPE(Vsuxei8V32VoidVUVI, suxei8_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt32, 2, OneDInt32, OneDUInt8) +CUSTOM_OP_TYPE(Vsuxei16V32VoidVUVI, suxei16_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt32, 2, OneDInt32, OneDUInt16) +CUSTOM_OP_TYPE(Vsuxei32V32VoidVUVI, suxei32_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt32, 2, OneDInt32, OneDUInt32) +CUSTOM_OP_TYPE(Vsuxei64V32VoidVUVI, suxei64_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt32, 2, OneDInt32, OneDUInt64) +CUSTOM_OP_TYPE(Vsuxei8V64VoidVUVI, suxei8_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt64, 2, OneDInt64, OneDUInt8) +CUSTOM_OP_TYPE(Vsuxei16V64VoidVUVI, suxei16_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt64, 2, OneDInt64, OneDUInt16) +CUSTOM_OP_TYPE(Vsuxei32V64VoidVUVI, suxei32_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt64, 2, OneDInt64, OneDUInt32) +CUSTOM_OP_TYPE(Vsuxei64V64VoidVUVI, suxei64_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt64, 2, OneDInt64, OneDUInt64) +CUSTOM_OP_TYPE(Vsuxei8V8VoidVUVU, suxei8_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt8, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(Vsuxei16V8VoidVUVU, suxei16_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt8, 2, OneDUInt8, OneDUInt16) +CUSTOM_OP_TYPE(Vsuxei32V8VoidVUVU, suxei32_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt8, 2, OneDUInt8, OneDUInt32) +CUSTOM_OP_TYPE(Vsuxei64V8VoidVUVU, suxei64_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt8, 2, OneDUInt8, OneDUInt64) +CUSTOM_OP_TYPE(Vsuxei8V16VoidVUVU, suxei8_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt16, 2, OneDUInt16, OneDUInt8) +CUSTOM_OP_TYPE(Vsuxei16V16VoidVUVU, suxei16_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt16, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(Vsuxei32V16VoidVUVU, suxei32_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt16, 2, OneDUInt16, OneDUInt32) +CUSTOM_OP_TYPE(Vsuxei64V16VoidVUVU, suxei64_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt16, 2, OneDUInt16, OneDUInt64) +CUSTOM_OP_TYPE(Vsuxei8V32VoidVUVU, suxei8_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt32, 2, OneDUInt32, OneDUInt8) +CUSTOM_OP_TYPE(Vsuxei16V32VoidVUVU, suxei16_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt32, 2, OneDUInt32, OneDUInt16) +CUSTOM_OP_TYPE(Vsuxei32V32VoidVUVU, suxei32_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt32, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(Vsuxei64V32VoidVUVU, suxei64_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt32, 2, OneDUInt32, OneDUInt64) +CUSTOM_OP_TYPE(Vsuxei8V64VoidVUVU, suxei8_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt64, 2, OneDUInt64, OneDUInt8) +CUSTOM_OP_TYPE(Vsuxei16V64VoidVUVU, suxei16_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt64, 2, OneDUInt64, OneDUInt16) +CUSTOM_OP_TYPE(Vsuxei32V64VoidVUVU, suxei32_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt64, 2, OneDUInt64, OneDUInt32) +CUSTOM_OP_TYPE(Vsuxei64V64VoidVUVU, suxei64_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt64, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(Vsuxei8V16VoidVUVF, suxei8_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat16, 2, OneDFloat16, OneDUInt8) +CUSTOM_OP_TYPE(Vsuxei16V16VoidVUVF, suxei16_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat16, 2, OneDFloat16, OneDUInt16) +CUSTOM_OP_TYPE(Vsuxei32V16VoidVUVF, suxei32_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat16, 2, OneDFloat16, OneDUInt32) +CUSTOM_OP_TYPE(Vsuxei64V16VoidVUVF, suxei64_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat16, 2, OneDFloat16, OneDUInt64) +CUSTOM_OP_TYPE(Vsuxei8V32VoidVUVF, suxei8_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat32, 2, OneDFloat32, OneDUInt8) +CUSTOM_OP_TYPE(Vsuxei16V32VoidVUVF, suxei16_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat32, 2, OneDFloat32, OneDUInt16) +CUSTOM_OP_TYPE(Vsuxei32V32VoidVUVF, suxei32_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat32, 2, OneDFloat32, OneDUInt32) +CUSTOM_OP_TYPE(Vsuxei64V32VoidVUVF, suxei64_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat32, 2, OneDFloat32, OneDUInt64) +CUSTOM_OP_TYPE(Vsuxei8V64VoidVUVF, suxei8_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat64, 2, OneDFloat64, OneDUInt8) +CUSTOM_OP_TYPE(Vsuxei16V64VoidVUVF, suxei16_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat64, 2, OneDFloat64, OneDUInt16) +CUSTOM_OP_TYPE(Vsuxei32V64VoidVUVF, suxei32_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat64, 2, OneDFloat64, OneDUInt32) +CUSTOM_OP_TYPE(Vsuxei64V64VoidVUVF, suxei64_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat64, 2, OneDFloat64, OneDUInt64) +CUSTOM_OP_TYPE(Vsoxei8V8VoidVBVUVI_m, soxei8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt8, 3, OneDBool, OneDInt8, OneDUInt8) +CUSTOM_OP_TYPE(Vsoxei16V8VoidVBVUVI_m, soxei16_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt8, 3, OneDBool, OneDInt8, OneDUInt16) +CUSTOM_OP_TYPE(Vsoxei32V8VoidVBVUVI_m, soxei32_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt8, 3, OneDBool, OneDInt8, OneDUInt32) +CUSTOM_OP_TYPE(Vsoxei64V8VoidVBVUVI_m, soxei64_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt8, 3, OneDBool, OneDInt8, OneDUInt64) +CUSTOM_OP_TYPE(Vsoxei8V16VoidVBVUVI_m, soxei8_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDUInt8) +CUSTOM_OP_TYPE(Vsoxei16V16VoidVBVUVI_m, soxei16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDUInt16) +CUSTOM_OP_TYPE(Vsoxei32V16VoidVBVUVI_m, soxei32_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDUInt32) +CUSTOM_OP_TYPE(Vsoxei64V16VoidVBVUVI_m, soxei64_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDUInt64) +CUSTOM_OP_TYPE(Vsoxei8V32VoidVBVUVI_m, soxei8_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDUInt8) +CUSTOM_OP_TYPE(Vsoxei16V32VoidVBVUVI_m, soxei16_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDUInt16) +CUSTOM_OP_TYPE(Vsoxei32V32VoidVBVUVI_m, soxei32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDUInt32) +CUSTOM_OP_TYPE(Vsoxei64V32VoidVBVUVI_m, soxei64_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDUInt64) +CUSTOM_OP_TYPE(Vsoxei8V64VoidVBVUVI_m, soxei8_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDUInt8) +CUSTOM_OP_TYPE(Vsoxei16V64VoidVBVUVI_m, soxei16_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDUInt16) +CUSTOM_OP_TYPE(Vsoxei32V64VoidVBVUVI_m, soxei32_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDUInt32) +CUSTOM_OP_TYPE(Vsoxei64V64VoidVBVUVI_m, soxei64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDUInt64) +CUSTOM_OP_TYPE(Vsoxei8V8VoidVBVUVU_m, soxei8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(Vsoxei16V8VoidVBVUVU_m, soxei16_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt16) +CUSTOM_OP_TYPE(Vsoxei32V8VoidVBVUVU_m, soxei32_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt32) +CUSTOM_OP_TYPE(Vsoxei64V8VoidVBVUVU_m, soxei64_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt64) +CUSTOM_OP_TYPE(Vsoxei8V16VoidVBVUVU_m, soxei8_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt8) +CUSTOM_OP_TYPE(Vsoxei16V16VoidVBVUVU_m, soxei16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(Vsoxei32V16VoidVBVUVU_m, soxei32_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt32) +CUSTOM_OP_TYPE(Vsoxei64V16VoidVBVUVU_m, soxei64_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt64) +CUSTOM_OP_TYPE(Vsoxei8V32VoidVBVUVU_m, soxei8_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt8) +CUSTOM_OP_TYPE(Vsoxei16V32VoidVBVUVU_m, soxei16_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt16) +CUSTOM_OP_TYPE(Vsoxei32V32VoidVBVUVU_m, soxei32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(Vsoxei64V32VoidVBVUVU_m, soxei64_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt64) +CUSTOM_OP_TYPE(Vsoxei8V64VoidVBVUVU_m, soxei8_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt8) +CUSTOM_OP_TYPE(Vsoxei16V64VoidVBVUVU_m, soxei16_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt16) +CUSTOM_OP_TYPE(Vsoxei32V64VoidVBVUVU_m, soxei32_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt32) +CUSTOM_OP_TYPE(Vsoxei64V64VoidVBVUVU_m, soxei64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(Vsoxei8V16VoidVBVUVF_m, soxei8_v, 16, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt8) +CUSTOM_OP_TYPE(Vsoxei16V16VoidVBVUVF_m, soxei16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt16) +CUSTOM_OP_TYPE(Vsoxei32V16VoidVBVUVF_m, soxei32_v, 16, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt32) +CUSTOM_OP_TYPE(Vsoxei64V16VoidVBVUVF_m, soxei64_v, 16, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt64) +CUSTOM_OP_TYPE(Vsoxei8V32VoidVBVUVF_m, soxei8_v, 32, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt8) +CUSTOM_OP_TYPE(Vsoxei16V32VoidVBVUVF_m, soxei16_v, 32, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt16) +CUSTOM_OP_TYPE(Vsoxei32V32VoidVBVUVF_m, soxei32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt32) +CUSTOM_OP_TYPE(Vsoxei64V32VoidVBVUVF_m, soxei64_v, 32, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt64) +CUSTOM_OP_TYPE(Vsoxei8V64VoidVBVUVF_m, soxei8_v, 64, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDUInt8) +CUSTOM_OP_TYPE(Vsoxei16V64VoidVBVUVF_m, soxei16_v, 64, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDUInt16) +CUSTOM_OP_TYPE(Vsoxei32V64VoidVBVUVF_m, soxei32_v, 64, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDUInt32) +CUSTOM_OP_TYPE(Vsoxei64V64VoidVBVUVF_m, soxei64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDUInt64) +CUSTOM_OP_TYPE(Vsuxei8V8VoidVBVUVI_m, suxei8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt8, 3, OneDBool, OneDInt8, OneDUInt8) +CUSTOM_OP_TYPE(Vsuxei16V8VoidVBVUVI_m, suxei16_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt8, 3, OneDBool, OneDInt8, OneDUInt16) +CUSTOM_OP_TYPE(Vsuxei32V8VoidVBVUVI_m, suxei32_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt8, 3, OneDBool, OneDInt8, OneDUInt32) +CUSTOM_OP_TYPE(Vsuxei64V8VoidVBVUVI_m, suxei64_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt8, 3, OneDBool, OneDInt8, OneDUInt64) +CUSTOM_OP_TYPE(Vsuxei8V16VoidVBVUVI_m, suxei8_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDUInt8) +CUSTOM_OP_TYPE(Vsuxei16V16VoidVBVUVI_m, suxei16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDUInt16) +CUSTOM_OP_TYPE(Vsuxei32V16VoidVBVUVI_m, suxei32_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDUInt32) +CUSTOM_OP_TYPE(Vsuxei64V16VoidVBVUVI_m, suxei64_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDUInt64) +CUSTOM_OP_TYPE(Vsuxei8V32VoidVBVUVI_m, suxei8_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDUInt8) +CUSTOM_OP_TYPE(Vsuxei16V32VoidVBVUVI_m, suxei16_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDUInt16) +CUSTOM_OP_TYPE(Vsuxei32V32VoidVBVUVI_m, suxei32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDUInt32) +CUSTOM_OP_TYPE(Vsuxei64V32VoidVBVUVI_m, suxei64_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDUInt64) +CUSTOM_OP_TYPE(Vsuxei8V64VoidVBVUVI_m, suxei8_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDUInt8) +CUSTOM_OP_TYPE(Vsuxei16V64VoidVBVUVI_m, suxei16_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDUInt16) +CUSTOM_OP_TYPE(Vsuxei32V64VoidVBVUVI_m, suxei32_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDUInt32) +CUSTOM_OP_TYPE(Vsuxei64V64VoidVBVUVI_m, suxei64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDUInt64) +CUSTOM_OP_TYPE(Vsuxei8V8VoidVBVUVU_m, suxei8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(Vsuxei16V8VoidVBVUVU_m, suxei16_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt16) +CUSTOM_OP_TYPE(Vsuxei32V8VoidVBVUVU_m, suxei32_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt32) +CUSTOM_OP_TYPE(Vsuxei64V8VoidVBVUVU_m, suxei64_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt64) +CUSTOM_OP_TYPE(Vsuxei8V16VoidVBVUVU_m, suxei8_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt8) +CUSTOM_OP_TYPE(Vsuxei16V16VoidVBVUVU_m, suxei16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(Vsuxei32V16VoidVBVUVU_m, suxei32_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt32) +CUSTOM_OP_TYPE(Vsuxei64V16VoidVBVUVU_m, suxei64_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt64) +CUSTOM_OP_TYPE(Vsuxei8V32VoidVBVUVU_m, suxei8_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt8) +CUSTOM_OP_TYPE(Vsuxei16V32VoidVBVUVU_m, suxei16_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt16) +CUSTOM_OP_TYPE(Vsuxei32V32VoidVBVUVU_m, suxei32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(Vsuxei64V32VoidVBVUVU_m, suxei64_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt64) +CUSTOM_OP_TYPE(Vsuxei8V64VoidVBVUVU_m, suxei8_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt8) +CUSTOM_OP_TYPE(Vsuxei16V64VoidVBVUVU_m, suxei16_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt16) +CUSTOM_OP_TYPE(Vsuxei32V64VoidVBVUVU_m, suxei32_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt32) +CUSTOM_OP_TYPE(Vsuxei64V64VoidVBVUVU_m, suxei64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(Vsuxei8V16VoidVBVUVF_m, suxei8_v, 16, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt8) +CUSTOM_OP_TYPE(Vsuxei16V16VoidVBVUVF_m, suxei16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt16) +CUSTOM_OP_TYPE(Vsuxei32V16VoidVBVUVF_m, suxei32_v, 16, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt32) +CUSTOM_OP_TYPE(Vsuxei64V16VoidVBVUVF_m, suxei64_v, 16, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt64) +CUSTOM_OP_TYPE(Vsuxei8V32VoidVBVUVF_m, suxei8_v, 32, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt8) +CUSTOM_OP_TYPE(Vsuxei16V32VoidVBVUVF_m, suxei16_v, 32, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt16) +CUSTOM_OP_TYPE(Vsuxei32V32VoidVBVUVF_m, suxei32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt32) +CUSTOM_OP_TYPE(Vsuxei64V32VoidVBVUVF_m, suxei64_v, 32, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt64) +CUSTOM_OP_TYPE(Vsuxei8V64VoidVBVUVF_m, suxei8_v, 64, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDUInt8) +CUSTOM_OP_TYPE(Vsuxei16V64VoidVBVUVF_m, suxei16_v, 64, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDUInt16) +CUSTOM_OP_TYPE(Vsuxei32V64VoidVBVUVF_m, suxei32_v, 64, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDUInt32) +CUSTOM_OP_TYPE(Vsuxei64V64VoidVBVUVF_m, suxei64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDUInt64) + +CUSTOM_OP_TYPE(Vlse8XX8VInt8SISI, lse8_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt8, 2, OneDInt8, ScalarIntXLen) +CUSTOM_OP_TYPE(Vlse16XX16VInt16SISI, lse16_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt16, 2, OneDInt16, ScalarIntXLen) +CUSTOM_OP_TYPE(Vlse32XX32VInt32SISI, lse32_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt32, 2, OneDInt32, ScalarIntXLen) +CUSTOM_OP_TYPE(Vlse64XX64VInt64SISI, lse64_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDInt64, 2, OneDInt64, ScalarIntXLen) +CUSTOM_OP_TYPE(Vlse8XX8VUInt8SUSI, lse8_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt8, 2, OneDUInt8, ScalarIntXLen) +CUSTOM_OP_TYPE(Vlse16XX16VUInt16SUSI, lse16_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt16, 2, OneDUInt16, ScalarIntXLen) +CUSTOM_OP_TYPE(Vlse32XX32VUInt32SUSI, lse32_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt32, 2, OneDUInt32, ScalarIntXLen) +CUSTOM_OP_TYPE(Vlse64XX64VUInt64SUSI, lse64_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDUInt64, 2, OneDUInt64, ScalarIntXLen) +CUSTOM_OP_TYPE(Vlse16XX16VFloat16SFSI, lse16_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat16, 2, OneDFloat16, ScalarIntXLen) +CUSTOM_OP_TYPE(Vlse32XX32VFloat32SFSI, lse32_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat32, 2, OneDFloat32, ScalarIntXLen) +CUSTOM_OP_TYPE(Vlse64XX64VFloat64SFSI, lse64_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation, OneDFloat64, 2, OneDFloat64, ScalarIntXLen) +CUSTOM_OP_TYPE(Vlse8XX8VInt8VBVISISI_m, lse8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarIntXLen) +CUSTOM_OP_TYPE(Vlse16XX16VInt16VBVISISI_m, lse16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarIntXLen) +CUSTOM_OP_TYPE(Vlse32XX32VInt32VBVISISI_m, lse32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarIntXLen) +CUSTOM_OP_TYPE(Vlse64XX64VInt64VBVISISI_m, lse64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarIntXLen) +CUSTOM_OP_TYPE(Vlse8XX8VUInt8VBVUSUSI_m, lse8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarIntXLen) +CUSTOM_OP_TYPE(Vlse16XX16VUInt16VBVUSUSI_m, lse16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarIntXLen) +CUSTOM_OP_TYPE(Vlse32XX32VUInt32VBVUSUSI_m, lse32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarIntXLen) +CUSTOM_OP_TYPE(Vlse64XX64VUInt64VBVUSUSI_m, lse64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarIntXLen) +CUSTOM_OP_TYPE(Vlse16XX16VFloat16VBVFSFSI_m, lse16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarIntXLen) +CUSTOM_OP_TYPE(Vlse32XX32VFloat32VBVFSFSI_m, lse32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarIntXLen) +CUSTOM_OP_TYPE(Vlse64XX64VFloat64VBVFSFSI_m, lse64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarIntXLen) + +CUSTOM_OP_TYPE(Vsse8XX8VoidSIVI, sse8_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt8, 2, OneDInt8, ScalarIntXLen) +CUSTOM_OP_TYPE(Vsse16XX16VoidSIVI, sse16_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt16, 2, OneDInt16, ScalarIntXLen) +CUSTOM_OP_TYPE(Vsse32XX32VoidSIVI, sse32_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt32, 2, OneDInt32, ScalarIntXLen) +CUSTOM_OP_TYPE(Vsse64XX64VoidSIVI, sse64_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDInt64, 2, OneDInt64, ScalarIntXLen) +CUSTOM_OP_TYPE(Vsse8XX8VoidSIVU, sse8_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt8, 2, OneDUInt8, ScalarIntXLen) +CUSTOM_OP_TYPE(Vsse16XX16VoidSIVU, sse16_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt16, 2, OneDUInt16, ScalarIntXLen) +CUSTOM_OP_TYPE(Vsse32XX32VoidSIVU, sse32_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt32, 2, OneDUInt32, ScalarIntXLen) +CUSTOM_OP_TYPE(Vsse64XX64VoidSIVU, sse64_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDUInt64, 2, OneDUInt64, ScalarIntXLen) +CUSTOM_OP_TYPE(Vsse16XX16VoidSIVF, sse16_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat16, 2, OneDFloat16, ScalarIntXLen) +CUSTOM_OP_TYPE(Vsse32XX32VoidSIVF, sse32_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat32, 2, OneDFloat32, ScalarIntXLen) +CUSTOM_OP_TYPE(Vsse64XX64VoidSIVF, sse64_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | VoidOperation | StoreOperation, OneDFloat64, 2, OneDFloat64, ScalarIntXLen) +CUSTOM_OP_TYPE(Vsse8XX8VoidVBSIVI_m, sse8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt8, 3, OneDBool, OneDInt8, ScalarIntXLen) +CUSTOM_OP_TYPE(Vsse16XX16VoidVBSIVI_m, sse16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt16, 3, OneDBool, OneDInt16, ScalarIntXLen) +CUSTOM_OP_TYPE(Vsse32XX32VoidVBSIVI_m, sse32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt32, 3, OneDBool, OneDInt32, ScalarIntXLen) +CUSTOM_OP_TYPE(Vsse64XX64VoidVBSIVI_m, sse64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDInt64, 3, OneDBool, OneDInt64, ScalarIntXLen) +CUSTOM_OP_TYPE(Vsse8XX8VoidVBSIVU_m, sse8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt8, 3, OneDBool, OneDUInt8, ScalarIntXLen) +CUSTOM_OP_TYPE(Vsse16XX16VoidVBSIVU_m, sse16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarIntXLen) +CUSTOM_OP_TYPE(Vsse32XX32VoidVBSIVU_m, sse32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarIntXLen) +CUSTOM_OP_TYPE(Vsse64XX64VoidVBSIVU_m, sse64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarIntXLen) +CUSTOM_OP_TYPE(Vsse16XX16VoidVBSIVF_m, sse16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat16, 3, OneDBool, OneDFloat16, ScalarIntXLen) +CUSTOM_OP_TYPE(Vsse32XX32VoidVBSIVF_m, sse32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat32, 3, OneDBool, OneDFloat32, ScalarIntXLen) +CUSTOM_OP_TYPE(Vsse64XX64VoidVBSIVF_m, sse64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | VoidOperation | StoreOperation, OneDFloat64, 3, OneDBool, OneDFloat64, ScalarIntXLen) + +// Proof of concept for tail policy verification +// add_vv/add_vx int TA +CUSTOM_OP_TYPE(AddVV8VInt8TA, add_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(AddVX8VInt8TA, add_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(AddVV16VInt16TA, add_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(AddVX16VInt16TA, add_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(AddVV32VInt32TA, add_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(AddVX32VInt32TA, add_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(AddVV64VInt64TA, add_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(AddVX64VInt64TA, add_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarInt64) + +// add_vv/add_vx uint TA +CUSTOM_OP_TYPE(AddVV8VUInt8TA, add_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(AddVX8VUInt8TA, add_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(AddVV16VUInt16TA, add_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(AddVX16VUInt16TA, add_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(AddVV32VUInt32TA, add_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(AddVX32VUInt32TA, add_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(AddVV64VUInt64TA, add_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(AddVX64VUInt64TA, add_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, ScalarUInt64) + +// add_vv/add_vx int TU +CUSTOM_OP_TYPE(AddVV8VInt8TU, add_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(AddVX8VInt8TU, add_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(AddVV16VInt16TU, add_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(AddVX16VInt16TU, add_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(AddVV32VInt32TU, add_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(AddVX32VInt32TU, add_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(AddVV64VInt64TU, add_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(AddVX64VInt64TU, add_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarInt64) + +// add_vv/add_vx uint TU +CUSTOM_OP_TYPE(AddVV8VUInt8TU, add_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(AddVX8VUInt8TU, add_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(AddVV16VUInt16TU, add_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(AddVX16VUInt16TU, add_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(AddVV32VUInt32TU, add_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(AddVX32VUInt32TU, add_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(AddVV64VUInt64TU, add_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(AddVX64VUInt64TU, add_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, ScalarUInt64) + +// add_vv/add_vx int TAMA +CUSTOM_OP_TYPE(AddVV8VInt8TAMA, add_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(AddVX8VInt8TAMA, add_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(AddVV16VInt16TAMA, add_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(AddVX16VInt16TAMA, add_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(AddVV32VInt32TAMA, add_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(AddVX32VInt32TAMA, add_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(AddVV64VInt64TAMA, add_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(AddVX64VInt64TAMA, add_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarInt64) + +// add_vv/add_vx uint TAMA +CUSTOM_OP_TYPE(AddVV8VUInt8TAMA, add_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(AddVX8VUInt8TAMA, add_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(AddVV16VUInt16TAMA, add_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(AddVX16VUInt16TAMA, add_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(AddVV32VUInt32TAMA, add_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(AddVX32VUInt32TAMA, add_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(AddVV64VUInt64TAMA, add_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(AddVX64VUInt64TAMA, add_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarUInt64) + +// add_vv/add_vx int TAMU +CUSTOM_OP_TYPE(AddVV8VInt8TAMU, add_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(AddVX8VInt8TAMU, add_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(AddVV16VInt16TAMU, add_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(AddVX16VInt16TAMU, add_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(AddVV32VInt32TAMU, add_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(AddVX32VInt32TAMU, add_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(AddVX64VInt64TAMU, add_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +CUSTOM_OP_TYPE(AddVV64VInt64TAMU, add_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) + +// add_vv/add_vx uint TAMU +CUSTOM_OP_TYPE(AddVV8VUInt8TAMU, add_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(AddVX8VUInt8TAMU, add_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(AddVV16VUInt16TAMU, add_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(AddVX16VUInt16TAMU, add_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(AddVV32VUInt32TAMU, add_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(AddVX32VUInt32TAMU, add_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(AddVV64VUInt64TAMU, add_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(AddVX64VUInt64TAMU, add_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) + +// add_vv/add_vx int TUMA +CUSTOM_OP_TYPE(AddVV8VInt8TUMA, add_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(AddVX8VInt8TUMA, add_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(AddVV16VInt16TUMA, add_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(AddVX16VInt16TUMA, add_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(AddVV32VInt32TUMA, add_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(AddVX32VInt32TUMA, add_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(AddVV64VInt64TUMA, add_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(AddVX64VInt64TUMA, add_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) + +// add_vv/add_vx uint TUMA +CUSTOM_OP_TYPE(AddVV8VUInt8TUMA, add_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(AddVX8VUInt8TUMA, add_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(AddVV16VUInt16TUMA, add_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(AddVX16VUInt16TUMA, add_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(AddVV32VUInt32TUMA, add_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(AddVX32VUInt32TUMA, add_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(AddVV64VUInt64TUMA, add_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(AddVX64VUInt64TUMA, add_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) + +// add_vv/add_vx int TUMU +CUSTOM_OP_TYPE(AddVV8VInt8TUMU, add_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +CUSTOM_OP_TYPE(AddVX8VInt8TUMU, add_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +CUSTOM_OP_TYPE(AddVV16VInt16TUMU, add_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +CUSTOM_OP_TYPE(AddVX16VInt16TUMU, add_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +CUSTOM_OP_TYPE(AddVV32VInt32TUMU, add_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +CUSTOM_OP_TYPE(AddVX32VInt32TUMU, add_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +CUSTOM_OP_TYPE(AddVV64VInt64TUMU, add_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +CUSTOM_OP_TYPE(AddVX64VInt64TUMU, add_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) + +// add_vv/add_vx uint TUMU +CUSTOM_OP_TYPE(AddVV8VUInt8TUMU, add_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +CUSTOM_OP_TYPE(AddVX8VUInt8TUMU, add_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +CUSTOM_OP_TYPE(AddVV16VUInt16TUMU, add_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +CUSTOM_OP_TYPE(AddVX16VUInt16TUMU, add_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +CUSTOM_OP_TYPE(AddVV32VUInt32TUMU, add_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +CUSTOM_OP_TYPE(AddVX32VUInt32TUMU, add_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +CUSTOM_OP_TYPE(AddVV64VUInt64TUMU, add_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +CUSTOM_OP_TYPE(AddVX64VUInt64TUMU, add_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) + +// vint8m1_t vsub_vv_int8m1_tu (vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV8VInt8VIVIVI_TU, sub_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vsub_vx_int8m1_tu (vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX8VInt8VIVISI_TU, sub_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vsub_vv_int16m1_tu (vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV16VInt16VIVIVI_TU, sub_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vsub_vx_int16m1_tu (vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX16VInt16VIVISI_TU, sub_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vsub_vv_int32m1_tu (vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV32VInt32VIVIVI_TU, sub_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vsub_vx_int32m1_tu (vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX32VInt32VIVISI_TU, sub_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vsub_vv_int64m1_tu (vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV64VInt64VIVIVI_TU, sub_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vsub_vx_int64m1_tu (vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX64VInt64VIVISI_TU, sub_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vsub_vv_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV8VUInt8VUVUVU_TU, sub_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vsub_vx_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX8VUInt8VUVUSU_TU, sub_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vsub_vv_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV16VUInt16VUVUVU_TU, sub_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vsub_vx_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX16VUInt16VUVUSU_TU, sub_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vsub_vv_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV32VUInt32VUVUVU_TU, sub_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vsub_vx_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX32VUInt32VUVUSU_TU, sub_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vsub_vv_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV64VUInt64VUVUVU_TU, sub_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vsub_vx_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX64VUInt64VUVUSU_TU, sub_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vrsub_vx_int8m1_tu (vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX8VInt8VIVISI_TU, rsub_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vrsub_vx_int16m1_tu (vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX16VInt16VIVISI_TU, rsub_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vrsub_vx_int32m1_tu (vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX32VInt32VIVISI_TU, rsub_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vrsub_vx_int64m1_tu (vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX64VInt64VIVISI_TU, rsub_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vrsub_vx_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX8VUInt8VUVUSU_TU, rsub_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vrsub_vx_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX16VUInt16VUVUSU_TU, rsub_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vrsub_vx_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX32VUInt32VUVUSU_TU, rsub_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vrsub_vx_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX64VUInt64VUVUSU_TU, rsub_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, ScalarUInt64) + +// vint8m1_t vsub_vv_int8m1_ta (vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV8VInt8VIVI_TA, sub_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDInt8) +// vint8m1_t vsub_vx_int8m1_ta (vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX8VInt8VISI_TA, sub_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, ScalarInt8) +// vint16m1_t vsub_vv_int16m1_ta (vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV16VInt16VIVI_TA, sub_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDInt16) +// vint16m1_t vsub_vx_int16m1_ta (vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX16VInt16VISI_TA, sub_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarInt16) +// vint32m1_t vsub_vv_int32m1_ta (vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV32VInt32VIVI_TA, sub_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDInt32) +// vint32m1_t vsub_vx_int32m1_ta (vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX32VInt32VISI_TA, sub_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarInt32) +// vint64m1_t vsub_vv_int64m1_ta (vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV64VInt64VIVI_TA, sub_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDInt64) +// vint64m1_t vsub_vx_int64m1_ta (vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX64VInt64VISI_TA, sub_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarInt64) +// vuint8m1_t vsub_vv_uint8m1_ta (vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV8VUInt8VUVU_TA, sub_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint8m1_t vsub_vx_uint8m1_ta (vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX8VUInt8VUSU_TA, sub_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +// vuint16m1_t vsub_vv_uint16m1_ta (vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV16VUInt16VUVU_TA, sub_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint16m1_t vsub_vx_uint16m1_ta (vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX16VUInt16VUSU_TA, sub_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +// vuint32m1_t vsub_vv_uint32m1_ta (vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV32VUInt32VUVU_TA, sub_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint32m1_t vsub_vx_uint32m1_ta (vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX32VUInt32VUSU_TA, sub_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +// vuint64m1_t vsub_vv_uint64m1_ta (vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV64VUInt64VUVU_TA, sub_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vuint64m1_t vsub_vx_uint64m1_ta (vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX64VUInt64VUSU_TA, sub_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +// vint8m1_t vrsub_vx_int8m1_ta (vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX8VInt8VISI_TA, rsub_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, ScalarInt8) +// vint16m1_t vrsub_vx_int16m1_ta (vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX16VInt16VISI_TA, rsub_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarInt16) +// vint32m1_t vrsub_vx_int32m1_ta (vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX32VInt32VISI_TA, rsub_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarInt32) +// vint64m1_t vrsub_vx_int64m1_ta (vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX64VInt64VISI_TA, rsub_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarInt64) +// vuint8m1_t vrsub_vx_uint8m1_ta (vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX8VUInt8VUSU_TA, rsub_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +// vuint16m1_t vrsub_vx_uint16m1_ta (vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX16VUInt16VUSU_TA, rsub_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +// vuint32m1_t vrsub_vx_uint32m1_ta (vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX32VUInt32VUSU_TA, rsub_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +// vuint64m1_t vrsub_vx_uint64m1_ta (vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX64VUInt64VUSU_TA, rsub_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, ScalarUInt64) + +// vint8m1_t vsub_vv_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV8VInt8VBVIVIVI_TUMA, sub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vsub_vx_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX8VInt8VBVIVISI_TUMA, sub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vsub_vv_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV16VInt16VBVIVIVI_TUMA, sub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vsub_vx_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX16VInt16VBVIVISI_TUMA, sub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vsub_vv_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV32VInt32VBVIVIVI_TUMA, sub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vsub_vx_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX32VInt32VBVIVISI_TUMA, sub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vsub_vv_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV64VInt64VBVIVIVI_TUMA, sub_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vsub_vx_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX64VInt64VBVIVISI_TUMA, sub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vsub_vv_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV8VUInt8VBVUVUVU_TUMA, sub_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vsub_vx_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX8VUInt8VBVUVUSU_TUMA, sub_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vsub_vv_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV16VUInt16VBVUVUVU_TUMA, sub_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vsub_vx_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX16VUInt16VBVUVUSU_TUMA, sub_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vsub_vv_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV32VUInt32VBVUVUVU_TUMA, sub_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vsub_vx_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX32VUInt32VBVUVUSU_TUMA, sub_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vsub_vv_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV64VUInt64VBVUVUVU_TUMA, sub_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vsub_vx_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX64VUInt64VBVUVUSU_TUMA, sub_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vrsub_vx_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX8VInt8VBVIVISI_TUMA, rsub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vrsub_vx_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX16VInt16VBVIVISI_TUMA, rsub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vrsub_vx_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX32VInt32VBVIVISI_TUMA, rsub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vrsub_vx_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX64VInt64VBVIVISI_TUMA, rsub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vrsub_vx_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX8VUInt8VBVUVUSU_TUMA, rsub_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vrsub_vx_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX16VUInt16VBVUVUSU_TUMA, rsub_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vrsub_vx_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX32VUInt32VBVUVUSU_TUMA, rsub_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vrsub_vx_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX64VUInt64VBVUVUSU_TUMA, rsub_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) + +// vint8m1_t vsub_vv_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV8VInt8VBVIVIVI_TUMU, sub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vsub_vx_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX8VInt8VBVIVISI_TUMU, sub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vsub_vv_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV16VInt16VBVIVIVI_TUMU, sub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vsub_vx_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX16VInt16VBVIVISI_TUMU, sub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vsub_vv_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV32VInt32VBVIVIVI_TUMU, sub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vsub_vx_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX32VInt32VBVIVISI_TUMU, sub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vsub_vv_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV64VInt64VBVIVIVI_TUMU, sub_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vsub_vx_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX64VInt64VBVIVISI_TUMU, sub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vsub_vv_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV8VUInt8VBVUVUVU_TUMU, sub_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vsub_vx_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX8VUInt8VBVUVUSU_TUMU, sub_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vsub_vv_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV16VUInt16VBVUVUVU_TUMU, sub_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vsub_vx_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX16VUInt16VBVUVUSU_TUMU, sub_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vsub_vv_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV32VUInt32VBVUVUVU_TUMU, sub_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vsub_vx_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX32VUInt32VBVUVUSU_TUMU, sub_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vsub_vv_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV64VUInt64VBVUVUVU_TUMU, sub_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vsub_vx_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX64VUInt64VBVUVUSU_TUMU, sub_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vrsub_vx_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX8VInt8VBVIVISI_TUMU, rsub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vrsub_vx_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX16VInt16VBVIVISI_TUMU, rsub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vrsub_vx_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX32VInt32VBVIVISI_TUMU, rsub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vrsub_vx_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX64VInt64VBVIVISI_TUMU, rsub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vrsub_vx_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX8VUInt8VBVUVUSU_TUMU, rsub_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vrsub_vx_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX16VUInt16VBVUVUSU_TUMU, rsub_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vrsub_vx_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX32VUInt32VBVUVUSU_TUMU, rsub_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vrsub_vx_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX64VUInt64VBVUVUSU_TUMU, rsub_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) + +// vint8m1_t vsub_vv_int8m1_tama (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV8VInt8VBVIVI_TAMA, sub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint8m1_t vsub_vx_int8m1_tama (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX8VInt8VBVISI_TAMA, sub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, ScalarInt8) +// vint16m1_t vsub_vv_int16m1_tama (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV16VInt16VBVIVI_TAMA, sub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint16m1_t vsub_vx_int16m1_tama (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX16VInt16VBVISI_TAMA, sub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarInt16) +// vint32m1_t vsub_vv_int32m1_tama (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV32VInt32VBVIVI_TAMA, sub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint32m1_t vsub_vx_int32m1_tama (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX32VInt32VBVISI_TAMA, sub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarInt32) +// vint64m1_t vsub_vv_int64m1_tama (vbool64_t mask, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV64VInt64VBVIVI_TAMA, sub_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vint64m1_t vsub_vx_int64m1_tama (vbool64_t mask, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX64VInt64VBVISI_TAMA, sub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarInt64) +// vuint8m1_t vsub_vv_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV8VUInt8VBVUVU_TAMA, sub_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint8m1_t vsub_vx_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX8VUInt8VBVUSU_TAMA, sub_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vuint16m1_t vsub_vv_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV16VUInt16VBVUVU_TAMA, sub_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint16m1_t vsub_vx_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX16VUInt16VBVUSU_TAMA, sub_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vuint32m1_t vsub_vv_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV32VUInt32VBVUVU_TAMA, sub_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint32m1_t vsub_vx_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX32VUInt32VBVUSU_TAMA, sub_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vuint64m1_t vsub_vv_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV64VUInt64VBVUVU_TAMA, sub_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vuint64m1_t vsub_vx_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX64VUInt64VBVUSU_TAMA, sub_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarUInt64) +// vint8m1_t vrsub_vx_int8m1_tama (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX8VInt8VBVISI_TAMA, rsub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, ScalarInt8) +// vint16m1_t vrsub_vx_int16m1_tama (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX16VInt16VBVISI_TAMA, rsub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarInt16) +// vint32m1_t vrsub_vx_int32m1_tama (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX32VInt32VBVISI_TAMA, rsub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarInt32) +// vint64m1_t vrsub_vx_int64m1_tama (vbool64_t mask, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX64VInt64VBVISI_TAMA, rsub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarInt64) +// vuint8m1_t vrsub_vx_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX8VUInt8VBVUSU_TAMA, rsub_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vuint16m1_t vrsub_vx_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX16VUInt16VBVUSU_TAMA, rsub_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vuint32m1_t vrsub_vx_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX32VUInt32VBVUSU_TAMA, rsub_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vuint64m1_t vrsub_vx_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX64VUInt64VBVUSU_TAMA, rsub_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarUInt64) + +// vint8m1_t vsub_vv_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV8VInt8VBVIVIVI_TAMU, sub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vsub_vx_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX8VInt8VBVIVISI_TAMU, sub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vsub_vv_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV16VInt16VBVIVIVI_TAMU, sub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vsub_vx_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX16VInt16VBVIVISI_TAMU, sub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vsub_vv_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV32VInt32VBVIVIVI_TAMU, sub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vsub_vx_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX32VInt32VBVIVISI_TAMU, sub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vsub_vv_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV64VInt64VBVIVIVI_TAMU, sub_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vsub_vx_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX64VInt64VBVIVISI_TAMU, sub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vsub_vv_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV8VUInt8VBVUVUVU_TAMU, sub_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vsub_vx_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX8VUInt8VBVUVUSU_TAMU, sub_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vsub_vv_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV16VUInt16VBVUVUVU_TAMU, sub_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vsub_vx_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX16VUInt16VBVUVUSU_TAMU, sub_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vsub_vv_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV32VUInt32VBVUVUVU_TAMU, sub_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vsub_vx_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX32VUInt32VBVUVUSU_TAMU, sub_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vsub_vv_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVV64VUInt64VBVUVUVU_TAMU, sub_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vsub_vx_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(SubVX64VUInt64VBVUVUSU_TAMU, sub_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vrsub_vx_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX8VInt8VBVIVISI_TAMU, rsub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vrsub_vx_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX16VInt16VBVIVISI_TAMU, rsub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vrsub_vx_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX32VInt32VBVIVISI_TAMU, rsub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vrsub_vx_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX64VInt64VBVIVISI_TAMU, rsub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vrsub_vx_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX8VUInt8VBVUVUSU_TAMU, rsub_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vrsub_vx_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX16VUInt16VBVUVUSU_TAMU, rsub_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vrsub_vx_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX32VUInt32VBVUVUSU_TAMU, rsub_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vrsub_vx_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(RsubVX64VUInt64VBVUVUSU_TAMU, rsub_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) + +// vint16m2_t vwadd_vv_int16m2_tu (vint16m2_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVV8VInt16VIVIVI_TU, wadd_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt8, OneDInt8) +// vint16m2_t vwadd_vx_int16m2_tu (vint16m2_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVX8VInt16VIVISI_TU, wadd_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt8, ScalarInt8) +// vint16m2_t vwadd_wv_int16m2_tu (vint16m2_t merge, vint16m2_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWV8VInt16VIVIVI_TU, wadd_wv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt8) +// vint16m2_t vwadd_wx_int16m2_tu (vint16m2_t merge, vint16m2_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWX8VInt16VIVISI_TU, wadd_wx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarInt8) +// vint32m2_t vwadd_vv_int32m2_tu (vint32m2_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVV16VInt32VIVIVI_TU, wadd_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt16, OneDInt16) +// vint32m2_t vwadd_vx_int32m2_tu (vint32m2_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVX16VInt32VIVISI_TU, wadd_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt16, ScalarInt16) +// vint32m2_t vwadd_wv_int32m2_tu (vint32m2_t merge, vint32m2_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWV16VInt32VIVIVI_TU, wadd_wv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt16) +// vint32m2_t vwadd_wx_int32m2_tu (vint32m2_t merge, vint32m2_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWX16VInt32VIVISI_TU, wadd_wx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarInt16) +// vint64m2_t vwadd_vv_int64m2_tu (vint64m2_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVV32VInt64VIVIVI_TU, wadd_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt32, OneDInt32) +// vint64m2_t vwadd_vx_int64m2_tu (vint64m2_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVX32VInt64VIVISI_TU, wadd_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt32, ScalarInt32) +// vint64m2_t vwadd_wv_int64m2_tu (vint64m2_t merge, vint64m2_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWV32VInt64VIVIVI_TU, wadd_wv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt32) +// vint64m2_t vwadd_wx_int64m2_tu (vint64m2_t merge, vint64m2_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWX32VInt64VIVISI_TU, wadd_wx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarInt32) +// vuint16m2_t vwaddu_vv_uint16m2_tu (vuint16m2_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVV8VUInt16VUVUVU_TU, waddu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt8, OneDUInt8) +// vuint16m2_t vwaddu_vx_uint16m2_tu (vuint16m2_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVX8VUInt16VUVUSU_TU, waddu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt8, ScalarUInt8) +// vuint16m2_t vwaddu_wv_uint16m2_tu (vuint16m2_t merge, vuint16m2_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWV8VUInt16VUVUVU_TU, waddu_wv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt8) +// vuint16m2_t vwaddu_wx_uint16m2_tu (vuint16m2_t merge, vuint16m2_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWX8VUInt16VUVUSU_TU, waddu_wx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, ScalarUInt8) +// vuint32m2_t vwaddu_vv_uint32m2_tu (vuint32m2_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVV16VUInt32VUVUVU_TU, waddu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt16, OneDUInt16) +// vuint32m2_t vwaddu_vx_uint32m2_tu (vuint32m2_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVX16VUInt32VUVUSU_TU, waddu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt16, ScalarUInt16) +// vuint32m2_t vwaddu_wv_uint32m2_tu (vuint32m2_t merge, vuint32m2_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWV16VUInt32VUVUVU_TU, waddu_wv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt16) +// vuint32m2_t vwaddu_wx_uint32m2_tu (vuint32m2_t merge, vuint32m2_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWX16VUInt32VUVUSU_TU, waddu_wx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, ScalarUInt16) +// vuint64m2_t vwaddu_vv_uint64m2_tu (vuint64m2_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVV32VUInt64VUVUVU_TU, waddu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt32, OneDUInt32) +// vuint64m2_t vwaddu_vx_uint64m2_tu (vuint64m2_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVX32VUInt64VUVUSU_TU, waddu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt32, ScalarUInt32) +// vuint64m2_t vwaddu_wv_uint64m2_tu (vuint64m2_t merge, vuint64m2_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWV32VUInt64VUVUVU_TU, waddu_wv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt32) +// vuint64m2_t vwaddu_wx_uint64m2_tu (vuint64m2_t merge, vuint64m2_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWX32VUInt64VUVUSU_TU, waddu_wx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, ScalarUInt32) + +// vint16m2_t vwsub_vv_int16m2_tu (vint16m2_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVV8VInt16VIVIVI_TU, wsub_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt8, OneDInt8) +// vint16m2_t vwsub_vx_int16m2_tu (vint16m2_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVX8VInt16VIVISI_TU, wsub_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt8, ScalarInt8) +// vint16m2_t vwsub_wv_int16m2_tu (vint16m2_t merge, vint16m2_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWV8VInt16VIVIVI_TU, wsub_wv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt8) +// vint16m2_t vwsub_wx_int16m2_tu (vint16m2_t merge, vint16m2_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWX8VInt16VIVISI_TU, wsub_wx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarInt8) +// vint32m2_t vwsub_vv_int32m2_tu (vint32m2_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVV16VInt32VIVIVI_TU, wsub_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt16, OneDInt16) +// vint32m2_t vwsub_vx_int32m2_tu (vint32m2_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVX16VInt32VIVISI_TU, wsub_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt16, ScalarInt16) +// vint32m2_t vwsub_wv_int32m2_tu (vint32m2_t merge, vint32m2_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWV16VInt32VIVIVI_TU, wsub_wv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt16) +// vint32m2_t vwsub_wx_int32m2_tu (vint32m2_t merge, vint32m2_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWX16VInt32VIVISI_TU, wsub_wx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarInt16) +// vint64m2_t vwsub_vv_int64m2_tu (vint64m2_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVV32VInt64VIVIVI_TU, wsub_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt32, OneDInt32) +// vint64m2_t vwsub_vx_int64m2_tu (vint64m2_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVX32VInt64VIVISI_TU, wsub_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt32, ScalarInt32) +// vint64m2_t vwsub_wv_int64m2_tu (vint64m2_t merge, vint64m2_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWV32VInt64VIVIVI_TU, wsub_wv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt32) +// vint64m2_t vwsub_wx_int64m2_tu (vint64m2_t merge, vint64m2_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWX32VInt64VIVISI_TU, wsub_wx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarInt32) +// vuint16m2_t vwsubu_vv_uint16m2_tu (vuint16m2_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVV8VUInt16VUVUVU_TU, wsubu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt8, OneDUInt8) +// vuint16m2_t vwsubu_vx_uint16m2_tu (vuint16m2_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVX8VUInt16VUVUSU_TU, wsubu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt8, ScalarUInt8) +// vuint16m2_t vwsubu_wv_uint16m2_tu (vuint16m2_t merge, vuint16m2_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWV8VUInt16VUVUVU_TU, wsubu_wv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt8) +// vuint16m2_t vwsubu_wx_uint16m2_tu (vuint16m2_t merge, vuint16m2_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWX8VUInt16VUVUSU_TU, wsubu_wx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, ScalarUInt8) +// vuint32m2_t vwsubu_vv_uint32m2_tu (vuint32m2_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVV16VUInt32VUVUVU_TU, wsubu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt16, OneDUInt16) +// vuint32m2_t vwsubu_vx_uint32m2_tu (vuint32m2_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVX16VUInt32VUVUSU_TU, wsubu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt16, ScalarUInt16) +// vuint32m2_t vwsubu_wv_uint32m2_tu (vuint32m2_t merge, vuint32m2_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWV16VUInt32VUVUVU_TU, wsubu_wv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt16) +// vuint32m2_t vwsubu_wx_uint32m2_tu (vuint32m2_t merge, vuint32m2_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWX16VUInt32VUVUSU_TU, wsubu_wx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, ScalarUInt16) +// vuint64m2_t vwsubu_vv_uint64m2_tu (vuint64m2_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVV32VUInt64VUVUVU_TU, wsubu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt32, OneDUInt32) +// vuint64m2_t vwsubu_vx_uint64m2_tu (vuint64m2_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVX32VUInt64VUVUSU_TU, wsubu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt32, ScalarUInt32) +// vuint64m2_t vwsubu_wv_uint64m2_tu (vuint64m2_t merge, vuint64m2_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWV32VUInt64VUVUVU_TU, wsubu_wv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt32) +// vuint64m2_t vwsubu_wx_uint64m2_tu (vuint64m2_t merge, vuint64m2_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWX32VUInt64VUVUSU_TU, wsubu_wx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, ScalarUInt32) + +// vint16m2_t vwadd_vv_int16m2_ta (vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVV8VInt16VIVI_TA, wadd_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt16, 2, OneDInt8, OneDInt8) +// vint16m2_t vwadd_vx_int16m2_ta (vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVX8VInt16VISI_TA, wadd_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt16, 2, OneDInt8, ScalarInt8) +// vint16m2_t vwadd_wv_int16m2_ta (vint16m2_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWV8VInt16VIVI_TA, wadd_wv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDInt8) +// vint16m2_t vwadd_wx_int16m2_ta (vint16m2_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWX8VInt16VISI_TA, wadd_wx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarInt8) +// vint32m2_t vwadd_vv_int32m2_ta (vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVV16VInt32VIVI_TA, wadd_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt32, 2, OneDInt16, OneDInt16) +// vint32m2_t vwadd_vx_int32m2_ta (vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVX16VInt32VISI_TA, wadd_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt32, 2, OneDInt16, ScalarInt16) +// vint32m2_t vwadd_wv_int32m2_ta (vint32m2_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWV16VInt32VIVI_TA, wadd_wv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDInt16) +// vint32m2_t vwadd_wx_int32m2_ta (vint32m2_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWX16VInt32VISI_TA, wadd_wx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarInt16) +// vint64m2_t vwadd_vv_int64m2_ta (vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVV32VInt64VIVI_TA, wadd_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt64, 2, OneDInt32, OneDInt32) +// vint64m2_t vwadd_vx_int64m2_ta (vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVX32VInt64VISI_TA, wadd_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt64, 2, OneDInt32, ScalarInt32) +// vint64m2_t vwadd_wv_int64m2_ta (vint64m2_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWV32VInt64VIVI_TA, wadd_wv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDInt32) +// vint64m2_t vwadd_wx_int64m2_ta (vint64m2_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWX32VInt64VISI_TA, wadd_wx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarInt32) +// vuint16m2_t vwaddu_vv_uint16m2_ta (vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVV8VUInt16VUVU_TA, waddu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt16, 2, OneDUInt8, OneDUInt8) +// vuint16m2_t vwaddu_vx_uint16m2_ta (vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVX8VUInt16VUSU_TA, waddu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt16, 2, OneDUInt8, ScalarUInt8) +// vuint16m2_t vwaddu_wv_uint16m2_ta (vuint16m2_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWV8VUInt16VUVU_TA, waddu_wv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt8) +// vuint16m2_t vwaddu_wx_uint16m2_ta (vuint16m2_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWX8VUInt16VUSU_TA, waddu_wx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, ScalarUInt8) +// vuint32m2_t vwaddu_vv_uint32m2_ta (vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVV16VUInt32VUVU_TA, waddu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt32, 2, OneDUInt16, OneDUInt16) +// vuint32m2_t vwaddu_vx_uint32m2_ta (vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVX16VUInt32VUSU_TA, waddu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt32, 2, OneDUInt16, ScalarUInt16) +// vuint32m2_t vwaddu_wv_uint32m2_ta (vuint32m2_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWV16VUInt32VUVU_TA, waddu_wv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt16) +// vuint32m2_t vwaddu_wx_uint32m2_ta (vuint32m2_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWX16VUInt32VUSU_TA, waddu_wx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, ScalarUInt16) +// vuint64m2_t vwaddu_vv_uint64m2_ta (vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVV32VUInt64VUVU_TA, waddu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt64, 2, OneDUInt32, OneDUInt32) +// vuint64m2_t vwaddu_vx_uint64m2_ta (vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVX32VUInt64VUSU_TA, waddu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt64, 2, OneDUInt32, ScalarUInt32) +// vuint64m2_t vwaddu_wv_uint64m2_ta (vuint64m2_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWV32VUInt64VUVU_TA, waddu_wv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt32) +// vuint64m2_t vwaddu_wx_uint64m2_ta (vuint64m2_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWX32VUInt64VUSU_TA, waddu_wx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, ScalarUInt32) + +// vint16m2_t vwsub_vv_int16m2_ta (vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVV8VInt16VIVI_TA, wsub_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt16, 2, OneDInt8, OneDInt8) +// vint16m2_t vwsub_vx_int16m2_ta (vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVX8VInt16VISI_TA, wsub_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt16, 2, OneDInt8, ScalarInt8) +// vint16m2_t vwsub_wv_int16m2_ta (vint16m2_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWV8VInt16VIVI_TA, wsub_wv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDInt8) +// vint16m2_t vwsub_wx_int16m2_ta (vint16m2_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWX8VInt16VISI_TA, wsub_wx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarInt8) +// vint32m2_t vwsub_vv_int32m2_ta (vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVV16VInt32VIVI_TA, wsub_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt32, 2, OneDInt16, OneDInt16) +// vint32m2_t vwsub_vx_int32m2_ta (vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVX16VInt32VISI_TA, wsub_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt32, 2, OneDInt16, ScalarInt16) +// vint32m2_t vwsub_wv_int32m2_ta (vint32m2_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWV16VInt32VIVI_TA, wsub_wv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDInt16) +// vint32m2_t vwsub_wx_int32m2_ta (vint32m2_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWX16VInt32VISI_TA, wsub_wx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarInt16) +// vint64m2_t vwsub_vv_int64m2_ta (vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVV32VInt64VIVI_TA, wsub_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt64, 2, OneDInt32, OneDInt32) +// vint64m2_t vwsub_vx_int64m2_ta (vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVX32VInt64VISI_TA, wsub_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt64, 2, OneDInt32, ScalarInt32) +// vint64m2_t vwsub_wv_int64m2_ta (vint64m2_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWV32VInt64VIVI_TA, wsub_wv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDInt32) +// vint64m2_t vwsub_wx_int64m2_ta (vint64m2_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWX32VInt64VISI_TA, wsub_wx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarInt32) +// vuint16m2_t vwsubu_vv_uint16m2_ta (vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVV8VUInt16VUVU_TA, wsubu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt16, 2, OneDUInt8, OneDUInt8) +// vuint16m2_t vwsubu_vx_uint16m2_ta (vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVX8VUInt16VUSU_TA, wsubu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt16, 2, OneDUInt8, ScalarUInt8) +// vuint16m2_t vwsubu_wv_uint16m2_ta (vuint16m2_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWV8VUInt16VUVU_TA, wsubu_wv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt8) +// vuint16m2_t vwsubu_wx_uint16m2_ta (vuint16m2_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWX8VUInt16VUSU_TA, wsubu_wx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, ScalarUInt8) +// vuint32m2_t vwsubu_vv_uint32m2_ta (vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVV16VUInt32VUVU_TA, wsubu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt32, 2, OneDUInt16, OneDUInt16) +// vuint32m2_t vwsubu_vx_uint32m2_ta (vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVX16VUInt32VUSU_TA, wsubu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt32, 2, OneDUInt16, ScalarUInt16) +// vuint32m2_t vwsubu_wv_uint32m2_ta (vuint32m2_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWV16VUInt32VUVU_TA, wsubu_wv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt16) +// vuint32m2_t vwsubu_wx_uint32m2_ta (vuint32m2_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWX16VUInt32VUSU_TA, wsubu_wx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, ScalarUInt16) +// vuint64m2_t vwsubu_vv_uint64m2_ta (vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVV32VUInt64VUVU_TA, wsubu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt64, 2, OneDUInt32, OneDUInt32) +// vuint64m2_t vwsubu_vx_uint64m2_ta (vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVX32VUInt64VUSU_TA, wsubu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt64, 2, OneDUInt32, ScalarUInt32) +// vuint64m2_t vwsubu_wv_uint64m2_ta (vuint64m2_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWV32VUInt64VUVU_TA, wsubu_wv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt32) +// vuint64m2_t vwsubu_wx_uint64m2_ta (vuint64m2_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWX32VUInt64VUSU_TA, wsubu_wx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, ScalarUInt32) + +// vint16m2_t vwadd_vv_int16m2_tuma (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVV8VInt16VBVIVIVI_TUMA, wadd_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDInt8) +// vint16m2_t vwadd_vx_int16m2_tuma (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVX8VInt16VBVIVISI_TUMA, wadd_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, ScalarInt8) +// vint16m2_t vwadd_wv_int16m2_tuma (vbool8_t mask, vint16m2_t merge, vint16m2_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWV8VInt16VBVIVIVI_TUMA, wadd_wv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt8) +// vint16m2_t vwadd_wx_int16m2_tuma (vbool8_t mask, vint16m2_t merge, vint16m2_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWX8VInt16VBVIVISI_TUMA, wadd_wx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt8) +// vint32m2_t vwadd_vv_int32m2_tuma (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVV16VInt32VBVIVIVI_TUMA, wadd_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDInt16) +// vint32m2_t vwadd_vx_int32m2_tuma (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVX16VInt32VBVIVISI_TUMA, wadd_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, ScalarInt16) +// vint32m2_t vwadd_wv_int32m2_tuma (vbool16_t mask, vint32m2_t merge, vint32m2_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWV16VInt32VBVIVIVI_TUMA, wadd_wv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt16) +// vint32m2_t vwadd_wx_int32m2_tuma (vbool16_t mask, vint32m2_t merge, vint32m2_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWX16VInt32VBVIVISI_TUMA, wadd_wx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt16) +// vint64m2_t vwadd_vv_int64m2_tuma (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVV32VInt64VBVIVIVI_TUMA, wadd_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDInt32) +// vint64m2_t vwadd_vx_int64m2_tuma (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVX32VInt64VBVIVISI_TUMA, wadd_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, ScalarInt32) +// vint64m2_t vwadd_wv_int64m2_tuma (vbool32_t mask, vint64m2_t merge, vint64m2_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWV32VInt64VBVIVIVI_TUMA, wadd_wv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt32) +// vint64m2_t vwadd_wx_int64m2_tuma (vbool32_t mask, vint64m2_t merge, vint64m2_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWX32VInt64VBVIVISI_TUMA, wadd_wx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt32) +// vuint16m2_t vwaddu_vv_uint16m2_tuma (vbool8_t mask, vuint16m2_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVV8VUInt16VBVUVUVU_TUMA, waddu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, OneDUInt8) +// vuint16m2_t vwaddu_vx_uint16m2_tuma (vbool8_t mask, vuint16m2_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVX8VUInt16VBVUVUSU_TUMA, waddu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, ScalarUInt8) +// vuint16m2_t vwaddu_wv_uint16m2_tuma (vbool8_t mask, vuint16m2_t merge, vuint16m2_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWV8VUInt16VBVUVUVU_TUMA, waddu_wv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt8) +// vuint16m2_t vwaddu_wx_uint16m2_tuma (vbool8_t mask, vuint16m2_t merge, vuint16m2_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWX8VUInt16VBVUVUSU_TUMA, waddu_wx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt8) +// vuint32m2_t vwaddu_vv_uint32m2_tuma (vbool16_t mask, vuint32m2_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVV16VUInt32VBVUVUVU_TUMA, waddu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, OneDUInt16) +// vuint32m2_t vwaddu_vx_uint32m2_tuma (vbool16_t mask, vuint32m2_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVX16VUInt32VBVUVUSU_TUMA, waddu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, ScalarUInt16) +// vuint32m2_t vwaddu_wv_uint32m2_tuma (vbool16_t mask, vuint32m2_t merge, vuint32m2_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWV16VUInt32VBVUVUVU_TUMA, waddu_wv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt16) +// vuint32m2_t vwaddu_wx_uint32m2_tuma (vbool16_t mask, vuint32m2_t merge, vuint32m2_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWX16VUInt32VBVUVUSU_TUMA, waddu_wx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt16) +// vuint64m2_t vwaddu_vv_uint64m2_tuma (vbool32_t mask, vuint64m2_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVV32VUInt64VBVUVUVU_TUMA, waddu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, OneDUInt32) +// vuint64m2_t vwaddu_vx_uint64m2_tuma (vbool32_t mask, vuint64m2_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVX32VUInt64VBVUVUSU_TUMA, waddu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, ScalarUInt32) +// vuint64m2_t vwaddu_wv_uint64m2_tuma (vbool32_t mask, vuint64m2_t merge, vuint64m2_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWV32VUInt64VBVUVUVU_TUMA, waddu_wv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt32) +// vuint64m2_t vwaddu_wx_uint64m2_tuma (vbool32_t mask, vuint64m2_t merge, vuint64m2_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWX32VUInt64VBVUVUSU_TUMA, waddu_wx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt32) + +// vint16m2_t vwsub_vv_int16m2_tuma (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVV8VInt16VBVIVIVI_TUMA, wsub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDInt8) +// vint16m2_t vwsub_vx_int16m2_tuma (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVX8VInt16VBVIVISI_TUMA, wsub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, ScalarInt8) +// vint16m2_t vwsub_wv_int16m2_tuma (vbool8_t mask, vint16m2_t merge, vint16m2_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWV8VInt16VBVIVIVI_TUMA, wsub_wv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt8) +// vint16m2_t vwsub_wx_int16m2_tuma (vbool8_t mask, vint16m2_t merge, vint16m2_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWX8VInt16VBVIVISI_TUMA, wsub_wx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt8) +// vint32m2_t vwsub_vv_int32m2_tuma (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVV16VInt32VBVIVIVI_TUMA, wsub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDInt16) +// vint32m2_t vwsub_vx_int32m2_tuma (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVX16VInt32VBVIVISI_TUMA, wsub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, ScalarInt16) +// vint32m2_t vwsub_wv_int32m2_tuma (vbool16_t mask, vint32m2_t merge, vint32m2_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWV16VInt32VBVIVIVI_TUMA, wsub_wv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt16) +// vint32m2_t vwsub_wx_int32m2_tuma (vbool16_t mask, vint32m2_t merge, vint32m2_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWX16VInt32VBVIVISI_TUMA, wsub_wx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt16) +// vint64m2_t vwsub_vv_int64m2_tuma (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVV32VInt64VBVIVIVI_TUMA, wsub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDInt32) +// vint64m2_t vwsub_vx_int64m2_tuma (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVX32VInt64VBVIVISI_TUMA, wsub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, ScalarInt32) +// vint64m2_t vwsub_wv_int64m2_tuma (vbool32_t mask, vint64m2_t merge, vint64m2_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWV32VInt64VBVIVIVI_TUMA, wsub_wv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt32) +// vint64m2_t vwsub_wx_int64m2_tuma (vbool32_t mask, vint64m2_t merge, vint64m2_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWX32VInt64VBVIVISI_TUMA, wsub_wx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt32) +// vuint16m2_t vwsubu_vv_uint16m2_tuma (vbool8_t mask, vuint16m2_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVV8VUInt16VBVUVUVU_TUMA, wsubu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, OneDUInt8) +// vuint16m2_t vwsubu_vx_uint16m2_tuma (vbool8_t mask, vuint16m2_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVX8VUInt16VBVUVUSU_TUMA, wsubu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, ScalarUInt8) +// vuint16m2_t vwsubu_wv_uint16m2_tuma (vbool8_t mask, vuint16m2_t merge, vuint16m2_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWV8VUInt16VBVUVUVU_TUMA, wsubu_wv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt8) +// vuint16m2_t vwsubu_wx_uint16m2_tuma (vbool8_t mask, vuint16m2_t merge, vuint16m2_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWX8VUInt16VBVUVUSU_TUMA, wsubu_wx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt8) +// vuint32m2_t vwsubu_vv_uint32m2_tuma (vbool16_t mask, vuint32m2_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVV16VUInt32VBVUVUVU_TUMA, wsubu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, OneDUInt16) +// vuint32m2_t vwsubu_vx_uint32m2_tuma (vbool16_t mask, vuint32m2_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVX16VUInt32VBVUVUSU_TUMA, wsubu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, ScalarUInt16) +// vuint32m2_t vwsubu_wv_uint32m2_tuma (vbool16_t mask, vuint32m2_t merge, vuint32m2_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWV16VUInt32VBVUVUVU_TUMA, wsubu_wv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt16) +// vuint32m2_t vwsubu_wx_uint32m2_tuma (vbool16_t mask, vuint32m2_t merge, vuint32m2_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWX16VUInt32VBVUVUSU_TUMA, wsubu_wx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt16) +// vuint64m2_t vwsubu_vv_uint64m2_tuma (vbool32_t mask, vuint64m2_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVV32VUInt64VBVUVUVU_TUMA, wsubu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, OneDUInt32) +// vuint64m2_t vwsubu_vx_uint64m2_tuma (vbool32_t mask, vuint64m2_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVX32VUInt64VBVUVUSU_TUMA, wsubu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, ScalarUInt32) +// vuint64m2_t vwsubu_wv_uint64m2_tuma (vbool32_t mask, vuint64m2_t merge, vuint64m2_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWV32VUInt64VBVUVUVU_TUMA, wsubu_wv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt32) +// vuint64m2_t vwsubu_wx_uint64m2_tuma (vbool32_t mask, vuint64m2_t merge, vuint64m2_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWX32VUInt64VBVUVUSU_TUMA, wsubu_wx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt32) + +// vint16m2_t vwadd_vv_int16m2_tumu (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVV8VInt16VBVIVIVI_TUMU, wadd_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDInt8) +// vint16m2_t vwadd_vx_int16m2_tumu (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVX8VInt16VBVIVISI_TUMU, wadd_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, ScalarInt8) +// vint16m2_t vwadd_wv_int16m2_tumu (vbool8_t mask, vint16m2_t merge, vint16m2_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWV8VInt16VBVIVIVI_TUMU, wadd_wv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt8) +// vint16m2_t vwadd_wx_int16m2_tumu (vbool8_t mask, vint16m2_t merge, vint16m2_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWX8VInt16VBVIVISI_TUMU, wadd_wx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt8) +// vint32m2_t vwadd_vv_int32m2_tumu (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVV16VInt32VBVIVIVI_TUMU, wadd_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDInt16) +// vint32m2_t vwadd_vx_int32m2_tumu (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVX16VInt32VBVIVISI_TUMU, wadd_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, ScalarInt16) +// vint32m2_t vwadd_wv_int32m2_tumu (vbool16_t mask, vint32m2_t merge, vint32m2_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWV16VInt32VBVIVIVI_TUMU, wadd_wv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt16) +// vint32m2_t vwadd_wx_int32m2_tumu (vbool16_t mask, vint32m2_t merge, vint32m2_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWX16VInt32VBVIVISI_TUMU, wadd_wx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt16) +// vint64m2_t vwadd_vv_int64m2_tumu (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVV32VInt64VBVIVIVI_TUMU, wadd_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDInt32) +// vint64m2_t vwadd_vx_int64m2_tumu (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVX32VInt64VBVIVISI_TUMU, wadd_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, ScalarInt32) +// vint64m2_t vwadd_wv_int64m2_tumu (vbool32_t mask, vint64m2_t merge, vint64m2_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWV32VInt64VBVIVIVI_TUMU, wadd_wv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt32) +// vint64m2_t vwadd_wx_int64m2_tumu (vbool32_t mask, vint64m2_t merge, vint64m2_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWX32VInt64VBVIVISI_TUMU, wadd_wx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt32) +// vuint16m2_t vwaddu_vv_uint16m2_tumu (vbool8_t mask, vuint16m2_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVV8VUInt16VBVUVUVU_TUMU, waddu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, OneDUInt8) +// vuint16m2_t vwaddu_vx_uint16m2_tumu (vbool8_t mask, vuint16m2_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVX8VUInt16VBVUVUSU_TUMU, waddu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, ScalarUInt8) +// vuint16m2_t vwaddu_wv_uint16m2_tumu (vbool8_t mask, vuint16m2_t merge, vuint16m2_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWV8VUInt16VBVUVUVU_TUMU, waddu_wv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt8) +// vuint16m2_t vwaddu_wx_uint16m2_tumu (vbool8_t mask, vuint16m2_t merge, vuint16m2_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWX8VUInt16VBVUVUSU_TUMU, waddu_wx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt8) +// vuint32m2_t vwaddu_vv_uint32m2_tumu (vbool16_t mask, vuint32m2_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVV16VUInt32VBVUVUVU_TUMU, waddu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, OneDUInt16) +// vuint32m2_t vwaddu_vx_uint32m2_tumu (vbool16_t mask, vuint32m2_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVX16VUInt32VBVUVUSU_TUMU, waddu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, ScalarUInt16) +// vuint32m2_t vwaddu_wv_uint32m2_tumu (vbool16_t mask, vuint32m2_t merge, vuint32m2_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWV16VUInt32VBVUVUVU_TUMU, waddu_wv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt16) +// vuint32m2_t vwaddu_wx_uint32m2_tumu (vbool16_t mask, vuint32m2_t merge, vuint32m2_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWX16VUInt32VBVUVUSU_TUMU, waddu_wx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt16) +// vuint64m2_t vwaddu_vv_uint64m2_tumu (vbool32_t mask, vuint64m2_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVV32VUInt64VBVUVUVU_TUMU, waddu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, OneDUInt32) +// vuint64m2_t vwaddu_vx_uint64m2_tumu (vbool32_t mask, vuint64m2_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVX32VUInt64VBVUVUSU_TUMU, waddu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, ScalarUInt32) +// vuint64m2_t vwaddu_wv_uint64m2_tumu (vbool32_t mask, vuint64m2_t merge, vuint64m2_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWV32VUInt64VBVUVUVU_TUMU, waddu_wv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt32) +// vuint64m2_t vwaddu_wx_uint64m2_tumu (vbool32_t mask, vuint64m2_t merge, vuint64m2_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWX32VUInt64VBVUVUSU_TUMU, waddu_wx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt32) + +// vint16m2_t vwsub_vv_int16m2_tumu (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVV8VInt16VBVIVIVI_TUMU, wsub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDInt8) +// vint16m2_t vwsub_vx_int16m2_tumu (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVX8VInt16VBVIVISI_TUMU, wsub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, ScalarInt8) +// vint16m2_t vwsub_wv_int16m2_tumu (vbool8_t mask, vint16m2_t merge, vint16m2_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWV8VInt16VBVIVIVI_TUMU, wsub_wv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt8) +// vint16m2_t vwsub_wx_int16m2_tumu (vbool8_t mask, vint16m2_t merge, vint16m2_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWX8VInt16VBVIVISI_TUMU, wsub_wx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt8) +// vint32m2_t vwsub_vv_int32m2_tumu (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVV16VInt32VBVIVIVI_TUMU, wsub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDInt16) +// vint32m2_t vwsub_vx_int32m2_tumu (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVX16VInt32VBVIVISI_TUMU, wsub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, ScalarInt16) +// vint32m2_t vwsub_wv_int32m2_tumu (vbool16_t mask, vint32m2_t merge, vint32m2_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWV16VInt32VBVIVIVI_TUMU, wsub_wv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt16) +// vint32m2_t vwsub_wx_int32m2_tumu (vbool16_t mask, vint32m2_t merge, vint32m2_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWX16VInt32VBVIVISI_TUMU, wsub_wx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt16) +// vint64m2_t vwsub_vv_int64m2_tumu (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVV32VInt64VBVIVIVI_TUMU, wsub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDInt32) +// vint64m2_t vwsub_vx_int64m2_tumu (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVX32VInt64VBVIVISI_TUMU, wsub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, ScalarInt32) +// vint64m2_t vwsub_wv_int64m2_tumu (vbool32_t mask, vint64m2_t merge, vint64m2_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWV32VInt64VBVIVIVI_TUMU, wsub_wv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt32) +// vint64m2_t vwsub_wx_int64m2_tumu (vbool32_t mask, vint64m2_t merge, vint64m2_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWX32VInt64VBVIVISI_TUMU, wsub_wx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt32) +// vuint16m2_t vwsubu_vv_uint16m2_tumu (vbool8_t mask, vuint16m2_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVV8VUInt16VBVUVUVU_TUMU, wsubu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, OneDUInt8) +// vuint16m2_t vwsubu_vx_uint16m2_tumu (vbool8_t mask, vuint16m2_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVX8VUInt16VBVUVUSU_TUMU, wsubu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, ScalarUInt8) +// vuint16m2_t vwsubu_wv_uint16m2_tumu (vbool8_t mask, vuint16m2_t merge, vuint16m2_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWV8VUInt16VBVUVUVU_TUMU, wsubu_wv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt8) +// vuint16m2_t vwsubu_wx_uint16m2_tumu (vbool8_t mask, vuint16m2_t merge, vuint16m2_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWX8VUInt16VBVUVUSU_TUMU, wsubu_wx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt8) +// vuint32m2_t vwsubu_vv_uint32m2_tumu (vbool16_t mask, vuint32m2_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVV16VUInt32VBVUVUVU_TUMU, wsubu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, OneDUInt16) +// vuint32m2_t vwsubu_vx_uint32m2_tumu (vbool16_t mask, vuint32m2_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVX16VUInt32VBVUVUSU_TUMU, wsubu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, ScalarUInt16) +// vuint32m2_t vwsubu_wv_uint32m2_tumu (vbool16_t mask, vuint32m2_t merge, vuint32m2_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWV16VUInt32VBVUVUVU_TUMU, wsubu_wv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt16) +// vuint32m2_t vwsubu_wx_uint32m2_tumu (vbool16_t mask, vuint32m2_t merge, vuint32m2_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWX16VUInt32VBVUVUSU_TUMU, wsubu_wx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt16) +// vuint64m2_t vwsubu_vv_uint64m2_tumu (vbool32_t mask, vuint64m2_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVV32VUInt64VBVUVUVU_TUMU, wsubu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, OneDUInt32) +// vuint64m2_t vwsubu_vx_uint64m2_tumu (vbool32_t mask, vuint64m2_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVX32VUInt64VBVUVUSU_TUMU, wsubu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, ScalarUInt32) +// vuint64m2_t vwsubu_wv_uint64m2_tumu (vbool32_t mask, vuint64m2_t merge, vuint64m2_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWV32VUInt64VBVUVUVU_TUMU, wsubu_wv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt32) +// vuint64m2_t vwsubu_wx_uint64m2_tumu (vbool32_t mask, vuint64m2_t merge, vuint64m2_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWX32VUInt64VBVUVUSU_TUMU, wsubu_wx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt32) + +// vint16m2_t vwadd_vv_int16m2_tama (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVV8VInt16VBVIVI_TAMA, wadd_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt8, OneDInt8) +// vint16m2_t vwadd_vx_int16m2_tama (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVX8VInt16VBVISI_TAMA, wadd_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt8, ScalarInt8) +// vint16m2_t vwadd_wv_int16m2_tama (vbool8_t mask, vint16m2_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWV8VInt16VBVIVI_TAMA, wadd_wv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt8) +// vint16m2_t vwadd_wx_int16m2_tama (vbool8_t mask, vint16m2_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWX8VInt16VBVISI_TAMA, wadd_wx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarInt8) +// vint32m2_t vwadd_vv_int32m2_tama (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVV16VInt32VBVIVI_TAMA, wadd_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt16, OneDInt16) +// vint32m2_t vwadd_vx_int32m2_tama (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVX16VInt32VBVISI_TAMA, wadd_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt16, ScalarInt16) +// vint32m2_t vwadd_wv_int32m2_tama (vbool16_t mask, vint32m2_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWV16VInt32VBVIVI_TAMA, wadd_wv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt16) +// vint32m2_t vwadd_wx_int32m2_tama (vbool16_t mask, vint32m2_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWX16VInt32VBVISI_TAMA, wadd_wx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarInt16) +// vint64m2_t vwadd_vv_int64m2_tama (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVV32VInt64VBVIVI_TAMA, wadd_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt32, OneDInt32) +// vint64m2_t vwadd_vx_int64m2_tama (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVX32VInt64VBVISI_TAMA, wadd_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt32, ScalarInt32) +// vint64m2_t vwadd_wv_int64m2_tama (vbool32_t mask, vint64m2_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWV32VInt64VBVIVI_TAMA, wadd_wv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt32) +// vint64m2_t vwadd_wx_int64m2_tama (vbool32_t mask, vint64m2_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWX32VInt64VBVISI_TAMA, wadd_wx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarInt32) +// vuint16m2_t vwaddu_vv_uint16m2_tama (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVV8VUInt16VBVUVU_TAMA, waddu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint16m2_t vwaddu_vx_uint16m2_tama (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVX8VUInt16VBVUSU_TAMA, waddu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vuint16m2_t vwaddu_wv_uint16m2_tama (vbool8_t mask, vuint16m2_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWV8VUInt16VBVUVU_TAMA, waddu_wv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt8) +// vuint16m2_t vwaddu_wx_uint16m2_tama (vbool8_t mask, vuint16m2_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWX8VUInt16VBVUSU_TAMA, waddu_wx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarUInt8) +// vuint32m2_t vwaddu_vv_uint32m2_tama (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVV16VUInt32VBVUVU_TAMA, waddu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint32m2_t vwaddu_vx_uint32m2_tama (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVX16VUInt32VBVUSU_TAMA, waddu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vuint32m2_t vwaddu_wv_uint32m2_tama (vbool16_t mask, vuint32m2_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWV16VUInt32VBVUVU_TAMA, waddu_wv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt16) +// vuint32m2_t vwaddu_wx_uint32m2_tama (vbool16_t mask, vuint32m2_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWX16VUInt32VBVUSU_TAMA, waddu_wx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarUInt16) +// vuint64m2_t vwaddu_vv_uint64m2_tama (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVV32VUInt64VBVUVU_TAMA, waddu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint64m2_t vwaddu_vx_uint64m2_tama (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVX32VUInt64VBVUSU_TAMA, waddu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vuint64m2_t vwaddu_wv_uint64m2_tama (vbool32_t mask, vuint64m2_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWV32VUInt64VBVUVU_TAMA, waddu_wv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt32) +// vuint64m2_t vwaddu_wx_uint64m2_tama (vbool32_t mask, vuint64m2_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWX32VUInt64VBVUSU_TAMA, waddu_wx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarUInt32) + +// vint16m2_t vwsub_vv_int16m2_tama (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVV8VInt16VBVIVI_TAMA, wsub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt8, OneDInt8) +// vint16m2_t vwsub_vx_int16m2_tama (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVX8VInt16VBVISI_TAMA, wsub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt8, ScalarInt8) +// vint16m2_t vwsub_wv_int16m2_tama (vbool8_t mask, vint16m2_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWV8VInt16VBVIVI_TAMA, wsub_wv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt8) +// vint16m2_t vwsub_wx_int16m2_tama (vbool8_t mask, vint16m2_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWX8VInt16VBVISI_TAMA, wsub_wx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarInt8) +// vint32m2_t vwsub_vv_int32m2_tama (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVV16VInt32VBVIVI_TAMA, wsub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt16, OneDInt16) +// vint32m2_t vwsub_vx_int32m2_tama (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVX16VInt32VBVISI_TAMA, wsub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt16, ScalarInt16) +// vint32m2_t vwsub_wv_int32m2_tama (vbool16_t mask, vint32m2_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWV16VInt32VBVIVI_TAMA, wsub_wv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt16) +// vint32m2_t vwsub_wx_int32m2_tama (vbool16_t mask, vint32m2_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWX16VInt32VBVISI_TAMA, wsub_wx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarInt16) +// vint64m2_t vwsub_vv_int64m2_tama (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVV32VInt64VBVIVI_TAMA, wsub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt32, OneDInt32) +// vint64m2_t vwsub_vx_int64m2_tama (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVX32VInt64VBVISI_TAMA, wsub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt32, ScalarInt32) +// vint64m2_t vwsub_wv_int64m2_tama (vbool32_t mask, vint64m2_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWV32VInt64VBVIVI_TAMA, wsub_wv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt32) +// vint64m2_t vwsub_wx_int64m2_tama (vbool32_t mask, vint64m2_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWX32VInt64VBVISI_TAMA, wsub_wx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarInt32) +// vuint16m2_t vwsubu_vv_uint16m2_tama (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVV8VUInt16VBVUVU_TAMA, wsubu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint16m2_t vwsubu_vx_uint16m2_tama (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVX8VUInt16VBVUSU_TAMA, wsubu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vuint16m2_t vwsubu_wv_uint16m2_tama (vbool8_t mask, vuint16m2_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWV8VUInt16VBVUVU_TAMA, wsubu_wv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt8) +// vuint16m2_t vwsubu_wx_uint16m2_tama (vbool8_t mask, vuint16m2_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWX8VUInt16VBVUSU_TAMA, wsubu_wx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarUInt8) +// vuint32m2_t vwsubu_vv_uint32m2_tama (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVV16VUInt32VBVUVU_TAMA, wsubu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint32m2_t vwsubu_vx_uint32m2_tama (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVX16VUInt32VBVUSU_TAMA, wsubu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vuint32m2_t vwsubu_wv_uint32m2_tama (vbool16_t mask, vuint32m2_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWV16VUInt32VBVUVU_TAMA, wsubu_wv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt16) +// vuint32m2_t vwsubu_wx_uint32m2_tama (vbool16_t mask, vuint32m2_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWX16VUInt32VBVUSU_TAMA, wsubu_wx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarUInt16) +// vuint64m2_t vwsubu_vv_uint64m2_tama (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVV32VUInt64VBVUVU_TAMA, wsubu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint64m2_t vwsubu_vx_uint64m2_tama (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVX32VUInt64VBVUSU_TAMA, wsubu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vuint64m2_t vwsubu_wv_uint64m2_tama (vbool32_t mask, vuint64m2_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWV32VUInt64VBVUVU_TAMA, wsubu_wv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt32) +// vuint64m2_t vwsubu_wx_uint64m2_tama (vbool32_t mask, vuint64m2_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWX32VUInt64VBVUSU_TAMA, wsubu_wx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarUInt32) + +// vint16m2_t vwadd_vv_int16m2_tamu (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVV8VInt16VBVIVIVI_TAMU, wadd_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDInt8) +// vint16m2_t vwadd_vx_int16m2_tamu (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVX8VInt16VBVIVISI_TAMU, wadd_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, ScalarInt8) +// vint16m2_t vwadd_wv_int16m2_tamu (vbool8_t mask, vint16m2_t merge, vint16m2_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWV8VInt16VBVIVIVI_TAMU, wadd_wv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt8) +// vint16m2_t vwadd_wx_int16m2_tamu (vbool8_t mask, vint16m2_t merge, vint16m2_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWX8VInt16VBVIVISI_TAMU, wadd_wx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt8) +// vint32m2_t vwadd_vv_int32m2_tamu (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVV16VInt32VBVIVIVI_TAMU, wadd_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDInt16) +// vint32m2_t vwadd_vx_int32m2_tamu (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVX16VInt32VBVIVISI_TAMU, wadd_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, ScalarInt16) +// vint32m2_t vwadd_wv_int32m2_tamu (vbool16_t mask, vint32m2_t merge, vint32m2_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWV16VInt32VBVIVIVI_TAMU, wadd_wv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt16) +// vint32m2_t vwadd_wx_int32m2_tamu (vbool16_t mask, vint32m2_t merge, vint32m2_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWX16VInt32VBVIVISI_TAMU, wadd_wx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt16) +// vint64m2_t vwadd_vv_int64m2_tamu (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVV32VInt64VBVIVIVI_TAMU, wadd_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDInt32) +// vint64m2_t vwadd_vx_int64m2_tamu (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddVX32VInt64VBVIVISI_TAMU, wadd_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, ScalarInt32) +// vint64m2_t vwadd_wv_int64m2_tamu (vbool32_t mask, vint64m2_t merge, vint64m2_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWV32VInt64VBVIVIVI_TAMU, wadd_wv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt32) +// vint64m2_t vwadd_wx_int64m2_tamu (vbool32_t mask, vint64m2_t merge, vint64m2_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WaddWX32VInt64VBVIVISI_TAMU, wadd_wx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt32) +// vuint16m2_t vwaddu_vv_uint16m2_tamu (vbool8_t mask, vuint16m2_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVV8VUInt16VBVUVUVU_TAMU, waddu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, OneDUInt8) +// vuint16m2_t vwaddu_vx_uint16m2_tamu (vbool8_t mask, vuint16m2_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVX8VUInt16VBVUVUSU_TAMU, waddu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, ScalarUInt8) +// vuint16m2_t vwaddu_wv_uint16m2_tamu (vbool8_t mask, vuint16m2_t merge, vuint16m2_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWV8VUInt16VBVUVUVU_TAMU, waddu_wv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt8) +// vuint16m2_t vwaddu_wx_uint16m2_tamu (vbool8_t mask, vuint16m2_t merge, vuint16m2_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWX8VUInt16VBVUVUSU_TAMU, waddu_wx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt8) +// vuint32m2_t vwaddu_vv_uint32m2_tamu (vbool16_t mask, vuint32m2_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVV16VUInt32VBVUVUVU_TAMU, waddu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, OneDUInt16) +// vuint32m2_t vwaddu_vx_uint32m2_tamu (vbool16_t mask, vuint32m2_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVX16VUInt32VBVUVUSU_TAMU, waddu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, ScalarUInt16) +// vuint32m2_t vwaddu_wv_uint32m2_tamu (vbool16_t mask, vuint32m2_t merge, vuint32m2_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWV16VUInt32VBVUVUVU_TAMU, waddu_wv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt16) +// vuint32m2_t vwaddu_wx_uint32m2_tamu (vbool16_t mask, vuint32m2_t merge, vuint32m2_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWX16VUInt32VBVUVUSU_TAMU, waddu_wx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt16) +// vuint64m2_t vwaddu_vv_uint64m2_tamu (vbool32_t mask, vuint64m2_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVV32VUInt64VBVUVUVU_TAMU, waddu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, OneDUInt32) +// vuint64m2_t vwaddu_vx_uint64m2_tamu (vbool32_t mask, vuint64m2_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduVX32VUInt64VBVUVUSU_TAMU, waddu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, ScalarUInt32) +// vuint64m2_t vwaddu_wv_uint64m2_tamu (vbool32_t mask, vuint64m2_t merge, vuint64m2_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWV32VUInt64VBVUVUVU_TAMU, waddu_wv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt32) +// vuint64m2_t vwaddu_wx_uint64m2_tamu (vbool32_t mask, vuint64m2_t merge, vuint64m2_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WadduWX32VUInt64VBVUVUSU_TAMU, waddu_wx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt32) + +// vint16m2_t vwsub_vv_int16m2_tamu (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVV8VInt16VBVIVIVI_TAMU, wsub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDInt8) +// vint16m2_t vwsub_vx_int16m2_tamu (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVX8VInt16VBVIVISI_TAMU, wsub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, ScalarInt8) +// vint16m2_t vwsub_wv_int16m2_tamu (vbool8_t mask, vint16m2_t merge, vint16m2_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWV8VInt16VBVIVIVI_TAMU, wsub_wv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt8) +// vint16m2_t vwsub_wx_int16m2_tamu (vbool8_t mask, vint16m2_t merge, vint16m2_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWX8VInt16VBVIVISI_TAMU, wsub_wx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt8) +// vint32m2_t vwsub_vv_int32m2_tamu (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVV16VInt32VBVIVIVI_TAMU, wsub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDInt16) +// vint32m2_t vwsub_vx_int32m2_tamu (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVX16VInt32VBVIVISI_TAMU, wsub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, ScalarInt16) +// vint32m2_t vwsub_wv_int32m2_tamu (vbool16_t mask, vint32m2_t merge, vint32m2_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWV16VInt32VBVIVIVI_TAMU, wsub_wv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt16) +// vint32m2_t vwsub_wx_int32m2_tamu (vbool16_t mask, vint32m2_t merge, vint32m2_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWX16VInt32VBVIVISI_TAMU, wsub_wx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt16) +// vint64m2_t vwsub_vv_int64m2_tamu (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVV32VInt64VBVIVIVI_TAMU, wsub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDInt32) +// vint64m2_t vwsub_vx_int64m2_tamu (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubVX32VInt64VBVIVISI_TAMU, wsub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, ScalarInt32) +// vint64m2_t vwsub_wv_int64m2_tamu (vbool32_t mask, vint64m2_t merge, vint64m2_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWV32VInt64VBVIVIVI_TAMU, wsub_wv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt32) +// vint64m2_t vwsub_wx_int64m2_tamu (vbool32_t mask, vint64m2_t merge, vint64m2_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubWX32VInt64VBVIVISI_TAMU, wsub_wx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt32) +// vuint16m2_t vwsubu_vv_uint16m2_tamu (vbool8_t mask, vuint16m2_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVV8VUInt16VBVUVUVU_TAMU, wsubu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, OneDUInt8) +// vuint16m2_t vwsubu_vx_uint16m2_tamu (vbool8_t mask, vuint16m2_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVX8VUInt16VBVUVUSU_TAMU, wsubu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, ScalarUInt8) +// vuint16m2_t vwsubu_wv_uint16m2_tamu (vbool8_t mask, vuint16m2_t merge, vuint16m2_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWV8VUInt16VBVUVUVU_TAMU, wsubu_wv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt8) +// vuint16m2_t vwsubu_wx_uint16m2_tamu (vbool8_t mask, vuint16m2_t merge, vuint16m2_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWX8VUInt16VBVUVUSU_TAMU, wsubu_wx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt8) +// vuint32m2_t vwsubu_vv_uint32m2_tamu (vbool16_t mask, vuint32m2_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVV16VUInt32VBVUVUVU_TAMU, wsubu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, OneDUInt16) +// vuint32m2_t vwsubu_vx_uint32m2_tamu (vbool16_t mask, vuint32m2_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVX16VUInt32VBVUVUSU_TAMU, wsubu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, ScalarUInt16) +// vuint32m2_t vwsubu_wv_uint32m2_tamu (vbool16_t mask, vuint32m2_t merge, vuint32m2_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWV16VUInt32VBVUVUVU_TAMU, wsubu_wv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt16) +// vuint32m2_t vwsubu_wx_uint32m2_tamu (vbool16_t mask, vuint32m2_t merge, vuint32m2_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWX16VUInt32VBVUVUSU_TAMU, wsubu_wx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt16) +// vuint64m2_t vwsubu_vv_uint64m2_tamu (vbool32_t mask, vuint64m2_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVV32VUInt64VBVUVUVU_TAMU, wsubu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, OneDUInt32) +// vuint64m2_t vwsubu_vx_uint64m2_tamu (vbool32_t mask, vuint64m2_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuVX32VUInt64VBVUVUSU_TAMU, wsubu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, ScalarUInt32) +// vuint64m2_t vwsubu_wv_uint64m2_tamu (vbool32_t mask, vuint64m2_t merge, vuint64m2_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWV32VUInt64VBVUVUVU_TAMU, wsubu_wv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt32) +// vuint64m2_t vwsubu_wx_uint64m2_tamu (vbool32_t mask, vuint64m2_t merge, vuint64m2_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WsubuWX32VUInt64VBVUVUSU_TAMU, wsubu_wx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt32) + +// vuint16m1_t vzext_vf2_uint16m1_tu (vuint16m1_t merge, vuint8mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf2V16VUInt16VUVU_TU, zext_vf2, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailUndisturbed, OneDUInt16, 2, OneDUInt16, OneDUInt8) +// vuint32m1_t vzext_vf4_uint32m1_tu (vuint32m1_t merge, vuint8mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf4V32VUInt32VUVU_TU, zext_vf4, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailUndisturbed, OneDUInt32, 2, OneDUInt32, OneDUInt8) +// vuint64m1_t vzext_vf8_uint64m1_tu (vuint64m1_t merge, vuint8mf8_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf8V64VUInt64VUVU_TU, zext_vf8, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailUndisturbed, OneDUInt64, 2, OneDUInt64, OneDUInt8) +// vuint32m1_t vzext_vf2_uint32m1_tu (vuint32m1_t merge, vuint16mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf2V32VUInt32VUVU_TU, zext_vf2, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailUndisturbed, OneDUInt32, 2, OneDUInt32, OneDUInt16) +// vuint64m1_t vzext_vf4_uint64m1_tu (vuint64m1_t merge, vuint16mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf4V64VUInt64VUVU_TU, zext_vf4, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailUndisturbed, OneDUInt64, 2, OneDUInt64, OneDUInt16) +// vuint64m1_t vzext_vf2_uint64m1_tu (vuint64m1_t merge, vuint32mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf2V64VUInt64VUVU_TU, zext_vf2, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailUndisturbed, OneDUInt64, 2, OneDUInt64, OneDUInt32) +// vint16m1_t vsext_vf2_int16m1_tu (vint16m1_t merge, vint8mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf2V16VInt16VIVI_TU, sext_vf2, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailUndisturbed, OneDInt16, 2, OneDInt16, OneDInt8) +// vint32m1_t vsext_vf4_int32m1_tu (vint32m1_t merge, vint8mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf4V32VInt32VIVI_TU, sext_vf4, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailUndisturbed, OneDInt32, 2, OneDInt32, OneDInt8) +// vint64m1_t vsext_vf8_int64m1_tu (vint64m1_t merge, vint8mf8_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf8V64VInt64VIVI_TU, sext_vf8, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailUndisturbed, OneDInt64, 2, OneDInt64, OneDInt8) +// vint32m1_t vsext_vf2_int32m1_tu (vint32m1_t merge, vint16mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf2V32VInt32VIVI_TU, sext_vf2, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailUndisturbed, OneDInt32, 2, OneDInt32, OneDInt16) +// vint64m1_t vsext_vf4_int64m1_tu (vint64m1_t merge, vint16mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf4V64VInt64VIVI_TU, sext_vf4, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailUndisturbed, OneDInt64, 2, OneDInt64, OneDInt16) +// vint64m1_t vsext_vf2_int64m1_tu (vint64m1_t merge, vint32mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf2V64VInt64VIVI_TU, sext_vf2, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailUndisturbed, OneDInt64, 2, OneDInt64, OneDInt32) +// vuint16m1_t vzext_vf2_uint16m1_ta (vuint8mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf2V16VUInt16VU_TA, zext_vf2, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailAgnostic, OneDUInt16, 1, OneDUInt8) +// vuint32m1_t vzext_vf4_uint32m1_ta (vuint8mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf4V32VUInt32VU_TA, zext_vf4, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailAgnostic, OneDUInt32, 1, OneDUInt8) +// vuint64m1_t vzext_vf8_uint64m1_ta (vuint8mf8_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf8V64VUInt64VU_TA, zext_vf8, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailAgnostic, OneDUInt64, 1, OneDUInt8) +// vuint32m1_t vzext_vf2_uint32m1_ta (vuint16mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf2V32VUInt32VU_TA, zext_vf2, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailAgnostic, OneDUInt32, 1, OneDUInt16) +// vuint64m1_t vzext_vf4_uint64m1_ta (vuint16mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf4V64VUInt64VU_TA, zext_vf4, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailAgnostic, OneDUInt64, 1, OneDUInt16) +// vuint64m1_t vzext_vf2_uint64m1_ta (vuint32mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf2V64VUInt64VU_TA, zext_vf2, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailAgnostic, OneDUInt64, 1, OneDUInt32) +// vint16m1_t vsext_vf2_int16m1_ta (vint8mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf2V16VInt16VI_TA, sext_vf2, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailAgnostic, OneDInt16, 1, OneDInt8) +// vint32m1_t vsext_vf4_int32m1_ta (vint8mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf4V32VInt32VI_TA, sext_vf4, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailAgnostic, OneDInt32, 1, OneDInt8) +// vint64m1_t vsext_vf8_int64m1_ta (vint8mf8_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf8V64VInt64VI_TA, sext_vf8, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailAgnostic, OneDInt64, 1, OneDInt8) +// vint32m1_t vsext_vf2_int32m1_ta (vint16mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf2V32VInt32VI_TA, sext_vf2, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailAgnostic, OneDInt32, 1, OneDInt16) +// vint64m1_t vsext_vf4_int64m1_ta (vint16mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf4V64VInt64VI_TA, sext_vf4, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailAgnostic, OneDInt64, 1, OneDInt16) +// vint64m1_t vsext_vf2_int64m1_ta (vint32mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf2V64VInt64VI_TA, sext_vf2, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ExtensionOperation | TailAgnostic, OneDInt64, 1, OneDInt32) +// vuint16m1_t vzext_vf2_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint8mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf2V16VUInt16VBVUVU_TUMA, zext_vf2, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt8) +// vuint32m1_t vzext_vf4_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint8mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf4V32VUInt32VBVUVU_TUMA, zext_vf4, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt8) +// vuint64m1_t vzext_vf8_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint8mf8_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf8V64VUInt64VBVUVU_TUMA, zext_vf8, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt8) +// vuint32m1_t vzext_vf2_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint16mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf2V32VUInt32VBVUVU_TUMA, zext_vf2, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt16) +// vuint64m1_t vzext_vf4_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint16mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf4V64VUInt64VBVUVU_TUMA, zext_vf4, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt16) +// vuint64m1_t vzext_vf2_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint32mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf2V64VUInt64VBVUVU_TUMA, zext_vf2, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt32) +// vint16m1_t vsext_vf2_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint8mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf2V16VInt16VBVIVI_TUMA, sext_vf2, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt8) +// vint32m1_t vsext_vf4_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint8mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf4V32VInt32VBVIVI_TUMA, sext_vf4, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt8) +// vint64m1_t vsext_vf8_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint8mf8_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf8V64VInt64VBVIVI_TUMA, sext_vf8, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt8) +// vint32m1_t vsext_vf2_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint16mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf2V32VInt32VBVIVI_TUMA, sext_vf2, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt16) +// vint64m1_t vsext_vf4_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint16mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf4V64VInt64VBVIVI_TUMA, sext_vf4, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt16) +// vint64m1_t vsext_vf2_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint32mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf2V64VInt64VBVIVI_TUMA, sext_vf2, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt32) +// vuint16m1_t vzext_vf2_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint8mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf2V16VUInt16VBVUVU_TUMU, zext_vf2, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt8) +// vuint32m1_t vzext_vf4_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint8mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf4V32VUInt32VBVUVU_TUMU, zext_vf4, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt8) +// vuint64m1_t vzext_vf8_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint8mf8_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf8V64VUInt64VBVUVU_TUMU, zext_vf8, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt8) +// vuint32m1_t vzext_vf2_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint16mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf2V32VUInt32VBVUVU_TUMU, zext_vf2, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt16) +// vuint64m1_t vzext_vf4_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint16mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf4V64VUInt64VBVUVU_TUMU, zext_vf4, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt16) +// vuint64m1_t vzext_vf2_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint32mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf2V64VUInt64VBVUVU_TUMU, zext_vf2, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt32) +// vint16m1_t vsext_vf2_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint8mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf2V16VInt16VBVIVI_TUMU, sext_vf2, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 3, OneDBool, OneDInt16, OneDInt8) +// vint32m1_t vsext_vf4_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint8mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf4V32VInt32VBVIVI_TUMU, sext_vf4, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDInt8) +// vint64m1_t vsext_vf8_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint8mf8_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf8V64VInt64VBVIVI_TUMU, sext_vf8, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 3, OneDBool, OneDInt64, OneDInt8) +// vint32m1_t vsext_vf2_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint16mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf2V32VInt32VBVIVI_TUMU, sext_vf2, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDInt16) +// vint64m1_t vsext_vf4_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint16mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf4V64VInt64VBVIVI_TUMU, sext_vf4, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 3, OneDBool, OneDInt64, OneDInt16) +// vint64m1_t vsext_vf2_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint32mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf2V64VInt64VBVIVI_TUMU, sext_vf2, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 3, OneDBool, OneDInt64, OneDInt32) +// vuint16m1_t vzext_vf2_uint16m1_tama (vbool16_t mask, vuint8mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf2V16VUInt16VBVU_TAMA, zext_vf2, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 2, OneDBool, OneDUInt8) +// vuint32m1_t vzext_vf4_uint32m1_tama (vbool32_t mask, vuint8mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf4V32VUInt32VBVU_TAMA, zext_vf4, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 2, OneDBool, OneDUInt8) +// vuint64m1_t vzext_vf8_uint64m1_tama (vbool64_t mask, vuint8mf8_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf8V64VUInt64VBVU_TAMA, zext_vf8, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 2, OneDBool, OneDUInt8) +// vuint32m1_t vzext_vf2_uint32m1_tama (vbool32_t mask, vuint16mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf2V32VUInt32VBVU_TAMA, zext_vf2, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 2, OneDBool, OneDUInt16) +// vuint64m1_t vzext_vf4_uint64m1_tama (vbool64_t mask, vuint16mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf4V64VUInt64VBVU_TAMA, zext_vf4, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 2, OneDBool, OneDUInt16) +// vuint64m1_t vzext_vf2_uint64m1_tama (vbool64_t mask, vuint32mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf2V64VUInt64VBVU_TAMA, zext_vf2, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 2, OneDBool, OneDUInt32) +// vint16m1_t vsext_vf2_int16m1_tama (vbool16_t mask, vint8mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf2V16VInt16VBVI_TAMA, sext_vf2, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 2, OneDBool, OneDInt8) +// vint32m1_t vsext_vf4_int32m1_tama (vbool32_t mask, vint8mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf4V32VInt32VBVI_TAMA, sext_vf4, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 2, OneDBool, OneDInt8) +// vint64m1_t vsext_vf8_int64m1_tama (vbool64_t mask, vint8mf8_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf8V64VInt64VBVI_TAMA, sext_vf8, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 2, OneDBool, OneDInt8) +// vint32m1_t vsext_vf2_int32m1_tama (vbool32_t mask, vint16mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf2V32VInt32VBVI_TAMA, sext_vf2, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 2, OneDBool, OneDInt16) +// vint64m1_t vsext_vf4_int64m1_tama (vbool64_t mask, vint16mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf4V64VInt64VBVI_TAMA, sext_vf4, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 2, OneDBool, OneDInt16) +// vint64m1_t vsext_vf2_int64m1_tama (vbool64_t mask, vint32mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf2V64VInt64VBVI_TAMA, sext_vf2, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 2, OneDBool, OneDInt32) +// vuint16m1_t vzext_vf2_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint8mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf2V16VUInt16VBVUVU_TAMU, zext_vf2, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt8) +// vuint32m1_t vzext_vf4_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint8mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf4V32VUInt32VBVUVU_TAMU, zext_vf4, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt8) +// vuint64m1_t vzext_vf8_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint8mf8_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf8V64VUInt64VBVUVU_TAMU, zext_vf8, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt8) +// vuint32m1_t vzext_vf2_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint16mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf2V32VUInt32VBVUVU_TAMU, zext_vf2, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt16) +// vuint64m1_t vzext_vf4_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint16mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf4V64VUInt64VBVUVU_TAMU, zext_vf4, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt16) +// vuint64m1_t vzext_vf2_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint32mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Zext_vf2V64VUInt64VBVUVU_TAMU, zext_vf2, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt32) +// vint16m1_t vsext_vf2_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint8mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf2V16VInt16VBVIVI_TAMU, sext_vf2, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 3, OneDBool, OneDInt16, OneDInt8) +// vint32m1_t vsext_vf4_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint8mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf4V32VInt32VBVIVI_TAMU, sext_vf4, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDInt8) +// vint64m1_t vsext_vf8_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint8mf8_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf8V64VInt64VBVIVI_TAMU, sext_vf8, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 3, OneDBool, OneDInt64, OneDInt8) +// vint32m1_t vsext_vf2_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint16mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf2V32VInt32VBVIVI_TAMU, sext_vf2, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDInt16) +// vint64m1_t vsext_vf4_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint16mf4_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf4V64VInt64VBVIVI_TAMU, sext_vf4, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 3, OneDBool, OneDInt64, OneDInt16) +// vint64m1_t vsext_vf2_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint32mf2_t op1, size_t vl); +CUSTOM_OP_TYPE(Sext_vf2V64VInt64VBVIVI_TAMU, sext_vf2, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | ExtensionOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 3, OneDBool, OneDInt64, OneDInt32) + +// vint8m1_t vadc_vvm_int8m1_tu (vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, vbool8_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVVM8VInt8VIVIVIVB_TU, adc_vvm, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 4, OneDInt8, OneDInt8, OneDInt8, OneDBool) +// vint8m1_t vadc_vxm_int8m1_tu (vint8m1_t merge, vint8m1_t op1, int8_t op2, vbool8_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVXM8VInt8VIVISIVB_TU, adc_vxm, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 4, OneDInt8, OneDInt8, ScalarInt8, OneDBool) +// vint16m1_t vadc_vvm_int16m1_tu (vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, vbool16_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVVM16VInt16VIVIVIVB_TU, adc_vvm, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 4, OneDInt16, OneDInt16, OneDInt16, OneDBool) +// vint16m1_t vadc_vxm_int16m1_tu (vint16m1_t merge, vint16m1_t op1, int16_t op2, vbool16_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVXM16VInt16VIVISIVB_TU, adc_vxm, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 4, OneDInt16, OneDInt16, ScalarInt16, OneDBool) +// vint32m1_t vadc_vvm_int32m1_tu (vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, vbool32_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVVM32VInt32VIVIVIVB_TU, adc_vvm, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 4, OneDInt32, OneDInt32, OneDInt32, OneDBool) +// vint32m1_t vadc_vxm_int32m1_tu (vint32m1_t merge, vint32m1_t op1, int32_t op2, vbool32_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVXM32VInt32VIVISIVB_TU, adc_vxm, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 4, OneDInt32, OneDInt32, ScalarInt32, OneDBool) +// vint64m1_t vadc_vvm_int64m1_tu (vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, vbool64_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVVM64VInt64VIVIVIVB_TU, adc_vvm, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 4, OneDInt64, OneDInt64, OneDInt64, OneDBool) +// vint64m1_t vadc_vxm_int64m1_tu (vint64m1_t merge, vint64m1_t op1, int64_t op2, vbool64_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVXM64VInt64VIVISIVB_TU, adc_vxm, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 4, OneDInt64, OneDInt64, ScalarInt64, OneDBool) +// vuint8m1_t vadc_vvm_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, vbool8_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVVM8VUInt8VUVUVUVB_TU, adc_vvm, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 4, OneDUInt8, OneDUInt8, OneDUInt8, OneDBool) +// vuint8m1_t vadc_vxm_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, vbool8_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVXM8VUInt8VUVUSUVB_TU, adc_vxm, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 4, OneDUInt8, OneDUInt8, ScalarUInt8, OneDBool) +// vuint16m1_t vadc_vvm_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, vbool16_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVVM16VUInt16VUVUVUVB_TU, adc_vvm, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 4, OneDUInt16, OneDUInt16, OneDUInt16, OneDBool) +// vuint16m1_t vadc_vxm_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, vbool16_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVXM16VUInt16VUVUSUVB_TU, adc_vxm, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 4, OneDUInt16, OneDUInt16, ScalarUInt16, OneDBool) +// vuint32m1_t vadc_vvm_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, vbool32_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVVM32VUInt32VUVUVUVB_TU, adc_vvm, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 4, OneDUInt32, OneDUInt32, OneDUInt32, OneDBool) +// vuint32m1_t vadc_vxm_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, vbool32_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVXM32VUInt32VUVUSUVB_TU, adc_vxm, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 4, OneDUInt32, OneDUInt32, ScalarUInt32, OneDBool) +// vuint64m1_t vadc_vvm_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, vbool64_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVVM64VUInt64VUVUVUVB_TU, adc_vvm, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 4, OneDUInt64, OneDUInt64, OneDUInt64, OneDBool) +// vuint64m1_t vadc_vxm_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, vbool64_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVXM64VUInt64VUVUSUVB_TU, adc_vxm, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 4, OneDUInt64, OneDUInt64, ScalarUInt64, OneDBool) +// vint8m1_t vsbc_vvm_int8m1_tu (vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, vbool8_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVVM8VInt8VIVIVIVB_TU, sbc_vvm, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 4, OneDInt8, OneDInt8, OneDInt8, OneDBool) +// vint8m1_t vsbc_vxm_int8m1_tu (vint8m1_t merge, vint8m1_t op1, int8_t op2, vbool8_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVXM8VInt8VIVISIVB_TU, sbc_vxm, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 4, OneDInt8, OneDInt8, ScalarInt8, OneDBool) +// vint16m1_t vsbc_vvm_int16m1_tu (vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, vbool16_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVVM16VInt16VIVIVIVB_TU, sbc_vvm, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 4, OneDInt16, OneDInt16, OneDInt16, OneDBool) +// vint16m1_t vsbc_vxm_int16m1_tu (vint16m1_t merge, vint16m1_t op1, int16_t op2, vbool16_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVXM16VInt16VIVISIVB_TU, sbc_vxm, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 4, OneDInt16, OneDInt16, ScalarInt16, OneDBool) +// vint32m1_t vsbc_vvm_int32m1_tu (vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, vbool32_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVVM32VInt32VIVIVIVB_TU, sbc_vvm, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 4, OneDInt32, OneDInt32, OneDInt32, OneDBool) +// vint32m1_t vsbc_vxm_int32m1_tu (vint32m1_t merge, vint32m1_t op1, int32_t op2, vbool32_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVXM32VInt32VIVISIVB_TU, sbc_vxm, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 4, OneDInt32, OneDInt32, ScalarInt32, OneDBool) +// vint64m1_t vsbc_vvm_int64m1_tu (vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, vbool64_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVVM64VInt64VIVIVIVB_TU, sbc_vvm, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 4, OneDInt64, OneDInt64, OneDInt64, OneDBool) +// vint64m1_t vsbc_vxm_int64m1_tu (vint64m1_t merge, vint64m1_t op1, int64_t op2, vbool64_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVXM64VInt64VIVISIVB_TU, sbc_vxm, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 4, OneDInt64, OneDInt64, ScalarInt64, OneDBool) +// vuint8m1_t vsbc_vvm_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, vbool8_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVVM8VUInt8VUVUVUVB_TU, sbc_vvm, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 4, OneDUInt8, OneDUInt8, OneDUInt8, OneDBool) +// vuint8m1_t vsbc_vxm_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, vbool8_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVXM8VUInt8VUVUSUVB_TU, sbc_vxm, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 4, OneDUInt8, OneDUInt8, ScalarUInt8, OneDBool) +// vuint16m1_t vsbc_vvm_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, vbool16_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVVM16VUInt16VUVUVUVB_TU, sbc_vvm, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 4, OneDUInt16, OneDUInt16, OneDUInt16, OneDBool) +// vuint16m1_t vsbc_vxm_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, vbool16_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVXM16VUInt16VUVUSUVB_TU, sbc_vxm, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 4, OneDUInt16, OneDUInt16, ScalarUInt16, OneDBool) +// vuint32m1_t vsbc_vvm_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, vbool32_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVVM32VUInt32VUVUVUVB_TU, sbc_vvm, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 4, OneDUInt32, OneDUInt32, OneDUInt32, OneDBool) +// vuint32m1_t vsbc_vxm_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, vbool32_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVXM32VUInt32VUVUSUVB_TU, sbc_vxm, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 4, OneDUInt32, OneDUInt32, ScalarUInt32, OneDBool) +// vuint64m1_t vsbc_vvm_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, vbool64_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVVM64VUInt64VUVUVUVB_TU, sbc_vvm, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 4, OneDUInt64, OneDUInt64, OneDUInt64, OneDBool) +// vuint64m1_t vsbc_vxm_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, vbool64_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVXM64VUInt64VUVUSUVB_TU, sbc_vxm, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 4, OneDUInt64, OneDUInt64, ScalarUInt64, OneDBool) +// vint8m1_t vadc_vvm_int8m1_ta (vint8m1_t op1, vint8m1_t op2, vbool8_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVVM8VInt8VIVIVB_TA, adc_vvm, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 3, OneDInt8, OneDInt8, OneDBool) +// vint8m1_t vadc_vxm_int8m1_ta (vint8m1_t op1, int8_t op2, vbool8_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVXM8VInt8VISIVB_TA, adc_vxm, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 3, OneDInt8, ScalarInt8, OneDBool) +// vint16m1_t vadc_vvm_int16m1_ta (vint16m1_t op1, vint16m1_t op2, vbool16_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVVM16VInt16VIVIVB_TA, adc_vvm, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 3, OneDInt16, OneDInt16, OneDBool) +// vint16m1_t vadc_vxm_int16m1_ta (vint16m1_t op1, int16_t op2, vbool16_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVXM16VInt16VISIVB_TA, adc_vxm, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 3, OneDInt16, ScalarInt16, OneDBool) +// vint32m1_t vadc_vvm_int32m1_ta (vint32m1_t op1, vint32m1_t op2, vbool32_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVVM32VInt32VIVIVB_TA, adc_vvm, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 3, OneDInt32, OneDInt32, OneDBool) +// vint32m1_t vadc_vxm_int32m1_ta (vint32m1_t op1, int32_t op2, vbool32_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVXM32VInt32VISIVB_TA, adc_vxm, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 3, OneDInt32, ScalarInt32, OneDBool) +// vint64m1_t vadc_vvm_int64m1_ta (vint64m1_t op1, vint64m1_t op2, vbool64_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVVM64VInt64VIVIVB_TA, adc_vvm, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 3, OneDInt64, OneDInt64, OneDBool) +// vint64m1_t vadc_vxm_int64m1_ta (vint64m1_t op1, int64_t op2, vbool64_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVXM64VInt64VISIVB_TA, adc_vxm, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 3, OneDInt64, ScalarInt64, OneDBool) +// vuint8m1_t vadc_vvm_uint8m1_ta (vuint8m1_t op1, vuint8m1_t op2, vbool8_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVVM8VUInt8VUVUVB_TA, adc_vvm, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDBool) +// vuint8m1_t vadc_vxm_uint8m1_ta (vuint8m1_t op1, uint8_t op2, vbool8_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVXM8VUInt8VUSUVB_TA, adc_vxm, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 3, OneDUInt8, ScalarUInt8, OneDBool) +// vuint16m1_t vadc_vvm_uint16m1_ta (vuint16m1_t op1, vuint16m1_t op2, vbool16_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVVM16VUInt16VUVUVB_TA, adc_vvm, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDBool) +// vuint16m1_t vadc_vxm_uint16m1_ta (vuint16m1_t op1, uint16_t op2, vbool16_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVXM16VUInt16VUSUVB_TA, adc_vxm, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 3, OneDUInt16, ScalarUInt16, OneDBool) +// vuint32m1_t vadc_vvm_uint32m1_ta (vuint32m1_t op1, vuint32m1_t op2, vbool32_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVVM32VUInt32VUVUVB_TA, adc_vvm, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDBool) +// vuint32m1_t vadc_vxm_uint32m1_ta (vuint32m1_t op1, uint32_t op2, vbool32_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVXM32VUInt32VUSUVB_TA, adc_vxm, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 3, OneDUInt32, ScalarUInt32, OneDBool) +// vuint64m1_t vadc_vvm_uint64m1_ta (vuint64m1_t op1, vuint64m1_t op2, vbool64_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVVM64VUInt64VUVUVB_TA, adc_vvm, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDBool) +// vuint64m1_t vadc_vxm_uint64m1_ta (vuint64m1_t op1, uint64_t op2, vbool64_t carryin, size_t vl); +CUSTOM_OP_TYPE(AdcVXM64VUInt64VUSUVB_TA, adc_vxm, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 3, OneDUInt64, ScalarUInt64, OneDBool) +// vint8m1_t vsbc_vvm_int8m1_ta (vint8m1_t op1, vint8m1_t op2, vbool8_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVVM8VInt8VIVIVB_TA, sbc_vvm, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 3, OneDInt8, OneDInt8, OneDBool) +// vint8m1_t vsbc_vxm_int8m1_ta (vint8m1_t op1, int8_t op2, vbool8_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVXM8VInt8VISIVB_TA, sbc_vxm, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 3, OneDInt8, ScalarInt8, OneDBool) +// vint16m1_t vsbc_vvm_int16m1_ta (vint16m1_t op1, vint16m1_t op2, vbool16_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVVM16VInt16VIVIVB_TA, sbc_vvm, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 3, OneDInt16, OneDInt16, OneDBool) +// vint16m1_t vsbc_vxm_int16m1_ta (vint16m1_t op1, int16_t op2, vbool16_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVXM16VInt16VISIVB_TA, sbc_vxm, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 3, OneDInt16, ScalarInt16, OneDBool) +// vint32m1_t vsbc_vvm_int32m1_ta (vint32m1_t op1, vint32m1_t op2, vbool32_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVVM32VInt32VIVIVB_TA, sbc_vvm, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 3, OneDInt32, OneDInt32, OneDBool) +// vint32m1_t vsbc_vxm_int32m1_ta (vint32m1_t op1, int32_t op2, vbool32_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVXM32VInt32VISIVB_TA, sbc_vxm, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 3, OneDInt32, ScalarInt32, OneDBool) +// vint64m1_t vsbc_vvm_int64m1_ta (vint64m1_t op1, vint64m1_t op2, vbool64_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVVM64VInt64VIVIVB_TA, sbc_vvm, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 3, OneDInt64, OneDInt64, OneDBool) +// vint64m1_t vsbc_vxm_int64m1_ta (vint64m1_t op1, int64_t op2, vbool64_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVXM64VInt64VISIVB_TA, sbc_vxm, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 3, OneDInt64, ScalarInt64, OneDBool) +// vuint8m1_t vsbc_vvm_uint8m1_ta (vuint8m1_t op1, vuint8m1_t op2, vbool8_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVVM8VUInt8VUVUVB_TA, sbc_vvm, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDBool) +// vuint8m1_t vsbc_vxm_uint8m1_ta (vuint8m1_t op1, uint8_t op2, vbool8_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVXM8VUInt8VUSUVB_TA, sbc_vxm, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 3, OneDUInt8, ScalarUInt8, OneDBool) +// vuint16m1_t vsbc_vvm_uint16m1_ta (vuint16m1_t op1, vuint16m1_t op2, vbool16_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVVM16VUInt16VUVUVB_TA, sbc_vvm, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDBool) +// vuint16m1_t vsbc_vxm_uint16m1_ta (vuint16m1_t op1, uint16_t op2, vbool16_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVXM16VUInt16VUSUVB_TA, sbc_vxm, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 3, OneDUInt16, ScalarUInt16, OneDBool) +// vuint32m1_t vsbc_vvm_uint32m1_ta (vuint32m1_t op1, vuint32m1_t op2, vbool32_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVVM32VUInt32VUVUVB_TA, sbc_vvm, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDBool) +// vuint32m1_t vsbc_vxm_uint32m1_ta (vuint32m1_t op1, uint32_t op2, vbool32_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVXM32VUInt32VUSUVB_TA, sbc_vxm, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 3, OneDUInt32, ScalarUInt32, OneDBool) +// vuint64m1_t vsbc_vvm_uint64m1_ta (vuint64m1_t op1, vuint64m1_t op2, vbool64_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVVM64VUInt64VUVUVB_TA, sbc_vvm, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDBool) +// vuint64m1_t vsbc_vxm_uint64m1_ta (vuint64m1_t op1, uint64_t op2, vbool64_t borrowin, size_t vl); +CUSTOM_OP_TYPE(SbcVXM64VUInt64VUSUVB_TA, sbc_vxm, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 3, OneDUInt64, ScalarUInt64, OneDBool) + +// vint8m1_t vand_vv_int8m1_tu (vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV8VInt8VIVIVI_TU, and_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vand_vx_int8m1_tu (vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX8VInt8VIVISI_TU, and_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vand_vv_int16m1_tu (vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV16VInt16VIVIVI_TU, and_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vand_vx_int16m1_tu (vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX16VInt16VIVISI_TU, and_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vand_vv_int32m1_tu (vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV32VInt32VIVIVI_TU, and_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vand_vx_int32m1_tu (vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX32VInt32VIVISI_TU, and_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vand_vv_int64m1_tu (vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV64VInt64VIVIVI_TU, and_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vand_vx_int64m1_tu (vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX64VInt64VIVISI_TU, and_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vand_vv_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV8VUInt8VUVUVU_TU, and_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vand_vx_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX8VUInt8VUVUSU_TU, and_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vand_vv_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV16VUInt16VUVUVU_TU, and_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vand_vx_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX16VUInt16VUVUSU_TU, and_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vand_vv_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV32VUInt32VUVUVU_TU, and_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vand_vx_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX32VUInt32VUVUSU_TU, and_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vand_vv_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV64VUInt64VUVUVU_TU, and_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vand_vx_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX64VUInt64VUVUSU_TU, and_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vor_vv_int8m1_tu (vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV8VInt8VIVIVI_TU, or_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vor_vx_int8m1_tu (vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX8VInt8VIVISI_TU, or_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vor_vv_int16m1_tu (vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV16VInt16VIVIVI_TU, or_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vor_vx_int16m1_tu (vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX16VInt16VIVISI_TU, or_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vor_vv_int32m1_tu (vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV32VInt32VIVIVI_TU, or_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vor_vx_int32m1_tu (vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX32VInt32VIVISI_TU, or_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vor_vv_int64m1_tu (vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV64VInt64VIVIVI_TU, or_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vor_vx_int64m1_tu (vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX64VInt64VIVISI_TU, or_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vor_vv_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV8VUInt8VUVUVU_TU, or_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vor_vx_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX8VUInt8VUVUSU_TU, or_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vor_vv_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV16VUInt16VUVUVU_TU, or_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vor_vx_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX16VUInt16VUVUSU_TU, or_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vor_vv_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV32VUInt32VUVUVU_TU, or_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vor_vx_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX32VUInt32VUVUSU_TU, or_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vor_vv_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV64VUInt64VUVUVU_TU, or_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vor_vx_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX64VUInt64VUVUSU_TU, or_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vxor_vv_int8m1_tu (vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV8VInt8VIVIVI_TU, xor_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vxor_vx_int8m1_tu (vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX8VInt8VIVISI_TU, xor_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vxor_vv_int16m1_tu (vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV16VInt16VIVIVI_TU, xor_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vxor_vx_int16m1_tu (vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX16VInt16VIVISI_TU, xor_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vxor_vv_int32m1_tu (vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV32VInt32VIVIVI_TU, xor_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vxor_vx_int32m1_tu (vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX32VInt32VIVISI_TU, xor_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vxor_vv_int64m1_tu (vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV64VInt64VIVIVI_TU, xor_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vxor_vx_int64m1_tu (vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX64VInt64VIVISI_TU, xor_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vxor_vv_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV8VUInt8VUVUVU_TU, xor_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vxor_vx_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX8VUInt8VUVUSU_TU, xor_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vxor_vv_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV16VUInt16VUVUVU_TU, xor_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vxor_vx_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX16VUInt16VUVUSU_TU, xor_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vxor_vv_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV32VUInt32VUVUVU_TU, xor_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vxor_vx_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX32VUInt32VUVUSU_TU, xor_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vxor_vv_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV64VUInt64VUVUVU_TU, xor_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vxor_vx_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX64VUInt64VUVUSU_TU, xor_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vand_vv_int8m1_ta (vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV8VInt8VIVI_TA, and_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDInt8) +// vint8m1_t vand_vx_int8m1_ta (vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX8VInt8VISI_TA, and_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, ScalarInt8) +// vint16m1_t vand_vv_int16m1_ta (vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV16VInt16VIVI_TA, and_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDInt16) +// vint16m1_t vand_vx_int16m1_ta (vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX16VInt16VISI_TA, and_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarInt16) +// vint32m1_t vand_vv_int32m1_ta (vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV32VInt32VIVI_TA, and_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDInt32) +// vint32m1_t vand_vx_int32m1_ta (vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX32VInt32VISI_TA, and_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarInt32) +// vint64m1_t vand_vv_int64m1_ta (vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV64VInt64VIVI_TA, and_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDInt64) +// vint64m1_t vand_vx_int64m1_ta (vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX64VInt64VISI_TA, and_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarInt64) +// vuint8m1_t vand_vv_uint8m1_ta (vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV8VUInt8VUVU_TA, and_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint8m1_t vand_vx_uint8m1_ta (vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX8VUInt8VUSU_TA, and_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +// vuint16m1_t vand_vv_uint16m1_ta (vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV16VUInt16VUVU_TA, and_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint16m1_t vand_vx_uint16m1_ta (vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX16VUInt16VUSU_TA, and_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +// vuint32m1_t vand_vv_uint32m1_ta (vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV32VUInt32VUVU_TA, and_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint32m1_t vand_vx_uint32m1_ta (vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX32VUInt32VUSU_TA, and_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +// vuint64m1_t vand_vv_uint64m1_ta (vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV64VUInt64VUVU_TA, and_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vuint64m1_t vand_vx_uint64m1_ta (vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX64VUInt64VUSU_TA, and_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +// vint8m1_t vor_vv_int8m1_ta (vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV8VInt8VIVI_TA, or_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDInt8) +// vint8m1_t vor_vx_int8m1_ta (vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX8VInt8VISI_TA, or_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, ScalarInt8) +// vint16m1_t vor_vv_int16m1_ta (vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV16VInt16VIVI_TA, or_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDInt16) +// vint16m1_t vor_vx_int16m1_ta (vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX16VInt16VISI_TA, or_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarInt16) +// vint32m1_t vor_vv_int32m1_ta (vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV32VInt32VIVI_TA, or_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDInt32) +// vint32m1_t vor_vx_int32m1_ta (vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX32VInt32VISI_TA, or_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarInt32) +// vint64m1_t vor_vv_int64m1_ta (vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV64VInt64VIVI_TA, or_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDInt64) +// vint64m1_t vor_vx_int64m1_ta (vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX64VInt64VISI_TA, or_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarInt64) +// vuint8m1_t vor_vv_uint8m1_ta (vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV8VUInt8VUVU_TA, or_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint8m1_t vor_vx_uint8m1_ta (vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX8VUInt8VUSU_TA, or_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +// vuint16m1_t vor_vv_uint16m1_ta (vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV16VUInt16VUVU_TA, or_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint16m1_t vor_vx_uint16m1_ta (vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX16VUInt16VUSU_TA, or_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +// vuint32m1_t vor_vv_uint32m1_ta (vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV32VUInt32VUVU_TA, or_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint32m1_t vor_vx_uint32m1_ta (vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX32VUInt32VUSU_TA, or_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +// vuint64m1_t vor_vv_uint64m1_ta (vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV64VUInt64VUVU_TA, or_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vuint64m1_t vor_vx_uint64m1_ta (vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX64VUInt64VUSU_TA, or_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +// vint8m1_t vxor_vv_int8m1_ta (vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV8VInt8VIVI_TA, xor_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDInt8) +// vint8m1_t vxor_vx_int8m1_ta (vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX8VInt8VISI_TA, xor_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, ScalarInt8) +// vint16m1_t vxor_vv_int16m1_ta (vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV16VInt16VIVI_TA, xor_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDInt16) +// vint16m1_t vxor_vx_int16m1_ta (vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX16VInt16VISI_TA, xor_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarInt16) +// vint32m1_t vxor_vv_int32m1_ta (vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV32VInt32VIVI_TA, xor_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDInt32) +// vint32m1_t vxor_vx_int32m1_ta (vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX32VInt32VISI_TA, xor_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarInt32) +// vint64m1_t vxor_vv_int64m1_ta (vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV64VInt64VIVI_TA, xor_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDInt64) +// vint64m1_t vxor_vx_int64m1_ta (vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX64VInt64VISI_TA, xor_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarInt64) +// vuint8m1_t vxor_vv_uint8m1_ta (vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV8VUInt8VUVU_TA, xor_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint8m1_t vxor_vx_uint8m1_ta (vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX8VUInt8VUSU_TA, xor_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +// vuint16m1_t vxor_vv_uint16m1_ta (vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV16VUInt16VUVU_TA, xor_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint16m1_t vxor_vx_uint16m1_ta (vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX16VUInt16VUSU_TA, xor_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +// vuint32m1_t vxor_vv_uint32m1_ta (vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV32VUInt32VUVU_TA, xor_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint32m1_t vxor_vx_uint32m1_ta (vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX32VUInt32VUSU_TA, xor_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +// vuint64m1_t vxor_vv_uint64m1_ta (vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV64VUInt64VUVU_TA, xor_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vuint64m1_t vxor_vx_uint64m1_ta (vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX64VUInt64VUSU_TA, xor_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +// vint8m1_t vand_vv_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV8VInt8VBVIVIVI_TUMA, and_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vand_vx_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX8VInt8VBVIVISI_TUMA, and_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vand_vv_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV16VInt16VBVIVIVI_TUMA, and_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vand_vx_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX16VInt16VBVIVISI_TUMA, and_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vand_vv_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV32VInt32VBVIVIVI_TUMA, and_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vand_vx_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX32VInt32VBVIVISI_TUMA, and_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vand_vv_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV64VInt64VBVIVIVI_TUMA, and_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vand_vx_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX64VInt64VBVIVISI_TUMA, and_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vand_vv_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV8VUInt8VBVUVUVU_TUMA, and_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vand_vx_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX8VUInt8VBVUVUSU_TUMA, and_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vand_vv_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV16VUInt16VBVUVUVU_TUMA, and_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vand_vx_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX16VUInt16VBVUVUSU_TUMA, and_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vand_vv_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV32VUInt32VBVUVUVU_TUMA, and_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vand_vx_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX32VUInt32VBVUVUSU_TUMA, and_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vand_vv_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV64VUInt64VBVUVUVU_TUMA, and_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vand_vx_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX64VUInt64VBVUVUSU_TUMA, and_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vor_vv_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV8VInt8VBVIVIVI_TUMA, or_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vor_vx_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX8VInt8VBVIVISI_TUMA, or_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vor_vv_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV16VInt16VBVIVIVI_TUMA, or_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vor_vx_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX16VInt16VBVIVISI_TUMA, or_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vor_vv_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV32VInt32VBVIVIVI_TUMA, or_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vor_vx_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX32VInt32VBVIVISI_TUMA, or_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vor_vv_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV64VInt64VBVIVIVI_TUMA, or_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vor_vx_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX64VInt64VBVIVISI_TUMA, or_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vor_vv_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV8VUInt8VBVUVUVU_TUMA, or_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vor_vx_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX8VUInt8VBVUVUSU_TUMA, or_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vor_vv_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV16VUInt16VBVUVUVU_TUMA, or_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vor_vx_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX16VUInt16VBVUVUSU_TUMA, or_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vor_vv_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV32VUInt32VBVUVUVU_TUMA, or_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vor_vx_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX32VUInt32VBVUVUSU_TUMA, or_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vor_vv_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV64VUInt64VBVUVUVU_TUMA, or_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vor_vx_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX64VUInt64VBVUVUSU_TUMA, or_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vxor_vv_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV8VInt8VBVIVIVI_TUMA, xor_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vxor_vx_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX8VInt8VBVIVISI_TUMA, xor_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vxor_vv_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV16VInt16VBVIVIVI_TUMA, xor_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vxor_vx_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX16VInt16VBVIVISI_TUMA, xor_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vxor_vv_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV32VInt32VBVIVIVI_TUMA, xor_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vxor_vx_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX32VInt32VBVIVISI_TUMA, xor_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vxor_vv_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV64VInt64VBVIVIVI_TUMA, xor_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vxor_vx_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX64VInt64VBVIVISI_TUMA, xor_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vxor_vv_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV8VUInt8VBVUVUVU_TUMA, xor_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vxor_vx_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX8VUInt8VBVUVUSU_TUMA, xor_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vxor_vv_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV16VUInt16VBVUVUVU_TUMA, xor_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vxor_vx_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX16VUInt16VBVUVUSU_TUMA, xor_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vxor_vv_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV32VUInt32VBVUVUVU_TUMA, xor_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vxor_vx_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX32VUInt32VBVUVUSU_TUMA, xor_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vxor_vv_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV64VUInt64VBVUVUVU_TUMA, xor_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vxor_vx_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX64VUInt64VBVUVUSU_TUMA, xor_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vand_vv_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV8VInt8VBVIVIVI_TUMU, and_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vand_vx_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX8VInt8VBVIVISI_TUMU, and_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vand_vv_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV16VInt16VBVIVIVI_TUMU, and_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vand_vx_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX16VInt16VBVIVISI_TUMU, and_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vand_vv_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV32VInt32VBVIVIVI_TUMU, and_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vand_vx_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX32VInt32VBVIVISI_TUMU, and_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vand_vv_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV64VInt64VBVIVIVI_TUMU, and_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vand_vx_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX64VInt64VBVIVISI_TUMU, and_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vand_vv_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV8VUInt8VBVUVUVU_TUMU, and_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vand_vx_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX8VUInt8VBVUVUSU_TUMU, and_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vand_vv_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV16VUInt16VBVUVUVU_TUMU, and_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vand_vx_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX16VUInt16VBVUVUSU_TUMU, and_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vand_vv_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV32VUInt32VBVUVUVU_TUMU, and_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vand_vx_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX32VUInt32VBVUVUSU_TUMU, and_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vand_vv_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV64VUInt64VBVUVUVU_TUMU, and_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vand_vx_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX64VUInt64VBVUVUSU_TUMU, and_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vor_vv_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV8VInt8VBVIVIVI_TUMU, or_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vor_vx_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX8VInt8VBVIVISI_TUMU, or_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vor_vv_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV16VInt16VBVIVIVI_TUMU, or_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vor_vx_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX16VInt16VBVIVISI_TUMU, or_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vor_vv_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV32VInt32VBVIVIVI_TUMU, or_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vor_vx_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX32VInt32VBVIVISI_TUMU, or_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vor_vv_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV64VInt64VBVIVIVI_TUMU, or_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vor_vx_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX64VInt64VBVIVISI_TUMU, or_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vor_vv_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV8VUInt8VBVUVUVU_TUMU, or_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vor_vx_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX8VUInt8VBVUVUSU_TUMU, or_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vor_vv_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV16VUInt16VBVUVUVU_TUMU, or_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vor_vx_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX16VUInt16VBVUVUSU_TUMU, or_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vor_vv_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV32VUInt32VBVUVUVU_TUMU, or_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vor_vx_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX32VUInt32VBVUVUSU_TUMU, or_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vor_vv_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV64VUInt64VBVUVUVU_TUMU, or_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vor_vx_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX64VUInt64VBVUVUSU_TUMU, or_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vxor_vv_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV8VInt8VBVIVIVI_TUMU, xor_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vxor_vx_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX8VInt8VBVIVISI_TUMU, xor_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vxor_vv_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV16VInt16VBVIVIVI_TUMU, xor_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vxor_vx_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX16VInt16VBVIVISI_TUMU, xor_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vxor_vv_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV32VInt32VBVIVIVI_TUMU, xor_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vxor_vx_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX32VInt32VBVIVISI_TUMU, xor_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vxor_vv_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV64VInt64VBVIVIVI_TUMU, xor_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vxor_vx_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX64VInt64VBVIVISI_TUMU, xor_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vxor_vv_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV8VUInt8VBVUVUVU_TUMU, xor_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vxor_vx_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX8VUInt8VBVUVUSU_TUMU, xor_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vxor_vv_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV16VUInt16VBVUVUVU_TUMU, xor_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vxor_vx_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX16VUInt16VBVUVUSU_TUMU, xor_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vxor_vv_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV32VUInt32VBVUVUVU_TUMU, xor_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vxor_vx_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX32VUInt32VBVUVUSU_TUMU, xor_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vxor_vv_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV64VUInt64VBVUVUVU_TUMU, xor_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vxor_vx_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX64VUInt64VBVUVUSU_TUMU, xor_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vand_vv_int8m1_tama (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV8VInt8VBVIVI_TAMA, and_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint8m1_t vand_vx_int8m1_tama (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX8VInt8VBVISI_TAMA, and_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, ScalarInt8) +// vint16m1_t vand_vv_int16m1_tama (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV16VInt16VBVIVI_TAMA, and_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint16m1_t vand_vx_int16m1_tama (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX16VInt16VBVISI_TAMA, and_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarInt16) +// vint32m1_t vand_vv_int32m1_tama (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV32VInt32VBVIVI_TAMA, and_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint32m1_t vand_vx_int32m1_tama (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX32VInt32VBVISI_TAMA, and_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarInt32) +// vint64m1_t vand_vv_int64m1_tama (vbool64_t mask, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV64VInt64VBVIVI_TAMA, and_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vint64m1_t vand_vx_int64m1_tama (vbool64_t mask, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX64VInt64VBVISI_TAMA, and_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarInt64) +// vuint8m1_t vand_vv_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV8VUInt8VBVUVU_TAMA, and_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint8m1_t vand_vx_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX8VUInt8VBVUSU_TAMA, and_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vuint16m1_t vand_vv_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV16VUInt16VBVUVU_TAMA, and_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint16m1_t vand_vx_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX16VUInt16VBVUSU_TAMA, and_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vuint32m1_t vand_vv_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV32VUInt32VBVUVU_TAMA, and_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint32m1_t vand_vx_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX32VUInt32VBVUSU_TAMA, and_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vuint64m1_t vand_vv_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV64VUInt64VBVUVU_TAMA, and_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vuint64m1_t vand_vx_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX64VUInt64VBVUSU_TAMA, and_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarUInt64) +// vint8m1_t vor_vv_int8m1_tama (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV8VInt8VBVIVI_TAMA, or_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint8m1_t vor_vx_int8m1_tama (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX8VInt8VBVISI_TAMA, or_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, ScalarInt8) +// vint16m1_t vor_vv_int16m1_tama (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV16VInt16VBVIVI_TAMA, or_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint16m1_t vor_vx_int16m1_tama (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX16VInt16VBVISI_TAMA, or_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarInt16) +// vint32m1_t vor_vv_int32m1_tama (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV32VInt32VBVIVI_TAMA, or_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint32m1_t vor_vx_int32m1_tama (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX32VInt32VBVISI_TAMA, or_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarInt32) +// vint64m1_t vor_vv_int64m1_tama (vbool64_t mask, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV64VInt64VBVIVI_TAMA, or_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vint64m1_t vor_vx_int64m1_tama (vbool64_t mask, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX64VInt64VBVISI_TAMA, or_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarInt64) +// vuint8m1_t vor_vv_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV8VUInt8VBVUVU_TAMA, or_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint8m1_t vor_vx_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX8VUInt8VBVUSU_TAMA, or_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vuint16m1_t vor_vv_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV16VUInt16VBVUVU_TAMA, or_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint16m1_t vor_vx_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX16VUInt16VBVUSU_TAMA, or_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vuint32m1_t vor_vv_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV32VUInt32VBVUVU_TAMA, or_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint32m1_t vor_vx_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX32VUInt32VBVUSU_TAMA, or_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vuint64m1_t vor_vv_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV64VUInt64VBVUVU_TAMA, or_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vuint64m1_t vor_vx_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX64VUInt64VBVUSU_TAMA, or_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarUInt64) +// vint8m1_t vxor_vv_int8m1_tama (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV8VInt8VBVIVI_TAMA, xor_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint8m1_t vxor_vx_int8m1_tama (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX8VInt8VBVISI_TAMA, xor_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, ScalarInt8) +// vint16m1_t vxor_vv_int16m1_tama (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV16VInt16VBVIVI_TAMA, xor_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint16m1_t vxor_vx_int16m1_tama (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX16VInt16VBVISI_TAMA, xor_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarInt16) +// vint32m1_t vxor_vv_int32m1_tama (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV32VInt32VBVIVI_TAMA, xor_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint32m1_t vxor_vx_int32m1_tama (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX32VInt32VBVISI_TAMA, xor_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarInt32) +// vint64m1_t vxor_vv_int64m1_tama (vbool64_t mask, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV64VInt64VBVIVI_TAMA, xor_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vint64m1_t vxor_vx_int64m1_tama (vbool64_t mask, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX64VInt64VBVISI_TAMA, xor_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarInt64) +// vuint8m1_t vxor_vv_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV8VUInt8VBVUVU_TAMA, xor_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint8m1_t vxor_vx_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX8VUInt8VBVUSU_TAMA, xor_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vuint16m1_t vxor_vv_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV16VUInt16VBVUVU_TAMA, xor_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint16m1_t vxor_vx_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX16VUInt16VBVUSU_TAMA, xor_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vuint32m1_t vxor_vv_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV32VUInt32VBVUVU_TAMA, xor_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint32m1_t vxor_vx_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX32VUInt32VBVUSU_TAMA, xor_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vuint64m1_t vxor_vv_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV64VUInt64VBVUVU_TAMA, xor_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vuint64m1_t vxor_vx_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX64VUInt64VBVUSU_TAMA, xor_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarUInt64) +// vint8m1_t vand_vv_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV8VInt8VBVIVIVI_TAMU, and_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vand_vx_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX8VInt8VBVIVISI_TAMU, and_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vand_vv_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV16VInt16VBVIVIVI_TAMU, and_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vand_vx_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX16VInt16VBVIVISI_TAMU, and_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vand_vv_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV32VInt32VBVIVIVI_TAMU, and_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vand_vx_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX32VInt32VBVIVISI_TAMU, and_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vand_vv_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV64VInt64VBVIVIVI_TAMU, and_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vand_vx_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX64VInt64VBVIVISI_TAMU, and_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vand_vv_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV8VUInt8VBVUVUVU_TAMU, and_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vand_vx_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX8VUInt8VBVUVUSU_TAMU, and_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vand_vv_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV16VUInt16VBVUVUVU_TAMU, and_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vand_vx_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX16VUInt16VBVUVUSU_TAMU, and_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vand_vv_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV32VUInt32VBVUVUVU_TAMU, and_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vand_vx_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX32VUInt32VBVUVUSU_TAMU, and_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vand_vv_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVV64VUInt64VBVUVUVU_TAMU, and_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vand_vx_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(AndVX64VUInt64VBVUVUSU_TAMU, and_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vor_vv_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV8VInt8VBVIVIVI_TAMU, or_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vor_vx_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX8VInt8VBVIVISI_TAMU, or_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vor_vv_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV16VInt16VBVIVIVI_TAMU, or_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vor_vx_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX16VInt16VBVIVISI_TAMU, or_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vor_vv_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV32VInt32VBVIVIVI_TAMU, or_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vor_vx_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX32VInt32VBVIVISI_TAMU, or_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vor_vv_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV64VInt64VBVIVIVI_TAMU, or_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vor_vx_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX64VInt64VBVIVISI_TAMU, or_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vor_vv_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV8VUInt8VBVUVUVU_TAMU, or_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vor_vx_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX8VUInt8VBVUVUSU_TAMU, or_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vor_vv_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV16VUInt16VBVUVUVU_TAMU, or_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vor_vx_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX16VUInt16VBVUVUSU_TAMU, or_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vor_vv_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV32VUInt32VBVUVUVU_TAMU, or_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vor_vx_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX32VUInt32VBVUVUSU_TAMU, or_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vor_vv_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVV64VUInt64VBVUVUVU_TAMU, or_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vor_vx_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(OrVX64VUInt64VBVUVUSU_TAMU, or_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vxor_vv_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV8VInt8VBVIVIVI_TAMU, xor_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vxor_vx_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX8VInt8VBVIVISI_TAMU, xor_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vxor_vv_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV16VInt16VBVIVIVI_TAMU, xor_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vxor_vx_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX16VInt16VBVIVISI_TAMU, xor_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vxor_vv_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV32VInt32VBVIVIVI_TAMU, xor_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vxor_vx_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX32VInt32VBVIVISI_TAMU, xor_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vxor_vv_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV64VInt64VBVIVIVI_TAMU, xor_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vxor_vx_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX64VInt64VBVIVISI_TAMU, xor_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vxor_vv_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV8VUInt8VBVUVUVU_TAMU, xor_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vxor_vx_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX8VUInt8VBVUVUSU_TAMU, xor_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vxor_vv_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV16VUInt16VBVUVUVU_TAMU, xor_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vxor_vx_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX16VUInt16VBVUVUSU_TAMU, xor_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vxor_vv_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV32VUInt32VBVUVUVU_TAMU, xor_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vxor_vx_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX32VUInt32VBVUVUSU_TAMU, xor_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vxor_vv_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVV64VUInt64VBVUVUVU_TAMU, xor_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vxor_vx_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(XorVX64VUInt64VBVUVUSU_TAMU, xor_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) + +// vint8m1_t vsll_vv_int8m1_tu (vint8m1_t merge, vint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV8VInt8VIVIVU_TU, sll_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vsll_vx_int8m1_tu (vint8m1_t merge, vint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX8VInt8VIVISL_TU, sll_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, ScalarUIntXLen) +// vint16m1_t vsll_vv_int16m1_tu (vint16m1_t merge, vint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV16VInt16VIVIVU_TU, sll_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vsll_vx_int16m1_tu (vint16m1_t merge, vint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX16VInt16VIVISL_TU, sll_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarUIntXLen) +// vint32m1_t vsll_vv_int32m1_tu (vint32m1_t merge, vint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV32VInt32VIVIVU_TU, sll_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vsll_vx_int32m1_tu (vint32m1_t merge, vint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX32VInt32VIVISL_TU, sll_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarUIntXLen) +// vint64m1_t vsll_vv_int64m1_tu (vint64m1_t merge, vint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV64VInt64VIVIVU_TU, sll_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDUInt64) +// vint64m1_t vsll_vx_int64m1_tu (vint64m1_t merge, vint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX64VInt64VIVISL_TU, sll_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarUIntXLen) +// vuint8m1_t vsll_vv_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV8VUInt8VUVUVU_TU, sll_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vsll_vx_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX8VUInt8VUVUSL_TU, sll_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, ScalarUIntXLen) +// vuint16m1_t vsll_vv_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV16VUInt16VUVUVU_TU, sll_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vsll_vx_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX16VUInt16VUVUSL_TU, sll_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, ScalarUIntXLen) +// vuint32m1_t vsll_vv_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV32VUInt32VUVUVU_TU, sll_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vsll_vx_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX32VUInt32VUVUSL_TU, sll_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, ScalarUIntXLen) +// vuint64m1_t vsll_vv_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV64VUInt64VUVUVU_TU, sll_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vsll_vx_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX64VUInt64VUVUSL_TU, sll_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, ScalarUIntXLen) +// vuint8m1_t vsrl_vv_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV8VUInt8VUVUVU_TU, srl_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vsrl_vx_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX8VUInt8VUVUSL_TU, srl_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, ScalarUIntXLen) +// vuint16m1_t vsrl_vv_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV16VUInt16VUVUVU_TU, srl_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vsrl_vx_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX16VUInt16VUVUSL_TU, srl_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, ScalarUIntXLen) +// vuint32m1_t vsrl_vv_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV32VUInt32VUVUVU_TU, srl_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vsrl_vx_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX32VUInt32VUVUSL_TU, srl_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, ScalarUIntXLen) +// vuint64m1_t vsrl_vv_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV64VUInt64VUVUVU_TU, srl_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vsrl_vx_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX64VUInt64VUVUSL_TU, srl_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, ScalarUIntXLen) +// vint8m1_t vsra_vv_int8m1_tu (vint8m1_t merge, vint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV8VInt8VIVIVU_TU, sra_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vsra_vx_int8m1_tu (vint8m1_t merge, vint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX8VInt8VIVISL_TU, sra_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, ScalarUIntXLen) +// vint16m1_t vsra_vv_int16m1_tu (vint16m1_t merge, vint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV16VInt16VIVIVU_TU, sra_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vsra_vx_int16m1_tu (vint16m1_t merge, vint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX16VInt16VIVISL_TU, sra_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarUIntXLen) +// vint32m1_t vsra_vv_int32m1_tu (vint32m1_t merge, vint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV32VInt32VIVIVU_TU, sra_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vsra_vx_int32m1_tu (vint32m1_t merge, vint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX32VInt32VIVISL_TU, sra_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarUIntXLen) +// vint64m1_t vsra_vv_int64m1_tu (vint64m1_t merge, vint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV64VInt64VIVIVU_TU, sra_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDUInt64) +// vint64m1_t vsra_vx_int64m1_tu (vint64m1_t merge, vint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX64VInt64VIVISL_TU, sra_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarUIntXLen) +// vint8m1_t vsll_vv_int8m1_ta (vint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV8VInt8VIVU_TA, sll_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDUInt8) +// vint8m1_t vsll_vx_int8m1_ta (vint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX8VInt8VISL_TA, sll_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, ScalarUIntXLen) +// vint16m1_t vsll_vv_int16m1_ta (vint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV16VInt16VIVU_TA, sll_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDUInt16) +// vint16m1_t vsll_vx_int16m1_ta (vint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX16VInt16VISL_TA, sll_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarUIntXLen) +// vint32m1_t vsll_vv_int32m1_ta (vint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV32VInt32VIVU_TA, sll_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDUInt32) +// vint32m1_t vsll_vx_int32m1_ta (vint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX32VInt32VISL_TA, sll_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarUIntXLen) +// vint64m1_t vsll_vv_int64m1_ta (vint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV64VInt64VIVU_TA, sll_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDUInt64) +// vint64m1_t vsll_vx_int64m1_ta (vint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX64VInt64VISL_TA, sll_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarUIntXLen) +// vuint8m1_t vsll_vv_uint8m1_ta (vuint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV8VUInt8VUVU_TA, sll_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint8m1_t vsll_vx_uint8m1_ta (vuint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX8VUInt8VUSL_TA, sll_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, ScalarUIntXLen) +// vuint16m1_t vsll_vv_uint16m1_ta (vuint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV16VUInt16VUVU_TA, sll_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint16m1_t vsll_vx_uint16m1_ta (vuint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX16VUInt16VUSL_TA, sll_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, ScalarUIntXLen) +// vuint32m1_t vsll_vv_uint32m1_ta (vuint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV32VUInt32VUVU_TA, sll_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint32m1_t vsll_vx_uint32m1_ta (vuint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX32VUInt32VUSL_TA, sll_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, ScalarUIntXLen) +// vuint64m1_t vsll_vv_uint64m1_ta (vuint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV64VUInt64VUVU_TA, sll_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vuint64m1_t vsll_vx_uint64m1_ta (vuint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX64VUInt64VUSL_TA, sll_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, ScalarUIntXLen) +// vuint8m1_t vsrl_vv_uint8m1_ta (vuint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV8VUInt8VUVU_TA, srl_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint8m1_t vsrl_vx_uint8m1_ta (vuint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX8VUInt8VUSL_TA, srl_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, ScalarUIntXLen) +// vuint16m1_t vsrl_vv_uint16m1_ta (vuint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV16VUInt16VUVU_TA, srl_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint16m1_t vsrl_vx_uint16m1_ta (vuint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX16VUInt16VUSL_TA, srl_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, ScalarUIntXLen) +// vuint32m1_t vsrl_vv_uint32m1_ta (vuint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV32VUInt32VUVU_TA, srl_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint32m1_t vsrl_vx_uint32m1_ta (vuint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX32VUInt32VUSL_TA, srl_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, ScalarUIntXLen) +// vuint64m1_t vsrl_vv_uint64m1_ta (vuint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV64VUInt64VUVU_TA, srl_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vuint64m1_t vsrl_vx_uint64m1_ta (vuint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX64VUInt64VUSL_TA, srl_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, ScalarUIntXLen) +// vint8m1_t vsra_vv_int8m1_ta (vint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV8VInt8VIVU_TA, sra_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDUInt8) +// vint8m1_t vsra_vx_int8m1_ta (vint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX8VInt8VISL_TA, sra_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, ScalarUIntXLen) +// vint16m1_t vsra_vv_int16m1_ta (vint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV16VInt16VIVU_TA, sra_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDUInt16) +// vint16m1_t vsra_vx_int16m1_ta (vint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX16VInt16VISL_TA, sra_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarUIntXLen) +// vint32m1_t vsra_vv_int32m1_ta (vint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV32VInt32VIVU_TA, sra_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDUInt32) +// vint32m1_t vsra_vx_int32m1_ta (vint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX32VInt32VISL_TA, sra_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarUIntXLen) +// vint64m1_t vsra_vv_int64m1_ta (vint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV64VInt64VIVU_TA, sra_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDUInt64) +// vint64m1_t vsra_vx_int64m1_ta (vint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX64VInt64VISL_TA, sra_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarUIntXLen) +// vint8m1_t vsll_vv_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV8VInt8VBVIVIVU_TUMA, sll_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vsll_vx_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX8VInt8VBVIVISL_TUMA, sll_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarUIntXLen) +// vint16m1_t vsll_vv_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV16VInt16VBVIVIVU_TUMA, sll_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vsll_vx_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX16VInt16VBVIVISL_TUMA, sll_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarUIntXLen) +// vint32m1_t vsll_vv_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV32VInt32VBVIVIVU_TUMA, sll_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vsll_vx_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX32VInt32VBVIVISL_TUMA, sll_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarUIntXLen) +// vint64m1_t vsll_vv_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV64VInt64VBVIVIVU_TUMA, sll_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +// vint64m1_t vsll_vx_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX64VInt64VBVIVISL_TUMA, sll_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarUIntXLen) +// vuint8m1_t vsll_vv_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV8VUInt8VBVUVUVU_TUMA, sll_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vsll_vx_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX8VUInt8VBVUVUSL_TUMA, sll_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUIntXLen) +// vuint16m1_t vsll_vv_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV16VUInt16VBVUVUVU_TUMA, sll_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vsll_vx_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX16VUInt16VBVUVUSL_TUMA, sll_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUIntXLen) +// vuint32m1_t vsll_vv_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV32VUInt32VBVUVUVU_TUMA, sll_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vsll_vx_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX32VUInt32VBVUVUSL_TUMA, sll_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUIntXLen) +// vuint64m1_t vsll_vv_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV64VUInt64VBVUVUVU_TUMA, sll_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vsll_vx_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX64VUInt64VBVUVUSL_TUMA, sll_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUIntXLen) +// vuint8m1_t vsrl_vv_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV8VUInt8VBVUVUVU_TUMA, srl_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vsrl_vx_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX8VUInt8VBVUVUSL_TUMA, srl_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUIntXLen) +// vuint16m1_t vsrl_vv_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV16VUInt16VBVUVUVU_TUMA, srl_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vsrl_vx_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX16VUInt16VBVUVUSL_TUMA, srl_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUIntXLen) +// vuint32m1_t vsrl_vv_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV32VUInt32VBVUVUVU_TUMA, srl_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vsrl_vx_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX32VUInt32VBVUVUSL_TUMA, srl_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUIntXLen) +// vuint64m1_t vsrl_vv_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV64VUInt64VBVUVUVU_TUMA, srl_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vsrl_vx_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX64VUInt64VBVUVUSL_TUMA, srl_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUIntXLen) +// vint8m1_t vsra_vv_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV8VInt8VBVIVIVU_TUMA, sra_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vsra_vx_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX8VInt8VBVIVISL_TUMA, sra_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarUIntXLen) +// vint16m1_t vsra_vv_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV16VInt16VBVIVIVU_TUMA, sra_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vsra_vx_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX16VInt16VBVIVISL_TUMA, sra_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarUIntXLen) +// vint32m1_t vsra_vv_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV32VInt32VBVIVIVU_TUMA, sra_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vsra_vx_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX32VInt32VBVIVISL_TUMA, sra_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarUIntXLen) +// vint64m1_t vsra_vv_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV64VInt64VBVIVIVU_TUMA, sra_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +// vint64m1_t vsra_vx_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX64VInt64VBVIVISL_TUMA, sra_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarUIntXLen) +// vint8m1_t vsll_vv_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV8VInt8VBVIVIVU_TUMU, sll_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vsll_vx_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX8VInt8VBVIVISL_TUMU, sll_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarUIntXLen) +// vint16m1_t vsll_vv_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV16VInt16VBVIVIVU_TUMU, sll_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vsll_vx_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX16VInt16VBVIVISL_TUMU, sll_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarUIntXLen) +// vint32m1_t vsll_vv_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV32VInt32VBVIVIVU_TUMU, sll_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vsll_vx_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX32VInt32VBVIVISL_TUMU, sll_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarUIntXLen) +// vint64m1_t vsll_vv_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV64VInt64VBVIVIVU_TUMU, sll_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +// vint64m1_t vsll_vx_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX64VInt64VBVIVISL_TUMU, sll_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarUIntXLen) +// vuint8m1_t vsll_vv_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV8VUInt8VBVUVUVU_TUMU, sll_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vsll_vx_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX8VUInt8VBVUVUSL_TUMU, sll_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUIntXLen) +// vuint16m1_t vsll_vv_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV16VUInt16VBVUVUVU_TUMU, sll_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vsll_vx_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX16VUInt16VBVUVUSL_TUMU, sll_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUIntXLen) +// vuint32m1_t vsll_vv_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV32VUInt32VBVUVUVU_TUMU, sll_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vsll_vx_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX32VUInt32VBVUVUSL_TUMU, sll_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUIntXLen) +// vuint64m1_t vsll_vv_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV64VUInt64VBVUVUVU_TUMU, sll_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vsll_vx_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX64VUInt64VBVUVUSL_TUMU, sll_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUIntXLen) +// vuint8m1_t vsrl_vv_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV8VUInt8VBVUVUVU_TUMU, srl_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vsrl_vx_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX8VUInt8VBVUVUSL_TUMU, srl_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUIntXLen) +// vuint16m1_t vsrl_vv_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV16VUInt16VBVUVUVU_TUMU, srl_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vsrl_vx_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX16VUInt16VBVUVUSL_TUMU, srl_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUIntXLen) +// vuint32m1_t vsrl_vv_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV32VUInt32VBVUVUVU_TUMU, srl_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vsrl_vx_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX32VUInt32VBVUVUSL_TUMU, srl_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUIntXLen) +// vuint64m1_t vsrl_vv_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV64VUInt64VBVUVUVU_TUMU, srl_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vsrl_vx_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX64VUInt64VBVUVUSL_TUMU, srl_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUIntXLen) +// vint8m1_t vsra_vv_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV8VInt8VBVIVIVU_TUMU, sra_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vsra_vx_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX8VInt8VBVIVISL_TUMU, sra_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarUIntXLen) +// vint16m1_t vsra_vv_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV16VInt16VBVIVIVU_TUMU, sra_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vsra_vx_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX16VInt16VBVIVISL_TUMU, sra_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarUIntXLen) +// vint32m1_t vsra_vv_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV32VInt32VBVIVIVU_TUMU, sra_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vsra_vx_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX32VInt32VBVIVISL_TUMU, sra_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarUIntXLen) +// vint64m1_t vsra_vv_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV64VInt64VBVIVIVU_TUMU, sra_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +// vint64m1_t vsra_vx_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX64VInt64VBVIVISL_TUMU, sra_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarUIntXLen) +// vint8m1_t vsll_vv_int8m1_tama (vbool8_t mask, vint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV8VInt8VBVIVU_TAMA, sll_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDUInt8) +// vint8m1_t vsll_vx_int8m1_tama (vbool8_t mask, vint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX8VInt8VBVISL_TAMA, sll_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, ScalarUIntXLen) +// vint16m1_t vsll_vv_int16m1_tama (vbool16_t mask, vint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV16VInt16VBVIVU_TAMA, sll_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDUInt16) +// vint16m1_t vsll_vx_int16m1_tama (vbool16_t mask, vint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX16VInt16VBVISL_TAMA, sll_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarUIntXLen) +// vint32m1_t vsll_vv_int32m1_tama (vbool32_t mask, vint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV32VInt32VBVIVU_TAMA, sll_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDUInt32) +// vint32m1_t vsll_vx_int32m1_tama (vbool32_t mask, vint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX32VInt32VBVISL_TAMA, sll_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarUIntXLen) +// vint64m1_t vsll_vv_int64m1_tama (vbool64_t mask, vint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV64VInt64VBVIVU_TAMA, sll_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDUInt64) +// vint64m1_t vsll_vx_int64m1_tama (vbool64_t mask, vint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX64VInt64VBVISL_TAMA, sll_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarUIntXLen) +// vuint8m1_t vsll_vv_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV8VUInt8VBVUVU_TAMA, sll_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint8m1_t vsll_vx_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX8VUInt8VBVUSL_TAMA, sll_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, ScalarUIntXLen) +// vuint16m1_t vsll_vv_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV16VUInt16VBVUVU_TAMA, sll_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint16m1_t vsll_vx_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX16VUInt16VBVUSL_TAMA, sll_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarUIntXLen) +// vuint32m1_t vsll_vv_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV32VUInt32VBVUVU_TAMA, sll_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint32m1_t vsll_vx_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX32VUInt32VBVUSL_TAMA, sll_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarUIntXLen) +// vuint64m1_t vsll_vv_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV64VUInt64VBVUVU_TAMA, sll_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vuint64m1_t vsll_vx_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX64VUInt64VBVUSL_TAMA, sll_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarUIntXLen) +// vuint8m1_t vsrl_vv_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV8VUInt8VBVUVU_TAMA, srl_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint8m1_t vsrl_vx_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX8VUInt8VBVUSL_TAMA, srl_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, ScalarUIntXLen) +// vuint16m1_t vsrl_vv_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV16VUInt16VBVUVU_TAMA, srl_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint16m1_t vsrl_vx_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX16VUInt16VBVUSL_TAMA, srl_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarUIntXLen) +// vuint32m1_t vsrl_vv_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV32VUInt32VBVUVU_TAMA, srl_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint32m1_t vsrl_vx_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX32VUInt32VBVUSL_TAMA, srl_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarUIntXLen) +// vuint64m1_t vsrl_vv_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV64VUInt64VBVUVU_TAMA, srl_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vuint64m1_t vsrl_vx_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX64VUInt64VBVUSL_TAMA, srl_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarUIntXLen) +// vint8m1_t vsra_vv_int8m1_tama (vbool8_t mask, vint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV8VInt8VBVIVU_TAMA, sra_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDUInt8) +// vint8m1_t vsra_vx_int8m1_tama (vbool8_t mask, vint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX8VInt8VBVISL_TAMA, sra_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, ScalarUIntXLen) +// vint16m1_t vsra_vv_int16m1_tama (vbool16_t mask, vint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV16VInt16VBVIVU_TAMA, sra_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDUInt16) +// vint16m1_t vsra_vx_int16m1_tama (vbool16_t mask, vint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX16VInt16VBVISL_TAMA, sra_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarUIntXLen) +// vint32m1_t vsra_vv_int32m1_tama (vbool32_t mask, vint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV32VInt32VBVIVU_TAMA, sra_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDUInt32) +// vint32m1_t vsra_vx_int32m1_tama (vbool32_t mask, vint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX32VInt32VBVISL_TAMA, sra_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarUIntXLen) +// vint64m1_t vsra_vv_int64m1_tama (vbool64_t mask, vint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV64VInt64VBVIVU_TAMA, sra_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDUInt64) +// vint64m1_t vsra_vx_int64m1_tama (vbool64_t mask, vint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX64VInt64VBVISL_TAMA, sra_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarUIntXLen) +// vint8m1_t vsll_vv_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV8VInt8VBVIVIVU_TAMU, sll_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vsll_vx_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX8VInt8VBVIVISL_TAMU, sll_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarUIntXLen) +// vint16m1_t vsll_vv_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV16VInt16VBVIVIVU_TAMU, sll_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vsll_vx_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX16VInt16VBVIVISL_TAMU, sll_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarUIntXLen) +// vint32m1_t vsll_vv_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV32VInt32VBVIVIVU_TAMU, sll_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vsll_vx_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX32VInt32VBVIVISL_TAMU, sll_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarUIntXLen) +// vint64m1_t vsll_vv_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV64VInt64VBVIVIVU_TAMU, sll_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +// vint64m1_t vsll_vx_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX64VInt64VBVIVISL_TAMU, sll_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarUIntXLen) +// vuint8m1_t vsll_vv_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV8VUInt8VBVUVUVU_TAMU, sll_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vsll_vx_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX8VUInt8VBVUVUSL_TAMU, sll_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUIntXLen) +// vuint16m1_t vsll_vv_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV16VUInt16VBVUVUVU_TAMU, sll_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vsll_vx_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX16VUInt16VBVUVUSL_TAMU, sll_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUIntXLen) +// vuint32m1_t vsll_vv_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV32VUInt32VBVUVUVU_TAMU, sll_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vsll_vx_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX32VUInt32VBVUVUSL_TAMU, sll_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUIntXLen) +// vuint64m1_t vsll_vv_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVV64VUInt64VBVUVUVU_TAMU, sll_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vsll_vx_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SllVX64VUInt64VBVUVUSL_TAMU, sll_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUIntXLen) +// vuint8m1_t vsrl_vv_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV8VUInt8VBVUVUVU_TAMU, srl_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vsrl_vx_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX8VUInt8VBVUVUSL_TAMU, srl_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUIntXLen) +// vuint16m1_t vsrl_vv_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV16VUInt16VBVUVUVU_TAMU, srl_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vsrl_vx_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX16VUInt16VBVUVUSL_TAMU, srl_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUIntXLen) +// vuint32m1_t vsrl_vv_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV32VUInt32VBVUVUVU_TAMU, srl_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vsrl_vx_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX32VUInt32VBVUVUSL_TAMU, srl_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUIntXLen) +// vuint64m1_t vsrl_vv_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVV64VUInt64VBVUVUVU_TAMU, srl_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vsrl_vx_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SrlVX64VUInt64VBVUVUSL_TAMU, srl_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUIntXLen) +// vint8m1_t vsra_vv_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV8VInt8VBVIVIVU_TAMU, sra_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vsra_vx_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX8VInt8VBVIVISL_TAMU, sra_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarUIntXLen) +// vint16m1_t vsra_vv_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV16VInt16VBVIVIVU_TAMU, sra_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vsra_vx_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX16VInt16VBVIVISL_TAMU, sra_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarUIntXLen) +// vint32m1_t vsra_vv_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV32VInt32VBVIVIVU_TAMU, sra_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vsra_vx_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX32VInt32VBVIVISL_TAMU, sra_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarUIntXLen) +// vint64m1_t vsra_vv_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVV64VInt64VBVIVIVU_TAMU, sra_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +// vint64m1_t vsra_vx_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SraVX64VInt64VBVIVISL_TAMU, sra_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarUIntXLen) + +// vuint8m1_t vnsrl_wv_uint8m1_tu (vuint8m1_t merge, vuint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWV8VUInt8VUVUVU_TU, nsrl_wv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt16, OneDUInt8) +// vuint8m1_t vnsrl_wx_uint8m1_tu (vuint8m1_t merge, vuint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWX8VUInt8VUVUSL_TU, nsrl_wx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt16, ScalarUIntXLen) +// vuint16m1_t vnsrl_wv_uint16m1_tu (vuint16m1_t merge, vuint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWV16VUInt16VUVUVU_TU, nsrl_wv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt32, OneDUInt16) +// vuint16m1_t vnsrl_wx_uint16m1_tu (vuint16m1_t merge, vuint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWX16VUInt16VUVUSL_TU, nsrl_wx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt32, ScalarUIntXLen) +// vuint32m1_t vnsrl_wv_uint32m1_tu (vuint32m1_t merge, vuint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWV32VUInt32VUVUVU_TU, nsrl_wv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt64, OneDUInt32) +// vuint32m1_t vnsrl_wx_uint32m1_tu (vuint32m1_t merge, vuint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWX32VUInt32VUVUSL_TU, nsrl_wx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt64, ScalarUIntXLen) +// vint8m1_t vnsra_wv_int8m1_tu (vint8m1_t merge, vint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWV8VInt8VIVIVU_TU, nsra_wv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt16, OneDUInt8) +// vint8m1_t vnsra_wx_int8m1_tu (vint8m1_t merge, vint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWX8VInt8VIVISL_TU, nsra_wx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt16, ScalarUIntXLen) +// vint16m1_t vnsra_wv_int16m1_tu (vint16m1_t merge, vint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWV16VInt16VIVIVU_TU, nsra_wv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt32, OneDUInt16) +// vint16m1_t vnsra_wx_int16m1_tu (vint16m1_t merge, vint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWX16VInt16VIVISL_TU, nsra_wx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt32, ScalarUIntXLen) +// vint32m1_t vnsra_wv_int32m1_tu (vint32m1_t merge, vint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWV32VInt32VIVIVU_TU, nsra_wv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt64, OneDUInt32) +// vint32m1_t vnsra_wx_int32m1_tu (vint32m1_t merge, vint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWX32VInt32VIVISL_TU, nsra_wx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt64, ScalarUIntXLen) +// vuint8m1_t vnsrl_wv_uint8m1_ta (vuint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWV8VUInt8VUVU_TA, nsrl_wv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDUInt8, 2, OneDUInt16, OneDUInt8) +// vuint8m1_t vnsrl_wx_uint8m1_ta (vuint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWX8VUInt8VUSL_TA, nsrl_wx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDUInt8, 2, OneDUInt16, ScalarUIntXLen) +// vuint16m1_t vnsrl_wv_uint16m1_ta (vuint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWV16VUInt16VUVU_TA, nsrl_wv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDUInt16, 2, OneDUInt32, OneDUInt16) +// vuint16m1_t vnsrl_wx_uint16m1_ta (vuint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWX16VUInt16VUSL_TA, nsrl_wx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDUInt16, 2, OneDUInt32, ScalarUIntXLen) +// vuint32m1_t vnsrl_wv_uint32m1_ta (vuint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWV32VUInt32VUVU_TA, nsrl_wv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDUInt32, 2, OneDUInt64, OneDUInt32) +// vuint32m1_t vnsrl_wx_uint32m1_ta (vuint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWX32VUInt32VUSL_TA, nsrl_wx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDUInt32, 2, OneDUInt64, ScalarUIntXLen) +// vint8m1_t vnsra_wv_int8m1_ta (vint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWV8VInt8VIVU_TA, nsra_wv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDInt8, 2, OneDInt16, OneDUInt8) +// vint8m1_t vnsra_wx_int8m1_ta (vint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWX8VInt8VISL_TA, nsra_wx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDInt8, 2, OneDInt16, ScalarUIntXLen) +// vint16m1_t vnsra_wv_int16m1_ta (vint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWV16VInt16VIVU_TA, nsra_wv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDInt16, 2, OneDInt32, OneDUInt16) +// vint16m1_t vnsra_wx_int16m1_ta (vint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWX16VInt16VISL_TA, nsra_wx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDInt16, 2, OneDInt32, ScalarUIntXLen) +// vint32m1_t vnsra_wv_int32m1_ta (vint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWV32VInt32VIVU_TA, nsra_wv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDInt32, 2, OneDInt64, OneDUInt32) +// vint32m1_t vnsra_wx_int32m1_ta (vint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWX32VInt32VISL_TA, nsra_wx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDInt32, 2, OneDInt64, ScalarUIntXLen) +// vuint8m1_t vnsrl_wv_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWV8VUInt8VBVUVUVU_TUMA, nsrl_wv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt16, OneDUInt8) +// vuint8m1_t vnsrl_wx_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWX8VUInt8VBVUVUSL_TUMA, nsrl_wx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt16, ScalarUIntXLen) +// vuint16m1_t vnsrl_wv_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWV16VUInt16VBVUVUVU_TUMA, nsrl_wv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt32, OneDUInt16) +// vuint16m1_t vnsrl_wx_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWX16VUInt16VBVUVUSL_TUMA, nsrl_wx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt32, ScalarUIntXLen) +// vuint32m1_t vnsrl_wv_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWV32VUInt32VBVUVUVU_TUMA, nsrl_wv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt64, OneDUInt32) +// vuint32m1_t vnsrl_wx_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWX32VUInt32VBVUVUSL_TUMA, nsrl_wx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt64, ScalarUIntXLen) +// vint8m1_t vnsra_wv_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWV8VInt8VBVIVIVU_TUMA, nsra_wv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt16, OneDUInt8) +// vint8m1_t vnsra_wx_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWX8VInt8VBVIVISL_TUMA, nsra_wx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt16, ScalarUIntXLen) +// vint16m1_t vnsra_wv_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWV16VInt16VBVIVIVU_TUMA, nsra_wv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt32, OneDUInt16) +// vint16m1_t vnsra_wx_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWX16VInt16VBVIVISL_TUMA, nsra_wx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt32, ScalarUIntXLen) +// vint32m1_t vnsra_wv_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWV32VInt32VBVIVIVU_TUMA, nsra_wv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt64, OneDUInt32) +// vint32m1_t vnsra_wx_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWX32VInt32VBVIVISL_TUMA, nsra_wx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt64, ScalarUIntXLen) +// vuint8m1_t vnsrl_wv_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWV8VUInt8VBVUVUVU_TUMU, nsrl_wv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt16, OneDUInt8) +// vuint8m1_t vnsrl_wx_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWX8VUInt8VBVUVUSL_TUMU, nsrl_wx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt16, ScalarUIntXLen) +// vuint16m1_t vnsrl_wv_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWV16VUInt16VBVUVUVU_TUMU, nsrl_wv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt32, OneDUInt16) +// vuint16m1_t vnsrl_wx_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWX16VUInt16VBVUVUSL_TUMU, nsrl_wx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt32, ScalarUIntXLen) +// vuint32m1_t vnsrl_wv_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWV32VUInt32VBVUVUVU_TUMU, nsrl_wv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt64, OneDUInt32) +// vuint32m1_t vnsrl_wx_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWX32VUInt32VBVUVUSL_TUMU, nsrl_wx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt64, ScalarUIntXLen) +// vint8m1_t vnsra_wv_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWV8VInt8VBVIVIVU_TUMU, nsra_wv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt16, OneDUInt8) +// vint8m1_t vnsra_wx_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWX8VInt8VBVIVISL_TUMU, nsra_wx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt16, ScalarUIntXLen) +// vint16m1_t vnsra_wv_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWV16VInt16VBVIVIVU_TUMU, nsra_wv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt32, OneDUInt16) +// vint16m1_t vnsra_wx_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWX16VInt16VBVIVISL_TUMU, nsra_wx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt32, ScalarUIntXLen) +// vint32m1_t vnsra_wv_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWV32VInt32VBVIVIVU_TUMU, nsra_wv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt64, OneDUInt32) +// vint32m1_t vnsra_wx_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWX32VInt32VBVIVISL_TUMU, nsra_wx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt64, ScalarUIntXLen) +// vuint8m1_t vnsrl_wv_uint8m1_tama (vbool8_t mask, vuint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWV8VUInt8VBVUVU_TAMA, nsrl_wv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt16, OneDUInt8) +// vuint8m1_t vnsrl_wx_uint8m1_tama (vbool8_t mask, vuint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWX8VUInt8VBVUSL_TAMA, nsrl_wx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt16, ScalarUIntXLen) +// vuint16m1_t vnsrl_wv_uint16m1_tama (vbool16_t mask, vuint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWV16VUInt16VBVUVU_TAMA, nsrl_wv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt32, OneDUInt16) +// vuint16m1_t vnsrl_wx_uint16m1_tama (vbool16_t mask, vuint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWX16VUInt16VBVUSL_TAMA, nsrl_wx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt32, ScalarUIntXLen) +// vuint32m1_t vnsrl_wv_uint32m1_tama (vbool32_t mask, vuint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWV32VUInt32VBVUVU_TAMA, nsrl_wv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt64, OneDUInt32) +// vuint32m1_t vnsrl_wx_uint32m1_tama (vbool32_t mask, vuint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWX32VUInt32VBVUSL_TAMA, nsrl_wx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt64, ScalarUIntXLen) +// vint8m1_t vnsra_wv_int8m1_tama (vbool8_t mask, vint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWV8VInt8VBVIVU_TAMA, nsra_wv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt16, OneDUInt8) +// vint8m1_t vnsra_wx_int8m1_tama (vbool8_t mask, vint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWX8VInt8VBVISL_TAMA, nsra_wx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt16, ScalarUIntXLen) +// vint16m1_t vnsra_wv_int16m1_tama (vbool16_t mask, vint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWV16VInt16VBVIVU_TAMA, nsra_wv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt32, OneDUInt16) +// vint16m1_t vnsra_wx_int16m1_tama (vbool16_t mask, vint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWX16VInt16VBVISL_TAMA, nsra_wx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt32, ScalarUIntXLen) +// vint32m1_t vnsra_wv_int32m1_tama (vbool32_t mask, vint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWV32VInt32VBVIVU_TAMA, nsra_wv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt64, OneDUInt32) +// vint32m1_t vnsra_wx_int32m1_tama (vbool32_t mask, vint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWX32VInt32VBVISL_TAMA, nsra_wx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt64, ScalarUIntXLen) +// vuint8m1_t vnsrl_wv_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWV8VUInt8VBVUVUVU_TAMU, nsrl_wv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt16, OneDUInt8) +// vuint8m1_t vnsrl_wx_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWX8VUInt8VBVUVUSL_TAMU, nsrl_wx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt16, ScalarUIntXLen) +// vuint16m1_t vnsrl_wv_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWV16VUInt16VBVUVUVU_TAMU, nsrl_wv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt32, OneDUInt16) +// vuint16m1_t vnsrl_wx_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWX16VUInt16VBVUVUSL_TAMU, nsrl_wx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt32, ScalarUIntXLen) +// vuint32m1_t vnsrl_wv_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWV32VUInt32VBVUVUVU_TAMU, nsrl_wv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt64, OneDUInt32) +// vuint32m1_t vnsrl_wx_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsrlWX32VUInt32VBVUVUSL_TAMU, nsrl_wx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt64, ScalarUIntXLen) +// vint8m1_t vnsra_wv_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWV8VInt8VBVIVIVU_TAMU, nsra_wv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt16, OneDUInt8) +// vint8m1_t vnsra_wx_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWX8VInt8VBVIVISL_TAMU, nsra_wx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt16, ScalarUIntXLen) +// vint16m1_t vnsra_wv_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWV16VInt16VBVIVIVU_TAMU, nsra_wv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt32, OneDUInt16) +// vint16m1_t vnsra_wx_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWX16VInt16VBVIVISL_TAMU, nsra_wx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt32, ScalarUIntXLen) +// vint32m1_t vnsra_wv_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWV32VInt32VBVIVIVU_TAMU, nsra_wv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt64, OneDUInt32) +// vint32m1_t vnsra_wx_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NsraWX32VInt32VBVIVISL_TAMU, nsra_wx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt64, ScalarUIntXLen) + +// vbool8_t vmseq_vv_int8m1_b8_ma (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVV8VBoolVBVIVI_MA, mseq_vv, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt8, OneDInt8) +// vbool8_t vmseq_vx_int8m1_b8_ma (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVX8VBoolVBVISI_MA, mseq_vx, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt8, ScalarInt8) +// vbool16_t vmseq_vv_int16m1_b16_ma (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVV16VBoolVBVIVI_MA, mseq_vv, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt16, OneDInt16) +// vbool16_t vmseq_vx_int16m1_b16_ma (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVX16VBoolVBVISI_MA, mseq_vx, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt16, ScalarInt16) +// vbool32_t vmseq_vv_int32m1_b32_ma (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVV32VBoolVBVIVI_MA, mseq_vv, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt32, OneDInt32) +// vbool32_t vmseq_vx_int32m1_b32_ma (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVX32VBoolVBVISI_MA, mseq_vx, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt32, ScalarInt32) +// vbool64_t vmseq_vv_int64m1_b64_ma (vbool64_t mask, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVV64VBoolVBVIVI_MA, mseq_vv, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt64, OneDInt64) +// vbool64_t vmseq_vx_int64m1_b64_ma (vbool64_t mask, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVX64VBoolVBVISI_MA, mseq_vx, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt64, ScalarInt64) +// vbool8_t vmseq_vv_uint8m1_b8_ma (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVV8VBoolVBVUVU_MA, mseq_vv, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt8, OneDUInt8) +// vbool8_t vmseq_vx_uint8m1_b8_ma (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVX8VBoolVBVUSU_MA, mseq_vx, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vbool16_t vmseq_vv_uint16m1_b16_ma (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVV16VBoolVBVUVU_MA, mseq_vv, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt16, OneDUInt16) +// vbool16_t vmseq_vx_uint16m1_b16_ma (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVX16VBoolVBVUSU_MA, mseq_vx, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vbool32_t vmseq_vv_uint32m1_b32_ma (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVV32VBoolVBVUVU_MA, mseq_vv, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt32, OneDUInt32) +// vbool32_t vmseq_vx_uint32m1_b32_ma (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVX32VBoolVBVUSU_MA, mseq_vx, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vbool64_t vmseq_vv_uint64m1_b64_ma (vbool64_t mask, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVV64VBoolVBVUVU_MA, mseq_vv, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt64, OneDUInt64) +// vbool64_t vmseq_vx_uint64m1_b64_ma (vbool64_t mask, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVX64VBoolVBVUSU_MA, mseq_vx, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt64, ScalarUInt64) +// vbool8_t vmsne_vv_int8m1_b8_ma (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVV8VBoolVBVIVI_MA, msne_vv, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt8, OneDInt8) +// vbool8_t vmsne_vx_int8m1_b8_ma (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVX8VBoolVBVISI_MA, msne_vx, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt8, ScalarInt8) +// vbool16_t vmsne_vv_int16m1_b16_ma (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVV16VBoolVBVIVI_MA, msne_vv, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt16, OneDInt16) +// vbool16_t vmsne_vx_int16m1_b16_ma (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVX16VBoolVBVISI_MA, msne_vx, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt16, ScalarInt16) +// vbool32_t vmsne_vv_int32m1_b32_ma (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVV32VBoolVBVIVI_MA, msne_vv, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt32, OneDInt32) +// vbool32_t vmsne_vx_int32m1_b32_ma (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVX32VBoolVBVISI_MA, msne_vx, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt32, ScalarInt32) +// vbool64_t vmsne_vv_int64m1_b64_ma (vbool64_t mask, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVV64VBoolVBVIVI_MA, msne_vv, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt64, OneDInt64) +// vbool64_t vmsne_vx_int64m1_b64_ma (vbool64_t mask, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVX64VBoolVBVISI_MA, msne_vx, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt64, ScalarInt64) +// vbool8_t vmsne_vv_uint8m1_b8_ma (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVV8VBoolVBVUVU_MA, msne_vv, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt8, OneDUInt8) +// vbool8_t vmsne_vx_uint8m1_b8_ma (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVX8VBoolVBVUSU_MA, msne_vx, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vbool16_t vmsne_vv_uint16m1_b16_ma (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVV16VBoolVBVUVU_MA, msne_vv, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt16, OneDUInt16) +// vbool16_t vmsne_vx_uint16m1_b16_ma (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVX16VBoolVBVUSU_MA, msne_vx, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vbool32_t vmsne_vv_uint32m1_b32_ma (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVV32VBoolVBVUVU_MA, msne_vv, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt32, OneDUInt32) +// vbool32_t vmsne_vx_uint32m1_b32_ma (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVX32VBoolVBVUSU_MA, msne_vx, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vbool64_t vmsne_vv_uint64m1_b64_ma (vbool64_t mask, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVV64VBoolVBVUVU_MA, msne_vv, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt64, OneDUInt64) +// vbool64_t vmsne_vx_uint64m1_b64_ma (vbool64_t mask, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVX64VBoolVBVUSU_MA, msne_vx, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt64, ScalarUInt64) +// vbool8_t vmslt_vv_int8m1_b8_ma (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltVV8VBoolVBVIVI_MA, mslt_vv, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt8, OneDInt8) +// vbool8_t vmslt_vx_int8m1_b8_ma (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltVX8VBoolVBVISI_MA, mslt_vx, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt8, ScalarInt8) +// vbool16_t vmslt_vv_int16m1_b16_ma (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltVV16VBoolVBVIVI_MA, mslt_vv, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt16, OneDInt16) +// vbool16_t vmslt_vx_int16m1_b16_ma (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltVX16VBoolVBVISI_MA, mslt_vx, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt16, ScalarInt16) +// vbool32_t vmslt_vv_int32m1_b32_ma (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltVV32VBoolVBVIVI_MA, mslt_vv, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt32, OneDInt32) +// vbool32_t vmslt_vx_int32m1_b32_ma (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltVX32VBoolVBVISI_MA, mslt_vx, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt32, ScalarInt32) +// vbool64_t vmslt_vv_int64m1_b64_ma (vbool64_t mask, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltVV64VBoolVBVIVI_MA, mslt_vv, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt64, OneDInt64) +// vbool64_t vmslt_vx_int64m1_b64_ma (vbool64_t mask, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltVX64VBoolVBVISI_MA, mslt_vx, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt64, ScalarInt64) +// vbool8_t vmsltu_vv_uint8m1_b8_ma (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltuVV8VBoolVBVUVU_MA, msltu_vv, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt8, OneDUInt8) +// vbool8_t vmsltu_vx_uint8m1_b8_ma (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltuVX8VBoolVBVUSU_MA, msltu_vx, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vbool16_t vmsltu_vv_uint16m1_b16_ma (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltuVV16VBoolVBVUVU_MA, msltu_vv, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt16, OneDUInt16) +// vbool16_t vmsltu_vx_uint16m1_b16_ma (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltuVX16VBoolVBVUSU_MA, msltu_vx, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vbool32_t vmsltu_vv_uint32m1_b32_ma (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltuVV32VBoolVBVUVU_MA, msltu_vv, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt32, OneDUInt32) +// vbool32_t vmsltu_vx_uint32m1_b32_ma (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltuVX32VBoolVBVUSU_MA, msltu_vx, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vbool64_t vmsltu_vv_uint64m1_b64_ma (vbool64_t mask, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltuVV64VBoolVBVUVU_MA, msltu_vv, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt64, OneDUInt64) +// vbool64_t vmsltu_vx_uint64m1_b64_ma (vbool64_t mask, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltuVX64VBoolVBVUSU_MA, msltu_vx, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt64, ScalarUInt64) +// vbool8_t vmsle_vv_int8m1_b8_ma (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleVV8VBoolVBVIVI_MA, msle_vv, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt8, OneDInt8) +// vbool8_t vmsle_vx_int8m1_b8_ma (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleVX8VBoolVBVISI_MA, msle_vx, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt8, ScalarInt8) +// vbool16_t vmsle_vv_int16m1_b16_ma (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleVV16VBoolVBVIVI_MA, msle_vv, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt16, OneDInt16) +// vbool16_t vmsle_vx_int16m1_b16_ma (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleVX16VBoolVBVISI_MA, msle_vx, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt16, ScalarInt16) +// vbool32_t vmsle_vv_int32m1_b32_ma (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleVV32VBoolVBVIVI_MA, msle_vv, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt32, OneDInt32) +// vbool32_t vmsle_vx_int32m1_b32_ma (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleVX32VBoolVBVISI_MA, msle_vx, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt32, ScalarInt32) +// vbool64_t vmsle_vv_int64m1_b64_ma (vbool64_t mask, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleVV64VBoolVBVIVI_MA, msle_vv, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt64, OneDInt64) +// vbool64_t vmsle_vx_int64m1_b64_ma (vbool64_t mask, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleVX64VBoolVBVISI_MA, msle_vx, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt64, ScalarInt64) +// vbool8_t vmsleu_vv_uint8m1_b8_ma (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleuVV8VBoolVBVUVU_MA, msleu_vv, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt8, OneDUInt8) +// vbool8_t vmsleu_vx_uint8m1_b8_ma (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleuVX8VBoolVBVUSU_MA, msleu_vx, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vbool16_t vmsleu_vv_uint16m1_b16_ma (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleuVV16VBoolVBVUVU_MA, msleu_vv, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt16, OneDUInt16) +// vbool16_t vmsleu_vx_uint16m1_b16_ma (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleuVX16VBoolVBVUSU_MA, msleu_vx, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vbool32_t vmsleu_vv_uint32m1_b32_ma (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleuVV32VBoolVBVUVU_MA, msleu_vv, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt32, OneDUInt32) +// vbool32_t vmsleu_vx_uint32m1_b32_ma (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleuVX32VBoolVBVUSU_MA, msleu_vx, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vbool64_t vmsleu_vv_uint64m1_b64_ma (vbool64_t mask, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleuVV64VBoolVBVUVU_MA, msleu_vv, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt64, OneDUInt64) +// vbool64_t vmsleu_vx_uint64m1_b64_ma (vbool64_t mask, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleuVX64VBoolVBVUSU_MA, msleu_vx, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt64, ScalarUInt64) +// vbool8_t vmsgt_vv_int8m1_b8_ma (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtVV8VBoolVBVIVI_MA, msgt_vv, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt8, OneDInt8) +// vbool8_t vmsgt_vx_int8m1_b8_ma (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtVX8VBoolVBVISI_MA, msgt_vx, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt8, ScalarInt8) +// vbool16_t vmsgt_vv_int16m1_b16_ma (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtVV16VBoolVBVIVI_MA, msgt_vv, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt16, OneDInt16) +// vbool16_t vmsgt_vx_int16m1_b16_ma (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtVX16VBoolVBVISI_MA, msgt_vx, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt16, ScalarInt16) +// vbool32_t vmsgt_vv_int32m1_b32_ma (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtVV32VBoolVBVIVI_MA, msgt_vv, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt32, OneDInt32) +// vbool32_t vmsgt_vx_int32m1_b32_ma (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtVX32VBoolVBVISI_MA, msgt_vx, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt32, ScalarInt32) +// vbool64_t vmsgt_vv_int64m1_b64_ma (vbool64_t mask, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtVV64VBoolVBVIVI_MA, msgt_vv, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt64, OneDInt64) +// vbool64_t vmsgt_vx_int64m1_b64_ma (vbool64_t mask, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtVX64VBoolVBVISI_MA, msgt_vx, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt64, ScalarInt64) +// vbool8_t vmsgtu_vv_uint8m1_b8_ma (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtuVV8VBoolVBVUVU_MA, msgtu_vv, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt8, OneDUInt8) +// vbool8_t vmsgtu_vx_uint8m1_b8_ma (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtuVX8VBoolVBVUSU_MA, msgtu_vx, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vbool16_t vmsgtu_vv_uint16m1_b16_ma (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtuVV16VBoolVBVUVU_MA, msgtu_vv, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt16, OneDUInt16) +// vbool16_t vmsgtu_vx_uint16m1_b16_ma (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtuVX16VBoolVBVUSU_MA, msgtu_vx, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vbool32_t vmsgtu_vv_uint32m1_b32_ma (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtuVV32VBoolVBVUVU_MA, msgtu_vv, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt32, OneDUInt32) +// vbool32_t vmsgtu_vx_uint32m1_b32_ma (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtuVX32VBoolVBVUSU_MA, msgtu_vx, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vbool64_t vmsgtu_vv_uint64m1_b64_ma (vbool64_t mask, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtuVV64VBoolVBVUVU_MA, msgtu_vv, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt64, OneDUInt64) +// vbool64_t vmsgtu_vx_uint64m1_b64_ma (vbool64_t mask, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtuVX64VBoolVBVUSU_MA, msgtu_vx, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt64, ScalarUInt64) +// vbool8_t vmsge_vv_int8m1_b8_ma (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeVV8VBoolVBVIVI_MA, msge_vv, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt8, OneDInt8) +// vbool8_t vmsge_vx_int8m1_b8_ma (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeVX8VBoolVBVISI_MA, msge_vx, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt8, ScalarInt8) +// vbool16_t vmsge_vv_int16m1_b16_ma (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeVV16VBoolVBVIVI_MA, msge_vv, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt16, OneDInt16) +// vbool16_t vmsge_vx_int16m1_b16_ma (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeVX16VBoolVBVISI_MA, msge_vx, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt16, ScalarInt16) +// vbool32_t vmsge_vv_int32m1_b32_ma (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeVV32VBoolVBVIVI_MA, msge_vv, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt32, OneDInt32) +// vbool32_t vmsge_vx_int32m1_b32_ma (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeVX32VBoolVBVISI_MA, msge_vx, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt32, ScalarInt32) +// vbool64_t vmsge_vv_int64m1_b64_ma (vbool64_t mask, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeVV64VBoolVBVIVI_MA, msge_vv, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt64, OneDInt64) +// vbool64_t vmsge_vx_int64m1_b64_ma (vbool64_t mask, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeVX64VBoolVBVISI_MA, msge_vx, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDInt64, ScalarInt64) +// vbool8_t vmsgeu_vv_uint8m1_b8_ma (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeuVV8VBoolVBVUVU_MA, msgeu_vv, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt8, OneDUInt8) +// vbool8_t vmsgeu_vx_uint8m1_b8_ma (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeuVX8VBoolVBVUSU_MA, msgeu_vx, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vbool16_t vmsgeu_vv_uint16m1_b16_ma (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeuVV16VBoolVBVUVU_MA, msgeu_vv, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt16, OneDUInt16) +// vbool16_t vmsgeu_vx_uint16m1_b16_ma (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeuVX16VBoolVBVUSU_MA, msgeu_vx, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vbool32_t vmsgeu_vv_uint32m1_b32_ma (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeuVV32VBoolVBVUVU_MA, msgeu_vv, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt32, OneDUInt32) +// vbool32_t vmsgeu_vx_uint32m1_b32_ma (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeuVX32VBoolVBVUSU_MA, msgeu_vx, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vbool64_t vmsgeu_vv_uint64m1_b64_ma (vbool64_t mask, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeuVV64VBoolVBVUVU_MA, msgeu_vv, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt64, OneDUInt64) +// vbool64_t vmsgeu_vx_uint64m1_b64_ma (vbool64_t mask, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeuVX64VBoolVBVUSU_MA, msgeu_vx, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDUInt64, ScalarUInt64) +// vbool8_t vmseq_vv_int8m1_b8_mu (vbool8_t mask, vbool8_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVV8VBoolVBVBVIVI_MU, mseq_vv, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt8, OneDInt8) +// vbool8_t vmseq_vx_int8m1_b8_mu (vbool8_t mask, vbool8_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVX8VBoolVBVBVISI_MU, mseq_vx, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt8, ScalarInt8) +// vbool16_t vmseq_vv_int16m1_b16_mu (vbool16_t mask, vbool16_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVV16VBoolVBVBVIVI_MU, mseq_vv, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt16, OneDInt16) +// vbool16_t vmseq_vx_int16m1_b16_mu (vbool16_t mask, vbool16_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVX16VBoolVBVBVISI_MU, mseq_vx, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt16, ScalarInt16) +// vbool32_t vmseq_vv_int32m1_b32_mu (vbool32_t mask, vbool32_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVV32VBoolVBVBVIVI_MU, mseq_vv, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt32, OneDInt32) +// vbool32_t vmseq_vx_int32m1_b32_mu (vbool32_t mask, vbool32_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVX32VBoolVBVBVISI_MU, mseq_vx, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt32, ScalarInt32) +// vbool64_t vmseq_vv_int64m1_b64_mu (vbool64_t mask, vbool64_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVV64VBoolVBVBVIVI_MU, mseq_vv, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt64, OneDInt64) +// vbool64_t vmseq_vx_int64m1_b64_mu (vbool64_t mask, vbool64_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVX64VBoolVBVBVISI_MU, mseq_vx, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt64, ScalarInt64) +// vbool8_t vmseq_vv_uint8m1_b8_mu (vbool8_t mask, vbool8_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVV8VBoolVBVBVUVU_MU, mseq_vv, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt8, OneDUInt8) +// vbool8_t vmseq_vx_uint8m1_b8_mu (vbool8_t mask, vbool8_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVX8VBoolVBVBVUSU_MU, mseq_vx, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt8, ScalarUInt8) +// vbool16_t vmseq_vv_uint16m1_b16_mu (vbool16_t mask, vbool16_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVV16VBoolVBVBVUVU_MU, mseq_vv, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt16, OneDUInt16) +// vbool16_t vmseq_vx_uint16m1_b16_mu (vbool16_t mask, vbool16_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVX16VBoolVBVBVUSU_MU, mseq_vx, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt16, ScalarUInt16) +// vbool32_t vmseq_vv_uint32m1_b32_mu (vbool32_t mask, vbool32_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVV32VBoolVBVBVUVU_MU, mseq_vv, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt32, OneDUInt32) +// vbool32_t vmseq_vx_uint32m1_b32_mu (vbool32_t mask, vbool32_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVX32VBoolVBVBVUSU_MU, mseq_vx, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt32, ScalarUInt32) +// vbool64_t vmseq_vv_uint64m1_b64_mu (vbool64_t mask, vbool64_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVV64VBoolVBVBVUVU_MU, mseq_vv, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt64, OneDUInt64) +// vbool64_t vmseq_vx_uint64m1_b64_mu (vbool64_t mask, vbool64_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MseqVX64VBoolVBVBVUSU_MU, mseq_vx, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt64, ScalarUInt64) +// vbool8_t vmsne_vv_int8m1_b8_mu (vbool8_t mask, vbool8_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVV8VBoolVBVBVIVI_MU, msne_vv, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt8, OneDInt8) +// vbool8_t vmsne_vx_int8m1_b8_mu (vbool8_t mask, vbool8_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVX8VBoolVBVBVISI_MU, msne_vx, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt8, ScalarInt8) +// vbool16_t vmsne_vv_int16m1_b16_mu (vbool16_t mask, vbool16_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVV16VBoolVBVBVIVI_MU, msne_vv, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt16, OneDInt16) +// vbool16_t vmsne_vx_int16m1_b16_mu (vbool16_t mask, vbool16_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVX16VBoolVBVBVISI_MU, msne_vx, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt16, ScalarInt16) +// vbool32_t vmsne_vv_int32m1_b32_mu (vbool32_t mask, vbool32_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVV32VBoolVBVBVIVI_MU, msne_vv, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt32, OneDInt32) +// vbool32_t vmsne_vx_int32m1_b32_mu (vbool32_t mask, vbool32_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVX32VBoolVBVBVISI_MU, msne_vx, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt32, ScalarInt32) +// vbool64_t vmsne_vv_int64m1_b64_mu (vbool64_t mask, vbool64_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVV64VBoolVBVBVIVI_MU, msne_vv, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt64, OneDInt64) +// vbool64_t vmsne_vx_int64m1_b64_mu (vbool64_t mask, vbool64_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVX64VBoolVBVBVISI_MU, msne_vx, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt64, ScalarInt64) +// vbool8_t vmsne_vv_uint8m1_b8_mu (vbool8_t mask, vbool8_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVV8VBoolVBVBVUVU_MU, msne_vv, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt8, OneDUInt8) +// vbool8_t vmsne_vx_uint8m1_b8_mu (vbool8_t mask, vbool8_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVX8VBoolVBVBVUSU_MU, msne_vx, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt8, ScalarUInt8) +// vbool16_t vmsne_vv_uint16m1_b16_mu (vbool16_t mask, vbool16_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVV16VBoolVBVBVUVU_MU, msne_vv, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt16, OneDUInt16) +// vbool16_t vmsne_vx_uint16m1_b16_mu (vbool16_t mask, vbool16_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVX16VBoolVBVBVUSU_MU, msne_vx, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt16, ScalarUInt16) +// vbool32_t vmsne_vv_uint32m1_b32_mu (vbool32_t mask, vbool32_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVV32VBoolVBVBVUVU_MU, msne_vv, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt32, OneDUInt32) +// vbool32_t vmsne_vx_uint32m1_b32_mu (vbool32_t mask, vbool32_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVX32VBoolVBVBVUSU_MU, msne_vx, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt32, ScalarUInt32) +// vbool64_t vmsne_vv_uint64m1_b64_mu (vbool64_t mask, vbool64_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVV64VBoolVBVBVUVU_MU, msne_vv, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt64, OneDUInt64) +// vbool64_t vmsne_vx_uint64m1_b64_mu (vbool64_t mask, vbool64_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MsneVX64VBoolVBVBVUSU_MU, msne_vx, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt64, ScalarUInt64) +// vbool8_t vmslt_vv_int8m1_b8_mu (vbool8_t mask, vbool8_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltVV8VBoolVBVBVIVI_MU, mslt_vv, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt8, OneDInt8) +// vbool8_t vmslt_vx_int8m1_b8_mu (vbool8_t mask, vbool8_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltVX8VBoolVBVBVISI_MU, mslt_vx, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt8, ScalarInt8) +// vbool16_t vmslt_vv_int16m1_b16_mu (vbool16_t mask, vbool16_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltVV16VBoolVBVBVIVI_MU, mslt_vv, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt16, OneDInt16) +// vbool16_t vmslt_vx_int16m1_b16_mu (vbool16_t mask, vbool16_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltVX16VBoolVBVBVISI_MU, mslt_vx, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt16, ScalarInt16) +// vbool32_t vmslt_vv_int32m1_b32_mu (vbool32_t mask, vbool32_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltVV32VBoolVBVBVIVI_MU, mslt_vv, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt32, OneDInt32) +// vbool32_t vmslt_vx_int32m1_b32_mu (vbool32_t mask, vbool32_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltVX32VBoolVBVBVISI_MU, mslt_vx, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt32, ScalarInt32) +// vbool64_t vmslt_vv_int64m1_b64_mu (vbool64_t mask, vbool64_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltVV64VBoolVBVBVIVI_MU, mslt_vv, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt64, OneDInt64) +// vbool64_t vmslt_vx_int64m1_b64_mu (vbool64_t mask, vbool64_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltVX64VBoolVBVBVISI_MU, mslt_vx, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt64, ScalarInt64) +// vbool8_t vmsltu_vv_uint8m1_b8_mu (vbool8_t mask, vbool8_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltuVV8VBoolVBVBVUVU_MU, msltu_vv, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt8, OneDUInt8) +// vbool8_t vmsltu_vx_uint8m1_b8_mu (vbool8_t mask, vbool8_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltuVX8VBoolVBVBVUSU_MU, msltu_vx, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt8, ScalarUInt8) +// vbool16_t vmsltu_vv_uint16m1_b16_mu (vbool16_t mask, vbool16_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltuVV16VBoolVBVBVUVU_MU, msltu_vv, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt16, OneDUInt16) +// vbool16_t vmsltu_vx_uint16m1_b16_mu (vbool16_t mask, vbool16_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltuVX16VBoolVBVBVUSU_MU, msltu_vx, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt16, ScalarUInt16) +// vbool32_t vmsltu_vv_uint32m1_b32_mu (vbool32_t mask, vbool32_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltuVV32VBoolVBVBVUVU_MU, msltu_vv, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt32, OneDUInt32) +// vbool32_t vmsltu_vx_uint32m1_b32_mu (vbool32_t mask, vbool32_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltuVX32VBoolVBVBVUSU_MU, msltu_vx, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt32, ScalarUInt32) +// vbool64_t vmsltu_vv_uint64m1_b64_mu (vbool64_t mask, vbool64_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltuVV64VBoolVBVBVUVU_MU, msltu_vv, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt64, OneDUInt64) +// vbool64_t vmsltu_vx_uint64m1_b64_mu (vbool64_t mask, vbool64_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MsltuVX64VBoolVBVBVUSU_MU, msltu_vx, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt64, ScalarUInt64) +// vbool8_t vmsle_vv_int8m1_b8_mu (vbool8_t mask, vbool8_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleVV8VBoolVBVBVIVI_MU, msle_vv, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt8, OneDInt8) +// vbool8_t vmsle_vx_int8m1_b8_mu (vbool8_t mask, vbool8_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleVX8VBoolVBVBVISI_MU, msle_vx, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt8, ScalarInt8) +// vbool16_t vmsle_vv_int16m1_b16_mu (vbool16_t mask, vbool16_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleVV16VBoolVBVBVIVI_MU, msle_vv, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt16, OneDInt16) +// vbool16_t vmsle_vx_int16m1_b16_mu (vbool16_t mask, vbool16_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleVX16VBoolVBVBVISI_MU, msle_vx, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt16, ScalarInt16) +// vbool32_t vmsle_vv_int32m1_b32_mu (vbool32_t mask, vbool32_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleVV32VBoolVBVBVIVI_MU, msle_vv, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt32, OneDInt32) +// vbool32_t vmsle_vx_int32m1_b32_mu (vbool32_t mask, vbool32_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleVX32VBoolVBVBVISI_MU, msle_vx, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt32, ScalarInt32) +// vbool64_t vmsle_vv_int64m1_b64_mu (vbool64_t mask, vbool64_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleVV64VBoolVBVBVIVI_MU, msle_vv, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt64, OneDInt64) +// vbool64_t vmsle_vx_int64m1_b64_mu (vbool64_t mask, vbool64_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleVX64VBoolVBVBVISI_MU, msle_vx, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt64, ScalarInt64) +// vbool8_t vmsleu_vv_uint8m1_b8_mu (vbool8_t mask, vbool8_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleuVV8VBoolVBVBVUVU_MU, msleu_vv, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt8, OneDUInt8) +// vbool8_t vmsleu_vx_uint8m1_b8_mu (vbool8_t mask, vbool8_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleuVX8VBoolVBVBVUSU_MU, msleu_vx, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt8, ScalarUInt8) +// vbool16_t vmsleu_vv_uint16m1_b16_mu (vbool16_t mask, vbool16_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleuVV16VBoolVBVBVUVU_MU, msleu_vv, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt16, OneDUInt16) +// vbool16_t vmsleu_vx_uint16m1_b16_mu (vbool16_t mask, vbool16_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleuVX16VBoolVBVBVUSU_MU, msleu_vx, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt16, ScalarUInt16) +// vbool32_t vmsleu_vv_uint32m1_b32_mu (vbool32_t mask, vbool32_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleuVV32VBoolVBVBVUVU_MU, msleu_vv, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt32, OneDUInt32) +// vbool32_t vmsleu_vx_uint32m1_b32_mu (vbool32_t mask, vbool32_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleuVX32VBoolVBVBVUSU_MU, msleu_vx, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt32, ScalarUInt32) +// vbool64_t vmsleu_vv_uint64m1_b64_mu (vbool64_t mask, vbool64_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleuVV64VBoolVBVBVUVU_MU, msleu_vv, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt64, OneDUInt64) +// vbool64_t vmsleu_vx_uint64m1_b64_mu (vbool64_t mask, vbool64_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MsleuVX64VBoolVBVBVUSU_MU, msleu_vx, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt64, ScalarUInt64) +// vbool8_t vmsgt_vv_int8m1_b8_mu (vbool8_t mask, vbool8_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtVV8VBoolVBVBVIVI_MU, msgt_vv, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt8, OneDInt8) +// vbool8_t vmsgt_vx_int8m1_b8_mu (vbool8_t mask, vbool8_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtVX8VBoolVBVBVISI_MU, msgt_vx, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt8, ScalarInt8) +// vbool16_t vmsgt_vv_int16m1_b16_mu (vbool16_t mask, vbool16_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtVV16VBoolVBVBVIVI_MU, msgt_vv, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt16, OneDInt16) +// vbool16_t vmsgt_vx_int16m1_b16_mu (vbool16_t mask, vbool16_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtVX16VBoolVBVBVISI_MU, msgt_vx, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt16, ScalarInt16) +// vbool32_t vmsgt_vv_int32m1_b32_mu (vbool32_t mask, vbool32_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtVV32VBoolVBVBVIVI_MU, msgt_vv, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt32, OneDInt32) +// vbool32_t vmsgt_vx_int32m1_b32_mu (vbool32_t mask, vbool32_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtVX32VBoolVBVBVISI_MU, msgt_vx, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt32, ScalarInt32) +// vbool64_t vmsgt_vv_int64m1_b64_mu (vbool64_t mask, vbool64_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtVV64VBoolVBVBVIVI_MU, msgt_vv, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt64, OneDInt64) +// vbool64_t vmsgt_vx_int64m1_b64_mu (vbool64_t mask, vbool64_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtVX64VBoolVBVBVISI_MU, msgt_vx, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt64, ScalarInt64) +// vbool8_t vmsgtu_vv_uint8m1_b8_mu (vbool8_t mask, vbool8_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtuVV8VBoolVBVBVUVU_MU, msgtu_vv, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt8, OneDUInt8) +// vbool8_t vmsgtu_vx_uint8m1_b8_mu (vbool8_t mask, vbool8_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtuVX8VBoolVBVBVUSU_MU, msgtu_vx, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt8, ScalarUInt8) +// vbool16_t vmsgtu_vv_uint16m1_b16_mu (vbool16_t mask, vbool16_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtuVV16VBoolVBVBVUVU_MU, msgtu_vv, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt16, OneDUInt16) +// vbool16_t vmsgtu_vx_uint16m1_b16_mu (vbool16_t mask, vbool16_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtuVX16VBoolVBVBVUSU_MU, msgtu_vx, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt16, ScalarUInt16) +// vbool32_t vmsgtu_vv_uint32m1_b32_mu (vbool32_t mask, vbool32_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtuVV32VBoolVBVBVUVU_MU, msgtu_vv, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt32, OneDUInt32) +// vbool32_t vmsgtu_vx_uint32m1_b32_mu (vbool32_t mask, vbool32_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtuVX32VBoolVBVBVUSU_MU, msgtu_vx, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt32, ScalarUInt32) +// vbool64_t vmsgtu_vv_uint64m1_b64_mu (vbool64_t mask, vbool64_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtuVV64VBoolVBVBVUVU_MU, msgtu_vv, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt64, OneDUInt64) +// vbool64_t vmsgtu_vx_uint64m1_b64_mu (vbool64_t mask, vbool64_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgtuVX64VBoolVBVBVUSU_MU, msgtu_vx, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt64, ScalarUInt64) +// vbool8_t vmsge_vv_int8m1_b8_mu (vbool8_t mask, vbool8_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeVV8VBoolVBVBVIVI_MU, msge_vv, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt8, OneDInt8) +// vbool8_t vmsge_vx_int8m1_b8_mu (vbool8_t mask, vbool8_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeVX8VBoolVBVBVISI_MU, msge_vx, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt8, ScalarInt8) +// vbool16_t vmsge_vv_int16m1_b16_mu (vbool16_t mask, vbool16_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeVV16VBoolVBVBVIVI_MU, msge_vv, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt16, OneDInt16) +// vbool16_t vmsge_vx_int16m1_b16_mu (vbool16_t mask, vbool16_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeVX16VBoolVBVBVISI_MU, msge_vx, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt16, ScalarInt16) +// vbool32_t vmsge_vv_int32m1_b32_mu (vbool32_t mask, vbool32_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeVV32VBoolVBVBVIVI_MU, msge_vv, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt32, OneDInt32) +// vbool32_t vmsge_vx_int32m1_b32_mu (vbool32_t mask, vbool32_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeVX32VBoolVBVBVISI_MU, msge_vx, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt32, ScalarInt32) +// vbool64_t vmsge_vv_int64m1_b64_mu (vbool64_t mask, vbool64_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeVV64VBoolVBVBVIVI_MU, msge_vv, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt64, OneDInt64) +// vbool64_t vmsge_vx_int64m1_b64_mu (vbool64_t mask, vbool64_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeVX64VBoolVBVBVISI_MU, msge_vx, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDInt64, ScalarInt64) +// vbool8_t vmsgeu_vv_uint8m1_b8_mu (vbool8_t mask, vbool8_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeuVV8VBoolVBVBVUVU_MU, msgeu_vv, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt8, OneDUInt8) +// vbool8_t vmsgeu_vx_uint8m1_b8_mu (vbool8_t mask, vbool8_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeuVX8VBoolVBVBVUSU_MU, msgeu_vx, 8, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt8, ScalarUInt8) +// vbool16_t vmsgeu_vv_uint16m1_b16_mu (vbool16_t mask, vbool16_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeuVV16VBoolVBVBVUVU_MU, msgeu_vv, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt16, OneDUInt16) +// vbool16_t vmsgeu_vx_uint16m1_b16_mu (vbool16_t mask, vbool16_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeuVX16VBoolVBVBVUSU_MU, msgeu_vx, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt16, ScalarUInt16) +// vbool32_t vmsgeu_vv_uint32m1_b32_mu (vbool32_t mask, vbool32_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeuVV32VBoolVBVBVUVU_MU, msgeu_vv, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt32, OneDUInt32) +// vbool32_t vmsgeu_vx_uint32m1_b32_mu (vbool32_t mask, vbool32_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeuVX32VBoolVBVBVUSU_MU, msgeu_vx, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt32, ScalarUInt32) +// vbool64_t vmsgeu_vv_uint64m1_b64_mu (vbool64_t mask, vbool64_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeuVV64VBoolVBVBVUVU_MU, msgeu_vv, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt64, OneDUInt64) +// vbool64_t vmsgeu_vx_uint64m1_b64_mu (vbool64_t mask, vbool64_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MsgeuVX64VBoolVBVBVUSU_MU, msgeu_vx, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDUInt64, ScalarUInt64) + +// vint8m1_t vmin_vv_int8m1_tu (vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV8VInt8VIVIVI_TU, min_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmin_vx_int8m1_tu (vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX8VInt8VIVISI_TU, min_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vmin_vv_int16m1_tu (vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV16VInt16VIVIVI_TU, min_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmin_vx_int16m1_tu (vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX16VInt16VIVISI_TU, min_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vmin_vv_int32m1_tu (vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV32VInt32VIVIVI_TU, min_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmin_vx_int32m1_tu (vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX32VInt32VIVISI_TU, min_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vmin_vv_int64m1_tu (vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV64VInt64VIVIVI_TU, min_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmin_vx_int64m1_tu (vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX64VInt64VIVISI_TU, min_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vminu_vv_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV8VUInt8VUVUVU_TU, minu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vminu_vx_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX8VUInt8VUVUSU_TU, minu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vminu_vv_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV16VUInt16VUVUVU_TU, minu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vminu_vx_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX16VUInt16VUVUSU_TU, minu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vminu_vv_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV32VUInt32VUVUVU_TU, minu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vminu_vx_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX32VUInt32VUVUSU_TU, minu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vminu_vv_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV64VUInt64VUVUVU_TU, minu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vminu_vx_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX64VUInt64VUVUSU_TU, minu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vmax_vv_int8m1_tu (vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV8VInt8VIVIVI_TU, max_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmax_vx_int8m1_tu (vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX8VInt8VIVISI_TU, max_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vmax_vv_int16m1_tu (vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV16VInt16VIVIVI_TU, max_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmax_vx_int16m1_tu (vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX16VInt16VIVISI_TU, max_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vmax_vv_int32m1_tu (vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV32VInt32VIVIVI_TU, max_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmax_vx_int32m1_tu (vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX32VInt32VIVISI_TU, max_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vmax_vv_int64m1_tu (vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV64VInt64VIVIVI_TU, max_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmax_vx_int64m1_tu (vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX64VInt64VIVISI_TU, max_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vmaxu_vv_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV8VUInt8VUVUVU_TU, maxu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmaxu_vx_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX8VUInt8VUVUSU_TU, maxu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vmaxu_vv_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV16VUInt16VUVUVU_TU, maxu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmaxu_vx_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX16VUInt16VUVUSU_TU, maxu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vmaxu_vv_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV32VUInt32VUVUVU_TU, maxu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmaxu_vx_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX32VUInt32VUVUSU_TU, maxu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vmaxu_vv_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV64VUInt64VUVUVU_TU, maxu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmaxu_vx_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX64VUInt64VUVUSU_TU, maxu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vmin_vv_int8m1_ta (vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV8VInt8VIVI_TA, min_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDInt8) +// vint8m1_t vmin_vx_int8m1_ta (vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX8VInt8VISI_TA, min_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, ScalarInt8) +// vint16m1_t vmin_vv_int16m1_ta (vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV16VInt16VIVI_TA, min_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDInt16) +// vint16m1_t vmin_vx_int16m1_ta (vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX16VInt16VISI_TA, min_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarInt16) +// vint32m1_t vmin_vv_int32m1_ta (vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV32VInt32VIVI_TA, min_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDInt32) +// vint32m1_t vmin_vx_int32m1_ta (vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX32VInt32VISI_TA, min_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarInt32) +// vint64m1_t vmin_vv_int64m1_ta (vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV64VInt64VIVI_TA, min_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDInt64) +// vint64m1_t vmin_vx_int64m1_ta (vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX64VInt64VISI_TA, min_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarInt64) +// vuint8m1_t vminu_vv_uint8m1_ta (vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV8VUInt8VUVU_TA, minu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint8m1_t vminu_vx_uint8m1_ta (vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX8VUInt8VUSU_TA, minu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +// vuint16m1_t vminu_vv_uint16m1_ta (vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV16VUInt16VUVU_TA, minu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint16m1_t vminu_vx_uint16m1_ta (vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX16VUInt16VUSU_TA, minu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +// vuint32m1_t vminu_vv_uint32m1_ta (vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV32VUInt32VUVU_TA, minu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint32m1_t vminu_vx_uint32m1_ta (vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX32VUInt32VUSU_TA, minu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +// vuint64m1_t vminu_vv_uint64m1_ta (vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV64VUInt64VUVU_TA, minu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vuint64m1_t vminu_vx_uint64m1_ta (vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX64VUInt64VUSU_TA, minu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +// vint8m1_t vmax_vv_int8m1_ta (vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV8VInt8VIVI_TA, max_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDInt8) +// vint8m1_t vmax_vx_int8m1_ta (vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX8VInt8VISI_TA, max_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, ScalarInt8) +// vint16m1_t vmax_vv_int16m1_ta (vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV16VInt16VIVI_TA, max_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDInt16) +// vint16m1_t vmax_vx_int16m1_ta (vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX16VInt16VISI_TA, max_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarInt16) +// vint32m1_t vmax_vv_int32m1_ta (vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV32VInt32VIVI_TA, max_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDInt32) +// vint32m1_t vmax_vx_int32m1_ta (vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX32VInt32VISI_TA, max_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarInt32) +// vint64m1_t vmax_vv_int64m1_ta (vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV64VInt64VIVI_TA, max_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDInt64) +// vint64m1_t vmax_vx_int64m1_ta (vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX64VInt64VISI_TA, max_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarInt64) +// vuint8m1_t vmaxu_vv_uint8m1_ta (vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV8VUInt8VUVU_TA, maxu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint8m1_t vmaxu_vx_uint8m1_ta (vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX8VUInt8VUSU_TA, maxu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +// vuint16m1_t vmaxu_vv_uint16m1_ta (vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV16VUInt16VUVU_TA, maxu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint16m1_t vmaxu_vx_uint16m1_ta (vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX16VUInt16VUSU_TA, maxu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +// vuint32m1_t vmaxu_vv_uint32m1_ta (vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV32VUInt32VUVU_TA, maxu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint32m1_t vmaxu_vx_uint32m1_ta (vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX32VUInt32VUSU_TA, maxu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +// vuint64m1_t vmaxu_vv_uint64m1_ta (vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV64VUInt64VUVU_TA, maxu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vuint64m1_t vmaxu_vx_uint64m1_ta (vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX64VUInt64VUSU_TA, maxu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +// vint8m1_t vmin_vv_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV8VInt8VBVIVIVI_TUMA, min_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmin_vx_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX8VInt8VBVIVISI_TUMA, min_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vmin_vv_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV16VInt16VBVIVIVI_TUMA, min_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmin_vx_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX16VInt16VBVIVISI_TUMA, min_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vmin_vv_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV32VInt32VBVIVIVI_TUMA, min_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmin_vx_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX32VInt32VBVIVISI_TUMA, min_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vmin_vv_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV64VInt64VBVIVIVI_TUMA, min_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmin_vx_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX64VInt64VBVIVISI_TUMA, min_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vminu_vv_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV8VUInt8VBVUVUVU_TUMA, minu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vminu_vx_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX8VUInt8VBVUVUSU_TUMA, minu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vminu_vv_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV16VUInt16VBVUVUVU_TUMA, minu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vminu_vx_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX16VUInt16VBVUVUSU_TUMA, minu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vminu_vv_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV32VUInt32VBVUVUVU_TUMA, minu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vminu_vx_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX32VUInt32VBVUVUSU_TUMA, minu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vminu_vv_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV64VUInt64VBVUVUVU_TUMA, minu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vminu_vx_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX64VUInt64VBVUVUSU_TUMA, minu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vmax_vv_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV8VInt8VBVIVIVI_TUMA, max_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmax_vx_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX8VInt8VBVIVISI_TUMA, max_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vmax_vv_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV16VInt16VBVIVIVI_TUMA, max_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmax_vx_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX16VInt16VBVIVISI_TUMA, max_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vmax_vv_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV32VInt32VBVIVIVI_TUMA, max_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmax_vx_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX32VInt32VBVIVISI_TUMA, max_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vmax_vv_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV64VInt64VBVIVIVI_TUMA, max_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmax_vx_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX64VInt64VBVIVISI_TUMA, max_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vmaxu_vv_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV8VUInt8VBVUVUVU_TUMA, maxu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmaxu_vx_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX8VUInt8VBVUVUSU_TUMA, maxu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vmaxu_vv_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV16VUInt16VBVUVUVU_TUMA, maxu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmaxu_vx_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX16VUInt16VBVUVUSU_TUMA, maxu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vmaxu_vv_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV32VUInt32VBVUVUVU_TUMA, maxu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmaxu_vx_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX32VUInt32VBVUVUSU_TUMA, maxu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vmaxu_vv_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV64VUInt64VBVUVUVU_TUMA, maxu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmaxu_vx_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX64VUInt64VBVUVUSU_TUMA, maxu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vmin_vv_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV8VInt8VBVIVIVI_TUMU, min_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmin_vx_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX8VInt8VBVIVISI_TUMU, min_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vmin_vv_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV16VInt16VBVIVIVI_TUMU, min_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmin_vx_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX16VInt16VBVIVISI_TUMU, min_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vmin_vv_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV32VInt32VBVIVIVI_TUMU, min_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmin_vx_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX32VInt32VBVIVISI_TUMU, min_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vmin_vv_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV64VInt64VBVIVIVI_TUMU, min_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmin_vx_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX64VInt64VBVIVISI_TUMU, min_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vminu_vv_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV8VUInt8VBVUVUVU_TUMU, minu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vminu_vx_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX8VUInt8VBVUVUSU_TUMU, minu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vminu_vv_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV16VUInt16VBVUVUVU_TUMU, minu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vminu_vx_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX16VUInt16VBVUVUSU_TUMU, minu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vminu_vv_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV32VUInt32VBVUVUVU_TUMU, minu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vminu_vx_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX32VUInt32VBVUVUSU_TUMU, minu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vminu_vv_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV64VUInt64VBVUVUVU_TUMU, minu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vminu_vx_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX64VUInt64VBVUVUSU_TUMU, minu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vmax_vv_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV8VInt8VBVIVIVI_TUMU, max_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmax_vx_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX8VInt8VBVIVISI_TUMU, max_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vmax_vv_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV16VInt16VBVIVIVI_TUMU, max_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmax_vx_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX16VInt16VBVIVISI_TUMU, max_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vmax_vv_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV32VInt32VBVIVIVI_TUMU, max_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmax_vx_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX32VInt32VBVIVISI_TUMU, max_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vmax_vv_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV64VInt64VBVIVIVI_TUMU, max_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmax_vx_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX64VInt64VBVIVISI_TUMU, max_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vmaxu_vv_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV8VUInt8VBVUVUVU_TUMU, maxu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmaxu_vx_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX8VUInt8VBVUVUSU_TUMU, maxu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vmaxu_vv_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV16VUInt16VBVUVUVU_TUMU, maxu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmaxu_vx_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX16VUInt16VBVUVUSU_TUMU, maxu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vmaxu_vv_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV32VUInt32VBVUVUVU_TUMU, maxu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmaxu_vx_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX32VUInt32VBVUVUSU_TUMU, maxu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vmaxu_vv_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV64VUInt64VBVUVUVU_TUMU, maxu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmaxu_vx_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX64VUInt64VBVUVUSU_TUMU, maxu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vmin_vv_int8m1_tama (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV8VInt8VBVIVI_TAMA, min_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint8m1_t vmin_vx_int8m1_tama (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX8VInt8VBVISI_TAMA, min_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, ScalarInt8) +// vint16m1_t vmin_vv_int16m1_tama (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV16VInt16VBVIVI_TAMA, min_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint16m1_t vmin_vx_int16m1_tama (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX16VInt16VBVISI_TAMA, min_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarInt16) +// vint32m1_t vmin_vv_int32m1_tama (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV32VInt32VBVIVI_TAMA, min_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint32m1_t vmin_vx_int32m1_tama (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX32VInt32VBVISI_TAMA, min_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarInt32) +// vint64m1_t vmin_vv_int64m1_tama (vbool64_t mask, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV64VInt64VBVIVI_TAMA, min_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vint64m1_t vmin_vx_int64m1_tama (vbool64_t mask, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX64VInt64VBVISI_TAMA, min_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarInt64) +// vuint8m1_t vminu_vv_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV8VUInt8VBVUVU_TAMA, minu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint8m1_t vminu_vx_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX8VUInt8VBVUSU_TAMA, minu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vuint16m1_t vminu_vv_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV16VUInt16VBVUVU_TAMA, minu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint16m1_t vminu_vx_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX16VUInt16VBVUSU_TAMA, minu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vuint32m1_t vminu_vv_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV32VUInt32VBVUVU_TAMA, minu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint32m1_t vminu_vx_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX32VUInt32VBVUSU_TAMA, minu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vuint64m1_t vminu_vv_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV64VUInt64VBVUVU_TAMA, minu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vuint64m1_t vminu_vx_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX64VUInt64VBVUSU_TAMA, minu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarUInt64) +// vint8m1_t vmax_vv_int8m1_tama (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV8VInt8VBVIVI_TAMA, max_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint8m1_t vmax_vx_int8m1_tama (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX8VInt8VBVISI_TAMA, max_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, ScalarInt8) +// vint16m1_t vmax_vv_int16m1_tama (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV16VInt16VBVIVI_TAMA, max_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint16m1_t vmax_vx_int16m1_tama (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX16VInt16VBVISI_TAMA, max_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarInt16) +// vint32m1_t vmax_vv_int32m1_tama (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV32VInt32VBVIVI_TAMA, max_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint32m1_t vmax_vx_int32m1_tama (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX32VInt32VBVISI_TAMA, max_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarInt32) +// vint64m1_t vmax_vv_int64m1_tama (vbool64_t mask, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV64VInt64VBVIVI_TAMA, max_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vint64m1_t vmax_vx_int64m1_tama (vbool64_t mask, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX64VInt64VBVISI_TAMA, max_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarInt64) +// vuint8m1_t vmaxu_vv_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV8VUInt8VBVUVU_TAMA, maxu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint8m1_t vmaxu_vx_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX8VUInt8VBVUSU_TAMA, maxu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vuint16m1_t vmaxu_vv_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV16VUInt16VBVUVU_TAMA, maxu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint16m1_t vmaxu_vx_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX16VUInt16VBVUSU_TAMA, maxu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vuint32m1_t vmaxu_vv_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV32VUInt32VBVUVU_TAMA, maxu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint32m1_t vmaxu_vx_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX32VUInt32VBVUSU_TAMA, maxu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vuint64m1_t vmaxu_vv_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV64VUInt64VBVUVU_TAMA, maxu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vuint64m1_t vmaxu_vx_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX64VUInt64VBVUSU_TAMA, maxu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarUInt64) +// vint8m1_t vmin_vv_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV8VInt8VBVIVIVI_TAMU, min_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmin_vx_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX8VInt8VBVIVISI_TAMU, min_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vmin_vv_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV16VInt16VBVIVIVI_TAMU, min_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmin_vx_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX16VInt16VBVIVISI_TAMU, min_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vmin_vv_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV32VInt32VBVIVIVI_TAMU, min_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmin_vx_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX32VInt32VBVIVISI_TAMU, min_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vmin_vv_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVV64VInt64VBVIVIVI_TAMU, min_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmin_vx_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MinVX64VInt64VBVIVISI_TAMU, min_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vminu_vv_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV8VUInt8VBVUVUVU_TAMU, minu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vminu_vx_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX8VUInt8VBVUVUSU_TAMU, minu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vminu_vv_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV16VUInt16VBVUVUVU_TAMU, minu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vminu_vx_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX16VUInt16VBVUVUSU_TAMU, minu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vminu_vv_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV32VUInt32VBVUVUVU_TAMU, minu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vminu_vx_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX32VUInt32VBVUVUSU_TAMU, minu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vminu_vv_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVV64VUInt64VBVUVUVU_TAMU, minu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vminu_vx_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MinuVX64VUInt64VBVUVUSU_TAMU, minu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vmax_vv_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV8VInt8VBVIVIVI_TAMU, max_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmax_vx_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX8VInt8VBVIVISI_TAMU, max_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vmax_vv_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV16VInt16VBVIVIVI_TAMU, max_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmax_vx_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX16VInt16VBVIVISI_TAMU, max_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vmax_vv_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV32VInt32VBVIVIVI_TAMU, max_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmax_vx_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX32VInt32VBVIVISI_TAMU, max_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vmax_vv_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVV64VInt64VBVIVIVI_TAMU, max_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmax_vx_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxVX64VInt64VBVIVISI_TAMU, max_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vmaxu_vv_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV8VUInt8VBVUVUVU_TAMU, maxu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmaxu_vx_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX8VUInt8VBVUVUSU_TAMU, maxu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vmaxu_vv_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV16VUInt16VBVUVUVU_TAMU, maxu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmaxu_vx_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX16VUInt16VBVUVUSU_TAMU, maxu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vmaxu_vv_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV32VUInt32VBVUVUVU_TAMU, maxu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmaxu_vx_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX32VUInt32VBVUVUSU_TAMU, maxu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vmaxu_vv_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVV64VUInt64VBVUVUVU_TAMU, maxu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmaxu_vx_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MaxuVX64VUInt64VBVUVUSU_TAMU, maxu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) + +// vint8m1_t vmul_vv_int8m1_tu (vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV8VInt8VIVIVI_TU, mul_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmul_vx_int8m1_tu (vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX8VInt8VIVISI_TU, mul_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vmul_vv_int16m1_tu (vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV16VInt16VIVIVI_TU, mul_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmul_vx_int16m1_tu (vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX16VInt16VIVISI_TU, mul_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vmul_vv_int32m1_tu (vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV32VInt32VIVIVI_TU, mul_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmul_vx_int32m1_tu (vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX32VInt32VIVISI_TU, mul_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vmul_vv_int64m1_tu (vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV64VInt64VIVIVI_TU, mul_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmul_vx_int64m1_tu (vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX64VInt64VIVISI_TU, mul_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vmul_vv_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV8VUInt8VUVUVU_TU, mul_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmul_vx_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX8VUInt8VUVUSU_TU, mul_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vmul_vv_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV16VUInt16VUVUVU_TU, mul_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmul_vx_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX16VUInt16VUVUSU_TU, mul_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vmul_vv_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV32VUInt32VUVUVU_TU, mul_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmul_vx_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX32VUInt32VUVUSU_TU, mul_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vmul_vv_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV64VUInt64VUVUVU_TU, mul_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmul_vx_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX64VUInt64VUVUSU_TU, mul_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vmulh_vv_int8m1_tu (vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV8VInt8VIVIVI_TU, mulh_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmulh_vx_int8m1_tu (vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX8VInt8VIVISI_TU, mulh_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vmulh_vv_int16m1_tu (vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV16VInt16VIVIVI_TU, mulh_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmulh_vx_int16m1_tu (vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX16VInt16VIVISI_TU, mulh_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vmulh_vv_int32m1_tu (vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV32VInt32VIVIVI_TU, mulh_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmulh_vx_int32m1_tu (vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX32VInt32VIVISI_TU, mulh_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vmulh_vv_int64m1_tu (vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV64VInt64VIVIVI_TU, mulh_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmulh_vx_int64m1_tu (vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX64VInt64VIVISI_TU, mulh_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vmulhu_vv_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV8VUInt8VUVUVU_TU, mulhu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmulhu_vx_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX8VUInt8VUVUSU_TU, mulhu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vmulhu_vv_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV16VUInt16VUVUVU_TU, mulhu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmulhu_vx_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX16VUInt16VUVUSU_TU, mulhu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vmulhu_vv_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV32VUInt32VUVUVU_TU, mulhu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmulhu_vx_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX32VUInt32VUVUSU_TU, mulhu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vmulhu_vv_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV64VUInt64VUVUVU_TU, mulhu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmulhu_vx_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX64VUInt64VUVUSU_TU, mulhu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vmulhsu_vv_int8m1_tu (vint8m1_t merge, vint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV8VInt8VIVIVU_TU, mulhsu_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vmulhsu_vx_int8m1_tu (vint8m1_t merge, vint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX8VInt8VIVISU_TU, mulhsu_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, ScalarUInt8) +// vint16m1_t vmulhsu_vv_int16m1_tu (vint16m1_t merge, vint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV16VInt16VIVIVU_TU, mulhsu_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vmulhsu_vx_int16m1_tu (vint16m1_t merge, vint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX16VInt16VIVISU_TU, mulhsu_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarUInt16) +// vint32m1_t vmulhsu_vv_int32m1_tu (vint32m1_t merge, vint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV32VInt32VIVIVU_TU, mulhsu_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vmulhsu_vx_int32m1_tu (vint32m1_t merge, vint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX32VInt32VIVISU_TU, mulhsu_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarUInt32) +// vint64m1_t vmulhsu_vv_int64m1_tu (vint64m1_t merge, vint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV64VInt64VIVIVU_TU, mulhsu_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDUInt64) +// vint64m1_t vmulhsu_vx_int64m1_tu (vint64m1_t merge, vint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX64VInt64VIVISU_TU, mulhsu_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarUInt64) +// vint8m1_t vmul_vv_int8m1_ta (vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV8VInt8VIVI_TA, mul_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDInt8) +// vint8m1_t vmul_vx_int8m1_ta (vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX8VInt8VISI_TA, mul_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, ScalarInt8) +// vint16m1_t vmul_vv_int16m1_ta (vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV16VInt16VIVI_TA, mul_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDInt16) +// vint16m1_t vmul_vx_int16m1_ta (vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX16VInt16VISI_TA, mul_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarInt16) +// vint32m1_t vmul_vv_int32m1_ta (vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV32VInt32VIVI_TA, mul_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDInt32) +// vint32m1_t vmul_vx_int32m1_ta (vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX32VInt32VISI_TA, mul_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarInt32) +// vint64m1_t vmul_vv_int64m1_ta (vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV64VInt64VIVI_TA, mul_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDInt64) +// vint64m1_t vmul_vx_int64m1_ta (vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX64VInt64VISI_TA, mul_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarInt64) +// vuint8m1_t vmul_vv_uint8m1_ta (vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV8VUInt8VUVU_TA, mul_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint8m1_t vmul_vx_uint8m1_ta (vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX8VUInt8VUSU_TA, mul_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +// vuint16m1_t vmul_vv_uint16m1_ta (vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV16VUInt16VUVU_TA, mul_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint16m1_t vmul_vx_uint16m1_ta (vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX16VUInt16VUSU_TA, mul_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +// vuint32m1_t vmul_vv_uint32m1_ta (vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV32VUInt32VUVU_TA, mul_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint32m1_t vmul_vx_uint32m1_ta (vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX32VUInt32VUSU_TA, mul_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +// vuint64m1_t vmul_vv_uint64m1_ta (vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV64VUInt64VUVU_TA, mul_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vuint64m1_t vmul_vx_uint64m1_ta (vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX64VUInt64VUSU_TA, mul_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +// vint8m1_t vmulh_vv_int8m1_ta (vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV8VInt8VIVI_TA, mulh_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDInt8) +// vint8m1_t vmulh_vx_int8m1_ta (vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX8VInt8VISI_TA, mulh_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, ScalarInt8) +// vint16m1_t vmulh_vv_int16m1_ta (vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV16VInt16VIVI_TA, mulh_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDInt16) +// vint16m1_t vmulh_vx_int16m1_ta (vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX16VInt16VISI_TA, mulh_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarInt16) +// vint32m1_t vmulh_vv_int32m1_ta (vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV32VInt32VIVI_TA, mulh_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDInt32) +// vint32m1_t vmulh_vx_int32m1_ta (vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX32VInt32VISI_TA, mulh_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarInt32) +// vint64m1_t vmulh_vv_int64m1_ta (vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV64VInt64VIVI_TA, mulh_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDInt64) +// vint64m1_t vmulh_vx_int64m1_ta (vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX64VInt64VISI_TA, mulh_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarInt64) +// vuint8m1_t vmulhu_vv_uint8m1_ta (vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV8VUInt8VUVU_TA, mulhu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint8m1_t vmulhu_vx_uint8m1_ta (vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX8VUInt8VUSU_TA, mulhu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +// vuint16m1_t vmulhu_vv_uint16m1_ta (vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV16VUInt16VUVU_TA, mulhu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint16m1_t vmulhu_vx_uint16m1_ta (vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX16VUInt16VUSU_TA, mulhu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +// vuint32m1_t vmulhu_vv_uint32m1_ta (vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV32VUInt32VUVU_TA, mulhu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint32m1_t vmulhu_vx_uint32m1_ta (vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX32VUInt32VUSU_TA, mulhu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +// vuint64m1_t vmulhu_vv_uint64m1_ta (vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV64VUInt64VUVU_TA, mulhu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vuint64m1_t vmulhu_vx_uint64m1_ta (vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX64VUInt64VUSU_TA, mulhu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +// vint8m1_t vmulhsu_vv_int8m1_ta (vint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV8VInt8VIVU_TA, mulhsu_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDUInt8) +// vint8m1_t vmulhsu_vx_int8m1_ta (vint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX8VInt8VISU_TA, mulhsu_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, ScalarUInt8) +// vint16m1_t vmulhsu_vv_int16m1_ta (vint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV16VInt16VIVU_TA, mulhsu_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDUInt16) +// vint16m1_t vmulhsu_vx_int16m1_ta (vint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX16VInt16VISU_TA, mulhsu_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarUInt16) +// vint32m1_t vmulhsu_vv_int32m1_ta (vint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV32VInt32VIVU_TA, mulhsu_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDUInt32) +// vint32m1_t vmulhsu_vx_int32m1_ta (vint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX32VInt32VISU_TA, mulhsu_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarUInt32) +// vint64m1_t vmulhsu_vv_int64m1_ta (vint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV64VInt64VIVU_TA, mulhsu_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDUInt64) +// vint64m1_t vmulhsu_vx_int64m1_ta (vint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX64VInt64VISU_TA, mulhsu_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarUInt64) +// vint8m1_t vmul_vv_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV8VInt8VBVIVIVI_TUMA, mul_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmul_vx_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX8VInt8VBVIVISI_TUMA, mul_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vmul_vv_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV16VInt16VBVIVIVI_TUMA, mul_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmul_vx_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX16VInt16VBVIVISI_TUMA, mul_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vmul_vv_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV32VInt32VBVIVIVI_TUMA, mul_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmul_vx_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX32VInt32VBVIVISI_TUMA, mul_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vmul_vv_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV64VInt64VBVIVIVI_TUMA, mul_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmul_vx_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX64VInt64VBVIVISI_TUMA, mul_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vmul_vv_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV8VUInt8VBVUVUVU_TUMA, mul_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmul_vx_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX8VUInt8VBVUVUSU_TUMA, mul_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vmul_vv_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV16VUInt16VBVUVUVU_TUMA, mul_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmul_vx_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX16VUInt16VBVUVUSU_TUMA, mul_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vmul_vv_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV32VUInt32VBVUVUVU_TUMA, mul_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmul_vx_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX32VUInt32VBVUVUSU_TUMA, mul_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vmul_vv_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV64VUInt64VBVUVUVU_TUMA, mul_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmul_vx_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX64VUInt64VBVUVUSU_TUMA, mul_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vmulh_vv_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV8VInt8VBVIVIVI_TUMA, mulh_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmulh_vx_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX8VInt8VBVIVISI_TUMA, mulh_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vmulh_vv_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV16VInt16VBVIVIVI_TUMA, mulh_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmulh_vx_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX16VInt16VBVIVISI_TUMA, mulh_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vmulh_vv_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV32VInt32VBVIVIVI_TUMA, mulh_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmulh_vx_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX32VInt32VBVIVISI_TUMA, mulh_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vmulh_vv_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV64VInt64VBVIVIVI_TUMA, mulh_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmulh_vx_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX64VInt64VBVIVISI_TUMA, mulh_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vmulhu_vv_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV8VUInt8VBVUVUVU_TUMA, mulhu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmulhu_vx_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX8VUInt8VBVUVUSU_TUMA, mulhu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vmulhu_vv_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV16VUInt16VBVUVUVU_TUMA, mulhu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmulhu_vx_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX16VUInt16VBVUVUSU_TUMA, mulhu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vmulhu_vv_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV32VUInt32VBVUVUVU_TUMA, mulhu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmulhu_vx_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX32VUInt32VBVUVUSU_TUMA, mulhu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vmulhu_vv_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV64VUInt64VBVUVUVU_TUMA, mulhu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmulhu_vx_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX64VUInt64VBVUVUSU_TUMA, mulhu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vmulhsu_vv_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV8VInt8VBVIVIVU_TUMA, mulhsu_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vmulhsu_vx_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX8VInt8VBVIVISU_TUMA, mulhsu_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarUInt8) +// vint16m1_t vmulhsu_vv_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV16VInt16VBVIVIVU_TUMA, mulhsu_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vmulhsu_vx_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX16VInt16VBVIVISU_TUMA, mulhsu_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarUInt16) +// vint32m1_t vmulhsu_vv_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV32VInt32VBVIVIVU_TUMA, mulhsu_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vmulhsu_vx_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX32VInt32VBVIVISU_TUMA, mulhsu_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarUInt32) +// vint64m1_t vmulhsu_vv_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV64VInt64VBVIVIVU_TUMA, mulhsu_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +// vint64m1_t vmulhsu_vx_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX64VInt64VBVIVISU_TUMA, mulhsu_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarUInt64) +// vint8m1_t vmul_vv_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV8VInt8VBVIVIVI_TUMU, mul_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmul_vx_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX8VInt8VBVIVISI_TUMU, mul_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vmul_vv_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV16VInt16VBVIVIVI_TUMU, mul_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmul_vx_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX16VInt16VBVIVISI_TUMU, mul_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vmul_vv_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV32VInt32VBVIVIVI_TUMU, mul_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmul_vx_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX32VInt32VBVIVISI_TUMU, mul_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vmul_vv_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV64VInt64VBVIVIVI_TUMU, mul_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmul_vx_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX64VInt64VBVIVISI_TUMU, mul_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vmul_vv_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV8VUInt8VBVUVUVU_TUMU, mul_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmul_vx_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX8VUInt8VBVUVUSU_TUMU, mul_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vmul_vv_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV16VUInt16VBVUVUVU_TUMU, mul_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmul_vx_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX16VUInt16VBVUVUSU_TUMU, mul_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vmul_vv_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV32VUInt32VBVUVUVU_TUMU, mul_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmul_vx_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX32VUInt32VBVUVUSU_TUMU, mul_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vmul_vv_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV64VUInt64VBVUVUVU_TUMU, mul_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmul_vx_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX64VUInt64VBVUVUSU_TUMU, mul_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vmulh_vv_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV8VInt8VBVIVIVI_TUMU, mulh_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmulh_vx_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX8VInt8VBVIVISI_TUMU, mulh_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vmulh_vv_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV16VInt16VBVIVIVI_TUMU, mulh_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmulh_vx_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX16VInt16VBVIVISI_TUMU, mulh_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vmulh_vv_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV32VInt32VBVIVIVI_TUMU, mulh_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmulh_vx_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX32VInt32VBVIVISI_TUMU, mulh_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vmulh_vv_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV64VInt64VBVIVIVI_TUMU, mulh_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmulh_vx_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX64VInt64VBVIVISI_TUMU, mulh_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vmulhu_vv_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV8VUInt8VBVUVUVU_TUMU, mulhu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmulhu_vx_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX8VUInt8VBVUVUSU_TUMU, mulhu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vmulhu_vv_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV16VUInt16VBVUVUVU_TUMU, mulhu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmulhu_vx_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX16VUInt16VBVUVUSU_TUMU, mulhu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vmulhu_vv_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV32VUInt32VBVUVUVU_TUMU, mulhu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmulhu_vx_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX32VUInt32VBVUVUSU_TUMU, mulhu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vmulhu_vv_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV64VUInt64VBVUVUVU_TUMU, mulhu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmulhu_vx_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX64VUInt64VBVUVUSU_TUMU, mulhu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vmulhsu_vv_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV8VInt8VBVIVIVU_TUMU, mulhsu_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vmulhsu_vx_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX8VInt8VBVIVISU_TUMU, mulhsu_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarUInt8) +// vint16m1_t vmulhsu_vv_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV16VInt16VBVIVIVU_TUMU, mulhsu_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vmulhsu_vx_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX16VInt16VBVIVISU_TUMU, mulhsu_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarUInt16) +// vint32m1_t vmulhsu_vv_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV32VInt32VBVIVIVU_TUMU, mulhsu_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vmulhsu_vx_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX32VInt32VBVIVISU_TUMU, mulhsu_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarUInt32) +// vint64m1_t vmulhsu_vv_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV64VInt64VBVIVIVU_TUMU, mulhsu_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +// vint64m1_t vmulhsu_vx_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX64VInt64VBVIVISU_TUMU, mulhsu_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarUInt64) +// vint8m1_t vmul_vv_int8m1_tama (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV8VInt8VBVIVI_TAMA, mul_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint8m1_t vmul_vx_int8m1_tama (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX8VInt8VBVISI_TAMA, mul_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, ScalarInt8) +// vint16m1_t vmul_vv_int16m1_tama (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV16VInt16VBVIVI_TAMA, mul_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint16m1_t vmul_vx_int16m1_tama (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX16VInt16VBVISI_TAMA, mul_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarInt16) +// vint32m1_t vmul_vv_int32m1_tama (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV32VInt32VBVIVI_TAMA, mul_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint32m1_t vmul_vx_int32m1_tama (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX32VInt32VBVISI_TAMA, mul_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarInt32) +// vint64m1_t vmul_vv_int64m1_tama (vbool64_t mask, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV64VInt64VBVIVI_TAMA, mul_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vint64m1_t vmul_vx_int64m1_tama (vbool64_t mask, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX64VInt64VBVISI_TAMA, mul_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarInt64) +// vuint8m1_t vmul_vv_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV8VUInt8VBVUVU_TAMA, mul_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint8m1_t vmul_vx_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX8VUInt8VBVUSU_TAMA, mul_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vuint16m1_t vmul_vv_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV16VUInt16VBVUVU_TAMA, mul_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint16m1_t vmul_vx_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX16VUInt16VBVUSU_TAMA, mul_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vuint32m1_t vmul_vv_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV32VUInt32VBVUVU_TAMA, mul_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint32m1_t vmul_vx_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX32VUInt32VBVUSU_TAMA, mul_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vuint64m1_t vmul_vv_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV64VUInt64VBVUVU_TAMA, mul_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vuint64m1_t vmul_vx_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX64VUInt64VBVUSU_TAMA, mul_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarUInt64) +// vint8m1_t vmulh_vv_int8m1_tama (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV8VInt8VBVIVI_TAMA, mulh_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint8m1_t vmulh_vx_int8m1_tama (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX8VInt8VBVISI_TAMA, mulh_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, ScalarInt8) +// vint16m1_t vmulh_vv_int16m1_tama (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV16VInt16VBVIVI_TAMA, mulh_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint16m1_t vmulh_vx_int16m1_tama (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX16VInt16VBVISI_TAMA, mulh_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarInt16) +// vint32m1_t vmulh_vv_int32m1_tama (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV32VInt32VBVIVI_TAMA, mulh_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint32m1_t vmulh_vx_int32m1_tama (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX32VInt32VBVISI_TAMA, mulh_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarInt32) +// vint64m1_t vmulh_vv_int64m1_tama (vbool64_t mask, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV64VInt64VBVIVI_TAMA, mulh_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vint64m1_t vmulh_vx_int64m1_tama (vbool64_t mask, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX64VInt64VBVISI_TAMA, mulh_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarInt64) +// vuint8m1_t vmulhu_vv_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV8VUInt8VBVUVU_TAMA, mulhu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint8m1_t vmulhu_vx_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX8VUInt8VBVUSU_TAMA, mulhu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vuint16m1_t vmulhu_vv_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV16VUInt16VBVUVU_TAMA, mulhu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint16m1_t vmulhu_vx_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX16VUInt16VBVUSU_TAMA, mulhu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vuint32m1_t vmulhu_vv_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV32VUInt32VBVUVU_TAMA, mulhu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint32m1_t vmulhu_vx_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX32VUInt32VBVUSU_TAMA, mulhu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vuint64m1_t vmulhu_vv_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV64VUInt64VBVUVU_TAMA, mulhu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vuint64m1_t vmulhu_vx_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX64VUInt64VBVUSU_TAMA, mulhu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarUInt64) +// vint8m1_t vmulhsu_vv_int8m1_tama (vbool8_t mask, vint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV8VInt8VBVIVU_TAMA, mulhsu_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDUInt8) +// vint8m1_t vmulhsu_vx_int8m1_tama (vbool8_t mask, vint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX8VInt8VBVISU_TAMA, mulhsu_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, ScalarUInt8) +// vint16m1_t vmulhsu_vv_int16m1_tama (vbool16_t mask, vint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV16VInt16VBVIVU_TAMA, mulhsu_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDUInt16) +// vint16m1_t vmulhsu_vx_int16m1_tama (vbool16_t mask, vint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX16VInt16VBVISU_TAMA, mulhsu_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarUInt16) +// vint32m1_t vmulhsu_vv_int32m1_tama (vbool32_t mask, vint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV32VInt32VBVIVU_TAMA, mulhsu_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDUInt32) +// vint32m1_t vmulhsu_vx_int32m1_tama (vbool32_t mask, vint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX32VInt32VBVISU_TAMA, mulhsu_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarUInt32) +// vint64m1_t vmulhsu_vv_int64m1_tama (vbool64_t mask, vint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV64VInt64VBVIVU_TAMA, mulhsu_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDUInt64) +// vint64m1_t vmulhsu_vx_int64m1_tama (vbool64_t mask, vint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX64VInt64VBVISU_TAMA, mulhsu_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarUInt64) +// vint8m1_t vmul_vv_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV8VInt8VBVIVIVI_TAMU, mul_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmul_vx_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX8VInt8VBVIVISI_TAMU, mul_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vmul_vv_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV16VInt16VBVIVIVI_TAMU, mul_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmul_vx_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX16VInt16VBVIVISI_TAMU, mul_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vmul_vv_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV32VInt32VBVIVIVI_TAMU, mul_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmul_vx_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX32VInt32VBVIVISI_TAMU, mul_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vmul_vv_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV64VInt64VBVIVIVI_TAMU, mul_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmul_vx_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX64VInt64VBVIVISI_TAMU, mul_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vmul_vv_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV8VUInt8VBVUVUVU_TAMU, mul_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmul_vx_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX8VUInt8VBVUVUSU_TAMU, mul_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vmul_vv_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV16VUInt16VBVUVUVU_TAMU, mul_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmul_vx_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX16VUInt16VBVUVUSU_TAMU, mul_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vmul_vv_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV32VUInt32VBVUVUVU_TAMU, mul_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmul_vx_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX32VUInt32VBVUVUSU_TAMU, mul_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vmul_vv_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVV64VUInt64VBVUVUVU_TAMU, mul_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmul_vx_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulVX64VUInt64VBVUVUSU_TAMU, mul_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vmulh_vv_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV8VInt8VBVIVIVI_TAMU, mulh_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmulh_vx_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX8VInt8VBVIVISI_TAMU, mulh_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vmulh_vv_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV16VInt16VBVIVIVI_TAMU, mulh_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmulh_vx_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX16VInt16VBVIVISI_TAMU, mulh_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vmulh_vv_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV32VInt32VBVIVIVI_TAMU, mulh_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmulh_vx_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX32VInt32VBVIVISI_TAMU, mulh_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vmulh_vv_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVV64VInt64VBVIVIVI_TAMU, mulh_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmulh_vx_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhVX64VInt64VBVIVISI_TAMU, mulh_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vmulhu_vv_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV8VUInt8VBVUVUVU_TAMU, mulhu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmulhu_vx_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX8VUInt8VBVUVUSU_TAMU, mulhu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vmulhu_vv_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV16VUInt16VBVUVUVU_TAMU, mulhu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmulhu_vx_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX16VUInt16VBVUVUSU_TAMU, mulhu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vmulhu_vv_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV32VUInt32VBVUVUVU_TAMU, mulhu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmulhu_vx_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX32VUInt32VBVUVUSU_TAMU, mulhu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vmulhu_vv_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVV64VUInt64VBVUVUVU_TAMU, mulhu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmulhu_vx_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhuVX64VUInt64VBVUVUSU_TAMU, mulhu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vmulhsu_vv_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV8VInt8VBVIVIVU_TAMU, mulhsu_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vmulhsu_vx_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX8VInt8VBVIVISU_TAMU, mulhsu_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarUInt8) +// vint16m1_t vmulhsu_vv_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV16VInt16VBVIVIVU_TAMU, mulhsu_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vmulhsu_vx_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX16VInt16VBVIVISU_TAMU, mulhsu_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarUInt16) +// vint32m1_t vmulhsu_vv_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV32VInt32VBVIVIVU_TAMU, mulhsu_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vmulhsu_vx_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX32VInt32VBVIVISU_TAMU, mulhsu_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarUInt32) +// vint64m1_t vmulhsu_vv_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVV64VInt64VBVIVIVU_TAMU, mulhsu_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +// vint64m1_t vmulhsu_vx_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MulhsuVX64VInt64VBVIVISU_TAMU, mulhsu_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarUInt64) + +// vint8m1_t vdiv_vv_int8m1_tu (vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV8VInt8VIVIVI_TU, div_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vdiv_vx_int8m1_tu (vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX8VInt8VIVISI_TU, div_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vdiv_vv_int16m1_tu (vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV16VInt16VIVIVI_TU, div_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vdiv_vx_int16m1_tu (vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX16VInt16VIVISI_TU, div_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vdiv_vv_int32m1_tu (vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV32VInt32VIVIVI_TU, div_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vdiv_vx_int32m1_tu (vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX32VInt32VIVISI_TU, div_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vdiv_vv_int64m1_tu (vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV64VInt64VIVIVI_TU, div_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vdiv_vx_int64m1_tu (vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX64VInt64VIVISI_TU, div_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vdivu_vv_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV8VUInt8VUVUVU_TU, divu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vdivu_vx_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX8VUInt8VUVUSU_TU, divu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vdivu_vv_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV16VUInt16VUVUVU_TU, divu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vdivu_vx_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX16VUInt16VUVUSU_TU, divu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vdivu_vv_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV32VUInt32VUVUVU_TU, divu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vdivu_vx_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX32VUInt32VUVUSU_TU, divu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vdivu_vv_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV64VUInt64VUVUVU_TU, divu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vdivu_vx_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX64VUInt64VUVUSU_TU, divu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vrem_vv_int8m1_tu (vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV8VInt8VIVIVI_TU, rem_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vrem_vx_int8m1_tu (vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX8VInt8VIVISI_TU, rem_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vrem_vv_int16m1_tu (vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV16VInt16VIVIVI_TU, rem_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vrem_vx_int16m1_tu (vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX16VInt16VIVISI_TU, rem_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vrem_vv_int32m1_tu (vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV32VInt32VIVIVI_TU, rem_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vrem_vx_int32m1_tu (vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX32VInt32VIVISI_TU, rem_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vrem_vv_int64m1_tu (vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV64VInt64VIVIVI_TU, rem_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vrem_vx_int64m1_tu (vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX64VInt64VIVISI_TU, rem_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vremu_vv_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV8VUInt8VUVUVU_TU, remu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vremu_vx_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX8VUInt8VUVUSU_TU, remu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vremu_vv_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV16VUInt16VUVUVU_TU, remu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vremu_vx_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX16VUInt16VUVUSU_TU, remu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vremu_vv_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV32VUInt32VUVUVU_TU, remu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vremu_vx_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX32VUInt32VUVUSU_TU, remu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vremu_vv_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV64VUInt64VUVUVU_TU, remu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vremu_vx_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX64VUInt64VUVUSU_TU, remu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vdiv_vv_int8m1_ta (vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV8VInt8VIVI_TA, div_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDInt8) +// vint8m1_t vdiv_vx_int8m1_ta (vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX8VInt8VISI_TA, div_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, ScalarInt8) +// vint16m1_t vdiv_vv_int16m1_ta (vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV16VInt16VIVI_TA, div_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDInt16) +// vint16m1_t vdiv_vx_int16m1_ta (vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX16VInt16VISI_TA, div_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarInt16) +// vint32m1_t vdiv_vv_int32m1_ta (vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV32VInt32VIVI_TA, div_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDInt32) +// vint32m1_t vdiv_vx_int32m1_ta (vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX32VInt32VISI_TA, div_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarInt32) +// vint64m1_t vdiv_vv_int64m1_ta (vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV64VInt64VIVI_TA, div_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDInt64) +// vint64m1_t vdiv_vx_int64m1_ta (vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX64VInt64VISI_TA, div_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarInt64) +// vuint8m1_t vdivu_vv_uint8m1_ta (vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV8VUInt8VUVU_TA, divu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint8m1_t vdivu_vx_uint8m1_ta (vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX8VUInt8VUSU_TA, divu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +// vuint16m1_t vdivu_vv_uint16m1_ta (vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV16VUInt16VUVU_TA, divu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint16m1_t vdivu_vx_uint16m1_ta (vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX16VUInt16VUSU_TA, divu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +// vuint32m1_t vdivu_vv_uint32m1_ta (vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV32VUInt32VUVU_TA, divu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint32m1_t vdivu_vx_uint32m1_ta (vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX32VUInt32VUSU_TA, divu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +// vuint64m1_t vdivu_vv_uint64m1_ta (vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV64VUInt64VUVU_TA, divu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vuint64m1_t vdivu_vx_uint64m1_ta (vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX64VUInt64VUSU_TA, divu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +// vint8m1_t vrem_vv_int8m1_ta (vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV8VInt8VIVI_TA, rem_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDInt8) +// vint8m1_t vrem_vx_int8m1_ta (vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX8VInt8VISI_TA, rem_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, ScalarInt8) +// vint16m1_t vrem_vv_int16m1_ta (vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV16VInt16VIVI_TA, rem_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDInt16) +// vint16m1_t vrem_vx_int16m1_ta (vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX16VInt16VISI_TA, rem_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarInt16) +// vint32m1_t vrem_vv_int32m1_ta (vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV32VInt32VIVI_TA, rem_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDInt32) +// vint32m1_t vrem_vx_int32m1_ta (vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX32VInt32VISI_TA, rem_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarInt32) +// vint64m1_t vrem_vv_int64m1_ta (vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV64VInt64VIVI_TA, rem_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDInt64) +// vint64m1_t vrem_vx_int64m1_ta (vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX64VInt64VISI_TA, rem_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarInt64) +// vuint8m1_t vremu_vv_uint8m1_ta (vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV8VUInt8VUVU_TA, remu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint8m1_t vremu_vx_uint8m1_ta (vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX8VUInt8VUSU_TA, remu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +// vuint16m1_t vremu_vv_uint16m1_ta (vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV16VUInt16VUVU_TA, remu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint16m1_t vremu_vx_uint16m1_ta (vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX16VUInt16VUSU_TA, remu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +// vuint32m1_t vremu_vv_uint32m1_ta (vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV32VUInt32VUVU_TA, remu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint32m1_t vremu_vx_uint32m1_ta (vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX32VUInt32VUSU_TA, remu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +// vuint64m1_t vremu_vv_uint64m1_ta (vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV64VUInt64VUVU_TA, remu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vuint64m1_t vremu_vx_uint64m1_ta (vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX64VUInt64VUSU_TA, remu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +// vint8m1_t vdiv_vv_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV8VInt8VBVIVIVI_TUMA, div_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vdiv_vx_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX8VInt8VBVIVISI_TUMA, div_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vdiv_vv_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV16VInt16VBVIVIVI_TUMA, div_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vdiv_vx_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX16VInt16VBVIVISI_TUMA, div_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vdiv_vv_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV32VInt32VBVIVIVI_TUMA, div_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vdiv_vx_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX32VInt32VBVIVISI_TUMA, div_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vdiv_vv_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV64VInt64VBVIVIVI_TUMA, div_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vdiv_vx_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX64VInt64VBVIVISI_TUMA, div_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vdivu_vv_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV8VUInt8VBVUVUVU_TUMA, divu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vdivu_vx_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX8VUInt8VBVUVUSU_TUMA, divu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vdivu_vv_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV16VUInt16VBVUVUVU_TUMA, divu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vdivu_vx_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX16VUInt16VBVUVUSU_TUMA, divu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vdivu_vv_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV32VUInt32VBVUVUVU_TUMA, divu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vdivu_vx_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX32VUInt32VBVUVUSU_TUMA, divu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vdivu_vv_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV64VUInt64VBVUVUVU_TUMA, divu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vdivu_vx_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX64VUInt64VBVUVUSU_TUMA, divu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vrem_vv_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV8VInt8VBVIVIVI_TUMA, rem_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vrem_vx_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX8VInt8VBVIVISI_TUMA, rem_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vrem_vv_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV16VInt16VBVIVIVI_TUMA, rem_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vrem_vx_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX16VInt16VBVIVISI_TUMA, rem_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vrem_vv_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV32VInt32VBVIVIVI_TUMA, rem_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vrem_vx_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX32VInt32VBVIVISI_TUMA, rem_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vrem_vv_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV64VInt64VBVIVIVI_TUMA, rem_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vrem_vx_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX64VInt64VBVIVISI_TUMA, rem_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vremu_vv_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV8VUInt8VBVUVUVU_TUMA, remu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vremu_vx_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX8VUInt8VBVUVUSU_TUMA, remu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vremu_vv_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV16VUInt16VBVUVUVU_TUMA, remu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vremu_vx_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX16VUInt16VBVUVUSU_TUMA, remu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vremu_vv_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV32VUInt32VBVUVUVU_TUMA, remu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vremu_vx_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX32VUInt32VBVUVUSU_TUMA, remu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vremu_vv_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV64VUInt64VBVUVUVU_TUMA, remu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vremu_vx_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX64VUInt64VBVUVUSU_TUMA, remu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vdiv_vv_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV8VInt8VBVIVIVI_TUMU, div_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vdiv_vx_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX8VInt8VBVIVISI_TUMU, div_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vdiv_vv_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV16VInt16VBVIVIVI_TUMU, div_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vdiv_vx_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX16VInt16VBVIVISI_TUMU, div_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vdiv_vv_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV32VInt32VBVIVIVI_TUMU, div_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vdiv_vx_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX32VInt32VBVIVISI_TUMU, div_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vdiv_vv_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV64VInt64VBVIVIVI_TUMU, div_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vdiv_vx_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX64VInt64VBVIVISI_TUMU, div_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vdivu_vv_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV8VUInt8VBVUVUVU_TUMU, divu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vdivu_vx_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX8VUInt8VBVUVUSU_TUMU, divu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vdivu_vv_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV16VUInt16VBVUVUVU_TUMU, divu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vdivu_vx_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX16VUInt16VBVUVUSU_TUMU, divu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vdivu_vv_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV32VUInt32VBVUVUVU_TUMU, divu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vdivu_vx_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX32VUInt32VBVUVUSU_TUMU, divu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vdivu_vv_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV64VUInt64VBVUVUVU_TUMU, divu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vdivu_vx_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX64VUInt64VBVUVUSU_TUMU, divu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vrem_vv_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV8VInt8VBVIVIVI_TUMU, rem_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vrem_vx_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX8VInt8VBVIVISI_TUMU, rem_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vrem_vv_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV16VInt16VBVIVIVI_TUMU, rem_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vrem_vx_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX16VInt16VBVIVISI_TUMU, rem_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vrem_vv_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV32VInt32VBVIVIVI_TUMU, rem_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vrem_vx_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX32VInt32VBVIVISI_TUMU, rem_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vrem_vv_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV64VInt64VBVIVIVI_TUMU, rem_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vrem_vx_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX64VInt64VBVIVISI_TUMU, rem_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vremu_vv_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV8VUInt8VBVUVUVU_TUMU, remu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vremu_vx_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX8VUInt8VBVUVUSU_TUMU, remu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vremu_vv_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV16VUInt16VBVUVUVU_TUMU, remu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vremu_vx_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX16VUInt16VBVUVUSU_TUMU, remu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vremu_vv_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV32VUInt32VBVUVUVU_TUMU, remu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vremu_vx_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX32VUInt32VBVUVUSU_TUMU, remu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vremu_vv_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV64VUInt64VBVUVUVU_TUMU, remu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vremu_vx_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX64VUInt64VBVUVUSU_TUMU, remu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vdiv_vv_int8m1_tama (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV8VInt8VBVIVI_TAMA, div_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint8m1_t vdiv_vx_int8m1_tama (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX8VInt8VBVISI_TAMA, div_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, ScalarInt8) +// vint16m1_t vdiv_vv_int16m1_tama (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV16VInt16VBVIVI_TAMA, div_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint16m1_t vdiv_vx_int16m1_tama (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX16VInt16VBVISI_TAMA, div_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarInt16) +// vint32m1_t vdiv_vv_int32m1_tama (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV32VInt32VBVIVI_TAMA, div_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint32m1_t vdiv_vx_int32m1_tama (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX32VInt32VBVISI_TAMA, div_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarInt32) +// vint64m1_t vdiv_vv_int64m1_tama (vbool64_t mask, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV64VInt64VBVIVI_TAMA, div_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vint64m1_t vdiv_vx_int64m1_tama (vbool64_t mask, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX64VInt64VBVISI_TAMA, div_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarInt64) +// vuint8m1_t vdivu_vv_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV8VUInt8VBVUVU_TAMA, divu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint8m1_t vdivu_vx_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX8VUInt8VBVUSU_TAMA, divu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vuint16m1_t vdivu_vv_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV16VUInt16VBVUVU_TAMA, divu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint16m1_t vdivu_vx_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX16VUInt16VBVUSU_TAMA, divu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vuint32m1_t vdivu_vv_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV32VUInt32VBVUVU_TAMA, divu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint32m1_t vdivu_vx_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX32VUInt32VBVUSU_TAMA, divu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vuint64m1_t vdivu_vv_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV64VUInt64VBVUVU_TAMA, divu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vuint64m1_t vdivu_vx_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX64VUInt64VBVUSU_TAMA, divu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarUInt64) +// vint8m1_t vrem_vv_int8m1_tama (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV8VInt8VBVIVI_TAMA, rem_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint8m1_t vrem_vx_int8m1_tama (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX8VInt8VBVISI_TAMA, rem_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, ScalarInt8) +// vint16m1_t vrem_vv_int16m1_tama (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV16VInt16VBVIVI_TAMA, rem_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint16m1_t vrem_vx_int16m1_tama (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX16VInt16VBVISI_TAMA, rem_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarInt16) +// vint32m1_t vrem_vv_int32m1_tama (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV32VInt32VBVIVI_TAMA, rem_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint32m1_t vrem_vx_int32m1_tama (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX32VInt32VBVISI_TAMA, rem_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarInt32) +// vint64m1_t vrem_vv_int64m1_tama (vbool64_t mask, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV64VInt64VBVIVI_TAMA, rem_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vint64m1_t vrem_vx_int64m1_tama (vbool64_t mask, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX64VInt64VBVISI_TAMA, rem_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarInt64) +// vuint8m1_t vremu_vv_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV8VUInt8VBVUVU_TAMA, remu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint8m1_t vremu_vx_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX8VUInt8VBVUSU_TAMA, remu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vuint16m1_t vremu_vv_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV16VUInt16VBVUVU_TAMA, remu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint16m1_t vremu_vx_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX16VUInt16VBVUSU_TAMA, remu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vuint32m1_t vremu_vv_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV32VUInt32VBVUVU_TAMA, remu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint32m1_t vremu_vx_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX32VUInt32VBVUSU_TAMA, remu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vuint64m1_t vremu_vv_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV64VUInt64VBVUVU_TAMA, remu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vuint64m1_t vremu_vx_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX64VUInt64VBVUSU_TAMA, remu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarUInt64) +// vint8m1_t vdiv_vv_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV8VInt8VBVIVIVI_TAMU, div_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vdiv_vx_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX8VInt8VBVIVISI_TAMU, div_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vdiv_vv_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV16VInt16VBVIVIVI_TAMU, div_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vdiv_vx_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX16VInt16VBVIVISI_TAMU, div_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vdiv_vv_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV32VInt32VBVIVIVI_TAMU, div_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vdiv_vx_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX32VInt32VBVIVISI_TAMU, div_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vdiv_vv_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVV64VInt64VBVIVIVI_TAMU, div_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vdiv_vx_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(DivVX64VInt64VBVIVISI_TAMU, div_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vdivu_vv_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV8VUInt8VBVUVUVU_TAMU, divu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vdivu_vx_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX8VUInt8VBVUVUSU_TAMU, divu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vdivu_vv_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV16VUInt16VBVUVUVU_TAMU, divu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vdivu_vx_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX16VUInt16VBVUVUSU_TAMU, divu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vdivu_vv_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV32VUInt32VBVUVUVU_TAMU, divu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vdivu_vx_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX32VUInt32VBVUVUSU_TAMU, divu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vdivu_vv_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVV64VUInt64VBVUVUVU_TAMU, divu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vdivu_vx_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(DivuVX64VUInt64VBVUVUSU_TAMU, divu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vrem_vv_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV8VInt8VBVIVIVI_TAMU, rem_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vrem_vx_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX8VInt8VBVIVISI_TAMU, rem_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vrem_vv_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV16VInt16VBVIVIVI_TAMU, rem_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vrem_vx_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX16VInt16VBVIVISI_TAMU, rem_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vrem_vv_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV32VInt32VBVIVIVI_TAMU, rem_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vrem_vx_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX32VInt32VBVIVISI_TAMU, rem_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vrem_vv_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVV64VInt64VBVIVIVI_TAMU, rem_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vrem_vx_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(RemVX64VInt64VBVIVISI_TAMU, rem_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vremu_vv_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV8VUInt8VBVUVUVU_TAMU, remu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vremu_vx_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX8VUInt8VBVUVUSU_TAMU, remu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vremu_vv_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV16VUInt16VBVUVUVU_TAMU, remu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vremu_vx_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX16VUInt16VBVUVUSU_TAMU, remu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vremu_vv_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV32VUInt32VBVUVUVU_TAMU, remu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vremu_vx_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX32VUInt32VBVUVUSU_TAMU, remu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vremu_vv_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVV64VUInt64VBVUVUVU_TAMU, remu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vremu_vx_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(RemuVX64VUInt64VBVUVUSU_TAMU, remu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) + +// vint16m2_t vwmul_vv_int16m2_tu (vint16m2_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVV8VInt16VIVIVI_TU, wmul_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt8, OneDInt8) +// vint16m2_t vwmul_vx_int16m2_tu (vint16m2_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVX8VInt16VIVISI_TU, wmul_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt8, ScalarInt8) +// vint32m2_t vwmul_vv_int32m2_tu (vint32m2_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVV16VInt32VIVIVI_TU, wmul_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt16, OneDInt16) +// vint32m2_t vwmul_vx_int32m2_tu (vint32m2_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVX16VInt32VIVISI_TU, wmul_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt16, ScalarInt16) +// vint64m2_t vwmul_vv_int64m2_tu (vint64m2_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVV32VInt64VIVIVI_TU, wmul_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt32, OneDInt32) +// vint64m2_t vwmul_vx_int64m2_tu (vint64m2_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVX32VInt64VIVISI_TU, wmul_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt32, ScalarInt32) +// vuint16m2_t vwmulu_vv_uint16m2_tu (vuint16m2_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVV8VUInt16VUVUVU_TU, wmulu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt8, OneDUInt8) +// vuint16m2_t vwmulu_vx_uint16m2_tu (vuint16m2_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVX8VUInt16VUVUSU_TU, wmulu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt8, ScalarUInt8) +// vuint32m2_t vwmulu_vv_uint32m2_tu (vuint32m2_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVV16VUInt32VUVUVU_TU, wmulu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt16, OneDUInt16) +// vuint32m2_t vwmulu_vx_uint32m2_tu (vuint32m2_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVX16VUInt32VUVUSU_TU, wmulu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt16, ScalarUInt16) +// vuint64m2_t vwmulu_vv_uint64m2_tu (vuint64m2_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVV32VUInt64VUVUVU_TU, wmulu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt32, OneDUInt32) +// vuint64m2_t vwmulu_vx_uint64m2_tu (vuint64m2_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVX32VUInt64VUVUSU_TU, wmulu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt32, ScalarUInt32) +// vint16m2_t vwmulsu_vv_int16m2_tu (vint16m2_t merge, vint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVV8VInt16VIVIVU_TU, wmulsu_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt8, OneDUInt8) +// vint16m2_t vwmulsu_vx_int16m2_tu (vint16m2_t merge, vint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVX8VInt16VIVISU_TU, wmulsu_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt8, ScalarUInt8) +// vint32m2_t vwmulsu_vv_int32m2_tu (vint32m2_t merge, vint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVV16VInt32VIVIVU_TU, wmulsu_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt16, OneDUInt16) +// vint32m2_t vwmulsu_vx_int32m2_tu (vint32m2_t merge, vint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVX16VInt32VIVISU_TU, wmulsu_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt16, ScalarUInt16) +// vint64m2_t vwmulsu_vv_int64m2_tu (vint64m2_t merge, vint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVV32VInt64VIVIVU_TU, wmulsu_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt32, OneDUInt32) +// vint64m2_t vwmulsu_vx_int64m2_tu (vint64m2_t merge, vint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVX32VInt64VIVISU_TU, wmulsu_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt32, ScalarUInt32) +// vint16m2_t vwmul_vv_int16m2_ta (vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVV8VInt16VIVI_TA, wmul_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt16, 2, OneDInt8, OneDInt8) +// vint16m2_t vwmul_vx_int16m2_ta (vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVX8VInt16VISI_TA, wmul_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt16, 2, OneDInt8, ScalarInt8) +// vint32m2_t vwmul_vv_int32m2_ta (vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVV16VInt32VIVI_TA, wmul_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt32, 2, OneDInt16, OneDInt16) +// vint32m2_t vwmul_vx_int32m2_ta (vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVX16VInt32VISI_TA, wmul_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt32, 2, OneDInt16, ScalarInt16) +// vint64m2_t vwmul_vv_int64m2_ta (vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVV32VInt64VIVI_TA, wmul_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt64, 2, OneDInt32, OneDInt32) +// vint64m2_t vwmul_vx_int64m2_ta (vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVX32VInt64VISI_TA, wmul_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt64, 2, OneDInt32, ScalarInt32) +// vuint16m2_t vwmulu_vv_uint16m2_ta (vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVV8VUInt16VUVU_TA, wmulu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt16, 2, OneDUInt8, OneDUInt8) +// vuint16m2_t vwmulu_vx_uint16m2_ta (vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVX8VUInt16VUSU_TA, wmulu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt16, 2, OneDUInt8, ScalarUInt8) +// vuint32m2_t vwmulu_vv_uint32m2_ta (vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVV16VUInt32VUVU_TA, wmulu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt32, 2, OneDUInt16, OneDUInt16) +// vuint32m2_t vwmulu_vx_uint32m2_ta (vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVX16VUInt32VUSU_TA, wmulu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt32, 2, OneDUInt16, ScalarUInt16) +// vuint64m2_t vwmulu_vv_uint64m2_ta (vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVV32VUInt64VUVU_TA, wmulu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt64, 2, OneDUInt32, OneDUInt32) +// vuint64m2_t vwmulu_vx_uint64m2_ta (vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVX32VUInt64VUSU_TA, wmulu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt64, 2, OneDUInt32, ScalarUInt32) +// vint16m2_t vwmulsu_vv_int16m2_ta (vint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVV8VInt16VIVU_TA, wmulsu_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt16, 2, OneDInt8, OneDUInt8) +// vint16m2_t vwmulsu_vx_int16m2_ta (vint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVX8VInt16VISU_TA, wmulsu_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt16, 2, OneDInt8, ScalarUInt8) +// vint32m2_t vwmulsu_vv_int32m2_ta (vint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVV16VInt32VIVU_TA, wmulsu_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt32, 2, OneDInt16, OneDUInt16) +// vint32m2_t vwmulsu_vx_int32m2_ta (vint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVX16VInt32VISU_TA, wmulsu_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt32, 2, OneDInt16, ScalarUInt16) +// vint64m2_t vwmulsu_vv_int64m2_ta (vint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVV32VInt64VIVU_TA, wmulsu_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt64, 2, OneDInt32, OneDUInt32) +// vint64m2_t vwmulsu_vx_int64m2_ta (vint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVX32VInt64VISU_TA, wmulsu_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt64, 2, OneDInt32, ScalarUInt32) +// vint16m2_t vwmul_vv_int16m2_tuma (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVV8VInt16VBVIVIVI_TUMA, wmul_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDInt8) +// vint16m2_t vwmul_vx_int16m2_tuma (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVX8VInt16VBVIVISI_TUMA, wmul_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, ScalarInt8) +// vint32m2_t vwmul_vv_int32m2_tuma (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVV16VInt32VBVIVIVI_TUMA, wmul_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDInt16) +// vint32m2_t vwmul_vx_int32m2_tuma (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVX16VInt32VBVIVISI_TUMA, wmul_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, ScalarInt16) +// vint64m2_t vwmul_vv_int64m2_tuma (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVV32VInt64VBVIVIVI_TUMA, wmul_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDInt32) +// vint64m2_t vwmul_vx_int64m2_tuma (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVX32VInt64VBVIVISI_TUMA, wmul_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, ScalarInt32) +// vuint16m2_t vwmulu_vv_uint16m2_tuma (vbool8_t mask, vuint16m2_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVV8VUInt16VBVUVUVU_TUMA, wmulu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, OneDUInt8) +// vuint16m2_t vwmulu_vx_uint16m2_tuma (vbool8_t mask, vuint16m2_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVX8VUInt16VBVUVUSU_TUMA, wmulu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, ScalarUInt8) +// vuint32m2_t vwmulu_vv_uint32m2_tuma (vbool16_t mask, vuint32m2_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVV16VUInt32VBVUVUVU_TUMA, wmulu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, OneDUInt16) +// vuint32m2_t vwmulu_vx_uint32m2_tuma (vbool16_t mask, vuint32m2_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVX16VUInt32VBVUVUSU_TUMA, wmulu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, ScalarUInt16) +// vuint64m2_t vwmulu_vv_uint64m2_tuma (vbool32_t mask, vuint64m2_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVV32VUInt64VBVUVUVU_TUMA, wmulu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, OneDUInt32) +// vuint64m2_t vwmulu_vx_uint64m2_tuma (vbool32_t mask, vuint64m2_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVX32VUInt64VBVUVUSU_TUMA, wmulu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, ScalarUInt32) +// vint16m2_t vwmulsu_vv_int16m2_tuma (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVV8VInt16VBVIVIVU_TUMA, wmulsu_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDUInt8) +// vint16m2_t vwmulsu_vx_int16m2_tuma (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVX8VInt16VBVIVISU_TUMA, wmulsu_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, ScalarUInt8) +// vint32m2_t vwmulsu_vv_int32m2_tuma (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVV16VInt32VBVIVIVU_TUMA, wmulsu_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDUInt16) +// vint32m2_t vwmulsu_vx_int32m2_tuma (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVX16VInt32VBVIVISU_TUMA, wmulsu_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, ScalarUInt16) +// vint64m2_t vwmulsu_vv_int64m2_tuma (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVV32VInt64VBVIVIVU_TUMA, wmulsu_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDUInt32) +// vint64m2_t vwmulsu_vx_int64m2_tuma (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVX32VInt64VBVIVISU_TUMA, wmulsu_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, ScalarUInt32) +// vint16m2_t vwmul_vv_int16m2_tumu (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVV8VInt16VBVIVIVI_TUMU, wmul_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDInt8) +// vint16m2_t vwmul_vx_int16m2_tumu (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVX8VInt16VBVIVISI_TUMU, wmul_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, ScalarInt8) +// vint32m2_t vwmul_vv_int32m2_tumu (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVV16VInt32VBVIVIVI_TUMU, wmul_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDInt16) +// vint32m2_t vwmul_vx_int32m2_tumu (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVX16VInt32VBVIVISI_TUMU, wmul_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, ScalarInt16) +// vint64m2_t vwmul_vv_int64m2_tumu (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVV32VInt64VBVIVIVI_TUMU, wmul_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDInt32) +// vint64m2_t vwmul_vx_int64m2_tumu (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVX32VInt64VBVIVISI_TUMU, wmul_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, ScalarInt32) +// vuint16m2_t vwmulu_vv_uint16m2_tumu (vbool8_t mask, vuint16m2_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVV8VUInt16VBVUVUVU_TUMU, wmulu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, OneDUInt8) +// vuint16m2_t vwmulu_vx_uint16m2_tumu (vbool8_t mask, vuint16m2_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVX8VUInt16VBVUVUSU_TUMU, wmulu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, ScalarUInt8) +// vuint32m2_t vwmulu_vv_uint32m2_tumu (vbool16_t mask, vuint32m2_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVV16VUInt32VBVUVUVU_TUMU, wmulu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, OneDUInt16) +// vuint32m2_t vwmulu_vx_uint32m2_tumu (vbool16_t mask, vuint32m2_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVX16VUInt32VBVUVUSU_TUMU, wmulu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, ScalarUInt16) +// vuint64m2_t vwmulu_vv_uint64m2_tumu (vbool32_t mask, vuint64m2_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVV32VUInt64VBVUVUVU_TUMU, wmulu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, OneDUInt32) +// vuint64m2_t vwmulu_vx_uint64m2_tumu (vbool32_t mask, vuint64m2_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVX32VUInt64VBVUVUSU_TUMU, wmulu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, ScalarUInt32) +// vint16m2_t vwmulsu_vv_int16m2_tumu (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVV8VInt16VBVIVIVU_TUMU, wmulsu_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDUInt8) +// vint16m2_t vwmulsu_vx_int16m2_tumu (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVX8VInt16VBVIVISU_TUMU, wmulsu_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, ScalarUInt8) +// vint32m2_t vwmulsu_vv_int32m2_tumu (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVV16VInt32VBVIVIVU_TUMU, wmulsu_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDUInt16) +// vint32m2_t vwmulsu_vx_int32m2_tumu (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVX16VInt32VBVIVISU_TUMU, wmulsu_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, ScalarUInt16) +// vint64m2_t vwmulsu_vv_int64m2_tumu (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVV32VInt64VBVIVIVU_TUMU, wmulsu_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDUInt32) +// vint64m2_t vwmulsu_vx_int64m2_tumu (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVX32VInt64VBVIVISU_TUMU, wmulsu_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, ScalarUInt32) +// vint16m2_t vwmul_vv_int16m2_tama (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVV8VInt16VBVIVI_TAMA, wmul_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt8, OneDInt8) +// vint16m2_t vwmul_vx_int16m2_tama (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVX8VInt16VBVISI_TAMA, wmul_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt8, ScalarInt8) +// vint32m2_t vwmul_vv_int32m2_tama (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVV16VInt32VBVIVI_TAMA, wmul_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt16, OneDInt16) +// vint32m2_t vwmul_vx_int32m2_tama (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVX16VInt32VBVISI_TAMA, wmul_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt16, ScalarInt16) +// vint64m2_t vwmul_vv_int64m2_tama (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVV32VInt64VBVIVI_TAMA, wmul_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt32, OneDInt32) +// vint64m2_t vwmul_vx_int64m2_tama (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVX32VInt64VBVISI_TAMA, wmul_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt32, ScalarInt32) +// vuint16m2_t vwmulu_vv_uint16m2_tama (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVV8VUInt16VBVUVU_TAMA, wmulu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint16m2_t vwmulu_vx_uint16m2_tama (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVX8VUInt16VBVUSU_TAMA, wmulu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vuint32m2_t vwmulu_vv_uint32m2_tama (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVV16VUInt32VBVUVU_TAMA, wmulu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint32m2_t vwmulu_vx_uint32m2_tama (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVX16VUInt32VBVUSU_TAMA, wmulu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vuint64m2_t vwmulu_vv_uint64m2_tama (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVV32VUInt64VBVUVU_TAMA, wmulu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint64m2_t vwmulu_vx_uint64m2_tama (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVX32VUInt64VBVUSU_TAMA, wmulu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vint16m2_t vwmulsu_vv_int16m2_tama (vbool8_t mask, vint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVV8VInt16VBVIVU_TAMA, wmulsu_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt8, OneDUInt8) +// vint16m2_t vwmulsu_vx_int16m2_tama (vbool8_t mask, vint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVX8VInt16VBVISU_TAMA, wmulsu_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt8, ScalarUInt8) +// vint32m2_t vwmulsu_vv_int32m2_tama (vbool16_t mask, vint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVV16VInt32VBVIVU_TAMA, wmulsu_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt16, OneDUInt16) +// vint32m2_t vwmulsu_vx_int32m2_tama (vbool16_t mask, vint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVX16VInt32VBVISU_TAMA, wmulsu_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt16, ScalarUInt16) +// vint64m2_t vwmulsu_vv_int64m2_tama (vbool32_t mask, vint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVV32VInt64VBVIVU_TAMA, wmulsu_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt32, OneDUInt32) +// vint64m2_t vwmulsu_vx_int64m2_tama (vbool32_t mask, vint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVX32VInt64VBVISU_TAMA, wmulsu_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt32, ScalarUInt32) +// vint16m2_t vwmul_vv_int16m2_tamu (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVV8VInt16VBVIVIVI_TAMU, wmul_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDInt8) +// vint16m2_t vwmul_vx_int16m2_tamu (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVX8VInt16VBVIVISI_TAMU, wmul_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, ScalarInt8) +// vint32m2_t vwmul_vv_int32m2_tamu (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVV16VInt32VBVIVIVI_TAMU, wmul_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDInt16) +// vint32m2_t vwmul_vx_int32m2_tamu (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVX16VInt32VBVIVISI_TAMU, wmul_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, ScalarInt16) +// vint64m2_t vwmul_vv_int64m2_tamu (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVV32VInt64VBVIVIVI_TAMU, wmul_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDInt32) +// vint64m2_t vwmul_vx_int64m2_tamu (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulVX32VInt64VBVIVISI_TAMU, wmul_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, ScalarInt32) +// vuint16m2_t vwmulu_vv_uint16m2_tamu (vbool8_t mask, vuint16m2_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVV8VUInt16VBVUVUVU_TAMU, wmulu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, OneDUInt8) +// vuint16m2_t vwmulu_vx_uint16m2_tamu (vbool8_t mask, vuint16m2_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVX8VUInt16VBVUVUSU_TAMU, wmulu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, ScalarUInt8) +// vuint32m2_t vwmulu_vv_uint32m2_tamu (vbool16_t mask, vuint32m2_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVV16VUInt32VBVUVUVU_TAMU, wmulu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, OneDUInt16) +// vuint32m2_t vwmulu_vx_uint32m2_tamu (vbool16_t mask, vuint32m2_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVX16VUInt32VBVUVUSU_TAMU, wmulu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, ScalarUInt16) +// vuint64m2_t vwmulu_vv_uint64m2_tamu (vbool32_t mask, vuint64m2_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVV32VUInt64VBVUVUVU_TAMU, wmulu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, OneDUInt32) +// vuint64m2_t vwmulu_vx_uint64m2_tamu (vbool32_t mask, vuint64m2_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WmuluVX32VUInt64VBVUVUSU_TAMU, wmulu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, ScalarUInt32) +// vint16m2_t vwmulsu_vv_int16m2_tamu (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVV8VInt16VBVIVIVU_TAMU, wmulsu_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDUInt8) +// vint16m2_t vwmulsu_vx_int16m2_tamu (vbool8_t mask, vint16m2_t merge, vint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVX8VInt16VBVIVISU_TAMU, wmulsu_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, ScalarUInt8) +// vint32m2_t vwmulsu_vv_int32m2_tamu (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVV16VInt32VBVIVIVU_TAMU, wmulsu_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDUInt16) +// vint32m2_t vwmulsu_vx_int32m2_tamu (vbool16_t mask, vint32m2_t merge, vint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVX16VInt32VBVIVISU_TAMU, wmulsu_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, ScalarUInt16) +// vint64m2_t vwmulsu_vv_int64m2_tamu (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVV32VInt64VBVIVIVU_TAMU, wmulsu_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDUInt32) +// vint64m2_t vwmulsu_vx_int64m2_tamu (vbool32_t mask, vint64m2_t merge, vint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(WmulsuVX32VInt64VBVIVISU_TAMU, wmulsu_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, ScalarUInt32) + +// vint8m1_t vmacc_vv_int8m1_tu (vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV8VInt8VIVIVI_TU, macc_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmacc_vx_int8m1_tu (vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX8VInt8VISIVI_TU, macc_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vmacc_vv_int16m1_tu (vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV16VInt16VIVIVI_TU, macc_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmacc_vx_int16m1_tu (vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX16VInt16VISIVI_TU, macc_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vmacc_vv_int32m1_tu (vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV32VInt32VIVIVI_TU, macc_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmacc_vx_int32m1_tu (vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX32VInt32VISIVI_TU, macc_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vmacc_vv_int64m1_tu (vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV64VInt64VIVIVI_TU, macc_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmacc_vx_int64m1_tu (vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX64VInt64VISIVI_TU, macc_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vmacc_vv_uint8m1_tu (vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV8VUInt8VUVUVU_TU, macc_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmacc_vx_uint8m1_tu (vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX8VUInt8VUSUVU_TU, macc_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vmacc_vv_uint16m1_tu (vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV16VUInt16VUVUVU_TU, macc_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmacc_vx_uint16m1_tu (vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX16VUInt16VUSUVU_TU, macc_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vmacc_vv_uint32m1_tu (vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV32VUInt32VUVUVU_TU, macc_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmacc_vx_uint32m1_tu (vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX32VUInt32VUSUVU_TU, macc_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vmacc_vv_uint64m1_tu (vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV64VUInt64VUVUVU_TU, macc_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmacc_vx_uint64m1_tu (vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX64VUInt64VUSUVU_TU, macc_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, ScalarUInt64, OneDUInt64) +// vint8m1_t vnmsac_vv_int8m1_tu (vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV8VInt8VIVIVI_TU, nmsac_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vnmsac_vx_int8m1_tu (vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX8VInt8VISIVI_TU, nmsac_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vnmsac_vv_int16m1_tu (vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV16VInt16VIVIVI_TU, nmsac_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vnmsac_vx_int16m1_tu (vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX16VInt16VISIVI_TU, nmsac_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vnmsac_vv_int32m1_tu (vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV32VInt32VIVIVI_TU, nmsac_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vnmsac_vx_int32m1_tu (vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX32VInt32VISIVI_TU, nmsac_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vnmsac_vv_int64m1_tu (vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV64VInt64VIVIVI_TU, nmsac_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vnmsac_vx_int64m1_tu (vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX64VInt64VISIVI_TU, nmsac_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vnmsac_vv_uint8m1_tu (vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV8VUInt8VUVUVU_TU, nmsac_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vnmsac_vx_uint8m1_tu (vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX8VUInt8VUSUVU_TU, nmsac_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vnmsac_vv_uint16m1_tu (vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV16VUInt16VUVUVU_TU, nmsac_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vnmsac_vx_uint16m1_tu (vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX16VUInt16VUSUVU_TU, nmsac_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vnmsac_vv_uint32m1_tu (vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV32VUInt32VUVUVU_TU, nmsac_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vnmsac_vx_uint32m1_tu (vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX32VUInt32VUSUVU_TU, nmsac_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vnmsac_vv_uint64m1_tu (vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV64VUInt64VUVUVU_TU, nmsac_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vnmsac_vx_uint64m1_tu (vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX64VUInt64VUSUVU_TU, nmsac_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, ScalarUInt64, OneDUInt64) +// vint8m1_t vmadd_vv_int8m1_tu (vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV8VInt8VIVIVI_TU, madd_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmadd_vx_int8m1_tu (vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX8VInt8VISIVI_TU, madd_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vmadd_vv_int16m1_tu (vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV16VInt16VIVIVI_TU, madd_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmadd_vx_int16m1_tu (vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX16VInt16VISIVI_TU, madd_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vmadd_vv_int32m1_tu (vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV32VInt32VIVIVI_TU, madd_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmadd_vx_int32m1_tu (vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX32VInt32VISIVI_TU, madd_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vmadd_vv_int64m1_tu (vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV64VInt64VIVIVI_TU, madd_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmadd_vx_int64m1_tu (vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX64VInt64VISIVI_TU, madd_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vmadd_vv_uint8m1_tu (vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV8VUInt8VUVUVU_TU, madd_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmadd_vx_uint8m1_tu (vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX8VUInt8VUSUVU_TU, madd_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vmadd_vv_uint16m1_tu (vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV16VUInt16VUVUVU_TU, madd_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmadd_vx_uint16m1_tu (vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX16VUInt16VUSUVU_TU, madd_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vmadd_vv_uint32m1_tu (vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV32VUInt32VUVUVU_TU, madd_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmadd_vx_uint32m1_tu (vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX32VUInt32VUSUVU_TU, madd_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vmadd_vv_uint64m1_tu (vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV64VUInt64VUVUVU_TU, madd_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmadd_vx_uint64m1_tu (vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX64VUInt64VUSUVU_TU, madd_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, ScalarUInt64, OneDUInt64) +// vint8m1_t vnmsub_vv_int8m1_tu (vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV8VInt8VIVIVI_TU, nmsub_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vnmsub_vx_int8m1_tu (vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX8VInt8VISIVI_TU, nmsub_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vnmsub_vv_int16m1_tu (vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV16VInt16VIVIVI_TU, nmsub_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vnmsub_vx_int16m1_tu (vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX16VInt16VISIVI_TU, nmsub_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vnmsub_vv_int32m1_tu (vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV32VInt32VIVIVI_TU, nmsub_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vnmsub_vx_int32m1_tu (vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX32VInt32VISIVI_TU, nmsub_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vnmsub_vv_int64m1_tu (vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV64VInt64VIVIVI_TU, nmsub_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vnmsub_vx_int64m1_tu (vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX64VInt64VISIVI_TU, nmsub_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vnmsub_vv_uint8m1_tu (vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV8VUInt8VUVUVU_TU, nmsub_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vnmsub_vx_uint8m1_tu (vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX8VUInt8VUSUVU_TU, nmsub_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vnmsub_vv_uint16m1_tu (vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV16VUInt16VUVUVU_TU, nmsub_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vnmsub_vx_uint16m1_tu (vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX16VUInt16VUSUVU_TU, nmsub_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vnmsub_vv_uint32m1_tu (vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV32VUInt32VUVUVU_TU, nmsub_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vnmsub_vx_uint32m1_tu (vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX32VUInt32VUSUVU_TU, nmsub_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vnmsub_vv_uint64m1_tu (vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV64VUInt64VUVUVU_TU, nmsub_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vnmsub_vx_uint64m1_tu (vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX64VUInt64VUSUVU_TU, nmsub_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, ScalarUInt64, OneDUInt64) +// vint8m1_t vmacc_vv_int8m1_ta (vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV8VInt8VIVIVI_TA, macc_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmacc_vx_int8m1_ta (vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX8VInt8VISIVI_TA, macc_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt8, 3, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vmacc_vv_int16m1_ta (vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV16VInt16VIVIVI_TA, macc_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmacc_vx_int16m1_ta (vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX16VInt16VISIVI_TA, macc_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt16, 3, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vmacc_vv_int32m1_ta (vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV32VInt32VIVIVI_TA, macc_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmacc_vx_int32m1_ta (vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX32VInt32VISIVI_TA, macc_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt32, 3, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vmacc_vv_int64m1_ta (vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV64VInt64VIVIVI_TA, macc_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmacc_vx_int64m1_ta (vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX64VInt64VISIVI_TA, macc_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt64, 3, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vmacc_vv_uint8m1_ta (vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV8VUInt8VUVUVU_TA, macc_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmacc_vx_uint8m1_ta (vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX8VUInt8VUSUVU_TA, macc_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt8, 3, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vmacc_vv_uint16m1_ta (vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV16VUInt16VUVUVU_TA, macc_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmacc_vx_uint16m1_ta (vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX16VUInt16VUSUVU_TA, macc_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt16, 3, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vmacc_vv_uint32m1_ta (vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV32VUInt32VUVUVU_TA, macc_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmacc_vx_uint32m1_ta (vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX32VUInt32VUSUVU_TA, macc_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt32, 3, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vmacc_vv_uint64m1_ta (vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV64VUInt64VUVUVU_TA, macc_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmacc_vx_uint64m1_ta (vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX64VUInt64VUSUVU_TA, macc_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt64, 3, OneDUInt64, ScalarUInt64, OneDUInt64) +// vint8m1_t vnmsac_vv_int8m1_ta (vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV8VInt8VIVIVI_TA, nmsac_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vnmsac_vx_int8m1_ta (vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX8VInt8VISIVI_TA, nmsac_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt8, 3, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vnmsac_vv_int16m1_ta (vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV16VInt16VIVIVI_TA, nmsac_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vnmsac_vx_int16m1_ta (vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX16VInt16VISIVI_TA, nmsac_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt16, 3, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vnmsac_vv_int32m1_ta (vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV32VInt32VIVIVI_TA, nmsac_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vnmsac_vx_int32m1_ta (vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX32VInt32VISIVI_TA, nmsac_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt32, 3, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vnmsac_vv_int64m1_ta (vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV64VInt64VIVIVI_TA, nmsac_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vnmsac_vx_int64m1_ta (vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX64VInt64VISIVI_TA, nmsac_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt64, 3, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vnmsac_vv_uint8m1_ta (vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV8VUInt8VUVUVU_TA, nmsac_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vnmsac_vx_uint8m1_ta (vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX8VUInt8VUSUVU_TA, nmsac_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt8, 3, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vnmsac_vv_uint16m1_ta (vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV16VUInt16VUVUVU_TA, nmsac_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vnmsac_vx_uint16m1_ta (vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX16VUInt16VUSUVU_TA, nmsac_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt16, 3, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vnmsac_vv_uint32m1_ta (vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV32VUInt32VUVUVU_TA, nmsac_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vnmsac_vx_uint32m1_ta (vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX32VUInt32VUSUVU_TA, nmsac_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt32, 3, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vnmsac_vv_uint64m1_ta (vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV64VUInt64VUVUVU_TA, nmsac_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vnmsac_vx_uint64m1_ta (vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX64VUInt64VUSUVU_TA, nmsac_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt64, 3, OneDUInt64, ScalarUInt64, OneDUInt64) +// vint8m1_t vmadd_vv_int8m1_ta (vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV8VInt8VIVIVI_TA, madd_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmadd_vx_int8m1_ta (vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX8VInt8VISIVI_TA, madd_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt8, 3, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vmadd_vv_int16m1_ta (vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV16VInt16VIVIVI_TA, madd_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmadd_vx_int16m1_ta (vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX16VInt16VISIVI_TA, madd_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt16, 3, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vmadd_vv_int32m1_ta (vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV32VInt32VIVIVI_TA, madd_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmadd_vx_int32m1_ta (vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX32VInt32VISIVI_TA, madd_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt32, 3, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vmadd_vv_int64m1_ta (vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV64VInt64VIVIVI_TA, madd_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmadd_vx_int64m1_ta (vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX64VInt64VISIVI_TA, madd_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt64, 3, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vmadd_vv_uint8m1_ta (vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV8VUInt8VUVUVU_TA, madd_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmadd_vx_uint8m1_ta (vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX8VUInt8VUSUVU_TA, madd_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt8, 3, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vmadd_vv_uint16m1_ta (vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV16VUInt16VUVUVU_TA, madd_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmadd_vx_uint16m1_ta (vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX16VUInt16VUSUVU_TA, madd_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt16, 3, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vmadd_vv_uint32m1_ta (vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV32VUInt32VUVUVU_TA, madd_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmadd_vx_uint32m1_ta (vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX32VUInt32VUSUVU_TA, madd_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt32, 3, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vmadd_vv_uint64m1_ta (vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV64VUInt64VUVUVU_TA, madd_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmadd_vx_uint64m1_ta (vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX64VUInt64VUSUVU_TA, madd_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt64, 3, OneDUInt64, ScalarUInt64, OneDUInt64) +// vint8m1_t vnmsub_vv_int8m1_ta (vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV8VInt8VIVIVI_TA, nmsub_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vnmsub_vx_int8m1_ta (vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX8VInt8VISIVI_TA, nmsub_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt8, 3, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vnmsub_vv_int16m1_ta (vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV16VInt16VIVIVI_TA, nmsub_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vnmsub_vx_int16m1_ta (vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX16VInt16VISIVI_TA, nmsub_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt16, 3, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vnmsub_vv_int32m1_ta (vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV32VInt32VIVIVI_TA, nmsub_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vnmsub_vx_int32m1_ta (vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX32VInt32VISIVI_TA, nmsub_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt32, 3, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vnmsub_vv_int64m1_ta (vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV64VInt64VIVIVI_TA, nmsub_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vnmsub_vx_int64m1_ta (vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX64VInt64VISIVI_TA, nmsub_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDInt64, 3, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vnmsub_vv_uint8m1_ta (vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV8VUInt8VUVUVU_TA, nmsub_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vnmsub_vx_uint8m1_ta (vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX8VUInt8VUSUVU_TA, nmsub_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt8, 3, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vnmsub_vv_uint16m1_ta (vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV16VUInt16VUVUVU_TA, nmsub_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vnmsub_vx_uint16m1_ta (vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX16VUInt16VUSUVU_TA, nmsub_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt16, 3, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vnmsub_vv_uint32m1_ta (vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV32VUInt32VUVUVU_TA, nmsub_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vnmsub_vx_uint32m1_ta (vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX32VUInt32VUSUVU_TA, nmsub_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt32, 3, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vnmsub_vv_uint64m1_ta (vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV64VUInt64VUVUVU_TA, nmsub_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vnmsub_vx_uint64m1_ta (vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX64VUInt64VUSUVU_TA, nmsub_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDUInt64, 3, OneDUInt64, ScalarUInt64, OneDUInt64) +// vint8m1_t vmacc_vv_int8m1_tuma (vbool8_t mask, vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV8VInt8VBVIVIVI_TUMA, macc_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmacc_vx_int8m1_tuma (vbool8_t mask, vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX8VInt8VBVISIVI_TUMA, macc_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vmacc_vv_int16m1_tuma (vbool16_t mask, vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV16VInt16VBVIVIVI_TUMA, macc_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmacc_vx_int16m1_tuma (vbool16_t mask, vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX16VInt16VBVISIVI_TUMA, macc_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vmacc_vv_int32m1_tuma (vbool32_t mask, vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV32VInt32VBVIVIVI_TUMA, macc_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmacc_vx_int32m1_tuma (vbool32_t mask, vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX32VInt32VBVISIVI_TUMA, macc_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vmacc_vv_int64m1_tuma (vbool64_t mask, vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV64VInt64VBVIVIVI_TUMA, macc_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmacc_vx_int64m1_tuma (vbool64_t mask, vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX64VInt64VBVISIVI_TUMA, macc_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vmacc_vv_uint8m1_tuma (vbool8_t mask, vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV8VUInt8VBVUVUVU_TUMA, macc_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmacc_vx_uint8m1_tuma (vbool8_t mask, vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX8VUInt8VBVUSUVU_TUMA, macc_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vmacc_vv_uint16m1_tuma (vbool16_t mask, vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV16VUInt16VBVUVUVU_TUMA, macc_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmacc_vx_uint16m1_tuma (vbool16_t mask, vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX16VUInt16VBVUSUVU_TUMA, macc_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vmacc_vv_uint32m1_tuma (vbool32_t mask, vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV32VUInt32VBVUVUVU_TUMA, macc_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmacc_vx_uint32m1_tuma (vbool32_t mask, vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX32VUInt32VBVUSUVU_TUMA, macc_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vmacc_vv_uint64m1_tuma (vbool64_t mask, vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV64VUInt64VBVUVUVU_TUMA, macc_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmacc_vx_uint64m1_tuma (vbool64_t mask, vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX64VUInt64VBVUSUVU_TUMA, macc_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt64, OneDUInt64) +// vint8m1_t vnmsac_vv_int8m1_tuma (vbool8_t mask, vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV8VInt8VBVIVIVI_TUMA, nmsac_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vnmsac_vx_int8m1_tuma (vbool8_t mask, vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX8VInt8VBVISIVI_TUMA, nmsac_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vnmsac_vv_int16m1_tuma (vbool16_t mask, vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV16VInt16VBVIVIVI_TUMA, nmsac_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vnmsac_vx_int16m1_tuma (vbool16_t mask, vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX16VInt16VBVISIVI_TUMA, nmsac_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vnmsac_vv_int32m1_tuma (vbool32_t mask, vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV32VInt32VBVIVIVI_TUMA, nmsac_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vnmsac_vx_int32m1_tuma (vbool32_t mask, vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX32VInt32VBVISIVI_TUMA, nmsac_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vnmsac_vv_int64m1_tuma (vbool64_t mask, vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV64VInt64VBVIVIVI_TUMA, nmsac_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vnmsac_vx_int64m1_tuma (vbool64_t mask, vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX64VInt64VBVISIVI_TUMA, nmsac_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vnmsac_vv_uint8m1_tuma (vbool8_t mask, vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV8VUInt8VBVUVUVU_TUMA, nmsac_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vnmsac_vx_uint8m1_tuma (vbool8_t mask, vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX8VUInt8VBVUSUVU_TUMA, nmsac_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vnmsac_vv_uint16m1_tuma (vbool16_t mask, vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV16VUInt16VBVUVUVU_TUMA, nmsac_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vnmsac_vx_uint16m1_tuma (vbool16_t mask, vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX16VUInt16VBVUSUVU_TUMA, nmsac_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vnmsac_vv_uint32m1_tuma (vbool32_t mask, vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV32VUInt32VBVUVUVU_TUMA, nmsac_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vnmsac_vx_uint32m1_tuma (vbool32_t mask, vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX32VUInt32VBVUSUVU_TUMA, nmsac_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vnmsac_vv_uint64m1_tuma (vbool64_t mask, vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV64VUInt64VBVUVUVU_TUMA, nmsac_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vnmsac_vx_uint64m1_tuma (vbool64_t mask, vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX64VUInt64VBVUSUVU_TUMA, nmsac_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt64, OneDUInt64) +// vint8m1_t vmadd_vv_int8m1_tuma (vbool8_t mask, vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV8VInt8VBVIVIVI_TUMA, madd_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmadd_vx_int8m1_tuma (vbool8_t mask, vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX8VInt8VBVISIVI_TUMA, madd_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vmadd_vv_int16m1_tuma (vbool16_t mask, vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV16VInt16VBVIVIVI_TUMA, madd_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmadd_vx_int16m1_tuma (vbool16_t mask, vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX16VInt16VBVISIVI_TUMA, madd_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vmadd_vv_int32m1_tuma (vbool32_t mask, vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV32VInt32VBVIVIVI_TUMA, madd_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmadd_vx_int32m1_tuma (vbool32_t mask, vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX32VInt32VBVISIVI_TUMA, madd_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vmadd_vv_int64m1_tuma (vbool64_t mask, vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV64VInt64VBVIVIVI_TUMA, madd_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmadd_vx_int64m1_tuma (vbool64_t mask, vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX64VInt64VBVISIVI_TUMA, madd_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vmadd_vv_uint8m1_tuma (vbool8_t mask, vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV8VUInt8VBVUVUVU_TUMA, madd_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmadd_vx_uint8m1_tuma (vbool8_t mask, vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX8VUInt8VBVUSUVU_TUMA, madd_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vmadd_vv_uint16m1_tuma (vbool16_t mask, vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV16VUInt16VBVUVUVU_TUMA, madd_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmadd_vx_uint16m1_tuma (vbool16_t mask, vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX16VUInt16VBVUSUVU_TUMA, madd_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vmadd_vv_uint32m1_tuma (vbool32_t mask, vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV32VUInt32VBVUVUVU_TUMA, madd_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmadd_vx_uint32m1_tuma (vbool32_t mask, vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX32VUInt32VBVUSUVU_TUMA, madd_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vmadd_vv_uint64m1_tuma (vbool64_t mask, vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV64VUInt64VBVUVUVU_TUMA, madd_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmadd_vx_uint64m1_tuma (vbool64_t mask, vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX64VUInt64VBVUSUVU_TUMA, madd_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt64, OneDUInt64) +// vint8m1_t vnmsub_vv_int8m1_tuma (vbool8_t mask, vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV8VInt8VBVIVIVI_TUMA, nmsub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vnmsub_vx_int8m1_tuma (vbool8_t mask, vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX8VInt8VBVISIVI_TUMA, nmsub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vnmsub_vv_int16m1_tuma (vbool16_t mask, vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV16VInt16VBVIVIVI_TUMA, nmsub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vnmsub_vx_int16m1_tuma (vbool16_t mask, vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX16VInt16VBVISIVI_TUMA, nmsub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vnmsub_vv_int32m1_tuma (vbool32_t mask, vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV32VInt32VBVIVIVI_TUMA, nmsub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vnmsub_vx_int32m1_tuma (vbool32_t mask, vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX32VInt32VBVISIVI_TUMA, nmsub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vnmsub_vv_int64m1_tuma (vbool64_t mask, vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV64VInt64VBVIVIVI_TUMA, nmsub_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vnmsub_vx_int64m1_tuma (vbool64_t mask, vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX64VInt64VBVISIVI_TUMA, nmsub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vnmsub_vv_uint8m1_tuma (vbool8_t mask, vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV8VUInt8VBVUVUVU_TUMA, nmsub_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vnmsub_vx_uint8m1_tuma (vbool8_t mask, vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX8VUInt8VBVUSUVU_TUMA, nmsub_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vnmsub_vv_uint16m1_tuma (vbool16_t mask, vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV16VUInt16VBVUVUVU_TUMA, nmsub_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vnmsub_vx_uint16m1_tuma (vbool16_t mask, vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX16VUInt16VBVUSUVU_TUMA, nmsub_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vnmsub_vv_uint32m1_tuma (vbool32_t mask, vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV32VUInt32VBVUVUVU_TUMA, nmsub_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vnmsub_vx_uint32m1_tuma (vbool32_t mask, vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX32VUInt32VBVUSUVU_TUMA, nmsub_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vnmsub_vv_uint64m1_tuma (vbool64_t mask, vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV64VUInt64VBVUVUVU_TUMA, nmsub_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vnmsub_vx_uint64m1_tuma (vbool64_t mask, vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX64VUInt64VBVUSUVU_TUMA, nmsub_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt64, OneDUInt64) +// vint8m1_t vmacc_vv_int8m1_tumu (vbool8_t mask, vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV8VInt8VBVIVIVI_TUMU, macc_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmacc_vx_int8m1_tumu (vbool8_t mask, vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX8VInt8VBVISIVI_TUMU, macc_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vmacc_vv_int16m1_tumu (vbool16_t mask, vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV16VInt16VBVIVIVI_TUMU, macc_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmacc_vx_int16m1_tumu (vbool16_t mask, vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX16VInt16VBVISIVI_TUMU, macc_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vmacc_vv_int32m1_tumu (vbool32_t mask, vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV32VInt32VBVIVIVI_TUMU, macc_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmacc_vx_int32m1_tumu (vbool32_t mask, vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX32VInt32VBVISIVI_TUMU, macc_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vmacc_vv_int64m1_tumu (vbool64_t mask, vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV64VInt64VBVIVIVI_TUMU, macc_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmacc_vx_int64m1_tumu (vbool64_t mask, vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX64VInt64VBVISIVI_TUMU, macc_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vmacc_vv_uint8m1_tumu (vbool8_t mask, vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV8VUInt8VBVUVUVU_TUMU, macc_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmacc_vx_uint8m1_tumu (vbool8_t mask, vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX8VUInt8VBVUSUVU_TUMU, macc_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vmacc_vv_uint16m1_tumu (vbool16_t mask, vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV16VUInt16VBVUVUVU_TUMU, macc_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmacc_vx_uint16m1_tumu (vbool16_t mask, vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX16VUInt16VBVUSUVU_TUMU, macc_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vmacc_vv_uint32m1_tumu (vbool32_t mask, vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV32VUInt32VBVUVUVU_TUMU, macc_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmacc_vx_uint32m1_tumu (vbool32_t mask, vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX32VUInt32VBVUSUVU_TUMU, macc_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vmacc_vv_uint64m1_tumu (vbool64_t mask, vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV64VUInt64VBVUVUVU_TUMU, macc_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmacc_vx_uint64m1_tumu (vbool64_t mask, vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX64VUInt64VBVUSUVU_TUMU, macc_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt64, OneDUInt64) +// vint8m1_t vnmsac_vv_int8m1_tumu (vbool8_t mask, vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV8VInt8VBVIVIVI_TUMU, nmsac_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vnmsac_vx_int8m1_tumu (vbool8_t mask, vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX8VInt8VBVISIVI_TUMU, nmsac_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vnmsac_vv_int16m1_tumu (vbool16_t mask, vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV16VInt16VBVIVIVI_TUMU, nmsac_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vnmsac_vx_int16m1_tumu (vbool16_t mask, vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX16VInt16VBVISIVI_TUMU, nmsac_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vnmsac_vv_int32m1_tumu (vbool32_t mask, vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV32VInt32VBVIVIVI_TUMU, nmsac_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vnmsac_vx_int32m1_tumu (vbool32_t mask, vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX32VInt32VBVISIVI_TUMU, nmsac_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vnmsac_vv_int64m1_tumu (vbool64_t mask, vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV64VInt64VBVIVIVI_TUMU, nmsac_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vnmsac_vx_int64m1_tumu (vbool64_t mask, vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX64VInt64VBVISIVI_TUMU, nmsac_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vnmsac_vv_uint8m1_tumu (vbool8_t mask, vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV8VUInt8VBVUVUVU_TUMU, nmsac_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vnmsac_vx_uint8m1_tumu (vbool8_t mask, vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX8VUInt8VBVUSUVU_TUMU, nmsac_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vnmsac_vv_uint16m1_tumu (vbool16_t mask, vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV16VUInt16VBVUVUVU_TUMU, nmsac_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vnmsac_vx_uint16m1_tumu (vbool16_t mask, vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX16VUInt16VBVUSUVU_TUMU, nmsac_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vnmsac_vv_uint32m1_tumu (vbool32_t mask, vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV32VUInt32VBVUVUVU_TUMU, nmsac_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vnmsac_vx_uint32m1_tumu (vbool32_t mask, vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX32VUInt32VBVUSUVU_TUMU, nmsac_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vnmsac_vv_uint64m1_tumu (vbool64_t mask, vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV64VUInt64VBVUVUVU_TUMU, nmsac_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vnmsac_vx_uint64m1_tumu (vbool64_t mask, vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX64VUInt64VBVUSUVU_TUMU, nmsac_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt64, OneDUInt64) +// vint8m1_t vmadd_vv_int8m1_tumu (vbool8_t mask, vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV8VInt8VBVIVIVI_TUMU, madd_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmadd_vx_int8m1_tumu (vbool8_t mask, vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX8VInt8VBVISIVI_TUMU, madd_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vmadd_vv_int16m1_tumu (vbool16_t mask, vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV16VInt16VBVIVIVI_TUMU, madd_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmadd_vx_int16m1_tumu (vbool16_t mask, vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX16VInt16VBVISIVI_TUMU, madd_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vmadd_vv_int32m1_tumu (vbool32_t mask, vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV32VInt32VBVIVIVI_TUMU, madd_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmadd_vx_int32m1_tumu (vbool32_t mask, vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX32VInt32VBVISIVI_TUMU, madd_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vmadd_vv_int64m1_tumu (vbool64_t mask, vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV64VInt64VBVIVIVI_TUMU, madd_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmadd_vx_int64m1_tumu (vbool64_t mask, vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX64VInt64VBVISIVI_TUMU, madd_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vmadd_vv_uint8m1_tumu (vbool8_t mask, vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV8VUInt8VBVUVUVU_TUMU, madd_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmadd_vx_uint8m1_tumu (vbool8_t mask, vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX8VUInt8VBVUSUVU_TUMU, madd_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vmadd_vv_uint16m1_tumu (vbool16_t mask, vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV16VUInt16VBVUVUVU_TUMU, madd_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmadd_vx_uint16m1_tumu (vbool16_t mask, vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX16VUInt16VBVUSUVU_TUMU, madd_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vmadd_vv_uint32m1_tumu (vbool32_t mask, vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV32VUInt32VBVUVUVU_TUMU, madd_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmadd_vx_uint32m1_tumu (vbool32_t mask, vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX32VUInt32VBVUSUVU_TUMU, madd_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vmadd_vv_uint64m1_tumu (vbool64_t mask, vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV64VUInt64VBVUVUVU_TUMU, madd_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmadd_vx_uint64m1_tumu (vbool64_t mask, vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX64VUInt64VBVUSUVU_TUMU, madd_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt64, OneDUInt64) +// vint8m1_t vnmsub_vv_int8m1_tumu (vbool8_t mask, vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV8VInt8VBVIVIVI_TUMU, nmsub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vnmsub_vx_int8m1_tumu (vbool8_t mask, vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX8VInt8VBVISIVI_TUMU, nmsub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vnmsub_vv_int16m1_tumu (vbool16_t mask, vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV16VInt16VBVIVIVI_TUMU, nmsub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vnmsub_vx_int16m1_tumu (vbool16_t mask, vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX16VInt16VBVISIVI_TUMU, nmsub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vnmsub_vv_int32m1_tumu (vbool32_t mask, vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV32VInt32VBVIVIVI_TUMU, nmsub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vnmsub_vx_int32m1_tumu (vbool32_t mask, vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX32VInt32VBVISIVI_TUMU, nmsub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vnmsub_vv_int64m1_tumu (vbool64_t mask, vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV64VInt64VBVIVIVI_TUMU, nmsub_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vnmsub_vx_int64m1_tumu (vbool64_t mask, vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX64VInt64VBVISIVI_TUMU, nmsub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vnmsub_vv_uint8m1_tumu (vbool8_t mask, vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV8VUInt8VBVUVUVU_TUMU, nmsub_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vnmsub_vx_uint8m1_tumu (vbool8_t mask, vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX8VUInt8VBVUSUVU_TUMU, nmsub_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vnmsub_vv_uint16m1_tumu (vbool16_t mask, vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV16VUInt16VBVUVUVU_TUMU, nmsub_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vnmsub_vx_uint16m1_tumu (vbool16_t mask, vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX16VUInt16VBVUSUVU_TUMU, nmsub_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vnmsub_vv_uint32m1_tumu (vbool32_t mask, vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV32VUInt32VBVUVUVU_TUMU, nmsub_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vnmsub_vx_uint32m1_tumu (vbool32_t mask, vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX32VUInt32VBVUSUVU_TUMU, nmsub_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vnmsub_vv_uint64m1_tumu (vbool64_t mask, vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV64VUInt64VBVUVUVU_TUMU, nmsub_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vnmsub_vx_uint64m1_tumu (vbool64_t mask, vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX64VUInt64VBVUSUVU_TUMU, nmsub_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt64, OneDUInt64) +// vint8m1_t vmacc_vv_int8m1_tama (vbool8_t mask, vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV8VInt8VBVIVIVI_TAMA, macc_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmacc_vx_int8m1_tama (vbool8_t mask, vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX8VInt8VBVISIVI_TAMA, macc_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vmacc_vv_int16m1_tama (vbool16_t mask, vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV16VInt16VBVIVIVI_TAMA, macc_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmacc_vx_int16m1_tama (vbool16_t mask, vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX16VInt16VBVISIVI_TAMA, macc_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vmacc_vv_int32m1_tama (vbool32_t mask, vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV32VInt32VBVIVIVI_TAMA, macc_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmacc_vx_int32m1_tama (vbool32_t mask, vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX32VInt32VBVISIVI_TAMA, macc_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vmacc_vv_int64m1_tama (vbool64_t mask, vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV64VInt64VBVIVIVI_TAMA, macc_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmacc_vx_int64m1_tama (vbool64_t mask, vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX64VInt64VBVISIVI_TAMA, macc_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vmacc_vv_uint8m1_tama (vbool8_t mask, vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV8VUInt8VBVUVUVU_TAMA, macc_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmacc_vx_uint8m1_tama (vbool8_t mask, vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX8VUInt8VBVUSUVU_TAMA, macc_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vmacc_vv_uint16m1_tama (vbool16_t mask, vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV16VUInt16VBVUVUVU_TAMA, macc_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmacc_vx_uint16m1_tama (vbool16_t mask, vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX16VUInt16VBVUSUVU_TAMA, macc_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vmacc_vv_uint32m1_tama (vbool32_t mask, vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV32VUInt32VBVUVUVU_TAMA, macc_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmacc_vx_uint32m1_tama (vbool32_t mask, vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX32VUInt32VBVUSUVU_TAMA, macc_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vmacc_vv_uint64m1_tama (vbool64_t mask, vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV64VUInt64VBVUVUVU_TAMA, macc_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmacc_vx_uint64m1_tama (vbool64_t mask, vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX64VUInt64VBVUSUVU_TAMA, macc_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt64, OneDUInt64) +// vint8m1_t vnmsac_vv_int8m1_tama (vbool8_t mask, vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV8VInt8VBVIVIVI_TAMA, nmsac_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vnmsac_vx_int8m1_tama (vbool8_t mask, vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX8VInt8VBVISIVI_TAMA, nmsac_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vnmsac_vv_int16m1_tama (vbool16_t mask, vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV16VInt16VBVIVIVI_TAMA, nmsac_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vnmsac_vx_int16m1_tama (vbool16_t mask, vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX16VInt16VBVISIVI_TAMA, nmsac_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vnmsac_vv_int32m1_tama (vbool32_t mask, vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV32VInt32VBVIVIVI_TAMA, nmsac_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vnmsac_vx_int32m1_tama (vbool32_t mask, vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX32VInt32VBVISIVI_TAMA, nmsac_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vnmsac_vv_int64m1_tama (vbool64_t mask, vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV64VInt64VBVIVIVI_TAMA, nmsac_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vnmsac_vx_int64m1_tama (vbool64_t mask, vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX64VInt64VBVISIVI_TAMA, nmsac_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vnmsac_vv_uint8m1_tama (vbool8_t mask, vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV8VUInt8VBVUVUVU_TAMA, nmsac_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vnmsac_vx_uint8m1_tama (vbool8_t mask, vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX8VUInt8VBVUSUVU_TAMA, nmsac_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vnmsac_vv_uint16m1_tama (vbool16_t mask, vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV16VUInt16VBVUVUVU_TAMA, nmsac_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vnmsac_vx_uint16m1_tama (vbool16_t mask, vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX16VUInt16VBVUSUVU_TAMA, nmsac_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vnmsac_vv_uint32m1_tama (vbool32_t mask, vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV32VUInt32VBVUVUVU_TAMA, nmsac_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vnmsac_vx_uint32m1_tama (vbool32_t mask, vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX32VUInt32VBVUSUVU_TAMA, nmsac_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vnmsac_vv_uint64m1_tama (vbool64_t mask, vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV64VUInt64VBVUVUVU_TAMA, nmsac_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vnmsac_vx_uint64m1_tama (vbool64_t mask, vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX64VUInt64VBVUSUVU_TAMA, nmsac_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt64, OneDUInt64) +// vint8m1_t vmadd_vv_int8m1_tama (vbool8_t mask, vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV8VInt8VBVIVIVI_TAMA, madd_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmadd_vx_int8m1_tama (vbool8_t mask, vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX8VInt8VBVISIVI_TAMA, madd_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vmadd_vv_int16m1_tama (vbool16_t mask, vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV16VInt16VBVIVIVI_TAMA, madd_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmadd_vx_int16m1_tama (vbool16_t mask, vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX16VInt16VBVISIVI_TAMA, madd_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vmadd_vv_int32m1_tama (vbool32_t mask, vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV32VInt32VBVIVIVI_TAMA, madd_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmadd_vx_int32m1_tama (vbool32_t mask, vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX32VInt32VBVISIVI_TAMA, madd_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vmadd_vv_int64m1_tama (vbool64_t mask, vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV64VInt64VBVIVIVI_TAMA, madd_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmadd_vx_int64m1_tama (vbool64_t mask, vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX64VInt64VBVISIVI_TAMA, madd_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vmadd_vv_uint8m1_tama (vbool8_t mask, vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV8VUInt8VBVUVUVU_TAMA, madd_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmadd_vx_uint8m1_tama (vbool8_t mask, vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX8VUInt8VBVUSUVU_TAMA, madd_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vmadd_vv_uint16m1_tama (vbool16_t mask, vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV16VUInt16VBVUVUVU_TAMA, madd_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmadd_vx_uint16m1_tama (vbool16_t mask, vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX16VUInt16VBVUSUVU_TAMA, madd_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vmadd_vv_uint32m1_tama (vbool32_t mask, vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV32VUInt32VBVUVUVU_TAMA, madd_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmadd_vx_uint32m1_tama (vbool32_t mask, vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX32VUInt32VBVUSUVU_TAMA, madd_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vmadd_vv_uint64m1_tama (vbool64_t mask, vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV64VUInt64VBVUVUVU_TAMA, madd_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmadd_vx_uint64m1_tama (vbool64_t mask, vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX64VUInt64VBVUSUVU_TAMA, madd_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt64, OneDUInt64) +// vint8m1_t vnmsub_vv_int8m1_tama (vbool8_t mask, vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV8VInt8VBVIVIVI_TAMA, nmsub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vnmsub_vx_int8m1_tama (vbool8_t mask, vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX8VInt8VBVISIVI_TAMA, nmsub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vnmsub_vv_int16m1_tama (vbool16_t mask, vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV16VInt16VBVIVIVI_TAMA, nmsub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vnmsub_vx_int16m1_tama (vbool16_t mask, vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX16VInt16VBVISIVI_TAMA, nmsub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vnmsub_vv_int32m1_tama (vbool32_t mask, vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV32VInt32VBVIVIVI_TAMA, nmsub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vnmsub_vx_int32m1_tama (vbool32_t mask, vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX32VInt32VBVISIVI_TAMA, nmsub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vnmsub_vv_int64m1_tama (vbool64_t mask, vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV64VInt64VBVIVIVI_TAMA, nmsub_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vnmsub_vx_int64m1_tama (vbool64_t mask, vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX64VInt64VBVISIVI_TAMA, nmsub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vnmsub_vv_uint8m1_tama (vbool8_t mask, vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV8VUInt8VBVUVUVU_TAMA, nmsub_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vnmsub_vx_uint8m1_tama (vbool8_t mask, vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX8VUInt8VBVUSUVU_TAMA, nmsub_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vnmsub_vv_uint16m1_tama (vbool16_t mask, vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV16VUInt16VBVUVUVU_TAMA, nmsub_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vnmsub_vx_uint16m1_tama (vbool16_t mask, vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX16VUInt16VBVUSUVU_TAMA, nmsub_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vnmsub_vv_uint32m1_tama (vbool32_t mask, vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV32VUInt32VBVUVUVU_TAMA, nmsub_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vnmsub_vx_uint32m1_tama (vbool32_t mask, vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX32VUInt32VBVUSUVU_TAMA, nmsub_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vnmsub_vv_uint64m1_tama (vbool64_t mask, vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV64VUInt64VBVUVUVU_TAMA, nmsub_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vnmsub_vx_uint64m1_tama (vbool64_t mask, vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX64VUInt64VBVUSUVU_TAMA, nmsub_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt64, OneDUInt64) +// vint8m1_t vmacc_vv_int8m1_tamu (vbool8_t mask, vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV8VInt8VBVIVIVI_TAMU, macc_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmacc_vx_int8m1_tamu (vbool8_t mask, vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX8VInt8VBVISIVI_TAMU, macc_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vmacc_vv_int16m1_tamu (vbool16_t mask, vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV16VInt16VBVIVIVI_TAMU, macc_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmacc_vx_int16m1_tamu (vbool16_t mask, vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX16VInt16VBVISIVI_TAMU, macc_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vmacc_vv_int32m1_tamu (vbool32_t mask, vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV32VInt32VBVIVIVI_TAMU, macc_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmacc_vx_int32m1_tamu (vbool32_t mask, vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX32VInt32VBVISIVI_TAMU, macc_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vmacc_vv_int64m1_tamu (vbool64_t mask, vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV64VInt64VBVIVIVI_TAMU, macc_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmacc_vx_int64m1_tamu (vbool64_t mask, vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX64VInt64VBVISIVI_TAMU, macc_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vmacc_vv_uint8m1_tamu (vbool8_t mask, vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV8VUInt8VBVUVUVU_TAMU, macc_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmacc_vx_uint8m1_tamu (vbool8_t mask, vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX8VUInt8VBVUSUVU_TAMU, macc_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vmacc_vv_uint16m1_tamu (vbool16_t mask, vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV16VUInt16VBVUVUVU_TAMU, macc_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmacc_vx_uint16m1_tamu (vbool16_t mask, vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX16VUInt16VBVUSUVU_TAMU, macc_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vmacc_vv_uint32m1_tamu (vbool32_t mask, vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV32VUInt32VBVUVUVU_TAMU, macc_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmacc_vx_uint32m1_tamu (vbool32_t mask, vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX32VUInt32VBVUSUVU_TAMU, macc_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vmacc_vv_uint64m1_tamu (vbool64_t mask, vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVV64VUInt64VBVUVUVU_TAMU, macc_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmacc_vx_uint64m1_tamu (vbool64_t mask, vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaccVX64VUInt64VBVUSUVU_TAMU, macc_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt64, OneDUInt64) +// vint8m1_t vnmsac_vv_int8m1_tamu (vbool8_t mask, vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV8VInt8VBVIVIVI_TAMU, nmsac_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vnmsac_vx_int8m1_tamu (vbool8_t mask, vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX8VInt8VBVISIVI_TAMU, nmsac_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vnmsac_vv_int16m1_tamu (vbool16_t mask, vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV16VInt16VBVIVIVI_TAMU, nmsac_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vnmsac_vx_int16m1_tamu (vbool16_t mask, vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX16VInt16VBVISIVI_TAMU, nmsac_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vnmsac_vv_int32m1_tamu (vbool32_t mask, vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV32VInt32VBVIVIVI_TAMU, nmsac_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vnmsac_vx_int32m1_tamu (vbool32_t mask, vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX32VInt32VBVISIVI_TAMU, nmsac_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vnmsac_vv_int64m1_tamu (vbool64_t mask, vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV64VInt64VBVIVIVI_TAMU, nmsac_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vnmsac_vx_int64m1_tamu (vbool64_t mask, vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX64VInt64VBVISIVI_TAMU, nmsac_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vnmsac_vv_uint8m1_tamu (vbool8_t mask, vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV8VUInt8VBVUVUVU_TAMU, nmsac_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vnmsac_vx_uint8m1_tamu (vbool8_t mask, vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX8VUInt8VBVUSUVU_TAMU, nmsac_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vnmsac_vv_uint16m1_tamu (vbool16_t mask, vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV16VUInt16VBVUVUVU_TAMU, nmsac_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vnmsac_vx_uint16m1_tamu (vbool16_t mask, vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX16VUInt16VBVUSUVU_TAMU, nmsac_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vnmsac_vv_uint32m1_tamu (vbool32_t mask, vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV32VUInt32VBVUVUVU_TAMU, nmsac_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vnmsac_vx_uint32m1_tamu (vbool32_t mask, vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX32VUInt32VBVUSUVU_TAMU, nmsac_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vnmsac_vv_uint64m1_tamu (vbool64_t mask, vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVV64VUInt64VBVUVUVU_TAMU, nmsac_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vnmsac_vx_uint64m1_tamu (vbool64_t mask, vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsacVX64VUInt64VBVUSUVU_TAMU, nmsac_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt64, OneDUInt64) +// vint8m1_t vmadd_vv_int8m1_tamu (vbool8_t mask, vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV8VInt8VBVIVIVI_TAMU, madd_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmadd_vx_int8m1_tamu (vbool8_t mask, vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX8VInt8VBVISIVI_TAMU, madd_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vmadd_vv_int16m1_tamu (vbool16_t mask, vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV16VInt16VBVIVIVI_TAMU, madd_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmadd_vx_int16m1_tamu (vbool16_t mask, vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX16VInt16VBVISIVI_TAMU, madd_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vmadd_vv_int32m1_tamu (vbool32_t mask, vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV32VInt32VBVIVIVI_TAMU, madd_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmadd_vx_int32m1_tamu (vbool32_t mask, vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX32VInt32VBVISIVI_TAMU, madd_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vmadd_vv_int64m1_tamu (vbool64_t mask, vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV64VInt64VBVIVIVI_TAMU, madd_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmadd_vx_int64m1_tamu (vbool64_t mask, vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX64VInt64VBVISIVI_TAMU, madd_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vmadd_vv_uint8m1_tamu (vbool8_t mask, vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV8VUInt8VBVUVUVU_TAMU, madd_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmadd_vx_uint8m1_tamu (vbool8_t mask, vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX8VUInt8VBVUSUVU_TAMU, madd_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vmadd_vv_uint16m1_tamu (vbool16_t mask, vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV16VUInt16VBVUVUVU_TAMU, madd_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmadd_vx_uint16m1_tamu (vbool16_t mask, vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX16VUInt16VBVUSUVU_TAMU, madd_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vmadd_vv_uint32m1_tamu (vbool32_t mask, vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV32VUInt32VBVUVUVU_TAMU, madd_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmadd_vx_uint32m1_tamu (vbool32_t mask, vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX32VUInt32VBVUSUVU_TAMU, madd_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vmadd_vv_uint64m1_tamu (vbool64_t mask, vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVV64VUInt64VBVUVUVU_TAMU, madd_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmadd_vx_uint64m1_tamu (vbool64_t mask, vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(MaddVX64VUInt64VBVUSUVU_TAMU, madd_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt64, OneDUInt64) +// vint8m1_t vnmsub_vv_int8m1_tamu (vbool8_t mask, vint8m1_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV8VInt8VBVIVIVI_TAMU, nmsub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vnmsub_vx_int8m1_tamu (vbool8_t mask, vint8m1_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX8VInt8VBVISIVI_TAMU, nmsub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, ScalarInt8, OneDInt8) +// vint16m1_t vnmsub_vv_int16m1_tamu (vbool16_t mask, vint16m1_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV16VInt16VBVIVIVI_TAMU, nmsub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vnmsub_vx_int16m1_tamu (vbool16_t mask, vint16m1_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX16VInt16VBVISIVI_TAMU, nmsub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt16, OneDInt16) +// vint32m1_t vnmsub_vv_int32m1_tamu (vbool32_t mask, vint32m1_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV32VInt32VBVIVIVI_TAMU, nmsub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vnmsub_vx_int32m1_tamu (vbool32_t mask, vint32m1_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX32VInt32VBVISIVI_TAMU, nmsub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt32, OneDInt32) +// vint64m1_t vnmsub_vv_int64m1_tamu (vbool64_t mask, vint64m1_t vd, vint64m1_t vs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV64VInt64VBVIVIVI_TAMU, nmsub_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vnmsub_vx_int64m1_tamu (vbool64_t mask, vint64m1_t vd, int64_t rs1, vint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX64VInt64VBVISIVI_TAMU, nmsub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt64, OneDInt64) +// vuint8m1_t vnmsub_vv_uint8m1_tamu (vbool8_t mask, vuint8m1_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV8VUInt8VBVUVUVU_TAMU, nmsub_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vnmsub_vx_uint8m1_tamu (vbool8_t mask, vuint8m1_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX8VUInt8VBVUSUVU_TAMU, nmsub_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, ScalarUInt8, OneDUInt8) +// vuint16m1_t vnmsub_vv_uint16m1_tamu (vbool16_t mask, vuint16m1_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV16VUInt16VBVUVUVU_TAMU, nmsub_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vnmsub_vx_uint16m1_tamu (vbool16_t mask, vuint16m1_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX16VUInt16VBVUSUVU_TAMU, nmsub_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt16, OneDUInt16) +// vuint32m1_t vnmsub_vv_uint32m1_tamu (vbool32_t mask, vuint32m1_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV32VUInt32VBVUVUVU_TAMU, nmsub_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vnmsub_vx_uint32m1_tamu (vbool32_t mask, vuint32m1_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX32VUInt32VBVUSUVU_TAMU, nmsub_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt32, OneDUInt32) +// vuint64m1_t vnmsub_vv_uint64m1_tamu (vbool64_t mask, vuint64m1_t vd, vuint64m1_t vs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVV64VUInt64VBVUVUVU_TAMU, nmsub_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vnmsub_vx_uint64m1_tamu (vbool64_t mask, vuint64m1_t vd, uint64_t rs1, vuint64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(NmsubVX64VUInt64VBVUSUVU_TAMU, nmsub_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt64, OneDUInt64) + +// vint16m2_t vwmacc_vv_int16m2_tu (vint16m2_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVV8VInt16VIVIVI_TU, wmacc_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt8, OneDInt8) +// vint16m2_t vwmacc_vx_int16m2_tu (vint16m2_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVX8VInt16VISIVI_TU, wmacc_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, ScalarInt8, OneDInt8) +// vint32m2_t vwmacc_vv_int32m2_tu (vint32m2_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVV16VInt32VIVIVI_TU, wmacc_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt16, OneDInt16) +// vint32m2_t vwmacc_vx_int32m2_tu (vint32m2_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVX16VInt32VISIVI_TU, wmacc_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, ScalarInt16, OneDInt16) +// vint64m2_t vwmacc_vv_int64m2_tu (vint64m2_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVV32VInt64VIVIVI_TU, wmacc_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt32, OneDInt32) +// vint64m2_t vwmacc_vx_int64m2_tu (vint64m2_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVX32VInt64VISIVI_TU, wmacc_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, ScalarInt32, OneDInt32) +// vuint16m2_t vwmaccu_vv_uint16m2_tu (vuint16m2_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVV8VUInt16VUVUVU_TU, wmaccu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt8, OneDUInt8) +// vuint16m2_t vwmaccu_vx_uint16m2_tu (vuint16m2_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVX8VUInt16VUSUVU_TU, wmaccu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, ScalarUInt8, OneDUInt8) +// vuint32m2_t vwmaccu_vv_uint32m2_tu (vuint32m2_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVV16VUInt32VUVUVU_TU, wmaccu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt16, OneDUInt16) +// vuint32m2_t vwmaccu_vx_uint32m2_tu (vuint32m2_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVX16VUInt32VUSUVU_TU, wmaccu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, ScalarUInt16, OneDUInt16) +// vuint64m2_t vwmaccu_vv_uint64m2_tu (vuint64m2_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVV32VUInt64VUVUVU_TU, wmaccu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt32, OneDUInt32) +// vuint64m2_t vwmaccu_vx_uint64m2_tu (vuint64m2_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVX32VUInt64VUSUVU_TU, wmaccu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, ScalarUInt32, OneDUInt32) +// vint16m2_t vwmaccsu_vv_int16m2_tu (vint16m2_t vd, vint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVV8VInt16VIVIVU_TU, wmaccsu_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt8, OneDUInt8) +// vint16m2_t vwmaccsu_vx_int16m2_tu (vint16m2_t vd, int8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVX8VInt16VISIVU_TU, wmaccsu_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, ScalarInt8, OneDUInt8) +// vint32m2_t vwmaccsu_vv_int32m2_tu (vint32m2_t vd, vint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVV16VInt32VIVIVU_TU, wmaccsu_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt16, OneDUInt16) +// vint32m2_t vwmaccsu_vx_int32m2_tu (vint32m2_t vd, int16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVX16VInt32VISIVU_TU, wmaccsu_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, ScalarInt16, OneDUInt16) +// vint64m2_t vwmaccsu_vv_int64m2_tu (vint64m2_t vd, vint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVV32VInt64VIVIVU_TU, wmaccsu_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt32, OneDUInt32) +// vint64m2_t vwmaccsu_vx_int64m2_tu (vint64m2_t vd, int32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVX32VInt64VISIVU_TU, wmaccsu_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, ScalarInt32, OneDUInt32) +// vint16m2_t vwmaccus_vx_int16m2_tu (vint16m2_t vd, uint8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccusVX8VInt16VISUVI_TU, wmaccus_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, ScalarUInt8, OneDInt8) +// vint32m2_t vwmaccus_vx_int32m2_tu (vint32m2_t vd, uint16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccusVX16VInt32VISUVI_TU, wmaccus_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, ScalarUInt16, OneDInt16) +// vint64m2_t vwmaccus_vx_int64m2_tu (vint64m2_t vd, uint32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccusVX32VInt64VISUVI_TU, wmaccus_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, ScalarUInt32, OneDInt32) +// vint16m2_t vwmacc_vv_int16m2_ta (vint16m2_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVV8VInt16VIVIVI_TA, wmacc_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDInt16, 3, OneDInt16, OneDInt8, OneDInt8) +// vint16m2_t vwmacc_vx_int16m2_ta (vint16m2_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVX8VInt16VISIVI_TA, wmacc_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDInt16, 3, OneDInt16, ScalarInt8, OneDInt8) +// vint32m2_t vwmacc_vv_int32m2_ta (vint32m2_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVV16VInt32VIVIVI_TA, wmacc_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDInt32, 3, OneDInt32, OneDInt16, OneDInt16) +// vint32m2_t vwmacc_vx_int32m2_ta (vint32m2_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVX16VInt32VISIVI_TA, wmacc_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDInt32, 3, OneDInt32, ScalarInt16, OneDInt16) +// vint64m2_t vwmacc_vv_int64m2_ta (vint64m2_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVV32VInt64VIVIVI_TA, wmacc_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDInt64, 3, OneDInt64, OneDInt32, OneDInt32) +// vint64m2_t vwmacc_vx_int64m2_ta (vint64m2_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVX32VInt64VISIVI_TA, wmacc_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDInt64, 3, OneDInt64, ScalarInt32, OneDInt32) +// vuint16m2_t vwmaccu_vv_uint16m2_ta (vuint16m2_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVV8VUInt16VUVUVU_TA, wmaccu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDUInt16, 3, OneDUInt16, OneDUInt8, OneDUInt8) +// vuint16m2_t vwmaccu_vx_uint16m2_ta (vuint16m2_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVX8VUInt16VUSUVU_TA, wmaccu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDUInt16, 3, OneDUInt16, ScalarUInt8, OneDUInt8) +// vuint32m2_t vwmaccu_vv_uint32m2_ta (vuint32m2_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVV16VUInt32VUVUVU_TA, wmaccu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDUInt32, 3, OneDUInt32, OneDUInt16, OneDUInt16) +// vuint32m2_t vwmaccu_vx_uint32m2_ta (vuint32m2_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVX16VUInt32VUSUVU_TA, wmaccu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDUInt32, 3, OneDUInt32, ScalarUInt16, OneDUInt16) +// vuint64m2_t vwmaccu_vv_uint64m2_ta (vuint64m2_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVV32VUInt64VUVUVU_TA, wmaccu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDUInt64, 3, OneDUInt64, OneDUInt32, OneDUInt32) +// vuint64m2_t vwmaccu_vx_uint64m2_ta (vuint64m2_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVX32VUInt64VUSUVU_TA, wmaccu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDUInt64, 3, OneDUInt64, ScalarUInt32, OneDUInt32) +// vint16m2_t vwmaccsu_vv_int16m2_ta (vint16m2_t vd, vint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVV8VInt16VIVIVU_TA, wmaccsu_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDInt16, 3, OneDInt16, OneDInt8, OneDUInt8) +// vint16m2_t vwmaccsu_vx_int16m2_ta (vint16m2_t vd, int8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVX8VInt16VISIVU_TA, wmaccsu_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDInt16, 3, OneDInt16, ScalarInt8, OneDUInt8) +// vint32m2_t vwmaccsu_vv_int32m2_ta (vint32m2_t vd, vint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVV16VInt32VIVIVU_TA, wmaccsu_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDInt32, 3, OneDInt32, OneDInt16, OneDUInt16) +// vint32m2_t vwmaccsu_vx_int32m2_ta (vint32m2_t vd, int16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVX16VInt32VISIVU_TA, wmaccsu_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDInt32, 3, OneDInt32, ScalarInt16, OneDUInt16) +// vint64m2_t vwmaccsu_vv_int64m2_ta (vint64m2_t vd, vint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVV32VInt64VIVIVU_TA, wmaccsu_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDInt64, 3, OneDInt64, OneDInt32, OneDUInt32) +// vint64m2_t vwmaccsu_vx_int64m2_ta (vint64m2_t vd, int32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVX32VInt64VISIVU_TA, wmaccsu_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDInt64, 3, OneDInt64, ScalarInt32, OneDUInt32) +// vint16m2_t vwmaccus_vx_int16m2_ta (vint16m2_t vd, uint8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccusVX8VInt16VISUVI_TA, wmaccus_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDInt16, 3, OneDInt16, ScalarUInt8, OneDInt8) +// vint32m2_t vwmaccus_vx_int32m2_ta (vint32m2_t vd, uint16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccusVX16VInt32VISUVI_TA, wmaccus_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDInt32, 3, OneDInt32, ScalarUInt16, OneDInt16) +// vint64m2_t vwmaccus_vx_int64m2_ta (vint64m2_t vd, uint32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccusVX32VInt64VISUVI_TA, wmaccus_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDInt64, 3, OneDInt64, ScalarUInt32, OneDInt32) +// vint16m2_t vwmacc_vv_int16m2_tuma (vbool8_t mask, vint16m2_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVV8VInt16VBVIVIVI_TUMA, wmacc_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDInt8) +// vint16m2_t vwmacc_vx_int16m2_tuma (vbool8_t mask, vint16m2_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVX8VInt16VBVISIVI_TUMA, wmacc_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt8, OneDInt8) +// vint32m2_t vwmacc_vv_int32m2_tuma (vbool16_t mask, vint32m2_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVV16VInt32VBVIVIVI_TUMA, wmacc_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDInt16) +// vint32m2_t vwmacc_vx_int32m2_tuma (vbool16_t mask, vint32m2_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVX16VInt32VBVISIVI_TUMA, wmacc_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt16, OneDInt16) +// vint64m2_t vwmacc_vv_int64m2_tuma (vbool32_t mask, vint64m2_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVV32VInt64VBVIVIVI_TUMA, wmacc_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDInt32) +// vint64m2_t vwmacc_vx_int64m2_tuma (vbool32_t mask, vint64m2_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVX32VInt64VBVISIVI_TUMA, wmacc_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt32, OneDInt32) +// vuint16m2_t vwmaccu_vv_uint16m2_tuma (vbool8_t mask, vuint16m2_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVV8VUInt16VBVUVUVU_TUMA, wmaccu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, OneDUInt8) +// vuint16m2_t vwmaccu_vx_uint16m2_tuma (vbool8_t mask, vuint16m2_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVX8VUInt16VBVUSUVU_TUMA, wmaccu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt8, OneDUInt8) +// vuint32m2_t vwmaccu_vv_uint32m2_tuma (vbool16_t mask, vuint32m2_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVV16VUInt32VBVUVUVU_TUMA, wmaccu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, OneDUInt16) +// vuint32m2_t vwmaccu_vx_uint32m2_tuma (vbool16_t mask, vuint32m2_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVX16VUInt32VBVUSUVU_TUMA, wmaccu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt16, OneDUInt16) +// vuint64m2_t vwmaccu_vv_uint64m2_tuma (vbool32_t mask, vuint64m2_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVV32VUInt64VBVUVUVU_TUMA, wmaccu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, OneDUInt32) +// vuint64m2_t vwmaccu_vx_uint64m2_tuma (vbool32_t mask, vuint64m2_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVX32VUInt64VBVUSUVU_TUMA, wmaccu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt32, OneDUInt32) +// vint16m2_t vwmaccsu_vv_int16m2_tuma (vbool8_t mask, vint16m2_t vd, vint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVV8VInt16VBVIVIVU_TUMA, wmaccsu_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDUInt8) +// vint16m2_t vwmaccsu_vx_int16m2_tuma (vbool8_t mask, vint16m2_t vd, int8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVX8VInt16VBVISIVU_TUMA, wmaccsu_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt8, OneDUInt8) +// vint32m2_t vwmaccsu_vv_int32m2_tuma (vbool16_t mask, vint32m2_t vd, vint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVV16VInt32VBVIVIVU_TUMA, wmaccsu_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDUInt16) +// vint32m2_t vwmaccsu_vx_int32m2_tuma (vbool16_t mask, vint32m2_t vd, int16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVX16VInt32VBVISIVU_TUMA, wmaccsu_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt16, OneDUInt16) +// vint64m2_t vwmaccsu_vv_int64m2_tuma (vbool32_t mask, vint64m2_t vd, vint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVV32VInt64VBVIVIVU_TUMA, wmaccsu_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDUInt32) +// vint64m2_t vwmaccsu_vx_int64m2_tuma (vbool32_t mask, vint64m2_t vd, int32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVX32VInt64VBVISIVU_TUMA, wmaccsu_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt32, OneDUInt32) +// vint16m2_t vwmaccus_vx_int16m2_tuma (vbool8_t mask, vint16m2_t vd, uint8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccusVX8VInt16VBVISUVI_TUMA, wmaccus_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, ScalarUInt8, OneDInt8) +// vint32m2_t vwmaccus_vx_int32m2_tuma (vbool16_t mask, vint32m2_t vd, uint16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccusVX16VInt32VBVISUVI_TUMA, wmaccus_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, ScalarUInt16, OneDInt16) +// vint64m2_t vwmaccus_vx_int64m2_tuma (vbool32_t mask, vint64m2_t vd, uint32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccusVX32VInt64VBVISUVI_TUMA, wmaccus_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, ScalarUInt32, OneDInt32) +// vint16m2_t vwmacc_vv_int16m2_tumu (vbool8_t mask, vint16m2_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVV8VInt16VBVIVIVI_TUMU, wmacc_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDInt8) +// vint16m2_t vwmacc_vx_int16m2_tumu (vbool8_t mask, vint16m2_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVX8VInt16VBVISIVI_TUMU, wmacc_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt8, OneDInt8) +// vint32m2_t vwmacc_vv_int32m2_tumu (vbool16_t mask, vint32m2_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVV16VInt32VBVIVIVI_TUMU, wmacc_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDInt16) +// vint32m2_t vwmacc_vx_int32m2_tumu (vbool16_t mask, vint32m2_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVX16VInt32VBVISIVI_TUMU, wmacc_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt16, OneDInt16) +// vint64m2_t vwmacc_vv_int64m2_tumu (vbool32_t mask, vint64m2_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVV32VInt64VBVIVIVI_TUMU, wmacc_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDInt32) +// vint64m2_t vwmacc_vx_int64m2_tumu (vbool32_t mask, vint64m2_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVX32VInt64VBVISIVI_TUMU, wmacc_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt32, OneDInt32) +// vuint16m2_t vwmaccu_vv_uint16m2_tumu (vbool8_t mask, vuint16m2_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVV8VUInt16VBVUVUVU_TUMU, wmaccu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, OneDUInt8) +// vuint16m2_t vwmaccu_vx_uint16m2_tumu (vbool8_t mask, vuint16m2_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVX8VUInt16VBVUSUVU_TUMU, wmaccu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt8, OneDUInt8) +// vuint32m2_t vwmaccu_vv_uint32m2_tumu (vbool16_t mask, vuint32m2_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVV16VUInt32VBVUVUVU_TUMU, wmaccu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, OneDUInt16) +// vuint32m2_t vwmaccu_vx_uint32m2_tumu (vbool16_t mask, vuint32m2_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVX16VUInt32VBVUSUVU_TUMU, wmaccu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt16, OneDUInt16) +// vuint64m2_t vwmaccu_vv_uint64m2_tumu (vbool32_t mask, vuint64m2_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVV32VUInt64VBVUVUVU_TUMU, wmaccu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, OneDUInt32) +// vuint64m2_t vwmaccu_vx_uint64m2_tumu (vbool32_t mask, vuint64m2_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVX32VUInt64VBVUSUVU_TUMU, wmaccu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt32, OneDUInt32) +// vint16m2_t vwmaccsu_vv_int16m2_tumu (vbool8_t mask, vint16m2_t vd, vint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVV8VInt16VBVIVIVU_TUMU, wmaccsu_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDUInt8) +// vint16m2_t vwmaccsu_vx_int16m2_tumu (vbool8_t mask, vint16m2_t vd, int8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVX8VInt16VBVISIVU_TUMU, wmaccsu_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt8, OneDUInt8) +// vint32m2_t vwmaccsu_vv_int32m2_tumu (vbool16_t mask, vint32m2_t vd, vint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVV16VInt32VBVIVIVU_TUMU, wmaccsu_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDUInt16) +// vint32m2_t vwmaccsu_vx_int32m2_tumu (vbool16_t mask, vint32m2_t vd, int16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVX16VInt32VBVISIVU_TUMU, wmaccsu_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt16, OneDUInt16) +// vint64m2_t vwmaccsu_vv_int64m2_tumu (vbool32_t mask, vint64m2_t vd, vint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVV32VInt64VBVIVIVU_TUMU, wmaccsu_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDUInt32) +// vint64m2_t vwmaccsu_vx_int64m2_tumu (vbool32_t mask, vint64m2_t vd, int32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVX32VInt64VBVISIVU_TUMU, wmaccsu_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt32, OneDUInt32) +// vint16m2_t vwmaccus_vx_int16m2_tumu (vbool8_t mask, vint16m2_t vd, uint8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccusVX8VInt16VBVISUVI_TUMU, wmaccus_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, ScalarUInt8, OneDInt8) +// vint32m2_t vwmaccus_vx_int32m2_tumu (vbool16_t mask, vint32m2_t vd, uint16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccusVX16VInt32VBVISUVI_TUMU, wmaccus_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, ScalarUInt16, OneDInt16) +// vint64m2_t vwmaccus_vx_int64m2_tumu (vbool32_t mask, vint64m2_t vd, uint32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccusVX32VInt64VBVISUVI_TUMU, wmaccus_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, ScalarUInt32, OneDInt32) +// vint16m2_t vwmacc_vv_int16m2_tama (vbool8_t mask, vint16m2_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVV8VInt16VBVIVIVI_TAMA, wmacc_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDInt8) +// vint16m2_t vwmacc_vx_int16m2_tama (vbool8_t mask, vint16m2_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVX8VInt16VBVISIVI_TAMA, wmacc_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt8, OneDInt8) +// vint32m2_t vwmacc_vv_int32m2_tama (vbool16_t mask, vint32m2_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVV16VInt32VBVIVIVI_TAMA, wmacc_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDInt16) +// vint32m2_t vwmacc_vx_int32m2_tama (vbool16_t mask, vint32m2_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVX16VInt32VBVISIVI_TAMA, wmacc_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt16, OneDInt16) +// vint64m2_t vwmacc_vv_int64m2_tama (vbool32_t mask, vint64m2_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVV32VInt64VBVIVIVI_TAMA, wmacc_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDInt32) +// vint64m2_t vwmacc_vx_int64m2_tama (vbool32_t mask, vint64m2_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVX32VInt64VBVISIVI_TAMA, wmacc_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt32, OneDInt32) +// vuint16m2_t vwmaccu_vv_uint16m2_tama (vbool8_t mask, vuint16m2_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVV8VUInt16VBVUVUVU_TAMA, wmaccu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, OneDUInt8) +// vuint16m2_t vwmaccu_vx_uint16m2_tama (vbool8_t mask, vuint16m2_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVX8VUInt16VBVUSUVU_TAMA, wmaccu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt8, OneDUInt8) +// vuint32m2_t vwmaccu_vv_uint32m2_tama (vbool16_t mask, vuint32m2_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVV16VUInt32VBVUVUVU_TAMA, wmaccu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, OneDUInt16) +// vuint32m2_t vwmaccu_vx_uint32m2_tama (vbool16_t mask, vuint32m2_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVX16VUInt32VBVUSUVU_TAMA, wmaccu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt16, OneDUInt16) +// vuint64m2_t vwmaccu_vv_uint64m2_tama (vbool32_t mask, vuint64m2_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVV32VUInt64VBVUVUVU_TAMA, wmaccu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, OneDUInt32) +// vuint64m2_t vwmaccu_vx_uint64m2_tama (vbool32_t mask, vuint64m2_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVX32VUInt64VBVUSUVU_TAMA, wmaccu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt32, OneDUInt32) +// vint16m2_t vwmaccsu_vv_int16m2_tama (vbool8_t mask, vint16m2_t vd, vint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVV8VInt16VBVIVIVU_TAMA, wmaccsu_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDUInt8) +// vint16m2_t vwmaccsu_vx_int16m2_tama (vbool8_t mask, vint16m2_t vd, int8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVX8VInt16VBVISIVU_TAMA, wmaccsu_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt8, OneDUInt8) +// vint32m2_t vwmaccsu_vv_int32m2_tama (vbool16_t mask, vint32m2_t vd, vint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVV16VInt32VBVIVIVU_TAMA, wmaccsu_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDUInt16) +// vint32m2_t vwmaccsu_vx_int32m2_tama (vbool16_t mask, vint32m2_t vd, int16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVX16VInt32VBVISIVU_TAMA, wmaccsu_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt16, OneDUInt16) +// vint64m2_t vwmaccsu_vv_int64m2_tama (vbool32_t mask, vint64m2_t vd, vint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVV32VInt64VBVIVIVU_TAMA, wmaccsu_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDUInt32) +// vint64m2_t vwmaccsu_vx_int64m2_tama (vbool32_t mask, vint64m2_t vd, int32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVX32VInt64VBVISIVU_TAMA, wmaccsu_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt32, OneDUInt32) +// vint16m2_t vwmaccus_vx_int16m2_tama (vbool8_t mask, vint16m2_t vd, uint8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccusVX8VInt16VBVISUVI_TAMA, wmaccus_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, ScalarUInt8, OneDInt8) +// vint32m2_t vwmaccus_vx_int32m2_tama (vbool16_t mask, vint32m2_t vd, uint16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccusVX16VInt32VBVISUVI_TAMA, wmaccus_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, ScalarUInt16, OneDInt16) +// vint64m2_t vwmaccus_vx_int64m2_tama (vbool32_t mask, vint64m2_t vd, uint32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccusVX32VInt64VBVISUVI_TAMA, wmaccus_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, ScalarUInt32, OneDInt32) +// vint16m2_t vwmacc_vv_int16m2_tamu (vbool8_t mask, vint16m2_t vd, vint8m1_t vs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVV8VInt16VBVIVIVI_TAMU, wmacc_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDInt8) +// vint16m2_t vwmacc_vx_int16m2_tamu (vbool8_t mask, vint16m2_t vd, int8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVX8VInt16VBVISIVI_TAMU, wmacc_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt8, OneDInt8) +// vint32m2_t vwmacc_vv_int32m2_tamu (vbool16_t mask, vint32m2_t vd, vint16m1_t vs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVV16VInt32VBVIVIVI_TAMU, wmacc_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDInt16) +// vint32m2_t vwmacc_vx_int32m2_tamu (vbool16_t mask, vint32m2_t vd, int16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVX16VInt32VBVISIVI_TAMU, wmacc_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt16, OneDInt16) +// vint64m2_t vwmacc_vv_int64m2_tamu (vbool32_t mask, vint64m2_t vd, vint32m1_t vs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVV32VInt64VBVIVIVI_TAMU, wmacc_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDInt32) +// vint64m2_t vwmacc_vx_int64m2_tamu (vbool32_t mask, vint64m2_t vd, int32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccVX32VInt64VBVISIVI_TAMU, wmacc_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt32, OneDInt32) +// vuint16m2_t vwmaccu_vv_uint16m2_tamu (vbool8_t mask, vuint16m2_t vd, vuint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVV8VUInt16VBVUVUVU_TAMU, wmaccu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt8, OneDUInt8) +// vuint16m2_t vwmaccu_vx_uint16m2_tamu (vbool8_t mask, vuint16m2_t vd, uint8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVX8VUInt16VBVUSUVU_TAMU, wmaccu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, ScalarUInt8, OneDUInt8) +// vuint32m2_t vwmaccu_vv_uint32m2_tamu (vbool16_t mask, vuint32m2_t vd, vuint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVV16VUInt32VBVUVUVU_TAMU, wmaccu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt16, OneDUInt16) +// vuint32m2_t vwmaccu_vx_uint32m2_tamu (vbool16_t mask, vuint32m2_t vd, uint16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVX16VUInt32VBVUSUVU_TAMU, wmaccu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, ScalarUInt16, OneDUInt16) +// vuint64m2_t vwmaccu_vv_uint64m2_tamu (vbool32_t mask, vuint64m2_t vd, vuint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVV32VUInt64VBVUVUVU_TAMU, wmaccu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt32, OneDUInt32) +// vuint64m2_t vwmaccu_vx_uint64m2_tamu (vbool32_t mask, vuint64m2_t vd, uint32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccuVX32VUInt64VBVUSUVU_TAMU, wmaccu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, ScalarUInt32, OneDUInt32) +// vint16m2_t vwmaccsu_vv_int16m2_tamu (vbool8_t mask, vint16m2_t vd, vint8m1_t vs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVV8VInt16VBVIVIVU_TAMU, wmaccsu_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt8, OneDUInt8) +// vint16m2_t vwmaccsu_vx_int16m2_tamu (vbool8_t mask, vint16m2_t vd, int8_t rs1, vuint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVX8VInt16VBVISIVU_TAMU, wmaccsu_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, ScalarInt8, OneDUInt8) +// vint32m2_t vwmaccsu_vv_int32m2_tamu (vbool16_t mask, vint32m2_t vd, vint16m1_t vs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVV16VInt32VBVIVIVU_TAMU, wmaccsu_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt16, OneDUInt16) +// vint32m2_t vwmaccsu_vx_int32m2_tamu (vbool16_t mask, vint32m2_t vd, int16_t rs1, vuint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVX16VInt32VBVISIVU_TAMU, wmaccsu_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, ScalarInt16, OneDUInt16) +// vint64m2_t vwmaccsu_vv_int64m2_tamu (vbool32_t mask, vint64m2_t vd, vint32m1_t vs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVV32VInt64VBVIVIVU_TAMU, wmaccsu_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt32, OneDUInt32) +// vint64m2_t vwmaccsu_vx_int64m2_tamu (vbool32_t mask, vint64m2_t vd, int32_t rs1, vuint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccsuVX32VInt64VBVISIVU_TAMU, wmaccsu_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, ScalarInt32, OneDUInt32) +// vint16m2_t vwmaccus_vx_int16m2_tamu (vbool8_t mask, vint16m2_t vd, uint8_t rs1, vint8m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccusVX8VInt16VBVISUVI_TAMU, wmaccus_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, ScalarUInt8, OneDInt8) +// vint32m2_t vwmaccus_vx_int32m2_tamu (vbool16_t mask, vint32m2_t vd, uint16_t rs1, vint16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccusVX16VInt32VBVISUVI_TAMU, wmaccus_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, ScalarUInt16, OneDInt16) +// vint64m2_t vwmaccus_vx_int64m2_tamu (vbool32_t mask, vint64m2_t vd, uint32_t rs1, vint32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(WmaccusVX32VInt64VBVISUVI_TAMU, wmaccus_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, ScalarUInt32, OneDInt32) + +// vint8m1_t vmerge_vvm_int8m1_tu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVVM8VInt8VBVIVIVI_TU, merge_vvm, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vmerge_vxm_int8m1_tu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVXM8VInt8VBVIVISI_TU, merge_vxm, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vmerge_vvm_int16m1_tu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVVM16VInt16VBVIVIVI_TU, merge_vvm, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vmerge_vxm_int16m1_tu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVXM16VInt16VBVIVISI_TU, merge_vxm, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vmerge_vvm_int32m1_tu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVVM32VInt32VBVIVIVI_TU, merge_vvm, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vmerge_vxm_int32m1_tu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVXM32VInt32VBVIVISI_TU, merge_vxm, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vmerge_vvm_int64m1_tu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVVM64VInt64VBVIVIVI_TU, merge_vvm, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vmerge_vxm_int64m1_tu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVXM64VInt64VBVIVISI_TU, merge_vxm, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vmerge_vvm_uint8m1_tu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVVM8VUInt8VBVUVUVU_TU, merge_vvm, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vmerge_vxm_uint8m1_tu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVXM8VUInt8VBVUVUSU_TU, merge_vxm, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vmerge_vvm_uint16m1_tu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVVM16VUInt16VBVUVUVU_TU, merge_vvm, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vmerge_vxm_uint16m1_tu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVXM16VUInt16VBVUVUSU_TU, merge_vxm, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vmerge_vvm_uint32m1_tu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVVM32VUInt32VBVUVUVU_TU, merge_vvm, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vmerge_vxm_uint32m1_tu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVXM32VUInt32VBVUVUSU_TU, merge_vxm, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vmerge_vvm_uint64m1_tu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVVM64VUInt64VBVUVUVU_TU, merge_vvm, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vmerge_vxm_uint64m1_tu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVXM64VUInt64VBVUVUSU_TU, merge_vxm, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vmerge_vvm_int8m1_ta (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVVM8VInt8VBVIVI_TA, merge_vvm, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint8m1_t vmerge_vxm_int8m1_ta (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVXM8VInt8VBVISI_TA, merge_vxm, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailAgnostic, OneDInt8, 3, OneDBool, OneDInt8, ScalarInt8) +// vint16m1_t vmerge_vvm_int16m1_ta (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVVM16VInt16VBVIVI_TA, merge_vvm, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint16m1_t vmerge_vxm_int16m1_ta (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVXM16VInt16VBVISI_TA, merge_vxm, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarInt16) +// vint32m1_t vmerge_vvm_int32m1_ta (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVVM32VInt32VBVIVI_TA, merge_vvm, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint32m1_t vmerge_vxm_int32m1_ta (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVXM32VInt32VBVISI_TA, merge_vxm, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarInt32) +// vint64m1_t vmerge_vvm_int64m1_ta (vbool64_t mask, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVVM64VInt64VBVIVI_TA, merge_vvm, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vint64m1_t vmerge_vxm_int64m1_ta (vbool64_t mask, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVXM64VInt64VBVISI_TA, merge_vxm, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarInt64) +// vuint8m1_t vmerge_vvm_uint8m1_ta (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVVM8VUInt8VBVUVU_TA, merge_vvm, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint8m1_t vmerge_vxm_uint8m1_ta (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVXM8VUInt8VBVUSU_TA, merge_vxm, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vuint16m1_t vmerge_vvm_uint16m1_ta (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVVM16VUInt16VBVUVU_TA, merge_vvm, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint16m1_t vmerge_vxm_uint16m1_ta (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVXM16VUInt16VBVUSU_TA, merge_vxm, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vuint32m1_t vmerge_vvm_uint32m1_ta (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVVM32VUInt32VBVUVU_TA, merge_vvm, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint32m1_t vmerge_vxm_uint32m1_ta (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVXM32VUInt32VBVUSU_TA, merge_vxm, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vuint64m1_t vmerge_vvm_uint64m1_ta (vbool64_t mask, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVVM64VUInt64VBVUVU_TA, merge_vvm, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vuint64m1_t vmerge_vxm_uint64m1_ta (vbool64_t mask, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVXM64VUInt64VBVUSU_TA, merge_vxm, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarUInt64) + +// vint8m1_t vmv_v_v_int8m1_tu (vint8m1_t merge, vint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(MvV8VInt8VIVI_TU, mv_v_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 2, OneDInt8, OneDInt8) +// vint8m1_t vmv_v_x_int8m1_tu (vint8m1_t merge, int8_t src, size_t vl); +CUSTOM_OP_TYPE(MvX8VInt8VISI_TU, mv_v_x, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 2, OneDInt8, ScalarInt8) +// vint16m1_t vmv_v_v_int16m1_tu (vint16m1_t merge, vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(MvV16VInt16VIVI_TU, mv_v_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 2, OneDInt16, OneDInt16) +// vint16m1_t vmv_v_x_int16m1_tu (vint16m1_t merge, int16_t src, size_t vl); +CUSTOM_OP_TYPE(MvX16VInt16VISI_TU, mv_v_x, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 2, OneDInt16, ScalarInt16) +// vint32m1_t vmv_v_v_int32m1_tu (vint32m1_t merge, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(MvV32VInt32VIVI_TU, mv_v_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 2, OneDInt32, OneDInt32) +// vint32m1_t vmv_v_x_int32m1_tu (vint32m1_t merge, int32_t src, size_t vl); +CUSTOM_OP_TYPE(MvX32VInt32VISI_TU, mv_v_x, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 2, OneDInt32, ScalarInt32) +// vint64m1_t vmv_v_v_int64m1_tu (vint64m1_t merge, vint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(MvV64VInt64VIVI_TU, mv_v_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 2, OneDInt64, OneDInt64) +// vint64m1_t vmv_v_x_int64m1_tu (vint64m1_t merge, int64_t src, size_t vl); +CUSTOM_OP_TYPE(MvX64VInt64VISI_TU, mv_v_x, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 2, OneDInt64, ScalarInt64) +// vuint8m1_t vmv_v_v_uint8m1_tu (vuint8m1_t merge, vuint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(MvV8VUInt8VUVU_TU, mv_v_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint8m1_t vmv_v_x_uint8m1_tu (vuint8m1_t merge, uint8_t src, size_t vl); +CUSTOM_OP_TYPE(MvX8VUInt8VUSU_TU, mv_v_x, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +// vuint16m1_t vmv_v_v_uint16m1_tu (vuint16m1_t merge, vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(MvV16VUInt16VUVU_TU, mv_v_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint16m1_t vmv_v_x_uint16m1_tu (vuint16m1_t merge, uint16_t src, size_t vl); +CUSTOM_OP_TYPE(MvX16VUInt16VUSU_TU, mv_v_x, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +// vuint32m1_t vmv_v_v_uint32m1_tu (vuint32m1_t merge, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(MvV32VUInt32VUVU_TU, mv_v_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint32m1_t vmv_v_x_uint32m1_tu (vuint32m1_t merge, uint32_t src, size_t vl); +CUSTOM_OP_TYPE(MvX32VUInt32VUSU_TU, mv_v_x, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +// vuint64m1_t vmv_v_v_uint64m1_tu (vuint64m1_t merge, vuint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(MvV64VUInt64VUVU_TU, mv_v_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vuint64m1_t vmv_v_x_uint64m1_tu (vuint64m1_t merge, uint64_t src, size_t vl); +CUSTOM_OP_TYPE(MvX64VUInt64VUSU_TU, mv_v_x, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +// vint8m1_t vmv_v_v_int8m1_ta (vint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(MvV8VInt8VI_TA, mv_v_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 1, OneDInt8) +// vint8m1_t vmv_v_x_int8m1_ta (int8_t src, size_t vl); +CUSTOM_OP_TYPE(MvX8VInt8SI_TA, mv_v_x, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 1, ScalarInt8) +// vint16m1_t vmv_v_v_int16m1_ta (vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(MvV16VInt16VI_TA, mv_v_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 1, OneDInt16) +// vint16m1_t vmv_v_x_int16m1_ta (int16_t src, size_t vl); +CUSTOM_OP_TYPE(MvX16VInt16SI_TA, mv_v_x, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 1, ScalarInt16) +// vint32m1_t vmv_v_v_int32m1_ta (vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(MvV32VInt32VI_TA, mv_v_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 1, OneDInt32) +// vint32m1_t vmv_v_x_int32m1_ta (int32_t src, size_t vl); +CUSTOM_OP_TYPE(MvX32VInt32SI_TA, mv_v_x, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 1, ScalarInt32) +// vint64m1_t vmv_v_v_int64m1_ta (vint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(MvV64VInt64VI_TA, mv_v_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 1, OneDInt64) +// vint64m1_t vmv_v_x_int64m1_ta (int64_t src, size_t vl); +CUSTOM_OP_TYPE(MvX64VInt64SI_TA, mv_v_x, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 1, ScalarInt64) +// vuint8m1_t vmv_v_v_uint8m1_ta (vuint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(MvV8VUInt8VU_TA, mv_v_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 1, OneDUInt8) +// vuint8m1_t vmv_v_x_uint8m1_ta (uint8_t src, size_t vl); +CUSTOM_OP_TYPE(MvX8VUInt8SU_TA, mv_v_x, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 1, ScalarUInt8) +// vuint16m1_t vmv_v_v_uint16m1_ta (vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(MvV16VUInt16VU_TA, mv_v_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 1, OneDUInt16) +// vuint16m1_t vmv_v_x_uint16m1_ta (uint16_t src, size_t vl); +CUSTOM_OP_TYPE(MvX16VUInt16SU_TA, mv_v_x, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 1, ScalarUInt16) +// vuint32m1_t vmv_v_v_uint32m1_ta (vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(MvV32VUInt32VU_TA, mv_v_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 1, OneDUInt32) +// vuint32m1_t vmv_v_x_uint32m1_ta (uint32_t src, size_t vl); +CUSTOM_OP_TYPE(MvX32VUInt32SU_TA, mv_v_x, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 1, ScalarUInt32) +// vuint64m1_t vmv_v_v_uint64m1_ta (vuint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(MvV64VUInt64VU_TA, mv_v_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 1, OneDUInt64) +// vuint64m1_t vmv_v_x_uint64m1_ta (uint64_t src, size_t vl); +CUSTOM_OP_TYPE(MvX64VUInt64SU_TA, mv_v_x, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 1, ScalarUInt64) + +// vint8m1_t vneg_v_int8m1_tu (vint8m1_t merge, vint8m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV8VInt8VIVI_TU, neg_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 2, OneDInt8, OneDInt8) +// vint16m1_t vneg_v_int16m1_tu (vint16m1_t merge, vint16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV16VInt16VIVI_TU, neg_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 2, OneDInt16, OneDInt16) +// vint32m1_t vneg_v_int32m1_tu (vint32m1_t merge, vint32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV32VInt32VIVI_TU, neg_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 2, OneDInt32, OneDInt32) +// vint64m1_t vneg_v_int64m1_tu (vint64m1_t merge, vint64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV64VInt64VIVI_TU, neg_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 2, OneDInt64, OneDInt64) +// vint8m1_t vneg_v_int8m1_ta (vint8m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV8VInt8VI_TA, neg_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 1, OneDInt8) +// vint16m1_t vneg_v_int16m1_ta (vint16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV16VInt16VI_TA, neg_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 1, OneDInt16) +// vint32m1_t vneg_v_int32m1_ta (vint32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV32VInt32VI_TA, neg_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 1, OneDInt32) +// vint64m1_t vneg_v_int64m1_ta (vint64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV64VInt64VI_TA, neg_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 1, OneDInt64) +// vint8m1_t vneg_v_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV8VInt8VBVIVI_TUMA, neg_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint16m1_t vneg_v_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV16VInt16VBVIVI_TUMA, neg_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint32m1_t vneg_v_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV32VInt32VBVIVI_TUMA, neg_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint64m1_t vneg_v_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV64VInt64VBVIVI_TUMA, neg_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vint8m1_t vneg_v_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV8VInt8VBVIVI_TUMU, neg_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint16m1_t vneg_v_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV16VInt16VBVIVI_TUMU, neg_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint32m1_t vneg_v_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV32VInt32VBVIVI_TUMU, neg_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint64m1_t vneg_v_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV64VInt64VBVIVI_TUMU, neg_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vint8m1_t vneg_v_int8m1_tama (vbool8_t mask, vint8m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV8VInt8VBVI_TAMA, neg_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 2, OneDBool, OneDInt8) +// vint16m1_t vneg_v_int16m1_tama (vbool16_t mask, vint16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV16VInt16VBVI_TAMA, neg_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 2, OneDBool, OneDInt16) +// vint32m1_t vneg_v_int32m1_tama (vbool32_t mask, vint32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV32VInt32VBVI_TAMA, neg_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 2, OneDBool, OneDInt32) +// vint64m1_t vneg_v_int64m1_tama (vbool64_t mask, vint64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV64VInt64VBVI_TAMA, neg_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 2, OneDBool, OneDInt64) +// vint8m1_t vneg_v_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV8VInt8VBVIVI_TAMU, neg_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint16m1_t vneg_v_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV16VInt16VBVIVI_TAMU, neg_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint32m1_t vneg_v_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV32VInt32VBVIVI_TAMU, neg_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint64m1_t vneg_v_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NegV64VInt64VBVIVI_TAMU, neg_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) + +// vint8m1_t vnot_v_int8m1_tu (vint8m1_t merge, vint8m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV8VInt8VIVI_TU, not_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 2, OneDInt8, OneDInt8) +// vint16m1_t vnot_v_int16m1_tu (vint16m1_t merge, vint16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV16VInt16VIVI_TU, not_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 2, OneDInt16, OneDInt16) +// vint32m1_t vnot_v_int32m1_tu (vint32m1_t merge, vint32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV32VInt32VIVI_TU, not_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 2, OneDInt32, OneDInt32) +// vint64m1_t vnot_v_int64m1_tu (vint64m1_t merge, vint64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV64VInt64VIVI_TU, not_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 2, OneDInt64, OneDInt64) +// vuint8m1_t vnot_v_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV8VUInt8VUVU_TU, not_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint16m1_t vnot_v_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV16VUInt16VUVU_TU, not_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint32m1_t vnot_v_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV32VUInt32VUVU_TU, not_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint64m1_t vnot_v_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV64VUInt64VUVU_TU, not_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vint8m1_t vnot_v_int8m1_ta (vint8m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV8VInt8VI_TA, not_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 1, OneDInt8) +// vint16m1_t vnot_v_int16m1_ta (vint16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV16VInt16VI_TA, not_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 1, OneDInt16) +// vint32m1_t vnot_v_int32m1_ta (vint32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV32VInt32VI_TA, not_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 1, OneDInt32) +// vint64m1_t vnot_v_int64m1_ta (vint64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV64VInt64VI_TA, not_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 1, OneDInt64) +// vuint8m1_t vnot_v_uint8m1_ta (vuint8m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV8VUInt8VU_TA, not_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 1, OneDUInt8) +// vuint16m1_t vnot_v_uint16m1_ta (vuint16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV16VUInt16VU_TA, not_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 1, OneDUInt16) +// vuint32m1_t vnot_v_uint32m1_ta (vuint32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV32VUInt32VU_TA, not_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 1, OneDUInt32) +// vuint64m1_t vnot_v_uint64m1_ta (vuint64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV64VUInt64VU_TA, not_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 1, OneDUInt64) +// vint8m1_t vnot_v_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV8VInt8VBVIVI_TUMA, not_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint16m1_t vnot_v_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV16VInt16VBVIVI_TUMA, not_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint32m1_t vnot_v_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV32VInt32VBVIVI_TUMA, not_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint64m1_t vnot_v_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV64VInt64VBVIVI_TUMA, not_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vuint8m1_t vnot_v_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV8VUInt8VBVUVU_TUMA, not_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint16m1_t vnot_v_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV16VUInt16VBVUVU_TUMA, not_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint32m1_t vnot_v_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV32VUInt32VBVUVU_TUMA, not_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint64m1_t vnot_v_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV64VUInt64VBVUVU_TUMA, not_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vint8m1_t vnot_v_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV8VInt8VBVIVI_TUMU, not_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint16m1_t vnot_v_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV16VInt16VBVIVI_TUMU, not_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint32m1_t vnot_v_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV32VInt32VBVIVI_TUMU, not_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint64m1_t vnot_v_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV64VInt64VBVIVI_TUMU, not_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vuint8m1_t vnot_v_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV8VUInt8VBVUVU_TUMU, not_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint16m1_t vnot_v_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV16VUInt16VBVUVU_TUMU, not_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint32m1_t vnot_v_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV32VUInt32VBVUVU_TUMU, not_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint64m1_t vnot_v_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV64VUInt64VBVUVU_TUMU, not_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vint8m1_t vnot_v_int8m1_tama (vbool8_t mask, vint8m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV8VInt8VBVI_TAMA, not_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 2, OneDBool, OneDInt8) +// vint16m1_t vnot_v_int16m1_tama (vbool16_t mask, vint16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV16VInt16VBVI_TAMA, not_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 2, OneDBool, OneDInt16) +// vint32m1_t vnot_v_int32m1_tama (vbool32_t mask, vint32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV32VInt32VBVI_TAMA, not_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 2, OneDBool, OneDInt32) +// vint64m1_t vnot_v_int64m1_tama (vbool64_t mask, vint64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV64VInt64VBVI_TAMA, not_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 2, OneDBool, OneDInt64) +// vuint8m1_t vnot_v_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV8VUInt8VBVU_TAMA, not_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 2, OneDBool, OneDUInt8) +// vuint16m1_t vnot_v_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV16VUInt16VBVU_TAMA, not_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 2, OneDBool, OneDUInt16) +// vuint32m1_t vnot_v_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV32VUInt32VBVU_TAMA, not_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 2, OneDBool, OneDUInt32) +// vuint64m1_t vnot_v_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV64VUInt64VBVU_TAMA, not_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 2, OneDBool, OneDUInt64) +// vint8m1_t vnot_v_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV8VInt8VBVIVI_TAMU, not_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint16m1_t vnot_v_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV16VInt16VBVIVI_TAMU, not_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint32m1_t vnot_v_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV32VInt32VBVIVI_TAMU, not_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint64m1_t vnot_v_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV64VInt64VBVIVI_TAMU, not_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vuint8m1_t vnot_v_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV8VUInt8VBVUVU_TAMU, not_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint16m1_t vnot_v_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV16VUInt16VBVUVU_TAMU, not_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint32m1_t vnot_v_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV32VUInt32VBVUVU_TAMU, not_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint64m1_t vnot_v_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(NotV64VUInt64VBVUVU_TAMU, not_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) + +// vint16m2_t vwcvt_x_x_v_i16m2_tu (vint16m2_t merge, vint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtV8VInt16VIVI_TU, wcvt_x_x_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt16, 2, OneDInt16, OneDInt8) +// vuint16m2_t vwcvtu_x_x_v_u16m2_tu (vuint16m2_t merge, vuint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtuV8VUInt16VUVU_TU, wcvtu_x_x_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt16, 2, OneDUInt16, OneDUInt8) +// vint32m2_t vwcvt_x_x_v_i32m2_tu (vint32m2_t merge, vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtV16VInt32VIVI_TU, wcvt_x_x_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt32, 2, OneDInt32, OneDInt16) +// vuint32m2_t vwcvtu_x_x_v_u32m2_tu (vuint32m2_t merge, vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtuV16VUInt32VUVU_TU, wcvtu_x_x_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt32, 2, OneDUInt32, OneDUInt16) +// vint64m2_t vwcvt_x_x_v_i64m2_tu (vint64m2_t merge, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtV32VInt64VIVI_TU, wcvt_x_x_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt64, 2, OneDInt64, OneDInt32) +// vuint64m2_t vwcvtu_x_x_v_u64m2_tu (vuint64m2_t merge, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtuV32VUInt64VUVU_TU, wcvtu_x_x_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt64, 2, OneDUInt64, OneDUInt32) +// vint16m2_t vwcvt_x_x_v_i16m2_ta (vint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtV8VInt16VI_TA, wcvt_x_x_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt16, 1, OneDInt8) +// vuint16m2_t vwcvtu_x_x_v_u16m2_ta (vuint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtuV8VUInt16VU_TA, wcvtu_x_x_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt16, 1, OneDUInt8) +// vint32m2_t vwcvt_x_x_v_i32m2_ta (vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtV16VInt32VI_TA, wcvt_x_x_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt32, 1, OneDInt16) +// vuint32m2_t vwcvtu_x_x_v_u32m2_ta (vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtuV16VUInt32VU_TA, wcvtu_x_x_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt32, 1, OneDUInt16) +// vint64m2_t vwcvt_x_x_v_i64m2_ta (vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtV32VInt64VI_TA, wcvt_x_x_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt64, 1, OneDInt32) +// vuint64m2_t vwcvtu_x_x_v_u64m2_ta (vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtuV32VUInt64VU_TA, wcvtu_x_x_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt64, 1, OneDUInt32) +// vint16m2_t vwcvt_x_x_v_i16m2_tuma (vbool8_t mask, vint16m2_t merge, vint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtV8VInt16VBVIVI_TUMA, wcvt_x_x_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt8) +// vuint16m2_t vwcvtu_x_x_v_u16m2_tuma (vbool8_t mask, vuint16m2_t merge, vuint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtuV8VUInt16VBVUVU_TUMA, wcvtu_x_x_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt8) +// vint32m2_t vwcvt_x_x_v_i32m2_tuma (vbool16_t mask, vint32m2_t merge, vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtV16VInt32VBVIVI_TUMA, wcvt_x_x_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt16) +// vuint32m2_t vwcvtu_x_x_v_u32m2_tuma (vbool16_t mask, vuint32m2_t merge, vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtuV16VUInt32VBVUVU_TUMA, wcvtu_x_x_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt16) +// vint64m2_t vwcvt_x_x_v_i64m2_tuma (vbool32_t mask, vint64m2_t merge, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtV32VInt64VBVIVI_TUMA, wcvt_x_x_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt32) +// vuint64m2_t vwcvtu_x_x_v_u64m2_tuma (vbool32_t mask, vuint64m2_t merge, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtuV32VUInt64VBVUVU_TUMA, wcvtu_x_x_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt32) +// vint16m2_t vwcvt_x_x_v_i16m2_tumu (vbool8_t mask, vint16m2_t merge, vint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtV8VInt16VBVIVI_TUMU, wcvt_x_x_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 3, OneDBool, OneDInt16, OneDInt8) +// vuint16m2_t vwcvtu_x_x_v_u16m2_tumu (vbool8_t mask, vuint16m2_t merge, vuint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtuV8VUInt16VBVUVU_TUMU, wcvtu_x_x_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt8) +// vint32m2_t vwcvt_x_x_v_i32m2_tumu (vbool16_t mask, vint32m2_t merge, vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtV16VInt32VBVIVI_TUMU, wcvt_x_x_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDInt16) +// vuint32m2_t vwcvtu_x_x_v_u32m2_tumu (vbool16_t mask, vuint32m2_t merge, vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtuV16VUInt32VBVUVU_TUMU, wcvtu_x_x_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt16) +// vint64m2_t vwcvt_x_x_v_i64m2_tumu (vbool32_t mask, vint64m2_t merge, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtV32VInt64VBVIVI_TUMU, wcvt_x_x_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 3, OneDBool, OneDInt64, OneDInt32) +// vuint64m2_t vwcvtu_x_x_v_u64m2_tumu (vbool32_t mask, vuint64m2_t merge, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtuV32VUInt64VBVUVU_TUMU, wcvtu_x_x_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt32) +// vint16m2_t vwcvt_x_x_v_i16m2_tama (vbool8_t mask, vint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtV8VInt16VBVI_TAMA, wcvt_x_x_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 2, OneDBool, OneDInt8) +// vuint16m2_t vwcvtu_x_x_v_u16m2_tama (vbool8_t mask, vuint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtuV8VUInt16VBVU_TAMA, wcvtu_x_x_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 2, OneDBool, OneDUInt8) +// vint32m2_t vwcvt_x_x_v_i32m2_tama (vbool16_t mask, vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtV16VInt32VBVI_TAMA, wcvt_x_x_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 2, OneDBool, OneDInt16) +// vuint32m2_t vwcvtu_x_x_v_u32m2_tama (vbool16_t mask, vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtuV16VUInt32VBVU_TAMA, wcvtu_x_x_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 2, OneDBool, OneDUInt16) +// vint64m2_t vwcvt_x_x_v_i64m2_tama (vbool32_t mask, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtV32VInt64VBVI_TAMA, wcvt_x_x_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 2, OneDBool, OneDInt32) +// vuint64m2_t vwcvtu_x_x_v_u64m2_tama (vbool32_t mask, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtuV32VUInt64VBVU_TAMA, wcvtu_x_x_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 2, OneDBool, OneDUInt32) +// vint16m2_t vwcvt_x_x_v_i16m2_tamu (vbool8_t mask, vint16m2_t merge, vint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtV8VInt16VBVIVI_TAMU, wcvt_x_x_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 3, OneDBool, OneDInt16, OneDInt8) +// vuint16m2_t vwcvtu_x_x_v_u16m2_tamu (vbool8_t mask, vuint16m2_t merge, vuint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtuV8VUInt16VBVUVU_TAMU, wcvtu_x_x_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt8) +// vint32m2_t vwcvt_x_x_v_i32m2_tamu (vbool16_t mask, vint32m2_t merge, vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtV16VInt32VBVIVI_TAMU, wcvt_x_x_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDInt16) +// vuint32m2_t vwcvtu_x_x_v_u32m2_tamu (vbool16_t mask, vuint32m2_t merge, vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtuV16VUInt32VBVUVU_TAMU, wcvtu_x_x_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt16) +// vint64m2_t vwcvt_x_x_v_i64m2_tamu (vbool32_t mask, vint64m2_t merge, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtV32VInt64VBVIVI_TAMU, wcvt_x_x_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 3, OneDBool, OneDInt64, OneDInt32) +// vuint64m2_t vwcvtu_x_x_v_u64m2_tamu (vbool32_t mask, vuint64m2_t merge, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(WcvtuV32VUInt64VBVUVU_TAMU, wcvtu_x_x_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt32) +// vint8mf2_t vncvt_x_x_w_i8mf2_tu (vint8mf2_t merge, vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV16VInt8VIVI_TU, ncvt_x_x_w, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDInt8, 2, OneDInt8, OneDInt16) +// vuint8mf2_t vncvt_x_x_w_u8mf2_tu (vuint8mf2_t merge, vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV16VUInt8VUVU_TU, ncvt_x_x_w, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDUInt8, 2, OneDUInt8, OneDUInt16) +// vint16mf2_t vncvt_x_x_w_i16mf2_tu (vint16mf2_t merge, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV32VInt16VIVI_TU, ncvt_x_x_w, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDInt16, 2, OneDInt16, OneDInt32) +// vuint16mf2_t vncvt_x_x_w_u16mf2_tu (vuint16mf2_t merge, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV32VUInt16VUVU_TU, ncvt_x_x_w, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDUInt16, 2, OneDUInt16, OneDUInt32) +// vint32mf2_t vncvt_x_x_w_i32mf2_tu (vint32mf2_t merge, vint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV64VInt32VIVI_TU, ncvt_x_x_w, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDInt32, 2, OneDInt32, OneDInt64) +// vuint32mf2_t vncvt_x_x_w_u32mf2_tu (vuint32mf2_t merge, vuint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV64VUInt32VUVU_TU, ncvt_x_x_w, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDUInt32, 2, OneDUInt32, OneDUInt64) +// vint8mf2_t vncvt_x_x_w_i8mf2_ta (vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV16VInt8VI_TA, ncvt_x_x_w, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDInt8, 1, OneDInt16) +// vuint8mf2_t vncvt_x_x_w_u8mf2_ta (vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV16VUInt8VU_TA, ncvt_x_x_w, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDUInt8, 1, OneDUInt16) +// vint16mf2_t vncvt_x_x_w_i16mf2_ta (vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV32VInt16VI_TA, ncvt_x_x_w, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDInt16, 1, OneDInt32) +// vuint16mf2_t vncvt_x_x_w_u16mf2_ta (vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV32VUInt16VU_TA, ncvt_x_x_w, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDUInt16, 1, OneDUInt32) +// vint32mf2_t vncvt_x_x_w_i32mf2_ta (vint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV64VInt32VI_TA, ncvt_x_x_w, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDInt32, 1, OneDInt64) +// vuint32mf2_t vncvt_x_x_w_u32mf2_ta (vuint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV64VUInt32VU_TA, ncvt_x_x_w, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDUInt32, 1, OneDUInt64) +// vint8mf2_t vncvt_x_x_w_i8mf2_tuma (vbool16_t mask, vint8mf2_t merge, vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV16VInt8VBVIVI_TUMA, ncvt_x_x_w, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDInt16) +// vuint8mf2_t vncvt_x_x_w_u8mf2_tuma (vbool16_t mask, vuint8mf2_t merge, vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV16VUInt8VBVUVU_TUMA, ncvt_x_x_w, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt16) +// vint16mf2_t vncvt_x_x_w_i16mf2_tuma (vbool32_t mask, vint16mf2_t merge, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV32VInt16VBVIVI_TUMA, ncvt_x_x_w, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt32) +// vuint16mf2_t vncvt_x_x_w_u16mf2_tuma (vbool32_t mask, vuint16mf2_t merge, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV32VUInt16VBVUVU_TUMA, ncvt_x_x_w, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt32) +// vint32mf2_t vncvt_x_x_w_i32mf2_tuma (vbool64_t mask, vint32mf2_t merge, vint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV64VInt32VBVIVI_TUMA, ncvt_x_x_w, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt64) +// vuint32mf2_t vncvt_x_x_w_u32mf2_tuma (vbool64_t mask, vuint32mf2_t merge, vuint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV64VUInt32VBVUVU_TUMA, ncvt_x_x_w, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt64) +// vint8mf2_t vncvt_x_x_w_i8mf2_tumu (vbool16_t mask, vint8mf2_t merge, vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV16VInt8VBVIVI_TUMU, ncvt_x_x_w, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 3, OneDBool, OneDInt8, OneDInt16) +// vuint8mf2_t vncvt_x_x_w_u8mf2_tumu (vbool16_t mask, vuint8mf2_t merge, vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV16VUInt8VBVUVU_TUMU, ncvt_x_x_w, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt16) +// vint16mf2_t vncvt_x_x_w_i16mf2_tumu (vbool32_t mask, vint16mf2_t merge, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV32VInt16VBVIVI_TUMU, ncvt_x_x_w, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 3, OneDBool, OneDInt16, OneDInt32) +// vuint16mf2_t vncvt_x_x_w_u16mf2_tumu (vbool32_t mask, vuint16mf2_t merge, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV32VUInt16VBVUVU_TUMU, ncvt_x_x_w, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt32) +// vint32mf2_t vncvt_x_x_w_i32mf2_tumu (vbool64_t mask, vint32mf2_t merge, vint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV64VInt32VBVIVI_TUMU, ncvt_x_x_w, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDInt64) +// vuint32mf2_t vncvt_x_x_w_u32mf2_tumu (vbool64_t mask, vuint32mf2_t merge, vuint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV64VUInt32VBVUVU_TUMU, ncvt_x_x_w, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt64) +// vint8mf2_t vncvt_x_x_w_i8mf2_tama (vbool16_t mask, vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV16VInt8VBVI_TAMA, ncvt_x_x_w, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 2, OneDBool, OneDInt16) +// vuint8mf2_t vncvt_x_x_w_u8mf2_tama (vbool16_t mask, vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV16VUInt8VBVU_TAMA, ncvt_x_x_w, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 2, OneDBool, OneDUInt16) +// vint16mf2_t vncvt_x_x_w_i16mf2_tama (vbool32_t mask, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV32VInt16VBVI_TAMA, ncvt_x_x_w, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 2, OneDBool, OneDInt32) +// vuint16mf2_t vncvt_x_x_w_u16mf2_tama (vbool32_t mask, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV32VUInt16VBVU_TAMA, ncvt_x_x_w, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 2, OneDBool, OneDUInt32) +// vint32mf2_t vncvt_x_x_w_i32mf2_tama (vbool64_t mask, vint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV64VInt32VBVI_TAMA, ncvt_x_x_w, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 2, OneDBool, OneDInt64) +// vuint32mf2_t vncvt_x_x_w_u32mf2_tama (vbool64_t mask, vuint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV64VUInt32VBVU_TAMA, ncvt_x_x_w, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 2, OneDBool, OneDUInt64) +// vint8mf2_t vncvt_x_x_w_i8mf2_tamu (vbool16_t mask, vint8mf2_t merge, vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV16VInt8VBVIVI_TAMU, ncvt_x_x_w, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 3, OneDBool, OneDInt8, OneDInt16) +// vuint8mf2_t vncvt_x_x_w_u8mf2_tamu (vbool16_t mask, vuint8mf2_t merge, vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV16VUInt8VBVUVU_TAMU, ncvt_x_x_w, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt16) +// vint16mf2_t vncvt_x_x_w_i16mf2_tamu (vbool32_t mask, vint16mf2_t merge, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV32VInt16VBVIVI_TAMU, ncvt_x_x_w, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 3, OneDBool, OneDInt16, OneDInt32) +// vuint16mf2_t vncvt_x_x_w_u16mf2_tamu (vbool32_t mask, vuint16mf2_t merge, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV32VUInt16VBVUVU_TAMU, ncvt_x_x_w, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt32) +// vint32mf2_t vncvt_x_x_w_i32mf2_tamu (vbool64_t mask, vint32mf2_t merge, vint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV64VInt32VBVIVI_TAMU, ncvt_x_x_w, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDInt64) +// vuint32mf2_t vncvt_x_x_w_u32mf2_tamu (vbool64_t mask, vuint32mf2_t merge, vuint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(NcvtV64VUInt32VBVUVU_TAMU, ncvt_x_x_w, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt64) + +// vint8m1_t vsadd_vv_int8m1_tu (vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV8VInt8VIVIVI_TU, sadd_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vsadd_vx_int8m1_tu (vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX8VInt8VIVISI_TU, sadd_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vsadd_vv_int16m1_tu (vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV16VInt16VIVIVI_TU, sadd_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vsadd_vx_int16m1_tu (vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX16VInt16VIVISI_TU, sadd_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vsadd_vv_int32m1_tu (vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV32VInt32VIVIVI_TU, sadd_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vsadd_vx_int32m1_tu (vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX32VInt32VIVISI_TU, sadd_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vsadd_vv_int64m1_tu (vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV64VInt64VIVIVI_TU, sadd_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vsadd_vx_int64m1_tu (vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX64VInt64VIVISI_TU, sadd_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vsaddu_vv_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV8VUInt8VUVUVU_TU, saddu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vsaddu_vx_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX8VUInt8VUVUSU_TU, saddu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vsaddu_vv_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV16VUInt16VUVUVU_TU, saddu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vsaddu_vx_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX16VUInt16VUVUSU_TU, saddu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vsaddu_vv_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV32VUInt32VUVUVU_TU, saddu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vsaddu_vx_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX32VUInt32VUVUSU_TU, saddu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vsaddu_vv_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV64VUInt64VUVUVU_TU, saddu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vsaddu_vx_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX64VUInt64VUVUSU_TU, saddu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vssub_vv_int8m1_tu (vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV8VInt8VIVIVI_TU, ssub_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vssub_vx_int8m1_tu (vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX8VInt8VIVISI_TU, ssub_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vssub_vv_int16m1_tu (vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV16VInt16VIVIVI_TU, ssub_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vssub_vx_int16m1_tu (vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX16VInt16VIVISI_TU, ssub_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vssub_vv_int32m1_tu (vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV32VInt32VIVIVI_TU, ssub_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vssub_vx_int32m1_tu (vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX32VInt32VIVISI_TU, ssub_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vssub_vv_int64m1_tu (vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV64VInt64VIVIVI_TU, ssub_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vssub_vx_int64m1_tu (vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX64VInt64VIVISI_TU, ssub_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vssubu_vv_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV8VUInt8VUVUVU_TU, ssubu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vssubu_vx_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX8VUInt8VUVUSU_TU, ssubu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vssubu_vv_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV16VUInt16VUVUVU_TU, ssubu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vssubu_vx_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX16VUInt16VUVUSU_TU, ssubu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vssubu_vv_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV32VUInt32VUVUVU_TU, ssubu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vssubu_vx_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX32VUInt32VUVUSU_TU, ssubu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vssubu_vv_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV64VUInt64VUVUVU_TU, ssubu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vssubu_vx_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX64VUInt64VUVUSU_TU, ssubu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vsadd_vv_int8m1_ta (vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV8VInt8VIVI_TA, sadd_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDInt8) +// vint8m1_t vsadd_vx_int8m1_ta (vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX8VInt8VISI_TA, sadd_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, ScalarInt8) +// vint16m1_t vsadd_vv_int16m1_ta (vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV16VInt16VIVI_TA, sadd_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDInt16) +// vint16m1_t vsadd_vx_int16m1_ta (vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX16VInt16VISI_TA, sadd_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarInt16) +// vint32m1_t vsadd_vv_int32m1_ta (vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV32VInt32VIVI_TA, sadd_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDInt32) +// vint32m1_t vsadd_vx_int32m1_ta (vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX32VInt32VISI_TA, sadd_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarInt32) +// vint64m1_t vsadd_vv_int64m1_ta (vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV64VInt64VIVI_TA, sadd_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDInt64) +// vint64m1_t vsadd_vx_int64m1_ta (vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX64VInt64VISI_TA, sadd_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarInt64) +// vuint8m1_t vsaddu_vv_uint8m1_ta (vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV8VUInt8VUVU_TA, saddu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint8m1_t vsaddu_vx_uint8m1_ta (vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX8VUInt8VUSU_TA, saddu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +// vuint16m1_t vsaddu_vv_uint16m1_ta (vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV16VUInt16VUVU_TA, saddu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint16m1_t vsaddu_vx_uint16m1_ta (vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX16VUInt16VUSU_TA, saddu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +// vuint32m1_t vsaddu_vv_uint32m1_ta (vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV32VUInt32VUVU_TA, saddu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint32m1_t vsaddu_vx_uint32m1_ta (vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX32VUInt32VUSU_TA, saddu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +// vuint64m1_t vsaddu_vv_uint64m1_ta (vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV64VUInt64VUVU_TA, saddu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vuint64m1_t vsaddu_vx_uint64m1_ta (vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX64VUInt64VUSU_TA, saddu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +// vint8m1_t vssub_vv_int8m1_ta (vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV8VInt8VIVI_TA, ssub_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDInt8) +// vint8m1_t vssub_vx_int8m1_ta (vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX8VInt8VISI_TA, ssub_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, ScalarInt8) +// vint16m1_t vssub_vv_int16m1_ta (vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV16VInt16VIVI_TA, ssub_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDInt16) +// vint16m1_t vssub_vx_int16m1_ta (vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX16VInt16VISI_TA, ssub_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarInt16) +// vint32m1_t vssub_vv_int32m1_ta (vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV32VInt32VIVI_TA, ssub_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDInt32) +// vint32m1_t vssub_vx_int32m1_ta (vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX32VInt32VISI_TA, ssub_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarInt32) +// vint64m1_t vssub_vv_int64m1_ta (vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV64VInt64VIVI_TA, ssub_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDInt64) +// vint64m1_t vssub_vx_int64m1_ta (vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX64VInt64VISI_TA, ssub_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarInt64) +// vuint8m1_t vssubu_vv_uint8m1_ta (vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV8VUInt8VUVU_TA, ssubu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint8m1_t vssubu_vx_uint8m1_ta (vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX8VUInt8VUSU_TA, ssubu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +// vuint16m1_t vssubu_vv_uint16m1_ta (vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV16VUInt16VUVU_TA, ssubu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint16m1_t vssubu_vx_uint16m1_ta (vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX16VUInt16VUSU_TA, ssubu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +// vuint32m1_t vssubu_vv_uint32m1_ta (vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV32VUInt32VUVU_TA, ssubu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint32m1_t vssubu_vx_uint32m1_ta (vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX32VUInt32VUSU_TA, ssubu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +// vuint64m1_t vssubu_vv_uint64m1_ta (vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV64VUInt64VUVU_TA, ssubu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vuint64m1_t vssubu_vx_uint64m1_ta (vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX64VUInt64VUSU_TA, ssubu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +// vint8m1_t vsadd_vv_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV8VInt8VBVIVIVI_TUMA, sadd_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vsadd_vx_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX8VInt8VBVIVISI_TUMA, sadd_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vsadd_vv_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV16VInt16VBVIVIVI_TUMA, sadd_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vsadd_vx_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX16VInt16VBVIVISI_TUMA, sadd_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vsadd_vv_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV32VInt32VBVIVIVI_TUMA, sadd_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vsadd_vx_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX32VInt32VBVIVISI_TUMA, sadd_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vsadd_vv_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV64VInt64VBVIVIVI_TUMA, sadd_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vsadd_vx_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX64VInt64VBVIVISI_TUMA, sadd_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vsaddu_vv_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV8VUInt8VBVUVUVU_TUMA, saddu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vsaddu_vx_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX8VUInt8VBVUVUSU_TUMA, saddu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vsaddu_vv_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV16VUInt16VBVUVUVU_TUMA, saddu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vsaddu_vx_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX16VUInt16VBVUVUSU_TUMA, saddu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vsaddu_vv_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV32VUInt32VBVUVUVU_TUMA, saddu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vsaddu_vx_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX32VUInt32VBVUVUSU_TUMA, saddu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vsaddu_vv_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV64VUInt64VBVUVUVU_TUMA, saddu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vsaddu_vx_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX64VUInt64VBVUVUSU_TUMA, saddu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vssub_vv_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV8VInt8VBVIVIVI_TUMA, ssub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vssub_vx_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX8VInt8VBVIVISI_TUMA, ssub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vssub_vv_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV16VInt16VBVIVIVI_TUMA, ssub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vssub_vx_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX16VInt16VBVIVISI_TUMA, ssub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vssub_vv_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV32VInt32VBVIVIVI_TUMA, ssub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vssub_vx_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX32VInt32VBVIVISI_TUMA, ssub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vssub_vv_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV64VInt64VBVIVIVI_TUMA, ssub_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vssub_vx_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX64VInt64VBVIVISI_TUMA, ssub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vssubu_vv_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV8VUInt8VBVUVUVU_TUMA, ssubu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vssubu_vx_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX8VUInt8VBVUVUSU_TUMA, ssubu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vssubu_vv_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV16VUInt16VBVUVUVU_TUMA, ssubu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vssubu_vx_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX16VUInt16VBVUVUSU_TUMA, ssubu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vssubu_vv_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV32VUInt32VBVUVUVU_TUMA, ssubu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vssubu_vx_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX32VUInt32VBVUVUSU_TUMA, ssubu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vssubu_vv_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV64VUInt64VBVUVUVU_TUMA, ssubu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vssubu_vx_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX64VUInt64VBVUVUSU_TUMA, ssubu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vsadd_vv_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV8VInt8VBVIVIVI_TUMU, sadd_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vsadd_vx_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX8VInt8VBVIVISI_TUMU, sadd_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vsadd_vv_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV16VInt16VBVIVIVI_TUMU, sadd_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vsadd_vx_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX16VInt16VBVIVISI_TUMU, sadd_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vsadd_vv_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV32VInt32VBVIVIVI_TUMU, sadd_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vsadd_vx_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX32VInt32VBVIVISI_TUMU, sadd_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vsadd_vv_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV64VInt64VBVIVIVI_TUMU, sadd_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vsadd_vx_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX64VInt64VBVIVISI_TUMU, sadd_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vsaddu_vv_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV8VUInt8VBVUVUVU_TUMU, saddu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vsaddu_vx_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX8VUInt8VBVUVUSU_TUMU, saddu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vsaddu_vv_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV16VUInt16VBVUVUVU_TUMU, saddu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vsaddu_vx_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX16VUInt16VBVUVUSU_TUMU, saddu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vsaddu_vv_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV32VUInt32VBVUVUVU_TUMU, saddu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vsaddu_vx_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX32VUInt32VBVUVUSU_TUMU, saddu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vsaddu_vv_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV64VUInt64VBVUVUVU_TUMU, saddu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vsaddu_vx_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX64VUInt64VBVUVUSU_TUMU, saddu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vssub_vv_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV8VInt8VBVIVIVI_TUMU, ssub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vssub_vx_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX8VInt8VBVIVISI_TUMU, ssub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vssub_vv_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV16VInt16VBVIVIVI_TUMU, ssub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vssub_vx_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX16VInt16VBVIVISI_TUMU, ssub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vssub_vv_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV32VInt32VBVIVIVI_TUMU, ssub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vssub_vx_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX32VInt32VBVIVISI_TUMU, ssub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vssub_vv_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV64VInt64VBVIVIVI_TUMU, ssub_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vssub_vx_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX64VInt64VBVIVISI_TUMU, ssub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vssubu_vv_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV8VUInt8VBVUVUVU_TUMU, ssubu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vssubu_vx_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX8VUInt8VBVUVUSU_TUMU, ssubu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vssubu_vv_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV16VUInt16VBVUVUVU_TUMU, ssubu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vssubu_vx_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX16VUInt16VBVUVUSU_TUMU, ssubu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vssubu_vv_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV32VUInt32VBVUVUVU_TUMU, ssubu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vssubu_vx_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX32VUInt32VBVUVUSU_TUMU, ssubu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vssubu_vv_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV64VUInt64VBVUVUVU_TUMU, ssubu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vssubu_vx_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX64VUInt64VBVUVUSU_TUMU, ssubu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vsadd_vv_int8m1_tama (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV8VInt8VBVIVI_TAMA, sadd_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint8m1_t vsadd_vx_int8m1_tama (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX8VInt8VBVISI_TAMA, sadd_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, ScalarInt8) +// vint16m1_t vsadd_vv_int16m1_tama (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV16VInt16VBVIVI_TAMA, sadd_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint16m1_t vsadd_vx_int16m1_tama (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX16VInt16VBVISI_TAMA, sadd_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarInt16) +// vint32m1_t vsadd_vv_int32m1_tama (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV32VInt32VBVIVI_TAMA, sadd_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint32m1_t vsadd_vx_int32m1_tama (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX32VInt32VBVISI_TAMA, sadd_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarInt32) +// vint64m1_t vsadd_vv_int64m1_tama (vbool64_t mask, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV64VInt64VBVIVI_TAMA, sadd_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vint64m1_t vsadd_vx_int64m1_tama (vbool64_t mask, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX64VInt64VBVISI_TAMA, sadd_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarInt64) +// vuint8m1_t vsaddu_vv_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV8VUInt8VBVUVU_TAMA, saddu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint8m1_t vsaddu_vx_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX8VUInt8VBVUSU_TAMA, saddu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vuint16m1_t vsaddu_vv_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV16VUInt16VBVUVU_TAMA, saddu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint16m1_t vsaddu_vx_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX16VUInt16VBVUSU_TAMA, saddu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vuint32m1_t vsaddu_vv_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV32VUInt32VBVUVU_TAMA, saddu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint32m1_t vsaddu_vx_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX32VUInt32VBVUSU_TAMA, saddu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vuint64m1_t vsaddu_vv_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV64VUInt64VBVUVU_TAMA, saddu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vuint64m1_t vsaddu_vx_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX64VUInt64VBVUSU_TAMA, saddu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarUInt64) +// vint8m1_t vssub_vv_int8m1_tama (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV8VInt8VBVIVI_TAMA, ssub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint8m1_t vssub_vx_int8m1_tama (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX8VInt8VBVISI_TAMA, ssub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, ScalarInt8) +// vint16m1_t vssub_vv_int16m1_tama (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV16VInt16VBVIVI_TAMA, ssub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint16m1_t vssub_vx_int16m1_tama (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX16VInt16VBVISI_TAMA, ssub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarInt16) +// vint32m1_t vssub_vv_int32m1_tama (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV32VInt32VBVIVI_TAMA, ssub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint32m1_t vssub_vx_int32m1_tama (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX32VInt32VBVISI_TAMA, ssub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarInt32) +// vint64m1_t vssub_vv_int64m1_tama (vbool64_t mask, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV64VInt64VBVIVI_TAMA, ssub_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vint64m1_t vssub_vx_int64m1_tama (vbool64_t mask, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX64VInt64VBVISI_TAMA, ssub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarInt64) +// vuint8m1_t vssubu_vv_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV8VUInt8VBVUVU_TAMA, ssubu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint8m1_t vssubu_vx_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX8VUInt8VBVUSU_TAMA, ssubu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vuint16m1_t vssubu_vv_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV16VUInt16VBVUVU_TAMA, ssubu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint16m1_t vssubu_vx_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX16VUInt16VBVUSU_TAMA, ssubu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vuint32m1_t vssubu_vv_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV32VUInt32VBVUVU_TAMA, ssubu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint32m1_t vssubu_vx_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX32VUInt32VBVUSU_TAMA, ssubu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vuint64m1_t vssubu_vv_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV64VUInt64VBVUVU_TAMA, ssubu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vuint64m1_t vssubu_vx_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX64VUInt64VBVUSU_TAMA, ssubu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarUInt64) +// vint8m1_t vsadd_vv_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV8VInt8VBVIVIVI_TAMU, sadd_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vsadd_vx_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX8VInt8VBVIVISI_TAMU, sadd_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vsadd_vv_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV16VInt16VBVIVIVI_TAMU, sadd_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vsadd_vx_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX16VInt16VBVIVISI_TAMU, sadd_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vsadd_vv_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV32VInt32VBVIVIVI_TAMU, sadd_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vsadd_vx_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX32VInt32VBVIVISI_TAMU, sadd_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vsadd_vv_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVV64VInt64VBVIVIVI_TAMU, sadd_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vsadd_vx_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SaddVX64VInt64VBVIVISI_TAMU, sadd_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vsaddu_vv_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV8VUInt8VBVUVUVU_TAMU, saddu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vsaddu_vx_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX8VUInt8VBVUVUSU_TAMU, saddu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vsaddu_vv_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV16VUInt16VBVUVUVU_TAMU, saddu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vsaddu_vx_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX16VUInt16VBVUVUSU_TAMU, saddu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vsaddu_vv_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV32VUInt32VBVUVUVU_TAMU, saddu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vsaddu_vx_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX32VUInt32VBVUVUSU_TAMU, saddu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vsaddu_vv_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVV64VUInt64VBVUVUVU_TAMU, saddu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vsaddu_vx_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(SadduVX64VUInt64VBVUVUSU_TAMU, saddu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vssub_vv_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV8VInt8VBVIVIVI_TAMU, ssub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vssub_vx_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX8VInt8VBVIVISI_TAMU, ssub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vssub_vv_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV16VInt16VBVIVIVI_TAMU, ssub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vssub_vx_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX16VInt16VBVIVISI_TAMU, ssub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vssub_vv_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV32VInt32VBVIVIVI_TAMU, ssub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vssub_vx_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX32VInt32VBVIVISI_TAMU, ssub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vssub_vv_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVV64VInt64VBVIVIVI_TAMU, ssub_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vssub_vx_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubVX64VInt64VBVIVISI_TAMU, ssub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vssubu_vv_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV8VUInt8VBVUVUVU_TAMU, ssubu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vssubu_vx_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX8VUInt8VBVUVUSU_TAMU, ssubu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vssubu_vv_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV16VUInt16VBVUVUVU_TAMU, ssubu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vssubu_vx_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX16VUInt16VBVUVUSU_TAMU, ssubu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vssubu_vv_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV32VUInt32VBVUVUVU_TAMU, ssubu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vssubu_vx_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX32VUInt32VBVUVUSU_TAMU, ssubu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vssubu_vv_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVV64VUInt64VBVUVUVU_TAMU, ssubu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vssubu_vx_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(SsubuVX64VUInt64VBVUVUSU_TAMU, ssubu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) + +// vint8m1_t vaadd_vv_int8m1_tu (vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV8VInt8VIVIVI_TU, aadd_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vaadd_vx_int8m1_tu (vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX8VInt8VIVISI_TU, aadd_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vaadd_vv_int16m1_tu (vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV16VInt16VIVIVI_TU, aadd_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vaadd_vx_int16m1_tu (vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX16VInt16VIVISI_TU, aadd_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vaadd_vv_int32m1_tu (vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV32VInt32VIVIVI_TU, aadd_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vaadd_vx_int32m1_tu (vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX32VInt32VIVISI_TU, aadd_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vaadd_vv_int64m1_tu (vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV64VInt64VIVIVI_TU, aadd_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vaadd_vx_int64m1_tu (vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX64VInt64VIVISI_TU, aadd_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vaaddu_vv_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV8VUInt8VUVUVU_TU, aaddu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vaaddu_vx_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX8VUInt8VUVUSU_TU, aaddu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vaaddu_vv_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV16VUInt16VUVUVU_TU, aaddu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vaaddu_vx_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX16VUInt16VUVUSU_TU, aaddu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vaaddu_vv_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV32VUInt32VUVUVU_TU, aaddu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vaaddu_vx_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX32VUInt32VUVUSU_TU, aaddu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vaaddu_vv_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV64VUInt64VUVUVU_TU, aaddu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vaaddu_vx_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX64VUInt64VUVUSU_TU, aaddu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vasub_vv_int8m1_tu (vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV8VInt8VIVIVI_TU, asub_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vasub_vx_int8m1_tu (vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX8VInt8VIVISI_TU, asub_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vasub_vv_int16m1_tu (vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV16VInt16VIVIVI_TU, asub_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vasub_vx_int16m1_tu (vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX16VInt16VIVISI_TU, asub_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vasub_vv_int32m1_tu (vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV32VInt32VIVIVI_TU, asub_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vasub_vx_int32m1_tu (vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX32VInt32VIVISI_TU, asub_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vasub_vv_int64m1_tu (vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV64VInt64VIVIVI_TU, asub_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vasub_vx_int64m1_tu (vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX64VInt64VIVISI_TU, asub_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vasubu_vv_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV8VUInt8VUVUVU_TU, asubu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vasubu_vx_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX8VUInt8VUVUSU_TU, asubu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vasubu_vv_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV16VUInt16VUVUVU_TU, asubu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vasubu_vx_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX16VUInt16VUVUSU_TU, asubu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vasubu_vv_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV32VUInt32VUVUVU_TU, asubu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vasubu_vx_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX32VUInt32VUVUSU_TU, asubu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vasubu_vv_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV64VUInt64VUVUVU_TU, asubu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vasubu_vx_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX64VUInt64VUVUSU_TU, asubu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vaadd_vv_int8m1_ta (vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV8VInt8VIVI_TA, aadd_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDInt8) +// vint8m1_t vaadd_vx_int8m1_ta (vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX8VInt8VISI_TA, aadd_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, ScalarInt8) +// vint16m1_t vaadd_vv_int16m1_ta (vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV16VInt16VIVI_TA, aadd_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDInt16) +// vint16m1_t vaadd_vx_int16m1_ta (vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX16VInt16VISI_TA, aadd_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarInt16) +// vint32m1_t vaadd_vv_int32m1_ta (vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV32VInt32VIVI_TA, aadd_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDInt32) +// vint32m1_t vaadd_vx_int32m1_ta (vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX32VInt32VISI_TA, aadd_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarInt32) +// vint64m1_t vaadd_vv_int64m1_ta (vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV64VInt64VIVI_TA, aadd_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDInt64) +// vint64m1_t vaadd_vx_int64m1_ta (vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX64VInt64VISI_TA, aadd_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarInt64) +// vuint8m1_t vaaddu_vv_uint8m1_ta (vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV8VUInt8VUVU_TA, aaddu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint8m1_t vaaddu_vx_uint8m1_ta (vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX8VUInt8VUSU_TA, aaddu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +// vuint16m1_t vaaddu_vv_uint16m1_ta (vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV16VUInt16VUVU_TA, aaddu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint16m1_t vaaddu_vx_uint16m1_ta (vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX16VUInt16VUSU_TA, aaddu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +// vuint32m1_t vaaddu_vv_uint32m1_ta (vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV32VUInt32VUVU_TA, aaddu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint32m1_t vaaddu_vx_uint32m1_ta (vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX32VUInt32VUSU_TA, aaddu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +// vuint64m1_t vaaddu_vv_uint64m1_ta (vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV64VUInt64VUVU_TA, aaddu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vuint64m1_t vaaddu_vx_uint64m1_ta (vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX64VUInt64VUSU_TA, aaddu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +// vint8m1_t vasub_vv_int8m1_ta (vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV8VInt8VIVI_TA, asub_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDInt8) +// vint8m1_t vasub_vx_int8m1_ta (vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX8VInt8VISI_TA, asub_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, ScalarInt8) +// vint16m1_t vasub_vv_int16m1_ta (vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV16VInt16VIVI_TA, asub_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDInt16) +// vint16m1_t vasub_vx_int16m1_ta (vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX16VInt16VISI_TA, asub_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarInt16) +// vint32m1_t vasub_vv_int32m1_ta (vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV32VInt32VIVI_TA, asub_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDInt32) +// vint32m1_t vasub_vx_int32m1_ta (vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX32VInt32VISI_TA, asub_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarInt32) +// vint64m1_t vasub_vv_int64m1_ta (vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV64VInt64VIVI_TA, asub_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDInt64) +// vint64m1_t vasub_vx_int64m1_ta (vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX64VInt64VISI_TA, asub_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarInt64) +// vuint8m1_t vasubu_vv_uint8m1_ta (vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV8VUInt8VUVU_TA, asubu_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint8m1_t vasubu_vx_uint8m1_ta (vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX8VUInt8VUSU_TA, asubu_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, ScalarUInt8) +// vuint16m1_t vasubu_vv_uint16m1_ta (vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV16VUInt16VUVU_TA, asubu_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint16m1_t vasubu_vx_uint16m1_ta (vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX16VUInt16VUSU_TA, asubu_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, ScalarUInt16) +// vuint32m1_t vasubu_vv_uint32m1_ta (vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV32VUInt32VUVU_TA, asubu_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint32m1_t vasubu_vx_uint32m1_ta (vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX32VUInt32VUSU_TA, asubu_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, ScalarUInt32) +// vuint64m1_t vasubu_vv_uint64m1_ta (vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV64VUInt64VUVU_TA, asubu_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vuint64m1_t vasubu_vx_uint64m1_ta (vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX64VUInt64VUSU_TA, asubu_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, ScalarUInt64) +// vint8m1_t vaadd_vv_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV8VInt8VBVIVIVI_TUMA, aadd_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vaadd_vx_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX8VInt8VBVIVISI_TUMA, aadd_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vaadd_vv_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV16VInt16VBVIVIVI_TUMA, aadd_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vaadd_vx_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX16VInt16VBVIVISI_TUMA, aadd_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vaadd_vv_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV32VInt32VBVIVIVI_TUMA, aadd_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vaadd_vx_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX32VInt32VBVIVISI_TUMA, aadd_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vaadd_vv_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV64VInt64VBVIVIVI_TUMA, aadd_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vaadd_vx_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX64VInt64VBVIVISI_TUMA, aadd_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vaaddu_vv_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV8VUInt8VBVUVUVU_TUMA, aaddu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vaaddu_vx_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX8VUInt8VBVUVUSU_TUMA, aaddu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vaaddu_vv_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV16VUInt16VBVUVUVU_TUMA, aaddu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vaaddu_vx_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX16VUInt16VBVUVUSU_TUMA, aaddu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vaaddu_vv_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV32VUInt32VBVUVUVU_TUMA, aaddu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vaaddu_vx_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX32VUInt32VBVUVUSU_TUMA, aaddu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vaaddu_vv_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV64VUInt64VBVUVUVU_TUMA, aaddu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vaaddu_vx_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX64VUInt64VBVUVUSU_TUMA, aaddu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vasub_vv_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV8VInt8VBVIVIVI_TUMA, asub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vasub_vx_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX8VInt8VBVIVISI_TUMA, asub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vasub_vv_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV16VInt16VBVIVIVI_TUMA, asub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vasub_vx_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX16VInt16VBVIVISI_TUMA, asub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vasub_vv_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV32VInt32VBVIVIVI_TUMA, asub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vasub_vx_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX32VInt32VBVIVISI_TUMA, asub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vasub_vv_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV64VInt64VBVIVIVI_TUMA, asub_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vasub_vx_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX64VInt64VBVIVISI_TUMA, asub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vasubu_vv_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV8VUInt8VBVUVUVU_TUMA, asubu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vasubu_vx_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX8VUInt8VBVUVUSU_TUMA, asubu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vasubu_vv_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV16VUInt16VBVUVUVU_TUMA, asubu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vasubu_vx_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX16VUInt16VBVUVUSU_TUMA, asubu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vasubu_vv_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV32VUInt32VBVUVUVU_TUMA, asubu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vasubu_vx_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX32VUInt32VBVUVUSU_TUMA, asubu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vasubu_vv_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV64VUInt64VBVUVUVU_TUMA, asubu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vasubu_vx_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX64VUInt64VBVUVUSU_TUMA, asubu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vaadd_vv_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV8VInt8VBVIVIVI_TUMU, aadd_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vaadd_vx_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX8VInt8VBVIVISI_TUMU, aadd_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vaadd_vv_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV16VInt16VBVIVIVI_TUMU, aadd_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vaadd_vx_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX16VInt16VBVIVISI_TUMU, aadd_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vaadd_vv_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV32VInt32VBVIVIVI_TUMU, aadd_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vaadd_vx_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX32VInt32VBVIVISI_TUMU, aadd_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vaadd_vv_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV64VInt64VBVIVIVI_TUMU, aadd_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vaadd_vx_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX64VInt64VBVIVISI_TUMU, aadd_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vaaddu_vv_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV8VUInt8VBVUVUVU_TUMU, aaddu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vaaddu_vx_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX8VUInt8VBVUVUSU_TUMU, aaddu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vaaddu_vv_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV16VUInt16VBVUVUVU_TUMU, aaddu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vaaddu_vx_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX16VUInt16VBVUVUSU_TUMU, aaddu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vaaddu_vv_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV32VUInt32VBVUVUVU_TUMU, aaddu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vaaddu_vx_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX32VUInt32VBVUVUSU_TUMU, aaddu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vaaddu_vv_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV64VUInt64VBVUVUVU_TUMU, aaddu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vaaddu_vx_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX64VUInt64VBVUVUSU_TUMU, aaddu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vasub_vv_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV8VInt8VBVIVIVI_TUMU, asub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vasub_vx_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX8VInt8VBVIVISI_TUMU, asub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vasub_vv_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV16VInt16VBVIVIVI_TUMU, asub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vasub_vx_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX16VInt16VBVIVISI_TUMU, asub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vasub_vv_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV32VInt32VBVIVIVI_TUMU, asub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vasub_vx_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX32VInt32VBVIVISI_TUMU, asub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vasub_vv_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV64VInt64VBVIVIVI_TUMU, asub_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vasub_vx_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX64VInt64VBVIVISI_TUMU, asub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vasubu_vv_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV8VUInt8VBVUVUVU_TUMU, asubu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vasubu_vx_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX8VUInt8VBVUVUSU_TUMU, asubu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vasubu_vv_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV16VUInt16VBVUVUVU_TUMU, asubu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vasubu_vx_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX16VUInt16VBVUVUSU_TUMU, asubu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vasubu_vv_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV32VUInt32VBVUVUVU_TUMU, asubu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vasubu_vx_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX32VUInt32VBVUVUSU_TUMU, asubu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vasubu_vv_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV64VUInt64VBVUVUVU_TUMU, asubu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vasubu_vx_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX64VUInt64VBVUVUSU_TUMU, asubu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vaadd_vv_int8m1_tama (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV8VInt8VBVIVI_TAMA, aadd_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint8m1_t vaadd_vx_int8m1_tama (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX8VInt8VBVISI_TAMA, aadd_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, ScalarInt8) +// vint16m1_t vaadd_vv_int16m1_tama (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV16VInt16VBVIVI_TAMA, aadd_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint16m1_t vaadd_vx_int16m1_tama (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX16VInt16VBVISI_TAMA, aadd_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarInt16) +// vint32m1_t vaadd_vv_int32m1_tama (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV32VInt32VBVIVI_TAMA, aadd_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint32m1_t vaadd_vx_int32m1_tama (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX32VInt32VBVISI_TAMA, aadd_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarInt32) +// vint64m1_t vaadd_vv_int64m1_tama (vbool64_t mask, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV64VInt64VBVIVI_TAMA, aadd_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vint64m1_t vaadd_vx_int64m1_tama (vbool64_t mask, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX64VInt64VBVISI_TAMA, aadd_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarInt64) +// vuint8m1_t vaaddu_vv_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV8VUInt8VBVUVU_TAMA, aaddu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint8m1_t vaaddu_vx_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX8VUInt8VBVUSU_TAMA, aaddu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vuint16m1_t vaaddu_vv_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV16VUInt16VBVUVU_TAMA, aaddu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint16m1_t vaaddu_vx_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX16VUInt16VBVUSU_TAMA, aaddu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vuint32m1_t vaaddu_vv_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV32VUInt32VBVUVU_TAMA, aaddu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint32m1_t vaaddu_vx_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX32VUInt32VBVUSU_TAMA, aaddu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vuint64m1_t vaaddu_vv_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV64VUInt64VBVUVU_TAMA, aaddu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vuint64m1_t vaaddu_vx_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX64VUInt64VBVUSU_TAMA, aaddu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarUInt64) +// vint8m1_t vasub_vv_int8m1_tama (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV8VInt8VBVIVI_TAMA, asub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint8m1_t vasub_vx_int8m1_tama (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX8VInt8VBVISI_TAMA, asub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, ScalarInt8) +// vint16m1_t vasub_vv_int16m1_tama (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV16VInt16VBVIVI_TAMA, asub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint16m1_t vasub_vx_int16m1_tama (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX16VInt16VBVISI_TAMA, asub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarInt16) +// vint32m1_t vasub_vv_int32m1_tama (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV32VInt32VBVIVI_TAMA, asub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint32m1_t vasub_vx_int32m1_tama (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX32VInt32VBVISI_TAMA, asub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarInt32) +// vint64m1_t vasub_vv_int64m1_tama (vbool64_t mask, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV64VInt64VBVIVI_TAMA, asub_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vint64m1_t vasub_vx_int64m1_tama (vbool64_t mask, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX64VInt64VBVISI_TAMA, asub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarInt64) +// vuint8m1_t vasubu_vv_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV8VUInt8VBVUVU_TAMA, asubu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint8m1_t vasubu_vx_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX8VUInt8VBVUSU_TAMA, asubu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, ScalarUInt8) +// vuint16m1_t vasubu_vv_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV16VUInt16VBVUVU_TAMA, asubu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint16m1_t vasubu_vx_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX16VUInt16VBVUSU_TAMA, asubu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarUInt16) +// vuint32m1_t vasubu_vv_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV32VUInt32VBVUVU_TAMA, asubu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint32m1_t vasubu_vx_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX32VUInt32VBVUSU_TAMA, asubu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarUInt32) +// vuint64m1_t vasubu_vv_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV64VUInt64VBVUVU_TAMA, asubu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vuint64m1_t vasubu_vx_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX64VUInt64VBVUSU_TAMA, asubu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarUInt64) +// vint8m1_t vaadd_vv_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV8VInt8VBVIVIVI_TAMU, aadd_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vaadd_vx_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX8VInt8VBVIVISI_TAMU, aadd_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vaadd_vv_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV16VInt16VBVIVIVI_TAMU, aadd_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vaadd_vx_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX16VInt16VBVIVISI_TAMU, aadd_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vaadd_vv_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV32VInt32VBVIVIVI_TAMU, aadd_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vaadd_vx_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX32VInt32VBVIVISI_TAMU, aadd_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vaadd_vv_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVV64VInt64VBVIVIVI_TAMU, aadd_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vaadd_vx_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(AaddVX64VInt64VBVIVISI_TAMU, aadd_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vaaddu_vv_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV8VUInt8VBVUVUVU_TAMU, aaddu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vaaddu_vx_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX8VUInt8VBVUVUSU_TAMU, aaddu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vaaddu_vv_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV16VUInt16VBVUVUVU_TAMU, aaddu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vaaddu_vx_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX16VUInt16VBVUVUSU_TAMU, aaddu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vaaddu_vv_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV32VUInt32VBVUVUVU_TAMU, aaddu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vaaddu_vx_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX32VUInt32VBVUVUSU_TAMU, aaddu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vaaddu_vv_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVV64VUInt64VBVUVUVU_TAMU, aaddu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vaaddu_vx_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(AadduVX64VUInt64VBVUVUSU_TAMU, aaddu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) +// vint8m1_t vasub_vv_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV8VInt8VBVIVIVI_TAMU, asub_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vasub_vx_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX8VInt8VBVIVISI_TAMU, asub_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vasub_vv_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV16VInt16VBVIVIVI_TAMU, asub_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vasub_vx_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX16VInt16VBVIVISI_TAMU, asub_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vasub_vv_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV32VInt32VBVIVIVI_TAMU, asub_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vasub_vx_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX32VInt32VBVIVISI_TAMU, asub_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vasub_vv_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVV64VInt64VBVIVIVI_TAMU, asub_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vasub_vx_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubVX64VInt64VBVIVISI_TAMU, asub_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vuint8m1_t vasubu_vv_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV8VUInt8VBVUVUVU_TAMU, asubu_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vasubu_vx_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, uint8_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX8VUInt8VBVUVUSU_TAMU, asubu_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUInt8) +// vuint16m1_t vasubu_vv_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV16VUInt16VBVUVUVU_TAMU, asubu_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vasubu_vx_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, uint16_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX16VUInt16VBVUVUSU_TAMU, asubu_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUInt16) +// vuint32m1_t vasubu_vv_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV32VUInt32VBVUVUVU_TAMU, asubu_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vasubu_vx_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, uint32_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX32VUInt32VBVUVUSU_TAMU, asubu_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUInt32) +// vuint64m1_t vasubu_vv_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVV64VUInt64VBVUVUVU_TAMU, asubu_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vasubu_vx_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, uint64_t op2, size_t vl); +CUSTOM_OP_TYPE(AsubuVX64VUInt64VBVUVUSU_TAMU, asubu_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUInt64) + +// vint8m1_t vsmul_vv_int8m1_tu (vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV8VInt8VIVIVI_TU, smul_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vsmul_vx_int8m1_tu (vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX8VInt8VIVISI_TU, smul_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vsmul_vv_int16m1_tu (vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV16VInt16VIVIVI_TU, smul_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vsmul_vx_int16m1_tu (vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX16VInt16VIVISI_TU, smul_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vsmul_vv_int32m1_tu (vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV32VInt32VIVIVI_TU, smul_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vsmul_vx_int32m1_tu (vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX32VInt32VIVISI_TU, smul_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vsmul_vv_int64m1_tu (vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV64VInt64VIVIVI_TU, smul_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vsmul_vx_int64m1_tu (vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX64VInt64VIVISI_TU, smul_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarInt64) +// vint8m1_t vsmul_vv_int8m1_ta (vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV8VInt8VIVI_TA, smul_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDInt8) +// vint8m1_t vsmul_vx_int8m1_ta (vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX8VInt8VISI_TA, smul_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, ScalarInt8) +// vint16m1_t vsmul_vv_int16m1_ta (vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV16VInt16VIVI_TA, smul_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDInt16) +// vint16m1_t vsmul_vx_int16m1_ta (vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX16VInt16VISI_TA, smul_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarInt16) +// vint32m1_t vsmul_vv_int32m1_ta (vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV32VInt32VIVI_TA, smul_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDInt32) +// vint32m1_t vsmul_vx_int32m1_ta (vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX32VInt32VISI_TA, smul_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarInt32) +// vint64m1_t vsmul_vv_int64m1_ta (vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV64VInt64VIVI_TA, smul_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDInt64) +// vint64m1_t vsmul_vx_int64m1_ta (vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX64VInt64VISI_TA, smul_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarInt64) +// vint8m1_t vsmul_vv_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV8VInt8VBVIVIVI_TUMA, smul_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vsmul_vx_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX8VInt8VBVIVISI_TUMA, smul_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vsmul_vv_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV16VInt16VBVIVIVI_TUMA, smul_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vsmul_vx_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX16VInt16VBVIVISI_TUMA, smul_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vsmul_vv_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV32VInt32VBVIVIVI_TUMA, smul_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vsmul_vx_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX32VInt32VBVIVISI_TUMA, smul_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vsmul_vv_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV64VInt64VBVIVIVI_TUMA, smul_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vsmul_vx_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX64VInt64VBVIVISI_TUMA, smul_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vint8m1_t vsmul_vv_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV8VInt8VBVIVIVI_TUMU, smul_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vsmul_vx_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX8VInt8VBVIVISI_TUMU, smul_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vsmul_vv_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV16VInt16VBVIVIVI_TUMU, smul_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vsmul_vx_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX16VInt16VBVIVISI_TUMU, smul_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vsmul_vv_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV32VInt32VBVIVIVI_TUMU, smul_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vsmul_vx_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX32VInt32VBVIVISI_TUMU, smul_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vsmul_vv_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV64VInt64VBVIVIVI_TUMU, smul_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vsmul_vx_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX64VInt64VBVIVISI_TUMU, smul_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) +// vint8m1_t vsmul_vv_int8m1_tama (vbool8_t mask, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV8VInt8VBVIVI_TAMA, smul_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint8m1_t vsmul_vx_int8m1_tama (vbool8_t mask, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX8VInt8VBVISI_TAMA, smul_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, ScalarInt8) +// vint16m1_t vsmul_vv_int16m1_tama (vbool16_t mask, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV16VInt16VBVIVI_TAMA, smul_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint16m1_t vsmul_vx_int16m1_tama (vbool16_t mask, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX16VInt16VBVISI_TAMA, smul_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarInt16) +// vint32m1_t vsmul_vv_int32m1_tama (vbool32_t mask, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV32VInt32VBVIVI_TAMA, smul_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint32m1_t vsmul_vx_int32m1_tama (vbool32_t mask, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX32VInt32VBVISI_TAMA, smul_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarInt32) +// vint64m1_t vsmul_vv_int64m1_tama (vbool64_t mask, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV64VInt64VBVIVI_TAMA, smul_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vint64m1_t vsmul_vx_int64m1_tama (vbool64_t mask, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX64VInt64VBVISI_TAMA, smul_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarInt64) +// vint8m1_t vsmul_vv_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vint8m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV8VInt8VBVIVIVI_TAMU, smul_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDInt8) +// vint8m1_t vsmul_vx_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, int8_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX8VInt8VBVIVISI_TAMU, smul_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarInt8) +// vint16m1_t vsmul_vv_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vint16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV16VInt16VBVIVIVI_TAMU, smul_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDInt16) +// vint16m1_t vsmul_vx_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, int16_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX16VInt16VBVIVISI_TAMU, smul_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarInt16) +// vint32m1_t vsmul_vv_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vint32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV32VInt32VBVIVIVI_TAMU, smul_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDInt32) +// vint32m1_t vsmul_vx_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, int32_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX32VInt32VBVIVISI_TAMU, smul_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarInt32) +// vint64m1_t vsmul_vv_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vint64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVV64VInt64VBVIVIVI_TAMU, smul_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDInt64) +// vint64m1_t vsmul_vx_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, int64_t op2, size_t vl); +CUSTOM_OP_TYPE(SmulVX64VInt64VBVIVISI_TAMU, smul_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarInt64) + +// vuint8m1_t vssrl_vv_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV8VUInt8VUVUVU_TU, ssrl_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vssrl_vx_uint8m1_tu (vuint8m1_t merge, vuint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX8VUInt8VUVUSL_TU, ssrl_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, ScalarUIntXLen) +// vuint16m1_t vssrl_vv_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV16VUInt16VUVUVU_TU, ssrl_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vssrl_vx_uint16m1_tu (vuint16m1_t merge, vuint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX16VUInt16VUVUSL_TU, ssrl_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, ScalarUIntXLen) +// vuint32m1_t vssrl_vv_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV32VUInt32VUVUVU_TU, ssrl_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vssrl_vx_uint32m1_tu (vuint32m1_t merge, vuint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX32VUInt32VUVUSL_TU, ssrl_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, ScalarUIntXLen) +// vuint64m1_t vssrl_vv_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV64VUInt64VUVUVU_TU, ssrl_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vssrl_vx_uint64m1_tu (vuint64m1_t merge, vuint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX64VUInt64VUVUSL_TU, ssrl_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, ScalarUIntXLen) +// vint8m1_t vssra_vv_int8m1_tu (vint8m1_t merge, vint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV8VInt8VIVIVU_TU, ssra_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vssra_vx_int8m1_tu (vint8m1_t merge, vint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX8VInt8VIVISL_TU, ssra_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, ScalarUIntXLen) +// vint16m1_t vssra_vv_int16m1_tu (vint16m1_t merge, vint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV16VInt16VIVIVU_TU, ssra_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vssra_vx_int16m1_tu (vint16m1_t merge, vint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX16VInt16VIVISL_TU, ssra_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarUIntXLen) +// vint32m1_t vssra_vv_int32m1_tu (vint32m1_t merge, vint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV32VInt32VIVIVU_TU, ssra_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vssra_vx_int32m1_tu (vint32m1_t merge, vint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX32VInt32VIVISL_TU, ssra_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarUIntXLen) +// vint64m1_t vssra_vv_int64m1_tu (vint64m1_t merge, vint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV64VInt64VIVIVU_TU, ssra_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDUInt64) +// vint64m1_t vssra_vx_int64m1_tu (vint64m1_t merge, vint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX64VInt64VIVISL_TU, ssra_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarUIntXLen) +// vuint8m1_t vssrl_vv_uint8m1_ta (vuint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV8VUInt8VUVU_TA, ssrl_vv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint8m1_t vssrl_vx_uint8m1_ta (vuint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX8VUInt8VUSL_TA, ssrl_vx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, ScalarUIntXLen) +// vuint16m1_t vssrl_vv_uint16m1_ta (vuint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV16VUInt16VUVU_TA, ssrl_vv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint16m1_t vssrl_vx_uint16m1_ta (vuint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX16VUInt16VUSL_TA, ssrl_vx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, ScalarUIntXLen) +// vuint32m1_t vssrl_vv_uint32m1_ta (vuint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV32VUInt32VUVU_TA, ssrl_vv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint32m1_t vssrl_vx_uint32m1_ta (vuint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX32VUInt32VUSL_TA, ssrl_vx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, ScalarUIntXLen) +// vuint64m1_t vssrl_vv_uint64m1_ta (vuint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV64VUInt64VUVU_TA, ssrl_vv, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vuint64m1_t vssrl_vx_uint64m1_ta (vuint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX64VUInt64VUSL_TA, ssrl_vx, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, ScalarUIntXLen) +// vint8m1_t vssra_vv_int8m1_ta (vint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV8VInt8VIVU_TA, ssra_vv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDUInt8) +// vint8m1_t vssra_vx_int8m1_ta (vint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX8VInt8VISL_TA, ssra_vx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt8, 2, OneDInt8, ScalarUIntXLen) +// vint16m1_t vssra_vv_int16m1_ta (vint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV16VInt16VIVU_TA, ssra_vv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDUInt16) +// vint16m1_t vssra_vx_int16m1_ta (vint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX16VInt16VISL_TA, ssra_vx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarUIntXLen) +// vint32m1_t vssra_vv_int32m1_ta (vint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV32VInt32VIVU_TA, ssra_vv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDUInt32) +// vint32m1_t vssra_vx_int32m1_ta (vint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX32VInt32VISL_TA, ssra_vx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarUIntXLen) +// vint64m1_t vssra_vv_int64m1_ta (vint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV64VInt64VIVU_TA, ssra_vv, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDUInt64) +// vint64m1_t vssra_vx_int64m1_ta (vint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX64VInt64VISL_TA, ssra_vx, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarUIntXLen) +// vuint8m1_t vssrl_vv_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV8VUInt8VBVUVUVU_TUMA, ssrl_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vssrl_vx_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX8VUInt8VBVUVUSL_TUMA, ssrl_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUIntXLen) +// vuint16m1_t vssrl_vv_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV16VUInt16VBVUVUVU_TUMA, ssrl_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vssrl_vx_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX16VUInt16VBVUVUSL_TUMA, ssrl_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUIntXLen) +// vuint32m1_t vssrl_vv_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV32VUInt32VBVUVUVU_TUMA, ssrl_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vssrl_vx_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX32VUInt32VBVUVUSL_TUMA, ssrl_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUIntXLen) +// vuint64m1_t vssrl_vv_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV64VUInt64VBVUVUVU_TUMA, ssrl_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vssrl_vx_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX64VUInt64VBVUVUSL_TUMA, ssrl_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUIntXLen) +// vint8m1_t vssra_vv_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV8VInt8VBVIVIVU_TUMA, ssra_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vssra_vx_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX8VInt8VBVIVISL_TUMA, ssra_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarUIntXLen) +// vint16m1_t vssra_vv_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV16VInt16VBVIVIVU_TUMA, ssra_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vssra_vx_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX16VInt16VBVIVISL_TUMA, ssra_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarUIntXLen) +// vint32m1_t vssra_vv_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV32VInt32VBVIVIVU_TUMA, ssra_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vssra_vx_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX32VInt32VBVIVISL_TUMA, ssra_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarUIntXLen) +// vint64m1_t vssra_vv_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV64VInt64VBVIVIVU_TUMA, ssra_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +// vint64m1_t vssra_vx_int64m1_tuma (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX64VInt64VBVIVISL_TUMA, ssra_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarUIntXLen) +// vuint8m1_t vssrl_vv_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV8VUInt8VBVUVUVU_TUMU, ssrl_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vssrl_vx_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX8VUInt8VBVUVUSL_TUMU, ssrl_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUIntXLen) +// vuint16m1_t vssrl_vv_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV16VUInt16VBVUVUVU_TUMU, ssrl_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vssrl_vx_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX16VUInt16VBVUVUSL_TUMU, ssrl_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUIntXLen) +// vuint32m1_t vssrl_vv_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV32VUInt32VBVUVUVU_TUMU, ssrl_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vssrl_vx_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX32VUInt32VBVUVUSL_TUMU, ssrl_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUIntXLen) +// vuint64m1_t vssrl_vv_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV64VUInt64VBVUVUVU_TUMU, ssrl_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vssrl_vx_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX64VUInt64VBVUVUSL_TUMU, ssrl_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUIntXLen) +// vint8m1_t vssra_vv_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV8VInt8VBVIVIVU_TUMU, ssra_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vssra_vx_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX8VInt8VBVIVISL_TUMU, ssra_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarUIntXLen) +// vint16m1_t vssra_vv_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV16VInt16VBVIVIVU_TUMU, ssra_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vssra_vx_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX16VInt16VBVIVISL_TUMU, ssra_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarUIntXLen) +// vint32m1_t vssra_vv_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV32VInt32VBVIVIVU_TUMU, ssra_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vssra_vx_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX32VInt32VBVIVISL_TUMU, ssra_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarUIntXLen) +// vint64m1_t vssra_vv_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV64VInt64VBVIVIVU_TUMU, ssra_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +// vint64m1_t vssra_vx_int64m1_tumu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX64VInt64VBVIVISL_TUMU, ssra_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarUIntXLen) +// vuint8m1_t vssrl_vv_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV8VUInt8VBVUVU_TAMA, ssrl_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint8m1_t vssrl_vx_uint8m1_tama (vbool8_t mask, vuint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX8VUInt8VBVUSL_TAMA, ssrl_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, ScalarUIntXLen) +// vuint16m1_t vssrl_vv_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV16VUInt16VBVUVU_TAMA, ssrl_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint16m1_t vssrl_vx_uint16m1_tama (vbool16_t mask, vuint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX16VUInt16VBVUSL_TAMA, ssrl_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarUIntXLen) +// vuint32m1_t vssrl_vv_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV32VUInt32VBVUVU_TAMA, ssrl_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint32m1_t vssrl_vx_uint32m1_tama (vbool32_t mask, vuint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX32VUInt32VBVUSL_TAMA, ssrl_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarUIntXLen) +// vuint64m1_t vssrl_vv_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV64VUInt64VBVUVU_TAMA, ssrl_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vuint64m1_t vssrl_vx_uint64m1_tama (vbool64_t mask, vuint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX64VUInt64VBVUSL_TAMA, ssrl_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarUIntXLen) +// vint8m1_t vssra_vv_int8m1_tama (vbool8_t mask, vint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV8VInt8VBVIVU_TAMA, ssra_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDUInt8) +// vint8m1_t vssra_vx_int8m1_tama (vbool8_t mask, vint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX8VInt8VBVISL_TAMA, ssra_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, ScalarUIntXLen) +// vint16m1_t vssra_vv_int16m1_tama (vbool16_t mask, vint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV16VInt16VBVIVU_TAMA, ssra_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDUInt16) +// vint16m1_t vssra_vx_int16m1_tama (vbool16_t mask, vint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX16VInt16VBVISL_TAMA, ssra_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarUIntXLen) +// vint32m1_t vssra_vv_int32m1_tama (vbool32_t mask, vint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV32VInt32VBVIVU_TAMA, ssra_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDUInt32) +// vint32m1_t vssra_vx_int32m1_tama (vbool32_t mask, vint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX32VInt32VBVISL_TAMA, ssra_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarUIntXLen) +// vint64m1_t vssra_vv_int64m1_tama (vbool64_t mask, vint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV64VInt64VBVIVU_TAMA, ssra_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDUInt64) +// vint64m1_t vssra_vx_int64m1_tama (vbool64_t mask, vint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX64VInt64VBVISL_TAMA, ssra_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarUIntXLen) +// vuint8m1_t vssrl_vv_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV8VUInt8VBVUVUVU_TAMU, ssrl_vv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vssrl_vx_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX8VUInt8VBVUVUSL_TAMU, ssrl_vx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarUIntXLen) +// vuint16m1_t vssrl_vv_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV16VUInt16VBVUVUVU_TAMU, ssrl_vv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vssrl_vx_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX16VUInt16VBVUVUSL_TAMU, ssrl_vx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarUIntXLen) +// vuint32m1_t vssrl_vv_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV32VUInt32VBVUVUVU_TAMU, ssrl_vv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vssrl_vx_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX32VUInt32VBVUVUSL_TAMU, ssrl_vx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarUIntXLen) +// vuint64m1_t vssrl_vv_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVV64VUInt64VBVUVUVU_TAMU, ssrl_vv, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vuint64m1_t vssrl_vx_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, vuint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsrlVX64VUInt64VBVUVUSL_TAMU, ssrl_vx, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarUIntXLen) +// vint8m1_t vssra_vv_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV8VInt8VBVIVIVU_TAMU, ssra_vv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vssra_vx_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint8m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX8VInt8VBVIVISL_TAMU, ssra_vx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarUIntXLen) +// vint16m1_t vssra_vv_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV16VInt16VBVIVIVU_TAMU, ssra_vv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vssra_vx_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint16m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX16VInt16VBVIVISL_TAMU, ssra_vx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarUIntXLen) +// vint32m1_t vssra_vv_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV32VInt32VBVIVIVU_TAMU, ssra_vv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vssra_vx_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint32m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX32VInt32VBVIVISL_TAMU, ssra_vx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarUIntXLen) +// vint64m1_t vssra_vv_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, vuint64m1_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVV64VInt64VBVIVIVU_TAMU, ssra_vv, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +// vint64m1_t vssra_vx_int64m1_tamu (vbool64_t mask, vint64m1_t merge, vint64m1_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(SsraVX64VInt64VBVIVISL_TAMU, ssra_vx, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarUIntXLen) + +// vint8m1_t vnclip_wv_int8m1_tu (vint8m1_t merge, vint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWV8VInt8VIVIVU_TU, nclip_wv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt16, OneDUInt8) +// vint8m1_t vnclip_wx_int8m1_tu (vint8m1_t merge, vint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWX8VInt8VIVISL_TU, nclip_wx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt16, ScalarUIntXLen) +// vint16m1_t vnclip_wv_int16m1_tu (vint16m1_t merge, vint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWV16VInt16VIVIVU_TU, nclip_wv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt32, OneDUInt16) +// vint16m1_t vnclip_wx_int16m1_tu (vint16m1_t merge, vint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWX16VInt16VIVISL_TU, nclip_wx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt32, ScalarUIntXLen) +// vint32m1_t vnclip_wv_int32m1_tu (vint32m1_t merge, vint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWV32VInt32VIVIVU_TU, nclip_wv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt64, OneDUInt32) +// vint32m1_t vnclip_wx_int32m1_tu (vint32m1_t merge, vint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWX32VInt32VIVISL_TU, nclip_wx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt64, ScalarUIntXLen) +// vuint8m1_t vnclipu_wv_uint8m1_tu (vuint8m1_t merge, vuint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWV8VUInt8VUVUVU_TU, nclipu_wv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt16, OneDUInt8) +// vuint8m1_t vnclipu_wx_uint8m1_tu (vuint8m1_t merge, vuint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWX8VUInt8VUVUSL_TU, nclipu_wx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt16, ScalarUIntXLen) +// vuint16m1_t vnclipu_wv_uint16m1_tu (vuint16m1_t merge, vuint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWV16VUInt16VUVUVU_TU, nclipu_wv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt32, OneDUInt16) +// vuint16m1_t vnclipu_wx_uint16m1_tu (vuint16m1_t merge, vuint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWX16VUInt16VUVUSL_TU, nclipu_wx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt32, ScalarUIntXLen) +// vuint32m1_t vnclipu_wv_uint32m1_tu (vuint32m1_t merge, vuint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWV32VUInt32VUVUVU_TU, nclipu_wv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt64, OneDUInt32) +// vuint32m1_t vnclipu_wx_uint32m1_tu (vuint32m1_t merge, vuint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWX32VUInt32VUVUSL_TU, nclipu_wx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt64, ScalarUIntXLen) +// vint8m1_t vnclip_wv_int8m1_ta (vint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWV8VInt8VIVU_TA, nclip_wv, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDInt8, 2, OneDInt16, OneDUInt8) +// vint8m1_t vnclip_wx_int8m1_ta (vint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWX8VInt8VISL_TA, nclip_wx, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDInt8, 2, OneDInt16, ScalarUIntXLen) +// vint16m1_t vnclip_wv_int16m1_ta (vint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWV16VInt16VIVU_TA, nclip_wv, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDInt16, 2, OneDInt32, OneDUInt16) +// vint16m1_t vnclip_wx_int16m1_ta (vint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWX16VInt16VISL_TA, nclip_wx, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDInt16, 2, OneDInt32, ScalarUIntXLen) +// vint32m1_t vnclip_wv_int32m1_ta (vint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWV32VInt32VIVU_TA, nclip_wv, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDInt32, 2, OneDInt64, OneDUInt32) +// vint32m1_t vnclip_wx_int32m1_ta (vint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWX32VInt32VISL_TA, nclip_wx, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDInt32, 2, OneDInt64, ScalarUIntXLen) +// vuint8m1_t vnclipu_wv_uint8m1_ta (vuint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWV8VUInt8VUVU_TA, nclipu_wv, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDUInt8, 2, OneDUInt16, OneDUInt8) +// vuint8m1_t vnclipu_wx_uint8m1_ta (vuint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWX8VUInt8VUSL_TA, nclipu_wx, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDUInt8, 2, OneDUInt16, ScalarUIntXLen) +// vuint16m1_t vnclipu_wv_uint16m1_ta (vuint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWV16VUInt16VUVU_TA, nclipu_wv, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDUInt16, 2, OneDUInt32, OneDUInt16) +// vuint16m1_t vnclipu_wx_uint16m1_ta (vuint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWX16VUInt16VUSL_TA, nclipu_wx, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDUInt16, 2, OneDUInt32, ScalarUIntXLen) +// vuint32m1_t vnclipu_wv_uint32m1_ta (vuint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWV32VUInt32VUVU_TA, nclipu_wv, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDUInt32, 2, OneDUInt64, OneDUInt32) +// vuint32m1_t vnclipu_wx_uint32m1_ta (vuint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWX32VUInt32VUSL_TA, nclipu_wx, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDUInt32, 2, OneDUInt64, ScalarUIntXLen) +// vint8m1_t vnclip_wv_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWV8VInt8VBVIVIVU_TUMA, nclip_wv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt16, OneDUInt8) +// vint8m1_t vnclip_wx_int8m1_tuma (vbool8_t mask, vint8m1_t merge, vint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWX8VInt8VBVIVISL_TUMA, nclip_wx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt16, ScalarUIntXLen) +// vint16m1_t vnclip_wv_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWV16VInt16VBVIVIVU_TUMA, nclip_wv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt32, OneDUInt16) +// vint16m1_t vnclip_wx_int16m1_tuma (vbool16_t mask, vint16m1_t merge, vint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWX16VInt16VBVIVISL_TUMA, nclip_wx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt32, ScalarUIntXLen) +// vint32m1_t vnclip_wv_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWV32VInt32VBVIVIVU_TUMA, nclip_wv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt64, OneDUInt32) +// vint32m1_t vnclip_wx_int32m1_tuma (vbool32_t mask, vint32m1_t merge, vint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWX32VInt32VBVIVISL_TUMA, nclip_wx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt64, ScalarUIntXLen) +// vuint8m1_t vnclipu_wv_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWV8VUInt8VBVUVUVU_TUMA, nclipu_wv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt16, OneDUInt8) +// vuint8m1_t vnclipu_wx_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, vuint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWX8VUInt8VBVUVUSL_TUMA, nclipu_wx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt16, ScalarUIntXLen) +// vuint16m1_t vnclipu_wv_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWV16VUInt16VBVUVUVU_TUMA, nclipu_wv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt32, OneDUInt16) +// vuint16m1_t vnclipu_wx_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, vuint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWX16VUInt16VBVUVUSL_TUMA, nclipu_wx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt32, ScalarUIntXLen) +// vuint32m1_t vnclipu_wv_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWV32VUInt32VBVUVUVU_TUMA, nclipu_wv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt64, OneDUInt32) +// vuint32m1_t vnclipu_wx_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, vuint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWX32VUInt32VBVUVUSL_TUMA, nclipu_wx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt64, ScalarUIntXLen) +// vint8m1_t vnclip_wv_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWV8VInt8VBVIVIVU_TUMU, nclip_wv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt16, OneDUInt8) +// vint8m1_t vnclip_wx_int8m1_tumu (vbool8_t mask, vint8m1_t merge, vint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWX8VInt8VBVIVISL_TUMU, nclip_wx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt16, ScalarUIntXLen) +// vint16m1_t vnclip_wv_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWV16VInt16VBVIVIVU_TUMU, nclip_wv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt32, OneDUInt16) +// vint16m1_t vnclip_wx_int16m1_tumu (vbool16_t mask, vint16m1_t merge, vint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWX16VInt16VBVIVISL_TUMU, nclip_wx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt32, ScalarUIntXLen) +// vint32m1_t vnclip_wv_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWV32VInt32VBVIVIVU_TUMU, nclip_wv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt64, OneDUInt32) +// vint32m1_t vnclip_wx_int32m1_tumu (vbool32_t mask, vint32m1_t merge, vint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWX32VInt32VBVIVISL_TUMU, nclip_wx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt64, ScalarUIntXLen) +// vuint8m1_t vnclipu_wv_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWV8VUInt8VBVUVUVU_TUMU, nclipu_wv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt16, OneDUInt8) +// vuint8m1_t vnclipu_wx_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, vuint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWX8VUInt8VBVUVUSL_TUMU, nclipu_wx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt16, ScalarUIntXLen) +// vuint16m1_t vnclipu_wv_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWV16VUInt16VBVUVUVU_TUMU, nclipu_wv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt32, OneDUInt16) +// vuint16m1_t vnclipu_wx_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, vuint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWX16VUInt16VBVUVUSL_TUMU, nclipu_wx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt32, ScalarUIntXLen) +// vuint32m1_t vnclipu_wv_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWV32VUInt32VBVUVUVU_TUMU, nclipu_wv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt64, OneDUInt32) +// vuint32m1_t vnclipu_wx_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, vuint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWX32VUInt32VBVUVUSL_TUMU, nclipu_wx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt64, ScalarUIntXLen) +// vint8m1_t vnclip_wv_int8m1_tama (vbool8_t mask, vint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWV8VInt8VBVIVU_TAMA, nclip_wv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt16, OneDUInt8) +// vint8m1_t vnclip_wx_int8m1_tama (vbool8_t mask, vint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWX8VInt8VBVISL_TAMA, nclip_wx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt16, ScalarUIntXLen) +// vint16m1_t vnclip_wv_int16m1_tama (vbool16_t mask, vint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWV16VInt16VBVIVU_TAMA, nclip_wv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt32, OneDUInt16) +// vint16m1_t vnclip_wx_int16m1_tama (vbool16_t mask, vint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWX16VInt16VBVISL_TAMA, nclip_wx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt32, ScalarUIntXLen) +// vint32m1_t vnclip_wv_int32m1_tama (vbool32_t mask, vint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWV32VInt32VBVIVU_TAMA, nclip_wv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt64, OneDUInt32) +// vint32m1_t vnclip_wx_int32m1_tama (vbool32_t mask, vint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWX32VInt32VBVISL_TAMA, nclip_wx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt64, ScalarUIntXLen) +// vuint8m1_t vnclipu_wv_uint8m1_tama (vbool8_t mask, vuint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWV8VUInt8VBVUVU_TAMA, nclipu_wv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt16, OneDUInt8) +// vuint8m1_t vnclipu_wx_uint8m1_tama (vbool8_t mask, vuint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWX8VUInt8VBVUSL_TAMA, nclipu_wx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt16, ScalarUIntXLen) +// vuint16m1_t vnclipu_wv_uint16m1_tama (vbool16_t mask, vuint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWV16VUInt16VBVUVU_TAMA, nclipu_wv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt32, OneDUInt16) +// vuint16m1_t vnclipu_wx_uint16m1_tama (vbool16_t mask, vuint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWX16VUInt16VBVUSL_TAMA, nclipu_wx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt32, ScalarUIntXLen) +// vuint32m1_t vnclipu_wv_uint32m1_tama (vbool32_t mask, vuint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWV32VUInt32VBVUVU_TAMA, nclipu_wv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt64, OneDUInt32) +// vuint32m1_t vnclipu_wx_uint32m1_tama (vbool32_t mask, vuint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWX32VUInt32VBVUSL_TAMA, nclipu_wx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt64, ScalarUIntXLen) +// vint8m1_t vnclip_wv_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWV8VInt8VBVIVIVU_TAMU, nclip_wv, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt16, OneDUInt8) +// vint8m1_t vnclip_wx_int8m1_tamu (vbool8_t mask, vint8m1_t merge, vint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWX8VInt8VBVIVISL_TAMU, nclip_wx, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt16, ScalarUIntXLen) +// vint16m1_t vnclip_wv_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWV16VInt16VBVIVIVU_TAMU, nclip_wv, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt32, OneDUInt16) +// vint16m1_t vnclip_wx_int16m1_tamu (vbool16_t mask, vint16m1_t merge, vint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWX16VInt16VBVIVISL_TAMU, nclip_wx, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt32, ScalarUIntXLen) +// vint32m1_t vnclip_wv_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWV32VInt32VBVIVIVU_TAMU, nclip_wv, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt64, OneDUInt32) +// vint32m1_t vnclip_wx_int32m1_tamu (vbool32_t mask, vint32m1_t merge, vint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipWX32VInt32VBVIVISL_TAMU, nclip_wx, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt64, ScalarUIntXLen) +// vuint8m1_t vnclipu_wv_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint16m2_t op1, vuint8m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWV8VUInt8VBVUVUVU_TAMU, nclipu_wv, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt16, OneDUInt8) +// vuint8m1_t vnclipu_wx_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, vuint16m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWX8VUInt8VBVUVUSL_TAMU, nclipu_wx, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt16, ScalarUIntXLen) +// vuint16m1_t vnclipu_wv_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint32m2_t op1, vuint16m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWV16VUInt16VBVUVUVU_TAMU, nclipu_wv, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt32, OneDUInt16) +// vuint16m1_t vnclipu_wx_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, vuint32m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWX16VUInt16VBVUVUSL_TAMU, nclipu_wx, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt32, ScalarUIntXLen) +// vuint32m1_t vnclipu_wv_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint64m2_t op1, vuint32m1_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWV32VUInt32VBVUVUVU_TAMU, nclipu_wv, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt64, OneDUInt32) +// vuint32m1_t vnclipu_wx_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, vuint64m2_t op1, size_t shift, size_t vl); +CUSTOM_OP_TYPE(NclipuWX32VUInt32VBVUVUSL_TAMU, nclipu_wx, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt64, ScalarUIntXLen) + +// vfloat16m1_t vfadd_vv_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVV16VFloat16VFVFVF_TU, fadd_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfadd_vf_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVF16VFloat16VFVFSF_TU, fadd_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfadd_vv_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVV32VFloat32VFVFVF_TU, fadd_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfadd_vf_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVF32VFloat32VFVFSF_TU, fadd_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfadd_vv_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVV64VFloat64VFVFVF_TU, fadd_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfadd_vf_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVF64VFloat64VFVFSF_TU, fadd_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfsub_vv_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVV16VFloat16VFVFVF_TU, fsub_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsub_vf_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVF16VFloat16VFVFSF_TU, fsub_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsub_vv_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVV32VFloat32VFVFVF_TU, fsub_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsub_vf_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVF32VFloat32VFVFSF_TU, fsub_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsub_vv_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVV64VFloat64VFVFVF_TU, fsub_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsub_vf_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVF64VFloat64VFVFSF_TU, fsub_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfrsub_vf_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FrsubVF16VFloat16VFVFSF_TU, frsub_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfrsub_vf_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FrsubVF32VFloat32VFVFSF_TU, frsub_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfrsub_vf_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FrsubVF64VFloat64VFVFSF_TU, frsub_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfneg_v_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FnegV16VFloat16VFVF_TU, fneg_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 2, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfneg_v_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FnegV32VFloat32VFVF_TU, fneg_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 2, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfneg_v_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FnegV64VFloat64VFVF_TU, fneg_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 2, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfadd_vv_float16m1_ta (vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVV16VFloat16VFVF_TA, fadd_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfadd_vf_float16m1_ta (vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVF16VFloat16VFSF_TA, fadd_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfadd_vv_float32m1_ta (vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVV32VFloat32VFVF_TA, fadd_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfadd_vf_float32m1_ta (vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVF32VFloat32VFSF_TA, fadd_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfadd_vv_float64m1_ta (vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVV64VFloat64VFVF_TA, fadd_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfadd_vf_float64m1_ta (vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVF64VFloat64VFSF_TA, fadd_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfsub_vv_float16m1_ta (vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVV16VFloat16VFVF_TA, fsub_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsub_vf_float16m1_ta (vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVF16VFloat16VFSF_TA, fsub_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsub_vv_float32m1_ta (vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVV32VFloat32VFVF_TA, fsub_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsub_vf_float32m1_ta (vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVF32VFloat32VFSF_TA, fsub_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsub_vv_float64m1_ta (vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVV64VFloat64VFVF_TA, fsub_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsub_vf_float64m1_ta (vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVF64VFloat64VFSF_TA, fsub_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfrsub_vf_float16m1_ta (vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FrsubVF16VFloat16VFSF_TA, frsub_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfrsub_vf_float32m1_ta (vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FrsubVF32VFloat32VFSF_TA, frsub_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfrsub_vf_float64m1_ta (vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FrsubVF64VFloat64VFSF_TA, frsub_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfneg_v_float16m1_ta (vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FnegV16VFloat16VF_TA, fneg_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 1, OneDFloat16) +// vfloat32m1_t vfneg_v_float32m1_ta (vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FnegV32VFloat32VF_TA, fneg_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 1, OneDFloat32) +// vfloat64m1_t vfneg_v_float64m1_ta (vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FnegV64VFloat64VF_TA, fneg_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 1, OneDFloat64) +// vfloat16m1_t vfadd_vv_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVV16VFloat16VBVFVFVF_TUMA, fadd_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfadd_vf_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVF16VFloat16VBVFVFSF_TUMA, fadd_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfadd_vv_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVV32VFloat32VBVFVFVF_TUMA, fadd_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfadd_vf_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVF32VFloat32VBVFVFSF_TUMA, fadd_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfadd_vv_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVV64VFloat64VBVFVFVF_TUMA, fadd_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfadd_vf_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVF64VFloat64VBVFVFSF_TUMA, fadd_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfsub_vv_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVV16VFloat16VBVFVFVF_TUMA, fsub_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsub_vf_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVF16VFloat16VBVFVFSF_TUMA, fsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsub_vv_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVV32VFloat32VBVFVFVF_TUMA, fsub_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsub_vf_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVF32VFloat32VBVFVFSF_TUMA, fsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsub_vv_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVV64VFloat64VBVFVFVF_TUMA, fsub_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsub_vf_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVF64VFloat64VBVFVFSF_TUMA, fsub_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfrsub_vf_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FrsubVF16VFloat16VBVFVFSF_TUMA, frsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfrsub_vf_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FrsubVF32VFloat32VBVFVFSF_TUMA, frsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfrsub_vf_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FrsubVF64VFloat64VBVFVFSF_TUMA, frsub_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfneg_v_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FnegV16VFloat16VBVFVF_TUMA, fneg_v, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfneg_v_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FnegV32VFloat32VBVFVF_TUMA, fneg_v, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfneg_v_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FnegV64VFloat64VBVFVF_TUMA, fneg_v, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfadd_vv_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVV16VFloat16VBVFVFVF_TUMU, fadd_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfadd_vf_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVF16VFloat16VBVFVFSF_TUMU, fadd_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfadd_vv_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVV32VFloat32VBVFVFVF_TUMU, fadd_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfadd_vf_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVF32VFloat32VBVFVFSF_TUMU, fadd_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfadd_vv_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVV64VFloat64VBVFVFVF_TUMU, fadd_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfadd_vf_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVF64VFloat64VBVFVFSF_TUMU, fadd_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfsub_vv_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVV16VFloat16VBVFVFVF_TUMU, fsub_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsub_vf_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVF16VFloat16VBVFVFSF_TUMU, fsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsub_vv_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVV32VFloat32VBVFVFVF_TUMU, fsub_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsub_vf_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVF32VFloat32VBVFVFSF_TUMU, fsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsub_vv_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVV64VFloat64VBVFVFVF_TUMU, fsub_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsub_vf_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVF64VFloat64VBVFVFSF_TUMU, fsub_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfrsub_vf_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FrsubVF16VFloat16VBVFVFSF_TUMU, frsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfrsub_vf_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FrsubVF32VFloat32VBVFVFSF_TUMU, frsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfrsub_vf_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FrsubVF64VFloat64VBVFVFSF_TUMU, frsub_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfneg_v_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FnegV16VFloat16VBVFVF_TUMU, fneg_v, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfneg_v_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FnegV32VFloat32VBVFVF_TUMU, fneg_v, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfneg_v_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FnegV64VFloat64VBVFVF_TUMU, fneg_v, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfadd_vv_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVV16VFloat16VBVFVF_TAMA, fadd_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfadd_vf_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVF16VFloat16VBVFSF_TAMA, fadd_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfadd_vv_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVV32VFloat32VBVFVF_TAMA, fadd_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfadd_vf_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVF32VFloat32VBVFSF_TAMA, fadd_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfadd_vv_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVV64VFloat64VBVFVF_TAMA, fadd_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfadd_vf_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVF64VFloat64VBVFSF_TAMA, fadd_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfsub_vv_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVV16VFloat16VBVFVF_TAMA, fsub_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsub_vf_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVF16VFloat16VBVFSF_TAMA, fsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsub_vv_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVV32VFloat32VBVFVF_TAMA, fsub_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsub_vf_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVF32VFloat32VBVFSF_TAMA, fsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsub_vv_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVV64VFloat64VBVFVF_TAMA, fsub_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsub_vf_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVF64VFloat64VBVFSF_TAMA, fsub_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfrsub_vf_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FrsubVF16VFloat16VBVFSF_TAMA, frsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfrsub_vf_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FrsubVF32VFloat32VBVFSF_TAMA, frsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfrsub_vf_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FrsubVF64VFloat64VBVFSF_TAMA, frsub_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfneg_v_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FnegV16VFloat16VBVF_TAMA, fneg_v, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 2, OneDBool, OneDFloat16) +// vfloat32m1_t vfneg_v_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FnegV32VFloat32VBVF_TAMA, fneg_v, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 2, OneDBool, OneDFloat32) +// vfloat64m1_t vfneg_v_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FnegV64VFloat64VBVF_TAMA, fneg_v, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 2, OneDBool, OneDFloat64) +// vfloat16m1_t vfadd_vv_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVV16VFloat16VBVFVFVF_TAMU, fadd_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfadd_vf_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVF16VFloat16VBVFVFSF_TAMU, fadd_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfadd_vv_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVV32VFloat32VBVFVFVF_TAMU, fadd_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfadd_vf_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVF32VFloat32VBVFVFSF_TAMU, fadd_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfadd_vv_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVV64VFloat64VBVFVFVF_TAMU, fadd_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfadd_vf_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FaddVF64VFloat64VBVFVFSF_TAMU, fadd_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfsub_vv_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVV16VFloat16VBVFVFVF_TAMU, fsub_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsub_vf_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVF16VFloat16VBVFVFSF_TAMU, fsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsub_vv_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVV32VFloat32VBVFVFVF_TAMU, fsub_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsub_vf_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVF32VFloat32VBVFVFSF_TAMU, fsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsub_vv_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVV64VFloat64VBVFVFVF_TAMU, fsub_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsub_vf_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsubVF64VFloat64VBVFVFSF_TAMU, fsub_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfrsub_vf_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FrsubVF16VFloat16VBVFVFSF_TAMU, frsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfrsub_vf_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FrsubVF32VFloat32VBVFVFSF_TAMU, frsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfrsub_vf_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FrsubVF64VFloat64VBVFVFSF_TAMU, frsub_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfneg_v_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FnegV16VFloat16VBVFVF_TAMU, fneg_v, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfneg_v_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FnegV32VFloat32VBVFVF_TAMU, fneg_v, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfneg_v_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FnegV64VFloat64VBVFVF_TAMU, fneg_v, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) + +// vfloat16m1_t vfmul_vv_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVV16VFloat16VFVFVF_TU, fmul_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmul_vf_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVF16VFloat16VFVFSF_TU, fmul_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfmul_vv_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVV32VFloat32VFVFVF_TU, fmul_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmul_vf_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVF32VFloat32VFVFSF_TU, fmul_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfmul_vv_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVV64VFloat64VFVFVF_TU, fmul_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmul_vf_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVF64VFloat64VFVFSF_TU, fmul_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfdiv_vv_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVV16VFloat16VFVFVF_TU, fdiv_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfdiv_vf_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVF16VFloat16VFVFSF_TU, fdiv_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfdiv_vv_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVV32VFloat32VFVFVF_TU, fdiv_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfdiv_vf_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVF32VFloat32VFVFSF_TU, fdiv_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfdiv_vv_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVV64VFloat64VFVFVF_TU, fdiv_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfdiv_vf_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVF64VFloat64VFVFSF_TU, fdiv_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfrdiv_vf_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FrdivVF16VFloat16VFVFSF_TU, frdiv_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfrdiv_vf_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FrdivVF32VFloat32VFVFSF_TU, frdiv_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfrdiv_vf_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FrdivVF64VFloat64VFVFSF_TU, frdiv_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfmul_vv_float16m1_ta (vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVV16VFloat16VFVF_TA, fmul_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmul_vf_float16m1_ta (vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVF16VFloat16VFSF_TA, fmul_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfmul_vv_float32m1_ta (vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVV32VFloat32VFVF_TA, fmul_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmul_vf_float32m1_ta (vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVF32VFloat32VFSF_TA, fmul_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfmul_vv_float64m1_ta (vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVV64VFloat64VFVF_TA, fmul_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmul_vf_float64m1_ta (vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVF64VFloat64VFSF_TA, fmul_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfdiv_vv_float16m1_ta (vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVV16VFloat16VFVF_TA, fdiv_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfdiv_vf_float16m1_ta (vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVF16VFloat16VFSF_TA, fdiv_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfdiv_vv_float32m1_ta (vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVV32VFloat32VFVF_TA, fdiv_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfdiv_vf_float32m1_ta (vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVF32VFloat32VFSF_TA, fdiv_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfdiv_vv_float64m1_ta (vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVV64VFloat64VFVF_TA, fdiv_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfdiv_vf_float64m1_ta (vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVF64VFloat64VFSF_TA, fdiv_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfrdiv_vf_float16m1_ta (vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FrdivVF16VFloat16VFSF_TA, frdiv_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfrdiv_vf_float32m1_ta (vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FrdivVF32VFloat32VFSF_TA, frdiv_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfrdiv_vf_float64m1_ta (vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FrdivVF64VFloat64VFSF_TA, frdiv_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfmul_vv_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVV16VFloat16VBVFVFVF_TUMA, fmul_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmul_vf_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVF16VFloat16VBVFVFSF_TUMA, fmul_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfmul_vv_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVV32VFloat32VBVFVFVF_TUMA, fmul_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmul_vf_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVF32VFloat32VBVFVFSF_TUMA, fmul_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfmul_vv_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVV64VFloat64VBVFVFVF_TUMA, fmul_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmul_vf_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVF64VFloat64VBVFVFSF_TUMA, fmul_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfdiv_vv_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVV16VFloat16VBVFVFVF_TUMA, fdiv_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfdiv_vf_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVF16VFloat16VBVFVFSF_TUMA, fdiv_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfdiv_vv_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVV32VFloat32VBVFVFVF_TUMA, fdiv_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfdiv_vf_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVF32VFloat32VBVFVFSF_TUMA, fdiv_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfdiv_vv_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVV64VFloat64VBVFVFVF_TUMA, fdiv_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfdiv_vf_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVF64VFloat64VBVFVFSF_TUMA, fdiv_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfrdiv_vf_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FrdivVF16VFloat16VBVFVFSF_TUMA, frdiv_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfrdiv_vf_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FrdivVF32VFloat32VBVFVFSF_TUMA, frdiv_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfrdiv_vf_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FrdivVF64VFloat64VBVFVFSF_TUMA, frdiv_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfmul_vv_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVV16VFloat16VBVFVFVF_TUMU, fmul_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmul_vf_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVF16VFloat16VBVFVFSF_TUMU, fmul_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfmul_vv_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVV32VFloat32VBVFVFVF_TUMU, fmul_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmul_vf_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVF32VFloat32VBVFVFSF_TUMU, fmul_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfmul_vv_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVV64VFloat64VBVFVFVF_TUMU, fmul_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmul_vf_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVF64VFloat64VBVFVFSF_TUMU, fmul_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfdiv_vv_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVV16VFloat16VBVFVFVF_TUMU, fdiv_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfdiv_vf_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVF16VFloat16VBVFVFSF_TUMU, fdiv_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfdiv_vv_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVV32VFloat32VBVFVFVF_TUMU, fdiv_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfdiv_vf_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVF32VFloat32VBVFVFSF_TUMU, fdiv_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfdiv_vv_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVV64VFloat64VBVFVFVF_TUMU, fdiv_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfdiv_vf_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVF64VFloat64VBVFVFSF_TUMU, fdiv_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfrdiv_vf_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FrdivVF16VFloat16VBVFVFSF_TUMU, frdiv_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfrdiv_vf_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FrdivVF32VFloat32VBVFVFSF_TUMU, frdiv_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfrdiv_vf_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FrdivVF64VFloat64VBVFVFSF_TUMU, frdiv_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfmul_vv_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVV16VFloat16VBVFVF_TAMA, fmul_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmul_vf_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVF16VFloat16VBVFSF_TAMA, fmul_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfmul_vv_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVV32VFloat32VBVFVF_TAMA, fmul_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmul_vf_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVF32VFloat32VBVFSF_TAMA, fmul_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfmul_vv_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVV64VFloat64VBVFVF_TAMA, fmul_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmul_vf_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVF64VFloat64VBVFSF_TAMA, fmul_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfdiv_vv_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVV16VFloat16VBVFVF_TAMA, fdiv_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfdiv_vf_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVF16VFloat16VBVFSF_TAMA, fdiv_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfdiv_vv_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVV32VFloat32VBVFVF_TAMA, fdiv_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfdiv_vf_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVF32VFloat32VBVFSF_TAMA, fdiv_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfdiv_vv_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVV64VFloat64VBVFVF_TAMA, fdiv_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfdiv_vf_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVF64VFloat64VBVFSF_TAMA, fdiv_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfrdiv_vf_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FrdivVF16VFloat16VBVFSF_TAMA, frdiv_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfrdiv_vf_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FrdivVF32VFloat32VBVFSF_TAMA, frdiv_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfrdiv_vf_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FrdivVF64VFloat64VBVFSF_TAMA, frdiv_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfmul_vv_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVV16VFloat16VBVFVFVF_TAMU, fmul_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmul_vf_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVF16VFloat16VBVFVFSF_TAMU, fmul_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfmul_vv_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVV32VFloat32VBVFVFVF_TAMU, fmul_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmul_vf_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVF32VFloat32VBVFVFSF_TAMU, fmul_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfmul_vv_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVV64VFloat64VBVFVFVF_TAMU, fmul_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmul_vf_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FmulVF64VFloat64VBVFVFSF_TAMU, fmul_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfdiv_vv_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVV16VFloat16VBVFVFVF_TAMU, fdiv_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfdiv_vf_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVF16VFloat16VBVFVFSF_TAMU, fdiv_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfdiv_vv_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVV32VFloat32VBVFVFVF_TAMU, fdiv_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfdiv_vf_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVF32VFloat32VBVFVFSF_TAMU, fdiv_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfdiv_vv_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVV64VFloat64VBVFVFVF_TAMU, fdiv_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfdiv_vf_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FdivVF64VFloat64VBVFVFSF_TAMU, fdiv_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfrdiv_vf_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FrdivVF16VFloat16VBVFVFSF_TAMU, frdiv_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfrdiv_vf_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FrdivVF32VFloat32VBVFVFSF_TAMU, frdiv_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfrdiv_vf_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FrdivVF64VFloat64VBVFVFSF_TAMU, frdiv_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat32m2_t vfwadd_vv_float32m2_tu (vfloat32m2_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVV16VFloat32VFVFVF_TU, fwadd_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwadd_vf_float32m2_tu (vfloat32m2_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVF16VFloat32VFVFSF_TU, fwadd_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat16, ScalarFloat16) +// vfloat32m2_t vfwadd_wv_float32m2_tu (vfloat32m2_t merge, vfloat32m2_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWV16VFloat32VFVFVF_TU, fwadd_wv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat16) +// vfloat32m2_t vfwadd_wf_float32m2_tu (vfloat32m2_t merge, vfloat32m2_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWF16VFloat32VFVFSF_TU, fwadd_wf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, ScalarFloat16) +// vfloat64m2_t vfwadd_vv_float64m2_tu (vfloat64m2_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVV32VFloat64VFVFVF_TU, fwadd_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwadd_vf_float64m2_tu (vfloat64m2_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVF32VFloat64VFVFSF_TU, fwadd_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat32, ScalarFloat32) +// vfloat64m2_t vfwadd_wv_float64m2_tu (vfloat64m2_t merge, vfloat64m2_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWV32VFloat64VFVFVF_TU, fwadd_wv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat32) +// vfloat64m2_t vfwadd_wf_float64m2_tu (vfloat64m2_t merge, vfloat64m2_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWF32VFloat64VFVFSF_TU, fwadd_wf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, ScalarFloat32) +// vfloat32m2_t vfwsub_vv_float32m2_tu (vfloat32m2_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVV16VFloat32VFVFVF_TU, fwsub_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwsub_vf_float32m2_tu (vfloat32m2_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVF16VFloat32VFVFSF_TU, fwsub_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat16, ScalarFloat16) +// vfloat32m2_t vfwsub_wv_float32m2_tu (vfloat32m2_t merge, vfloat32m2_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWV16VFloat32VFVFVF_TU, fwsub_wv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat16) +// vfloat32m2_t vfwsub_wf_float32m2_tu (vfloat32m2_t merge, vfloat32m2_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWF16VFloat32VFVFSF_TU, fwsub_wf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, ScalarFloat16) +// vfloat64m2_t vfwsub_vv_float64m2_tu (vfloat64m2_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVV32VFloat64VFVFVF_TU, fwsub_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwsub_vf_float64m2_tu (vfloat64m2_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVF32VFloat64VFVFSF_TU, fwsub_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat32, ScalarFloat32) +// vfloat64m2_t vfwsub_wv_float64m2_tu (vfloat64m2_t merge, vfloat64m2_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWV32VFloat64VFVFVF_TU, fwsub_wv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat32) +// vfloat64m2_t vfwsub_wf_float64m2_tu (vfloat64m2_t merge, vfloat64m2_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWF32VFloat64VFVFSF_TU, fwsub_wf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, ScalarFloat32) +// vfloat32m2_t vfwadd_vv_float32m2_ta (vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVV16VFloat32VFVF_TA, fwadd_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat32, 2, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwadd_vf_float32m2_ta (vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVF16VFloat32VFSF_TA, fwadd_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat32, 2, OneDFloat16, ScalarFloat16) +// vfloat32m2_t vfwadd_wv_float32m2_ta (vfloat32m2_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWV16VFloat32VFVF_TA, fwadd_wv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, OneDFloat16) +// vfloat32m2_t vfwadd_wf_float32m2_ta (vfloat32m2_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWF16VFloat32VFSF_TA, fwadd_wf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, ScalarFloat16) +// vfloat64m2_t vfwadd_vv_float64m2_ta (vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVV32VFloat64VFVF_TA, fwadd_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat64, 2, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwadd_vf_float64m2_ta (vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVF32VFloat64VFSF_TA, fwadd_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat64, 2, OneDFloat32, ScalarFloat32) +// vfloat64m2_t vfwadd_wv_float64m2_ta (vfloat64m2_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWV32VFloat64VFVF_TA, fwadd_wv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, OneDFloat32) +// vfloat64m2_t vfwadd_wf_float64m2_ta (vfloat64m2_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWF32VFloat64VFSF_TA, fwadd_wf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, ScalarFloat32) +// vfloat32m2_t vfwsub_vv_float32m2_ta (vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVV16VFloat32VFVF_TA, fwsub_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat32, 2, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwsub_vf_float32m2_ta (vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVF16VFloat32VFSF_TA, fwsub_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat32, 2, OneDFloat16, ScalarFloat16) +// vfloat32m2_t vfwsub_wv_float32m2_ta (vfloat32m2_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWV16VFloat32VFVF_TA, fwsub_wv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, OneDFloat16) +// vfloat32m2_t vfwsub_wf_float32m2_ta (vfloat32m2_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWF16VFloat32VFSF_TA, fwsub_wf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, ScalarFloat16) +// vfloat64m2_t vfwsub_vv_float64m2_ta (vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVV32VFloat64VFVF_TA, fwsub_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat64, 2, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwsub_vf_float64m2_ta (vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVF32VFloat64VFSF_TA, fwsub_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat64, 2, OneDFloat32, ScalarFloat32) +// vfloat64m2_t vfwsub_wv_float64m2_ta (vfloat64m2_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWV32VFloat64VFVF_TA, fwsub_wv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, OneDFloat32) +// vfloat64m2_t vfwsub_wf_float64m2_ta (vfloat64m2_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWF32VFloat64VFSF_TA, fwsub_wf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, ScalarFloat32) +// vfloat32m2_t vfwadd_vv_float32m2_tuma (vbool16_t mask, vfloat32m2_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVV16VFloat32VBVFVFVF_TUMA, fwadd_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwadd_vf_float32m2_tuma (vbool16_t mask, vfloat32m2_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVF16VFloat32VBVFVFSF_TUMA, fwadd_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, ScalarFloat16) +// vfloat32m2_t vfwadd_wv_float32m2_tuma (vbool16_t mask, vfloat32m2_t merge, vfloat32m2_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWV16VFloat32VBVFVFVF_TUMA, fwadd_wv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat16) +// vfloat32m2_t vfwadd_wf_float32m2_tuma (vbool16_t mask, vfloat32m2_t merge, vfloat32m2_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWF16VFloat32VBVFVFSF_TUMA, fwadd_wf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat16) +// vfloat64m2_t vfwadd_vv_float64m2_tuma (vbool32_t mask, vfloat64m2_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVV32VFloat64VBVFVFVF_TUMA, fwadd_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwadd_vf_float64m2_tuma (vbool32_t mask, vfloat64m2_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVF32VFloat64VBVFVFSF_TUMA, fwadd_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, ScalarFloat32) +// vfloat64m2_t vfwadd_wv_float64m2_tuma (vbool32_t mask, vfloat64m2_t merge, vfloat64m2_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWV32VFloat64VBVFVFVF_TUMA, fwadd_wv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat32) +// vfloat64m2_t vfwadd_wf_float64m2_tuma (vbool32_t mask, vfloat64m2_t merge, vfloat64m2_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWF32VFloat64VBVFVFSF_TUMA, fwadd_wf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat32) +// vfloat32m2_t vfwsub_vv_float32m2_tuma (vbool16_t mask, vfloat32m2_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVV16VFloat32VBVFVFVF_TUMA, fwsub_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwsub_vf_float32m2_tuma (vbool16_t mask, vfloat32m2_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVF16VFloat32VBVFVFSF_TUMA, fwsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, ScalarFloat16) +// vfloat32m2_t vfwsub_wv_float32m2_tuma (vbool16_t mask, vfloat32m2_t merge, vfloat32m2_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWV16VFloat32VBVFVFVF_TUMA, fwsub_wv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat16) +// vfloat32m2_t vfwsub_wf_float32m2_tuma (vbool16_t mask, vfloat32m2_t merge, vfloat32m2_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWF16VFloat32VBVFVFSF_TUMA, fwsub_wf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat16) +// vfloat64m2_t vfwsub_vv_float64m2_tuma (vbool32_t mask, vfloat64m2_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVV32VFloat64VBVFVFVF_TUMA, fwsub_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwsub_vf_float64m2_tuma (vbool32_t mask, vfloat64m2_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVF32VFloat64VBVFVFSF_TUMA, fwsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, ScalarFloat32) +// vfloat64m2_t vfwsub_wv_float64m2_tuma (vbool32_t mask, vfloat64m2_t merge, vfloat64m2_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWV32VFloat64VBVFVFVF_TUMA, fwsub_wv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat32) +// vfloat64m2_t vfwsub_wf_float64m2_tuma (vbool32_t mask, vfloat64m2_t merge, vfloat64m2_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWF32VFloat64VBVFVFSF_TUMA, fwsub_wf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat32) +// vfloat32m2_t vfwadd_vv_float32m2_tumu (vbool16_t mask, vfloat32m2_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVV16VFloat32VBVFVFVF_TUMU, fwadd_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwadd_vf_float32m2_tumu (vbool16_t mask, vfloat32m2_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVF16VFloat32VBVFVFSF_TUMU, fwadd_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, ScalarFloat16) +// vfloat32m2_t vfwadd_wv_float32m2_tumu (vbool16_t mask, vfloat32m2_t merge, vfloat32m2_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWV16VFloat32VBVFVFVF_TUMU, fwadd_wv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat16) +// vfloat32m2_t vfwadd_wf_float32m2_tumu (vbool16_t mask, vfloat32m2_t merge, vfloat32m2_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWF16VFloat32VBVFVFSF_TUMU, fwadd_wf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat16) +// vfloat64m2_t vfwadd_vv_float64m2_tumu (vbool32_t mask, vfloat64m2_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVV32VFloat64VBVFVFVF_TUMU, fwadd_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwadd_vf_float64m2_tumu (vbool32_t mask, vfloat64m2_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVF32VFloat64VBVFVFSF_TUMU, fwadd_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, ScalarFloat32) +// vfloat64m2_t vfwadd_wv_float64m2_tumu (vbool32_t mask, vfloat64m2_t merge, vfloat64m2_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWV32VFloat64VBVFVFVF_TUMU, fwadd_wv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat32) +// vfloat64m2_t vfwadd_wf_float64m2_tumu (vbool32_t mask, vfloat64m2_t merge, vfloat64m2_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWF32VFloat64VBVFVFSF_TUMU, fwadd_wf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat32) +// vfloat32m2_t vfwsub_vv_float32m2_tumu (vbool16_t mask, vfloat32m2_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVV16VFloat32VBVFVFVF_TUMU, fwsub_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwsub_vf_float32m2_tumu (vbool16_t mask, vfloat32m2_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVF16VFloat32VBVFVFSF_TUMU, fwsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, ScalarFloat16) +// vfloat32m2_t vfwsub_wv_float32m2_tumu (vbool16_t mask, vfloat32m2_t merge, vfloat32m2_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWV16VFloat32VBVFVFVF_TUMU, fwsub_wv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat16) +// vfloat32m2_t vfwsub_wf_float32m2_tumu (vbool16_t mask, vfloat32m2_t merge, vfloat32m2_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWF16VFloat32VBVFVFSF_TUMU, fwsub_wf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat16) +// vfloat64m2_t vfwsub_vv_float64m2_tumu (vbool32_t mask, vfloat64m2_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVV32VFloat64VBVFVFVF_TUMU, fwsub_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwsub_vf_float64m2_tumu (vbool32_t mask, vfloat64m2_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVF32VFloat64VBVFVFSF_TUMU, fwsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, ScalarFloat32) +// vfloat64m2_t vfwsub_wv_float64m2_tumu (vbool32_t mask, vfloat64m2_t merge, vfloat64m2_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWV32VFloat64VBVFVFVF_TUMU, fwsub_wv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat32) +// vfloat64m2_t vfwsub_wf_float64m2_tumu (vbool32_t mask, vfloat64m2_t merge, vfloat64m2_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWF32VFloat64VBVFVFSF_TUMU, fwsub_wf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat32) +// vfloat32m2_t vfwadd_vv_float32m2_tama (vbool16_t mask, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVV16VFloat32VBVFVF_TAMA, fwadd_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwadd_vf_float32m2_tama (vbool16_t mask, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVF16VFloat32VBVFSF_TAMA, fwadd_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat16, ScalarFloat16) +// vfloat32m2_t vfwadd_wv_float32m2_tama (vbool16_t mask, vfloat32m2_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWV16VFloat32VBVFVF_TAMA, fwadd_wv, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat16) +// vfloat32m2_t vfwadd_wf_float32m2_tama (vbool16_t mask, vfloat32m2_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWF16VFloat32VBVFSF_TAMA, fwadd_wf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, ScalarFloat16) +// vfloat64m2_t vfwadd_vv_float64m2_tama (vbool32_t mask, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVV32VFloat64VBVFVF_TAMA, fwadd_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwadd_vf_float64m2_tama (vbool32_t mask, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVF32VFloat64VBVFSF_TAMA, fwadd_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat32, ScalarFloat32) +// vfloat64m2_t vfwadd_wv_float64m2_tama (vbool32_t mask, vfloat64m2_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWV32VFloat64VBVFVF_TAMA, fwadd_wv, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat32) +// vfloat64m2_t vfwadd_wf_float64m2_tama (vbool32_t mask, vfloat64m2_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWF32VFloat64VBVFSF_TAMA, fwadd_wf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, ScalarFloat32) +// vfloat32m2_t vfwsub_vv_float32m2_tama (vbool16_t mask, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVV16VFloat32VBVFVF_TAMA, fwsub_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwsub_vf_float32m2_tama (vbool16_t mask, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVF16VFloat32VBVFSF_TAMA, fwsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat16, ScalarFloat16) +// vfloat32m2_t vfwsub_wv_float32m2_tama (vbool16_t mask, vfloat32m2_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWV16VFloat32VBVFVF_TAMA, fwsub_wv, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat16) +// vfloat32m2_t vfwsub_wf_float32m2_tama (vbool16_t mask, vfloat32m2_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWF16VFloat32VBVFSF_TAMA, fwsub_wf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, ScalarFloat16) +// vfloat64m2_t vfwsub_vv_float64m2_tama (vbool32_t mask, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVV32VFloat64VBVFVF_TAMA, fwsub_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwsub_vf_float64m2_tama (vbool32_t mask, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVF32VFloat64VBVFSF_TAMA, fwsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat32, ScalarFloat32) +// vfloat64m2_t vfwsub_wv_float64m2_tama (vbool32_t mask, vfloat64m2_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWV32VFloat64VBVFVF_TAMA, fwsub_wv, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat32) +// vfloat64m2_t vfwsub_wf_float64m2_tama (vbool32_t mask, vfloat64m2_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWF32VFloat64VBVFSF_TAMA, fwsub_wf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, ScalarFloat32) +// vfloat32m2_t vfwadd_vv_float32m2_tamu (vbool16_t mask, vfloat32m2_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVV16VFloat32VBVFVFVF_TAMU, fwadd_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwadd_vf_float32m2_tamu (vbool16_t mask, vfloat32m2_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVF16VFloat32VBVFVFSF_TAMU, fwadd_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, ScalarFloat16) +// vfloat32m2_t vfwadd_wv_float32m2_tamu (vbool16_t mask, vfloat32m2_t merge, vfloat32m2_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWV16VFloat32VBVFVFVF_TAMU, fwadd_wv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat16) +// vfloat32m2_t vfwadd_wf_float32m2_tamu (vbool16_t mask, vfloat32m2_t merge, vfloat32m2_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWF16VFloat32VBVFVFSF_TAMU, fwadd_wf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat16) +// vfloat64m2_t vfwadd_vv_float64m2_tamu (vbool32_t mask, vfloat64m2_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVV32VFloat64VBVFVFVF_TAMU, fwadd_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwadd_vf_float64m2_tamu (vbool32_t mask, vfloat64m2_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddVF32VFloat64VBVFVFSF_TAMU, fwadd_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, ScalarFloat32) +// vfloat64m2_t vfwadd_wv_float64m2_tamu (vbool32_t mask, vfloat64m2_t merge, vfloat64m2_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWV32VFloat64VBVFVFVF_TAMU, fwadd_wv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat32) +// vfloat64m2_t vfwadd_wf_float64m2_tamu (vbool32_t mask, vfloat64m2_t merge, vfloat64m2_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwaddWF32VFloat64VBVFVFSF_TAMU, fwadd_wf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat32) +// vfloat32m2_t vfwsub_vv_float32m2_tamu (vbool16_t mask, vfloat32m2_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVV16VFloat32VBVFVFVF_TAMU, fwsub_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwsub_vf_float32m2_tamu (vbool16_t mask, vfloat32m2_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVF16VFloat32VBVFVFSF_TAMU, fwsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, ScalarFloat16) +// vfloat32m2_t vfwsub_wv_float32m2_tamu (vbool16_t mask, vfloat32m2_t merge, vfloat32m2_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWV16VFloat32VBVFVFVF_TAMU, fwsub_wv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat16) +// vfloat32m2_t vfwsub_wf_float32m2_tamu (vbool16_t mask, vfloat32m2_t merge, vfloat32m2_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWF16VFloat32VBVFVFSF_TAMU, fwsub_wf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat16) +// vfloat64m2_t vfwsub_vv_float64m2_tamu (vbool32_t mask, vfloat64m2_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVV32VFloat64VBVFVFVF_TAMU, fwsub_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwsub_vf_float64m2_tamu (vbool32_t mask, vfloat64m2_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubVF32VFloat64VBVFVFSF_TAMU, fwsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, ScalarFloat32) +// vfloat64m2_t vfwsub_wv_float64m2_tamu (vbool32_t mask, vfloat64m2_t merge, vfloat64m2_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWV32VFloat64VBVFVFVF_TAMU, fwsub_wv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat32) +// vfloat64m2_t vfwsub_wf_float64m2_tamu (vbool32_t mask, vfloat64m2_t merge, vfloat64m2_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwsubWF32VFloat64VBVFVFSF_TAMU, fwsub_wf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat32) + +// vfloat32m2_t vfwmul_vv_float32m2_tu (vfloat32m2_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVV16VFloat32VFVFVF_TU, fwmul_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwmul_vf_float32m2_tu (vfloat32m2_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVF16VFloat32VFVFSF_TU, fwmul_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat16, ScalarFloat16) +// vfloat64m2_t vfwmul_vv_float64m2_tu (vfloat64m2_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVV32VFloat64VFVFVF_TU, fwmul_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwmul_vf_float64m2_tu (vfloat64m2_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVF32VFloat64VFVFSF_TU, fwmul_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat32, ScalarFloat32) +// vfloat32m2_t vfwmul_vv_float32m2_ta (vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVV16VFloat32VFVF_TA, fwmul_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat32, 2, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwmul_vf_float32m2_ta (vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVF16VFloat32VFSF_TA, fwmul_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat32, 2, OneDFloat16, ScalarFloat16) +// vfloat64m2_t vfwmul_vv_float64m2_ta (vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVV32VFloat64VFVF_TA, fwmul_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat64, 2, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwmul_vf_float64m2_ta (vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVF32VFloat64VFSF_TA, fwmul_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat64, 2, OneDFloat32, ScalarFloat32) +// vfloat32m2_t vfwmul_vv_float32m2_tuma (vbool16_t mask, vfloat32m2_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVV16VFloat32VBVFVFVF_TUMA, fwmul_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwmul_vf_float32m2_tuma (vbool16_t mask, vfloat32m2_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVF16VFloat32VBVFVFSF_TUMA, fwmul_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, ScalarFloat16) +// vfloat64m2_t vfwmul_vv_float64m2_tuma (vbool32_t mask, vfloat64m2_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVV32VFloat64VBVFVFVF_TUMA, fwmul_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwmul_vf_float64m2_tuma (vbool32_t mask, vfloat64m2_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVF32VFloat64VBVFVFSF_TUMA, fwmul_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, ScalarFloat32) +// vfloat32m2_t vfwmul_vv_float32m2_tumu (vbool16_t mask, vfloat32m2_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVV16VFloat32VBVFVFVF_TUMU, fwmul_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwmul_vf_float32m2_tumu (vbool16_t mask, vfloat32m2_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVF16VFloat32VBVFVFSF_TUMU, fwmul_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, ScalarFloat16) +// vfloat64m2_t vfwmul_vv_float64m2_tumu (vbool32_t mask, vfloat64m2_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVV32VFloat64VBVFVFVF_TUMU, fwmul_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwmul_vf_float64m2_tumu (vbool32_t mask, vfloat64m2_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVF32VFloat64VBVFVFSF_TUMU, fwmul_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, ScalarFloat32) +// vfloat32m2_t vfwmul_vv_float32m2_tama (vbool16_t mask, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVV16VFloat32VBVFVF_TAMA, fwmul_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwmul_vf_float32m2_tama (vbool16_t mask, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVF16VFloat32VBVFSF_TAMA, fwmul_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat16, ScalarFloat16) +// vfloat64m2_t vfwmul_vv_float64m2_tama (vbool32_t mask, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVV32VFloat64VBVFVF_TAMA, fwmul_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwmul_vf_float64m2_tama (vbool32_t mask, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVF32VFloat64VBVFSF_TAMA, fwmul_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat32, ScalarFloat32) +// vfloat32m2_t vfwmul_vv_float32m2_tamu (vbool16_t mask, vfloat32m2_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVV16VFloat32VBVFVFVF_TAMU, fwmul_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwmul_vf_float32m2_tamu (vbool16_t mask, vfloat32m2_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVF16VFloat32VBVFVFSF_TAMU, fwmul_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, ScalarFloat16) +// vfloat64m2_t vfwmul_vv_float64m2_tamu (vbool32_t mask, vfloat64m2_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVV32VFloat64VBVFVFVF_TAMU, fwmul_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwmul_vf_float64m2_tamu (vbool32_t mask, vfloat64m2_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FwmulVF32VFloat64VBVFVFSF_TAMU, fwmul_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, ScalarFloat32) + +// vfloat16m1_t vfmacc_vv_float16m1_tu (vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVV16VFloat16VFVFVF_TU, fmacc_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmacc_vf_float16m1_tu (vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVF16VFloat16VFSFVF_TU, fmacc_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmacc_vv_float32m1_tu (vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVV32VFloat32VFVFVF_TU, fmacc_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmacc_vf_float32m1_tu (vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVF32VFloat32VFSFVF_TU, fmacc_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmacc_vv_float64m1_tu (vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVV64VFloat64VFVFVF_TU, fmacc_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmacc_vf_float64m1_tu (vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVF64VFloat64VFSFVF_TU, fmacc_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmacc_vv_float16m1_tu (vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVV16VFloat16VFVFVF_TU, fnmacc_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmacc_vf_float16m1_tu (vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVF16VFloat16VFSFVF_TU, fnmacc_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmacc_vv_float32m1_tu (vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVV32VFloat32VFVFVF_TU, fnmacc_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmacc_vf_float32m1_tu (vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVF32VFloat32VFSFVF_TU, fnmacc_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmacc_vv_float64m1_tu (vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVV64VFloat64VFVFVF_TU, fnmacc_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmacc_vf_float64m1_tu (vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVF64VFloat64VFSFVF_TU, fnmacc_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfmsac_vv_float16m1_tu (vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVV16VFloat16VFVFVF_TU, fmsac_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmsac_vf_float16m1_tu (vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVF16VFloat16VFSFVF_TU, fmsac_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmsac_vv_float32m1_tu (vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVV32VFloat32VFVFVF_TU, fmsac_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmsac_vf_float32m1_tu (vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVF32VFloat32VFSFVF_TU, fmsac_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmsac_vv_float64m1_tu (vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVV64VFloat64VFVFVF_TU, fmsac_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmsac_vf_float64m1_tu (vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVF64VFloat64VFSFVF_TU, fmsac_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmsac_vv_float16m1_tu (vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVV16VFloat16VFVFVF_TU, fnmsac_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmsac_vf_float16m1_tu (vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVF16VFloat16VFSFVF_TU, fnmsac_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmsac_vv_float32m1_tu (vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVV32VFloat32VFVFVF_TU, fnmsac_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmsac_vf_float32m1_tu (vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVF32VFloat32VFSFVF_TU, fnmsac_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmsac_vv_float64m1_tu (vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVV64VFloat64VFVFVF_TU, fnmsac_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmsac_vf_float64m1_tu (vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVF64VFloat64VFSFVF_TU, fnmsac_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfmadd_vv_float16m1_tu (vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVV16VFloat16VFVFVF_TU, fmadd_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmadd_vf_float16m1_tu (vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVF16VFloat16VFSFVF_TU, fmadd_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmadd_vv_float32m1_tu (vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVV32VFloat32VFVFVF_TU, fmadd_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmadd_vf_float32m1_tu (vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVF32VFloat32VFSFVF_TU, fmadd_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmadd_vv_float64m1_tu (vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVV64VFloat64VFVFVF_TU, fmadd_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmadd_vf_float64m1_tu (vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVF64VFloat64VFSFVF_TU, fmadd_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmadd_vv_float16m1_tu (vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVV16VFloat16VFVFVF_TU, fnmadd_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmadd_vf_float16m1_tu (vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVF16VFloat16VFSFVF_TU, fnmadd_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmadd_vv_float32m1_tu (vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVV32VFloat32VFVFVF_TU, fnmadd_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmadd_vf_float32m1_tu (vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVF32VFloat32VFSFVF_TU, fnmadd_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmadd_vv_float64m1_tu (vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVV64VFloat64VFVFVF_TU, fnmadd_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmadd_vf_float64m1_tu (vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVF64VFloat64VFSFVF_TU, fnmadd_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfmsub_vv_float16m1_tu (vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVV16VFloat16VFVFVF_TU, fmsub_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmsub_vf_float16m1_tu (vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVF16VFloat16VFSFVF_TU, fmsub_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmsub_vv_float32m1_tu (vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVV32VFloat32VFVFVF_TU, fmsub_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmsub_vf_float32m1_tu (vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVF32VFloat32VFSFVF_TU, fmsub_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmsub_vv_float64m1_tu (vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVV64VFloat64VFVFVF_TU, fmsub_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmsub_vf_float64m1_tu (vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVF64VFloat64VFSFVF_TU, fmsub_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmsub_vv_float16m1_tu (vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVV16VFloat16VFVFVF_TU, fnmsub_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmsub_vf_float16m1_tu (vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVF16VFloat16VFSFVF_TU, fnmsub_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmsub_vv_float32m1_tu (vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVV32VFloat32VFVFVF_TU, fnmsub_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmsub_vf_float32m1_tu (vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVF32VFloat32VFSFVF_TU, fnmsub_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmsub_vv_float64m1_tu (vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVV64VFloat64VFVFVF_TU, fnmsub_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmsub_vf_float64m1_tu (vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVF64VFloat64VFSFVF_TU, fnmsub_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfmacc_vv_float16m1_ta (vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVV16VFloat16VFVFVF_TA, fmacc_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmacc_vf_float16m1_ta (vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVF16VFloat16VFSFVF_TA, fmacc_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmacc_vv_float32m1_ta (vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVV32VFloat32VFVFVF_TA, fmacc_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmacc_vf_float32m1_ta (vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVF32VFloat32VFSFVF_TA, fmacc_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmacc_vv_float64m1_ta (vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVV64VFloat64VFVFVF_TA, fmacc_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmacc_vf_float64m1_ta (vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVF64VFloat64VFSFVF_TA, fmacc_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmacc_vv_float16m1_ta (vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVV16VFloat16VFVFVF_TA, fnmacc_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmacc_vf_float16m1_ta (vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVF16VFloat16VFSFVF_TA, fnmacc_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmacc_vv_float32m1_ta (vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVV32VFloat32VFVFVF_TA, fnmacc_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmacc_vf_float32m1_ta (vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVF32VFloat32VFSFVF_TA, fnmacc_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmacc_vv_float64m1_ta (vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVV64VFloat64VFVFVF_TA, fnmacc_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmacc_vf_float64m1_ta (vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVF64VFloat64VFSFVF_TA, fnmacc_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfmsac_vv_float16m1_ta (vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVV16VFloat16VFVFVF_TA, fmsac_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmsac_vf_float16m1_ta (vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVF16VFloat16VFSFVF_TA, fmsac_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmsac_vv_float32m1_ta (vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVV32VFloat32VFVFVF_TA, fmsac_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmsac_vf_float32m1_ta (vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVF32VFloat32VFSFVF_TA, fmsac_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmsac_vv_float64m1_ta (vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVV64VFloat64VFVFVF_TA, fmsac_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmsac_vf_float64m1_ta (vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVF64VFloat64VFSFVF_TA, fmsac_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmsac_vv_float16m1_ta (vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVV16VFloat16VFVFVF_TA, fnmsac_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmsac_vf_float16m1_ta (vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVF16VFloat16VFSFVF_TA, fnmsac_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmsac_vv_float32m1_ta (vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVV32VFloat32VFVFVF_TA, fnmsac_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmsac_vf_float32m1_ta (vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVF32VFloat32VFSFVF_TA, fnmsac_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmsac_vv_float64m1_ta (vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVV64VFloat64VFVFVF_TA, fnmsac_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmsac_vf_float64m1_ta (vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVF64VFloat64VFSFVF_TA, fnmsac_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfmadd_vv_float16m1_ta (vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVV16VFloat16VFVFVF_TA, fmadd_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmadd_vf_float16m1_ta (vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVF16VFloat16VFSFVF_TA, fmadd_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmadd_vv_float32m1_ta (vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVV32VFloat32VFVFVF_TA, fmadd_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmadd_vf_float32m1_ta (vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVF32VFloat32VFSFVF_TA, fmadd_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmadd_vv_float64m1_ta (vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVV64VFloat64VFVFVF_TA, fmadd_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmadd_vf_float64m1_ta (vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVF64VFloat64VFSFVF_TA, fmadd_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmadd_vv_float16m1_ta (vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVV16VFloat16VFVFVF_TA, fnmadd_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmadd_vf_float16m1_ta (vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVF16VFloat16VFSFVF_TA, fnmadd_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmadd_vv_float32m1_ta (vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVV32VFloat32VFVFVF_TA, fnmadd_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmadd_vf_float32m1_ta (vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVF32VFloat32VFSFVF_TA, fnmadd_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmadd_vv_float64m1_ta (vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVV64VFloat64VFVFVF_TA, fnmadd_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmadd_vf_float64m1_ta (vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVF64VFloat64VFSFVF_TA, fnmadd_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfmsub_vv_float16m1_ta (vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVV16VFloat16VFVFVF_TA, fmsub_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmsub_vf_float16m1_ta (vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVF16VFloat16VFSFVF_TA, fmsub_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmsub_vv_float32m1_ta (vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVV32VFloat32VFVFVF_TA, fmsub_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmsub_vf_float32m1_ta (vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVF32VFloat32VFSFVF_TA, fmsub_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmsub_vv_float64m1_ta (vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVV64VFloat64VFVFVF_TA, fmsub_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmsub_vf_float64m1_ta (vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVF64VFloat64VFSFVF_TA, fmsub_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmsub_vv_float16m1_ta (vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVV16VFloat16VFVFVF_TA, fnmsub_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmsub_vf_float16m1_ta (vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVF16VFloat16VFSFVF_TA, fnmsub_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat16, 3, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmsub_vv_float32m1_ta (vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVV32VFloat32VFVFVF_TA, fnmsub_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmsub_vf_float32m1_ta (vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVF32VFloat32VFSFVF_TA, fnmsub_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmsub_vv_float64m1_ta (vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVV64VFloat64VFVFVF_TA, fnmsub_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmsub_vf_float64m1_ta (vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVF64VFloat64VFSFVF_TA, fnmsub_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfmacc_vv_float16m1_tuma (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVV16VFloat16VBVFVFVF_TUMA, fmacc_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmacc_vf_float16m1_tuma (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVF16VFloat16VBVFSFVF_TUMA, fmacc_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmacc_vv_float32m1_tuma (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVV32VFloat32VBVFVFVF_TUMA, fmacc_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmacc_vf_float32m1_tuma (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVF32VFloat32VBVFSFVF_TUMA, fmacc_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmacc_vv_float64m1_tuma (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVV64VFloat64VBVFVFVF_TUMA, fmacc_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmacc_vf_float64m1_tuma (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVF64VFloat64VBVFSFVF_TUMA, fmacc_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmacc_vv_float16m1_tuma (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVV16VFloat16VBVFVFVF_TUMA, fnmacc_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmacc_vf_float16m1_tuma (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVF16VFloat16VBVFSFVF_TUMA, fnmacc_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmacc_vv_float32m1_tuma (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVV32VFloat32VBVFVFVF_TUMA, fnmacc_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmacc_vf_float32m1_tuma (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVF32VFloat32VBVFSFVF_TUMA, fnmacc_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmacc_vv_float64m1_tuma (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVV64VFloat64VBVFVFVF_TUMA, fnmacc_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmacc_vf_float64m1_tuma (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVF64VFloat64VBVFSFVF_TUMA, fnmacc_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfmsac_vv_float16m1_tuma (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVV16VFloat16VBVFVFVF_TUMA, fmsac_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmsac_vf_float16m1_tuma (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVF16VFloat16VBVFSFVF_TUMA, fmsac_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmsac_vv_float32m1_tuma (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVV32VFloat32VBVFVFVF_TUMA, fmsac_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmsac_vf_float32m1_tuma (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVF32VFloat32VBVFSFVF_TUMA, fmsac_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmsac_vv_float64m1_tuma (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVV64VFloat64VBVFVFVF_TUMA, fmsac_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmsac_vf_float64m1_tuma (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVF64VFloat64VBVFSFVF_TUMA, fmsac_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmsac_vv_float16m1_tuma (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVV16VFloat16VBVFVFVF_TUMA, fnmsac_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmsac_vf_float16m1_tuma (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVF16VFloat16VBVFSFVF_TUMA, fnmsac_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmsac_vv_float32m1_tuma (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVV32VFloat32VBVFVFVF_TUMA, fnmsac_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmsac_vf_float32m1_tuma (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVF32VFloat32VBVFSFVF_TUMA, fnmsac_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmsac_vv_float64m1_tuma (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVV64VFloat64VBVFVFVF_TUMA, fnmsac_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmsac_vf_float64m1_tuma (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVF64VFloat64VBVFSFVF_TUMA, fnmsac_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfmadd_vv_float16m1_tuma (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVV16VFloat16VBVFVFVF_TUMA, fmadd_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmadd_vf_float16m1_tuma (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVF16VFloat16VBVFSFVF_TUMA, fmadd_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmadd_vv_float32m1_tuma (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVV32VFloat32VBVFVFVF_TUMA, fmadd_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmadd_vf_float32m1_tuma (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVF32VFloat32VBVFSFVF_TUMA, fmadd_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmadd_vv_float64m1_tuma (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVV64VFloat64VBVFVFVF_TUMA, fmadd_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmadd_vf_float64m1_tuma (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVF64VFloat64VBVFSFVF_TUMA, fmadd_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmadd_vv_float16m1_tuma (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVV16VFloat16VBVFVFVF_TUMA, fnmadd_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmadd_vf_float16m1_tuma (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVF16VFloat16VBVFSFVF_TUMA, fnmadd_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmadd_vv_float32m1_tuma (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVV32VFloat32VBVFVFVF_TUMA, fnmadd_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmadd_vf_float32m1_tuma (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVF32VFloat32VBVFSFVF_TUMA, fnmadd_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmadd_vv_float64m1_tuma (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVV64VFloat64VBVFVFVF_TUMA, fnmadd_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmadd_vf_float64m1_tuma (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVF64VFloat64VBVFSFVF_TUMA, fnmadd_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfmsub_vv_float16m1_tuma (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVV16VFloat16VBVFVFVF_TUMA, fmsub_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmsub_vf_float16m1_tuma (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVF16VFloat16VBVFSFVF_TUMA, fmsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmsub_vv_float32m1_tuma (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVV32VFloat32VBVFVFVF_TUMA, fmsub_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmsub_vf_float32m1_tuma (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVF32VFloat32VBVFSFVF_TUMA, fmsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmsub_vv_float64m1_tuma (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVV64VFloat64VBVFVFVF_TUMA, fmsub_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmsub_vf_float64m1_tuma (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVF64VFloat64VBVFSFVF_TUMA, fmsub_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmsub_vv_float16m1_tuma (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVV16VFloat16VBVFVFVF_TUMA, fnmsub_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmsub_vf_float16m1_tuma (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVF16VFloat16VBVFSFVF_TUMA, fnmsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmsub_vv_float32m1_tuma (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVV32VFloat32VBVFVFVF_TUMA, fnmsub_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmsub_vf_float32m1_tuma (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVF32VFloat32VBVFSFVF_TUMA, fnmsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmsub_vv_float64m1_tuma (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVV64VFloat64VBVFVFVF_TUMA, fnmsub_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmsub_vf_float64m1_tuma (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVF64VFloat64VBVFSFVF_TUMA, fnmsub_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfmacc_vv_float16m1_tumu (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVV16VFloat16VBVFVFVF_TUMU, fmacc_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmacc_vf_float16m1_tumu (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVF16VFloat16VBVFSFVF_TUMU, fmacc_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmacc_vv_float32m1_tumu (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVV32VFloat32VBVFVFVF_TUMU, fmacc_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmacc_vf_float32m1_tumu (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVF32VFloat32VBVFSFVF_TUMU, fmacc_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmacc_vv_float64m1_tumu (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVV64VFloat64VBVFVFVF_TUMU, fmacc_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmacc_vf_float64m1_tumu (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVF64VFloat64VBVFSFVF_TUMU, fmacc_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmacc_vv_float16m1_tumu (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVV16VFloat16VBVFVFVF_TUMU, fnmacc_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmacc_vf_float16m1_tumu (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVF16VFloat16VBVFSFVF_TUMU, fnmacc_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmacc_vv_float32m1_tumu (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVV32VFloat32VBVFVFVF_TUMU, fnmacc_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmacc_vf_float32m1_tumu (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVF32VFloat32VBVFSFVF_TUMU, fnmacc_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmacc_vv_float64m1_tumu (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVV64VFloat64VBVFVFVF_TUMU, fnmacc_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmacc_vf_float64m1_tumu (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVF64VFloat64VBVFSFVF_TUMU, fnmacc_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfmsac_vv_float16m1_tumu (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVV16VFloat16VBVFVFVF_TUMU, fmsac_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmsac_vf_float16m1_tumu (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVF16VFloat16VBVFSFVF_TUMU, fmsac_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmsac_vv_float32m1_tumu (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVV32VFloat32VBVFVFVF_TUMU, fmsac_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmsac_vf_float32m1_tumu (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVF32VFloat32VBVFSFVF_TUMU, fmsac_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmsac_vv_float64m1_tumu (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVV64VFloat64VBVFVFVF_TUMU, fmsac_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmsac_vf_float64m1_tumu (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVF64VFloat64VBVFSFVF_TUMU, fmsac_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmsac_vv_float16m1_tumu (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVV16VFloat16VBVFVFVF_TUMU, fnmsac_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmsac_vf_float16m1_tumu (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVF16VFloat16VBVFSFVF_TUMU, fnmsac_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmsac_vv_float32m1_tumu (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVV32VFloat32VBVFVFVF_TUMU, fnmsac_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmsac_vf_float32m1_tumu (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVF32VFloat32VBVFSFVF_TUMU, fnmsac_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmsac_vv_float64m1_tumu (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVV64VFloat64VBVFVFVF_TUMU, fnmsac_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmsac_vf_float64m1_tumu (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVF64VFloat64VBVFSFVF_TUMU, fnmsac_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfmadd_vv_float16m1_tumu (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVV16VFloat16VBVFVFVF_TUMU, fmadd_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmadd_vf_float16m1_tumu (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVF16VFloat16VBVFSFVF_TUMU, fmadd_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmadd_vv_float32m1_tumu (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVV32VFloat32VBVFVFVF_TUMU, fmadd_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmadd_vf_float32m1_tumu (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVF32VFloat32VBVFSFVF_TUMU, fmadd_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmadd_vv_float64m1_tumu (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVV64VFloat64VBVFVFVF_TUMU, fmadd_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmadd_vf_float64m1_tumu (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVF64VFloat64VBVFSFVF_TUMU, fmadd_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmadd_vv_float16m1_tumu (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVV16VFloat16VBVFVFVF_TUMU, fnmadd_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmadd_vf_float16m1_tumu (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVF16VFloat16VBVFSFVF_TUMU, fnmadd_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmadd_vv_float32m1_tumu (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVV32VFloat32VBVFVFVF_TUMU, fnmadd_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmadd_vf_float32m1_tumu (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVF32VFloat32VBVFSFVF_TUMU, fnmadd_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmadd_vv_float64m1_tumu (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVV64VFloat64VBVFVFVF_TUMU, fnmadd_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmadd_vf_float64m1_tumu (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVF64VFloat64VBVFSFVF_TUMU, fnmadd_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfmsub_vv_float16m1_tumu (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVV16VFloat16VBVFVFVF_TUMU, fmsub_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmsub_vf_float16m1_tumu (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVF16VFloat16VBVFSFVF_TUMU, fmsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmsub_vv_float32m1_tumu (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVV32VFloat32VBVFVFVF_TUMU, fmsub_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmsub_vf_float32m1_tumu (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVF32VFloat32VBVFSFVF_TUMU, fmsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmsub_vv_float64m1_tumu (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVV64VFloat64VBVFVFVF_TUMU, fmsub_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmsub_vf_float64m1_tumu (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVF64VFloat64VBVFSFVF_TUMU, fmsub_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmsub_vv_float16m1_tumu (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVV16VFloat16VBVFVFVF_TUMU, fnmsub_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmsub_vf_float16m1_tumu (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVF16VFloat16VBVFSFVF_TUMU, fnmsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmsub_vv_float32m1_tumu (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVV32VFloat32VBVFVFVF_TUMU, fnmsub_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmsub_vf_float32m1_tumu (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVF32VFloat32VBVFSFVF_TUMU, fnmsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmsub_vv_float64m1_tumu (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVV64VFloat64VBVFVFVF_TUMU, fnmsub_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmsub_vf_float64m1_tumu (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVF64VFloat64VBVFSFVF_TUMU, fnmsub_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfmacc_vv_float16m1_tama (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVV16VFloat16VBVFVFVF_TAMA, fmacc_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmacc_vf_float16m1_tama (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVF16VFloat16VBVFSFVF_TAMA, fmacc_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmacc_vv_float32m1_tama (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVV32VFloat32VBVFVFVF_TAMA, fmacc_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmacc_vf_float32m1_tama (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVF32VFloat32VBVFSFVF_TAMA, fmacc_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmacc_vv_float64m1_tama (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVV64VFloat64VBVFVFVF_TAMA, fmacc_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmacc_vf_float64m1_tama (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVF64VFloat64VBVFSFVF_TAMA, fmacc_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmacc_vv_float16m1_tama (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVV16VFloat16VBVFVFVF_TAMA, fnmacc_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmacc_vf_float16m1_tama (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVF16VFloat16VBVFSFVF_TAMA, fnmacc_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmacc_vv_float32m1_tama (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVV32VFloat32VBVFVFVF_TAMA, fnmacc_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmacc_vf_float32m1_tama (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVF32VFloat32VBVFSFVF_TAMA, fnmacc_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmacc_vv_float64m1_tama (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVV64VFloat64VBVFVFVF_TAMA, fnmacc_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmacc_vf_float64m1_tama (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVF64VFloat64VBVFSFVF_TAMA, fnmacc_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfmsac_vv_float16m1_tama (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVV16VFloat16VBVFVFVF_TAMA, fmsac_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmsac_vf_float16m1_tama (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVF16VFloat16VBVFSFVF_TAMA, fmsac_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmsac_vv_float32m1_tama (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVV32VFloat32VBVFVFVF_TAMA, fmsac_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmsac_vf_float32m1_tama (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVF32VFloat32VBVFSFVF_TAMA, fmsac_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmsac_vv_float64m1_tama (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVV64VFloat64VBVFVFVF_TAMA, fmsac_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmsac_vf_float64m1_tama (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVF64VFloat64VBVFSFVF_TAMA, fmsac_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmsac_vv_float16m1_tama (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVV16VFloat16VBVFVFVF_TAMA, fnmsac_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmsac_vf_float16m1_tama (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVF16VFloat16VBVFSFVF_TAMA, fnmsac_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmsac_vv_float32m1_tama (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVV32VFloat32VBVFVFVF_TAMA, fnmsac_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmsac_vf_float32m1_tama (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVF32VFloat32VBVFSFVF_TAMA, fnmsac_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmsac_vv_float64m1_tama (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVV64VFloat64VBVFVFVF_TAMA, fnmsac_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmsac_vf_float64m1_tama (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVF64VFloat64VBVFSFVF_TAMA, fnmsac_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfmadd_vv_float16m1_tama (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVV16VFloat16VBVFVFVF_TAMA, fmadd_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmadd_vf_float16m1_tama (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVF16VFloat16VBVFSFVF_TAMA, fmadd_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmadd_vv_float32m1_tama (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVV32VFloat32VBVFVFVF_TAMA, fmadd_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmadd_vf_float32m1_tama (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVF32VFloat32VBVFSFVF_TAMA, fmadd_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmadd_vv_float64m1_tama (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVV64VFloat64VBVFVFVF_TAMA, fmadd_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmadd_vf_float64m1_tama (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVF64VFloat64VBVFSFVF_TAMA, fmadd_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmadd_vv_float16m1_tama (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVV16VFloat16VBVFVFVF_TAMA, fnmadd_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmadd_vf_float16m1_tama (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVF16VFloat16VBVFSFVF_TAMA, fnmadd_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmadd_vv_float32m1_tama (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVV32VFloat32VBVFVFVF_TAMA, fnmadd_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmadd_vf_float32m1_tama (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVF32VFloat32VBVFSFVF_TAMA, fnmadd_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmadd_vv_float64m1_tama (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVV64VFloat64VBVFVFVF_TAMA, fnmadd_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmadd_vf_float64m1_tama (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVF64VFloat64VBVFSFVF_TAMA, fnmadd_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfmsub_vv_float16m1_tama (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVV16VFloat16VBVFVFVF_TAMA, fmsub_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmsub_vf_float16m1_tama (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVF16VFloat16VBVFSFVF_TAMA, fmsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmsub_vv_float32m1_tama (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVV32VFloat32VBVFVFVF_TAMA, fmsub_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmsub_vf_float32m1_tama (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVF32VFloat32VBVFSFVF_TAMA, fmsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmsub_vv_float64m1_tama (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVV64VFloat64VBVFVFVF_TAMA, fmsub_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmsub_vf_float64m1_tama (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVF64VFloat64VBVFSFVF_TAMA, fmsub_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmsub_vv_float16m1_tama (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVV16VFloat16VBVFVFVF_TAMA, fnmsub_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmsub_vf_float16m1_tama (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVF16VFloat16VBVFSFVF_TAMA, fnmsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmsub_vv_float32m1_tama (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVV32VFloat32VBVFVFVF_TAMA, fnmsub_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmsub_vf_float32m1_tama (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVF32VFloat32VBVFSFVF_TAMA, fnmsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmsub_vv_float64m1_tama (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVV64VFloat64VBVFVFVF_TAMA, fnmsub_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmsub_vf_float64m1_tama (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVF64VFloat64VBVFSFVF_TAMA, fnmsub_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfmacc_vv_float16m1_tamu (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVV16VFloat16VBVFVFVF_TAMU, fmacc_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmacc_vf_float16m1_tamu (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVF16VFloat16VBVFSFVF_TAMU, fmacc_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmacc_vv_float32m1_tamu (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVV32VFloat32VBVFVFVF_TAMU, fmacc_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmacc_vf_float32m1_tamu (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVF32VFloat32VBVFSFVF_TAMU, fmacc_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmacc_vv_float64m1_tamu (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVV64VFloat64VBVFVFVF_TAMU, fmacc_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmacc_vf_float64m1_tamu (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaccVF64VFloat64VBVFSFVF_TAMU, fmacc_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmacc_vv_float16m1_tamu (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVV16VFloat16VBVFVFVF_TAMU, fnmacc_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmacc_vf_float16m1_tamu (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVF16VFloat16VBVFSFVF_TAMU, fnmacc_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmacc_vv_float32m1_tamu (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVV32VFloat32VBVFVFVF_TAMU, fnmacc_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmacc_vf_float32m1_tamu (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVF32VFloat32VBVFSFVF_TAMU, fnmacc_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmacc_vv_float64m1_tamu (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVV64VFloat64VBVFVFVF_TAMU, fnmacc_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmacc_vf_float64m1_tamu (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaccVF64VFloat64VBVFSFVF_TAMU, fnmacc_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfmsac_vv_float16m1_tamu (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVV16VFloat16VBVFVFVF_TAMU, fmsac_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmsac_vf_float16m1_tamu (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVF16VFloat16VBVFSFVF_TAMU, fmsac_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmsac_vv_float32m1_tamu (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVV32VFloat32VBVFVFVF_TAMU, fmsac_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmsac_vf_float32m1_tamu (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVF32VFloat32VBVFSFVF_TAMU, fmsac_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmsac_vv_float64m1_tamu (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVV64VFloat64VBVFVFVF_TAMU, fmsac_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmsac_vf_float64m1_tamu (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsacVF64VFloat64VBVFSFVF_TAMU, fmsac_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmsac_vv_float16m1_tamu (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVV16VFloat16VBVFVFVF_TAMU, fnmsac_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmsac_vf_float16m1_tamu (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVF16VFloat16VBVFSFVF_TAMU, fnmsac_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmsac_vv_float32m1_tamu (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVV32VFloat32VBVFVFVF_TAMU, fnmsac_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmsac_vf_float32m1_tamu (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVF32VFloat32VBVFSFVF_TAMU, fnmsac_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmsac_vv_float64m1_tamu (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVV64VFloat64VBVFVFVF_TAMU, fnmsac_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmsac_vf_float64m1_tamu (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsacVF64VFloat64VBVFSFVF_TAMU, fnmsac_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfmadd_vv_float16m1_tamu (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVV16VFloat16VBVFVFVF_TAMU, fmadd_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmadd_vf_float16m1_tamu (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVF16VFloat16VBVFSFVF_TAMU, fmadd_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmadd_vv_float32m1_tamu (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVV32VFloat32VBVFVFVF_TAMU, fmadd_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmadd_vf_float32m1_tamu (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVF32VFloat32VBVFSFVF_TAMU, fmadd_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmadd_vv_float64m1_tamu (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVV64VFloat64VBVFVFVF_TAMU, fmadd_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmadd_vf_float64m1_tamu (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmaddVF64VFloat64VBVFSFVF_TAMU, fmadd_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmadd_vv_float16m1_tamu (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVV16VFloat16VBVFVFVF_TAMU, fnmadd_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmadd_vf_float16m1_tamu (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVF16VFloat16VBVFSFVF_TAMU, fnmadd_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmadd_vv_float32m1_tamu (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVV32VFloat32VBVFVFVF_TAMU, fnmadd_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmadd_vf_float32m1_tamu (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVF32VFloat32VBVFSFVF_TAMU, fnmadd_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmadd_vv_float64m1_tamu (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVV64VFloat64VBVFVFVF_TAMU, fnmadd_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmadd_vf_float64m1_tamu (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmaddVF64VFloat64VBVFSFVF_TAMU, fnmadd_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfmsub_vv_float16m1_tamu (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVV16VFloat16VBVFVFVF_TAMU, fmsub_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmsub_vf_float16m1_tamu (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVF16VFloat16VBVFSFVF_TAMU, fmsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfmsub_vv_float32m1_tamu (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVV32VFloat32VBVFVFVF_TAMU, fmsub_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmsub_vf_float32m1_tamu (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVF32VFloat32VBVFSFVF_TAMU, fmsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfmsub_vv_float64m1_tamu (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVV64VFloat64VBVFVFVF_TAMU, fmsub_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmsub_vf_float64m1_tamu (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FmsubVF64VFloat64VBVFSFVF_TAMU, fmsub_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) +// vfloat16m1_t vfnmsub_vv_float16m1_tamu (vbool16_t mask, vfloat16m1_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVV16VFloat16VBVFVFVF_TAMU, fnmsub_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfnmsub_vf_float16m1_tamu (vbool16_t mask, vfloat16m1_t vd, float16_t rs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVF16VFloat16VBVFSFVF_TAMU, fnmsub_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, ScalarFloat16, OneDFloat16) +// vfloat32m1_t vfnmsub_vv_float32m1_tamu (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVV32VFloat32VBVFVFVF_TAMU, fnmsub_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfnmsub_vf_float32m1_tamu (vbool32_t mask, vfloat32m1_t vd, float32_t rs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVF32VFloat32VBVFSFVF_TAMU, fnmsub_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat32, OneDFloat32) +// vfloat64m1_t vfnmsub_vv_float64m1_tamu (vbool64_t mask, vfloat64m1_t vd, vfloat64m1_t vs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVV64VFloat64VBVFVFVF_TAMU, fnmsub_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfnmsub_vf_float64m1_tamu (vbool64_t mask, vfloat64m1_t vd, float64_t rs1, vfloat64m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FnmsubVF64VFloat64VBVFSFVF_TAMU, fnmsub_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat64, OneDFloat64) + +// vfloat32m2_t vfwmacc_vv_float32m2_tu (vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVV16VFloat32VFVFVF_TU, fwmacc_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwmacc_vf_float32m2_tu (vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVF16VFloat32VFSFVF_TU, fwmacc_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwmacc_vv_float64m2_tu (vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVV32VFloat64VFVFVF_TU, fwmacc_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwmacc_vf_float64m2_tu (vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVF32VFloat64VFSFVF_TU, fwmacc_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, ScalarFloat32, OneDFloat32) +// vfloat32m2_t vfwnmacc_vv_float32m2_tu (vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVV16VFloat32VFVFVF_TU, fwnmacc_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwnmacc_vf_float32m2_tu (vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVF16VFloat32VFSFVF_TU, fwnmacc_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwnmacc_vv_float64m2_tu (vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVV32VFloat64VFVFVF_TU, fwnmacc_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwnmacc_vf_float64m2_tu (vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVF32VFloat64VFSFVF_TU, fwnmacc_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, ScalarFloat32, OneDFloat32) +// vfloat32m2_t vfwmsac_vv_float32m2_tu (vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVV16VFloat32VFVFVF_TU, fwmsac_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwmsac_vf_float32m2_tu (vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVF16VFloat32VFSFVF_TU, fwmsac_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwmsac_vv_float64m2_tu (vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVV32VFloat64VFVFVF_TU, fwmsac_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwmsac_vf_float64m2_tu (vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVF32VFloat64VFSFVF_TU, fwmsac_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, ScalarFloat32, OneDFloat32) +// vfloat32m2_t vfwnmsac_vv_float32m2_tu (vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVV16VFloat32VFVFVF_TU, fwnmsac_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwnmsac_vf_float32m2_tu (vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVF16VFloat32VFSFVF_TU, fwnmsac_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwnmsac_vv_float64m2_tu (vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVV32VFloat64VFVFVF_TU, fwnmsac_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwnmsac_vf_float64m2_tu (vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVF32VFloat64VFSFVF_TU, fwnmsac_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, ScalarFloat32, OneDFloat32) +// vfloat32m2_t vfwmacc_vv_float32m2_ta (vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVV16VFloat32VFVFVF_TA, fwmacc_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwmacc_vf_float32m2_ta (vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVF16VFloat32VFSFVF_TA, fwmacc_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwmacc_vv_float64m2_ta (vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVV32VFloat64VFVFVF_TA, fwmacc_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwmacc_vf_float64m2_ta (vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVF32VFloat64VFSFVF_TA, fwmacc_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, ScalarFloat32, OneDFloat32) +// vfloat32m2_t vfwnmacc_vv_float32m2_ta (vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVV16VFloat32VFVFVF_TA, fwnmacc_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwnmacc_vf_float32m2_ta (vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVF16VFloat32VFSFVF_TA, fwnmacc_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwnmacc_vv_float64m2_ta (vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVV32VFloat64VFVFVF_TA, fwnmacc_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwnmacc_vf_float64m2_ta (vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVF32VFloat64VFSFVF_TA, fwnmacc_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, ScalarFloat32, OneDFloat32) +// vfloat32m2_t vfwmsac_vv_float32m2_ta (vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVV16VFloat32VFVFVF_TA, fwmsac_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwmsac_vf_float32m2_ta (vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVF16VFloat32VFSFVF_TA, fwmsac_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwmsac_vv_float64m2_ta (vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVV32VFloat64VFVFVF_TA, fwmsac_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwmsac_vf_float64m2_ta (vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVF32VFloat64VFSFVF_TA, fwmsac_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, ScalarFloat32, OneDFloat32) +// vfloat32m2_t vfwnmsac_vv_float32m2_ta (vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVV16VFloat32VFVFVF_TA, fwnmsac_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwnmsac_vf_float32m2_ta (vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVF16VFloat32VFSFVF_TA, fwnmsac_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDFloat32, 3, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwnmsac_vv_float64m2_ta (vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVV32VFloat64VFVFVF_TA, fwnmsac_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwnmsac_vf_float64m2_ta (vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVF32VFloat64VFSFVF_TA, fwnmsac_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | MulAddOperation | TailAgnostic, OneDFloat64, 3, OneDFloat64, ScalarFloat32, OneDFloat32) +// vfloat32m2_t vfwmacc_vv_float32m2_tuma (vbool16_t mask, vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVV16VFloat32VBVFVFVF_TUMA, fwmacc_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwmacc_vf_float32m2_tuma (vbool16_t mask, vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVF16VFloat32VBVFSFVF_TUMA, fwmacc_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwmacc_vv_float64m2_tuma (vbool32_t mask, vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVV32VFloat64VBVFVFVF_TUMA, fwmacc_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwmacc_vf_float64m2_tuma (vbool32_t mask, vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVF32VFloat64VBVFSFVF_TUMA, fwmacc_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat32, OneDFloat32) +// vfloat32m2_t vfwnmacc_vv_float32m2_tuma (vbool16_t mask, vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVV16VFloat32VBVFVFVF_TUMA, fwnmacc_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwnmacc_vf_float32m2_tuma (vbool16_t mask, vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVF16VFloat32VBVFSFVF_TUMA, fwnmacc_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwnmacc_vv_float64m2_tuma (vbool32_t mask, vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVV32VFloat64VBVFVFVF_TUMA, fwnmacc_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwnmacc_vf_float64m2_tuma (vbool32_t mask, vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVF32VFloat64VBVFSFVF_TUMA, fwnmacc_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat32, OneDFloat32) +// vfloat32m2_t vfwmsac_vv_float32m2_tuma (vbool16_t mask, vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVV16VFloat32VBVFVFVF_TUMA, fwmsac_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwmsac_vf_float32m2_tuma (vbool16_t mask, vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVF16VFloat32VBVFSFVF_TUMA, fwmsac_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwmsac_vv_float64m2_tuma (vbool32_t mask, vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVV32VFloat64VBVFVFVF_TUMA, fwmsac_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwmsac_vf_float64m2_tuma (vbool32_t mask, vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVF32VFloat64VBVFSFVF_TUMA, fwmsac_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat32, OneDFloat32) +// vfloat32m2_t vfwnmsac_vv_float32m2_tuma (vbool16_t mask, vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVV16VFloat32VBVFVFVF_TUMA, fwnmsac_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwnmsac_vf_float32m2_tuma (vbool16_t mask, vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVF16VFloat32VBVFSFVF_TUMA, fwnmsac_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwnmsac_vv_float64m2_tuma (vbool32_t mask, vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVV32VFloat64VBVFVFVF_TUMA, fwnmsac_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwnmsac_vf_float64m2_tuma (vbool32_t mask, vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVF32VFloat64VBVFSFVF_TUMA, fwnmsac_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat32, OneDFloat32) +// vfloat32m2_t vfwmacc_vv_float32m2_tumu (vbool16_t mask, vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVV16VFloat32VBVFVFVF_TUMU, fwmacc_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwmacc_vf_float32m2_tumu (vbool16_t mask, vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVF16VFloat32VBVFSFVF_TUMU, fwmacc_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwmacc_vv_float64m2_tumu (vbool32_t mask, vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVV32VFloat64VBVFVFVF_TUMU, fwmacc_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwmacc_vf_float64m2_tumu (vbool32_t mask, vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVF32VFloat64VBVFSFVF_TUMU, fwmacc_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat32, OneDFloat32) +// vfloat32m2_t vfwnmacc_vv_float32m2_tumu (vbool16_t mask, vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVV16VFloat32VBVFVFVF_TUMU, fwnmacc_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwnmacc_vf_float32m2_tumu (vbool16_t mask, vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVF16VFloat32VBVFSFVF_TUMU, fwnmacc_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwnmacc_vv_float64m2_tumu (vbool32_t mask, vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVV32VFloat64VBVFVFVF_TUMU, fwnmacc_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwnmacc_vf_float64m2_tumu (vbool32_t mask, vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVF32VFloat64VBVFSFVF_TUMU, fwnmacc_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat32, OneDFloat32) +// vfloat32m2_t vfwmsac_vv_float32m2_tumu (vbool16_t mask, vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVV16VFloat32VBVFVFVF_TUMU, fwmsac_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwmsac_vf_float32m2_tumu (vbool16_t mask, vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVF16VFloat32VBVFSFVF_TUMU, fwmsac_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwmsac_vv_float64m2_tumu (vbool32_t mask, vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVV32VFloat64VBVFVFVF_TUMU, fwmsac_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwmsac_vf_float64m2_tumu (vbool32_t mask, vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVF32VFloat64VBVFSFVF_TUMU, fwmsac_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat32, OneDFloat32) +// vfloat32m2_t vfwnmsac_vv_float32m2_tumu (vbool16_t mask, vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVV16VFloat32VBVFVFVF_TUMU, fwnmsac_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwnmsac_vf_float32m2_tumu (vbool16_t mask, vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVF16VFloat32VBVFSFVF_TUMU, fwnmsac_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwnmsac_vv_float64m2_tumu (vbool32_t mask, vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVV32VFloat64VBVFVFVF_TUMU, fwnmsac_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwnmsac_vf_float64m2_tumu (vbool32_t mask, vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVF32VFloat64VBVFSFVF_TUMU, fwnmsac_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat32, OneDFloat32) +// vfloat32m2_t vfwmacc_vv_float32m2_tama (vbool16_t mask, vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVV16VFloat32VBVFVFVF_TAMA, fwmacc_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwmacc_vf_float32m2_tama (vbool16_t mask, vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVF16VFloat32VBVFSFVF_TAMA, fwmacc_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwmacc_vv_float64m2_tama (vbool32_t mask, vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVV32VFloat64VBVFVFVF_TAMA, fwmacc_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwmacc_vf_float64m2_tama (vbool32_t mask, vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVF32VFloat64VBVFSFVF_TAMA, fwmacc_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat32, OneDFloat32) +// vfloat32m2_t vfwnmacc_vv_float32m2_tama (vbool16_t mask, vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVV16VFloat32VBVFVFVF_TAMA, fwnmacc_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwnmacc_vf_float32m2_tama (vbool16_t mask, vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVF16VFloat32VBVFSFVF_TAMA, fwnmacc_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwnmacc_vv_float64m2_tama (vbool32_t mask, vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVV32VFloat64VBVFVFVF_TAMA, fwnmacc_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwnmacc_vf_float64m2_tama (vbool32_t mask, vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVF32VFloat64VBVFSFVF_TAMA, fwnmacc_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat32, OneDFloat32) +// vfloat32m2_t vfwmsac_vv_float32m2_tama (vbool16_t mask, vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVV16VFloat32VBVFVFVF_TAMA, fwmsac_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwmsac_vf_float32m2_tama (vbool16_t mask, vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVF16VFloat32VBVFSFVF_TAMA, fwmsac_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwmsac_vv_float64m2_tama (vbool32_t mask, vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVV32VFloat64VBVFVFVF_TAMA, fwmsac_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwmsac_vf_float64m2_tama (vbool32_t mask, vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVF32VFloat64VBVFSFVF_TAMA, fwmsac_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat32, OneDFloat32) +// vfloat32m2_t vfwnmsac_vv_float32m2_tama (vbool16_t mask, vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVV16VFloat32VBVFVFVF_TAMA, fwnmsac_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwnmsac_vf_float32m2_tama (vbool16_t mask, vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVF16VFloat32VBVFSFVF_TAMA, fwnmsac_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwnmsac_vv_float64m2_tama (vbool32_t mask, vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVV32VFloat64VBVFVFVF_TAMA, fwnmsac_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwnmsac_vf_float64m2_tama (vbool32_t mask, vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVF32VFloat64VBVFSFVF_TAMA, fwnmsac_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat32, OneDFloat32) +// vfloat32m2_t vfwmacc_vv_float32m2_tamu (vbool16_t mask, vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVV16VFloat32VBVFVFVF_TAMU, fwmacc_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwmacc_vf_float32m2_tamu (vbool16_t mask, vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVF16VFloat32VBVFSFVF_TAMU, fwmacc_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwmacc_vv_float64m2_tamu (vbool32_t mask, vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVV32VFloat64VBVFVFVF_TAMU, fwmacc_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwmacc_vf_float64m2_tamu (vbool32_t mask, vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmaccVF32VFloat64VBVFSFVF_TAMU, fwmacc_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat32, OneDFloat32) +// vfloat32m2_t vfwnmacc_vv_float32m2_tamu (vbool16_t mask, vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVV16VFloat32VBVFVFVF_TAMU, fwnmacc_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwnmacc_vf_float32m2_tamu (vbool16_t mask, vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVF16VFloat32VBVFSFVF_TAMU, fwnmacc_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwnmacc_vv_float64m2_tamu (vbool32_t mask, vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVV32VFloat64VBVFVFVF_TAMU, fwnmacc_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwnmacc_vf_float64m2_tamu (vbool32_t mask, vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmaccVF32VFloat64VBVFSFVF_TAMU, fwnmacc_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat32, OneDFloat32) +// vfloat32m2_t vfwmsac_vv_float32m2_tamu (vbool16_t mask, vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVV16VFloat32VBVFVFVF_TAMU, fwmsac_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwmsac_vf_float32m2_tamu (vbool16_t mask, vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVF16VFloat32VBVFSFVF_TAMU, fwmsac_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwmsac_vv_float64m2_tamu (vbool32_t mask, vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVV32VFloat64VBVFVFVF_TAMU, fwmsac_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwmsac_vf_float64m2_tamu (vbool32_t mask, vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwmsacVF32VFloat64VBVFSFVF_TAMU, fwmsac_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat32, OneDFloat32) +// vfloat32m2_t vfwnmsac_vv_float32m2_tamu (vbool16_t mask, vfloat32m2_t vd, vfloat16m1_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVV16VFloat32VBVFVFVF_TAMU, fwnmsac_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat16, OneDFloat16) +// vfloat32m2_t vfwnmsac_vf_float32m2_tamu (vbool16_t mask, vfloat32m2_t vd, float16_t vs1, vfloat16m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVF16VFloat32VBVFSFVF_TAMU, fwnmsac_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, ScalarFloat16, OneDFloat16) +// vfloat64m2_t vfwnmsac_vv_float64m2_tamu (vbool32_t mask, vfloat64m2_t vd, vfloat32m1_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVV32VFloat64VBVFVFVF_TAMU, fwnmsac_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat32, OneDFloat32) +// vfloat64m2_t vfwnmsac_vf_float64m2_tamu (vbool32_t mask, vfloat64m2_t vd, float32_t vs1, vfloat32m1_t vs2, size_t vl); +CUSTOM_OP_TYPE(FwnmsacVF32VFloat64VBVFSFVF_TAMU, fwnmsac_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | MulAddOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, ScalarFloat32, OneDFloat32) + +// vfloat16m1_t vfsqrt_v_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FsqrtV16VFloat16VFVF_TU, fsqrt_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 2, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfsqrt_v_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FsqrtV32VFloat32VFVF_TU, fsqrt_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 2, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfsqrt_v_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FsqrtV64VFloat64VFVF_TU, fsqrt_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 2, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfsqrt_v_float16m1_ta (vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FsqrtV16VFloat16VF_TA, fsqrt_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 1, OneDFloat16) +// vfloat32m1_t vfsqrt_v_float32m1_ta (vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FsqrtV32VFloat32VF_TA, fsqrt_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 1, OneDFloat32) +// vfloat64m1_t vfsqrt_v_float64m1_ta (vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FsqrtV64VFloat64VF_TA, fsqrt_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 1, OneDFloat64) +// vfloat16m1_t vfsqrt_v_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FsqrtV16VFloat16VBVFVF_TUMA, fsqrt_v, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfsqrt_v_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FsqrtV32VFloat32VBVFVF_TUMA, fsqrt_v, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfsqrt_v_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FsqrtV64VFloat64VBVFVF_TUMA, fsqrt_v, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfsqrt_v_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FsqrtV16VFloat16VBVFVF_TUMU, fsqrt_v, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfsqrt_v_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FsqrtV32VFloat32VBVFVF_TUMU, fsqrt_v, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfsqrt_v_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FsqrtV64VFloat64VBVFVF_TUMU, fsqrt_v, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfsqrt_v_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FsqrtV16VFloat16VBVF_TAMA, fsqrt_v, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 2, OneDBool, OneDFloat16) +// vfloat32m1_t vfsqrt_v_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FsqrtV32VFloat32VBVF_TAMA, fsqrt_v, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 2, OneDBool, OneDFloat32) +// vfloat64m1_t vfsqrt_v_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FsqrtV64VFloat64VBVF_TAMA, fsqrt_v, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 2, OneDBool, OneDFloat64) +// vfloat16m1_t vfsqrt_v_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FsqrtV16VFloat16VBVFVF_TAMU, fsqrt_v, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfsqrt_v_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FsqrtV32VFloat32VBVFVF_TAMU, fsqrt_v, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfsqrt_v_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FsqrtV64VFloat64VBVFVF_TAMU, fsqrt_v, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfrsqrt7_v_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frsqrt7V16VFloat16VFVF_TU, frsqrt7_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 2, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfrsqrt7_v_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frsqrt7V32VFloat32VFVF_TU, frsqrt7_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 2, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfrsqrt7_v_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frsqrt7V64VFloat64VFVF_TU, frsqrt7_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 2, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfrsqrt7_v_float16m1_ta (vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frsqrt7V16VFloat16VF_TA, frsqrt7_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 1, OneDFloat16) +// vfloat32m1_t vfrsqrt7_v_float32m1_ta (vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frsqrt7V32VFloat32VF_TA, frsqrt7_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 1, OneDFloat32) +// vfloat64m1_t vfrsqrt7_v_float64m1_ta (vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frsqrt7V64VFloat64VF_TA, frsqrt7_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 1, OneDFloat64) +// vfloat16m1_t vfrsqrt7_v_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frsqrt7V16VFloat16VBVFVF_TUMA, frsqrt7_v, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfrsqrt7_v_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frsqrt7V32VFloat32VBVFVF_TUMA, frsqrt7_v, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfrsqrt7_v_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frsqrt7V64VFloat64VBVFVF_TUMA, frsqrt7_v, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfrsqrt7_v_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frsqrt7V16VFloat16VBVFVF_TUMU, frsqrt7_v, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfrsqrt7_v_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frsqrt7V32VFloat32VBVFVF_TUMU, frsqrt7_v, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfrsqrt7_v_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frsqrt7V64VFloat64VBVFVF_TUMU, frsqrt7_v, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfrsqrt7_v_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frsqrt7V16VFloat16VBVF_TAMA, frsqrt7_v, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 2, OneDBool, OneDFloat16) +// vfloat32m1_t vfrsqrt7_v_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frsqrt7V32VFloat32VBVF_TAMA, frsqrt7_v, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 2, OneDBool, OneDFloat32) +// vfloat64m1_t vfrsqrt7_v_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frsqrt7V64VFloat64VBVF_TAMA, frsqrt7_v, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 2, OneDBool, OneDFloat64) +// vfloat16m1_t vfrsqrt7_v_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frsqrt7V16VFloat16VBVFVF_TAMU, frsqrt7_v, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfrsqrt7_v_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frsqrt7V32VFloat32VBVFVF_TAMU, frsqrt7_v, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfrsqrt7_v_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frsqrt7V64VFloat64VBVFVF_TAMU, frsqrt7_v, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) + +// vfloat16m1_t vfrec7_v_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frec7V16VFloat16VFVF_TU, frec7_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 2, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfrec7_v_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frec7V32VFloat32VFVF_TU, frec7_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 2, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfrec7_v_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frec7V64VFloat64VFVF_TU, frec7_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 2, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfrec7_v_float16m1_ta (vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frec7V16VFloat16VF_TA, frec7_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 1, OneDFloat16) +// vfloat32m1_t vfrec7_v_float32m1_ta (vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frec7V32VFloat32VF_TA, frec7_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 1, OneDFloat32) +// vfloat64m1_t vfrec7_v_float64m1_ta (vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frec7V64VFloat64VF_TA, frec7_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 1, OneDFloat64) +// vfloat16m1_t vfrec7_v_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frec7V16VFloat16VBVFVF_TUMA, frec7_v, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfrec7_v_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frec7V32VFloat32VBVFVF_TUMA, frec7_v, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfrec7_v_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frec7V64VFloat64VBVFVF_TUMA, frec7_v, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfrec7_v_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frec7V16VFloat16VBVFVF_TUMU, frec7_v, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfrec7_v_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frec7V32VFloat32VBVFVF_TUMU, frec7_v, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfrec7_v_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frec7V64VFloat64VBVFVF_TUMU, frec7_v, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfrec7_v_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frec7V16VFloat16VBVF_TAMA, frec7_v, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 2, OneDBool, OneDFloat16) +// vfloat32m1_t vfrec7_v_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frec7V32VFloat32VBVF_TAMA, frec7_v, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 2, OneDBool, OneDFloat32) +// vfloat64m1_t vfrec7_v_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frec7V64VFloat64VBVF_TAMA, frec7_v, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 2, OneDBool, OneDFloat64) +// vfloat16m1_t vfrec7_v_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frec7V16VFloat16VBVFVF_TAMU, frec7_v, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfrec7_v_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frec7V32VFloat32VBVFVF_TAMU, frec7_v, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfrec7_v_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(Frec7V64VFloat64VBVFVF_TAMU, frec7_v, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) + +// vfloat16m1_t vfmin_vv_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVV16VFloat16VFVFVF_TU, fmin_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmin_vf_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVF16VFloat16VFVFSF_TU, fmin_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfmin_vv_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVV32VFloat32VFVFVF_TU, fmin_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmin_vf_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVF32VFloat32VFVFSF_TU, fmin_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfmin_vv_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVV64VFloat64VFVFVF_TU, fmin_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmin_vf_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVF64VFloat64VFVFSF_TU, fmin_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfmax_vv_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVV16VFloat16VFVFVF_TU, fmax_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmax_vf_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVF16VFloat16VFVFSF_TU, fmax_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfmax_vv_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVV32VFloat32VFVFVF_TU, fmax_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmax_vf_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVF32VFloat32VFVFSF_TU, fmax_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfmax_vv_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVV64VFloat64VFVFVF_TU, fmax_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmax_vf_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVF64VFloat64VFVFSF_TU, fmax_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfmin_vv_float16m1_ta (vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVV16VFloat16VFVF_TA, fmin_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmin_vf_float16m1_ta (vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVF16VFloat16VFSF_TA, fmin_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfmin_vv_float32m1_ta (vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVV32VFloat32VFVF_TA, fmin_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmin_vf_float32m1_ta (vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVF32VFloat32VFSF_TA, fmin_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfmin_vv_float64m1_ta (vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVV64VFloat64VFVF_TA, fmin_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmin_vf_float64m1_ta (vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVF64VFloat64VFSF_TA, fmin_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfmax_vv_float16m1_ta (vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVV16VFloat16VFVF_TA, fmax_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmax_vf_float16m1_ta (vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVF16VFloat16VFSF_TA, fmax_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfmax_vv_float32m1_ta (vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVV32VFloat32VFVF_TA, fmax_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmax_vf_float32m1_ta (vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVF32VFloat32VFSF_TA, fmax_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfmax_vv_float64m1_ta (vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVV64VFloat64VFVF_TA, fmax_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmax_vf_float64m1_ta (vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVF64VFloat64VFSF_TA, fmax_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfmin_vv_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVV16VFloat16VBVFVFVF_TUMA, fmin_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmin_vf_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVF16VFloat16VBVFVFSF_TUMA, fmin_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfmin_vv_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVV32VFloat32VBVFVFVF_TUMA, fmin_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmin_vf_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVF32VFloat32VBVFVFSF_TUMA, fmin_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfmin_vv_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVV64VFloat64VBVFVFVF_TUMA, fmin_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmin_vf_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVF64VFloat64VBVFVFSF_TUMA, fmin_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfmax_vv_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVV16VFloat16VBVFVFVF_TUMA, fmax_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmax_vf_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVF16VFloat16VBVFVFSF_TUMA, fmax_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfmax_vv_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVV32VFloat32VBVFVFVF_TUMA, fmax_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmax_vf_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVF32VFloat32VBVFVFSF_TUMA, fmax_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfmax_vv_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVV64VFloat64VBVFVFVF_TUMA, fmax_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmax_vf_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVF64VFloat64VBVFVFSF_TUMA, fmax_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfmin_vv_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVV16VFloat16VBVFVFVF_TUMU, fmin_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmin_vf_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVF16VFloat16VBVFVFSF_TUMU, fmin_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfmin_vv_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVV32VFloat32VBVFVFVF_TUMU, fmin_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmin_vf_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVF32VFloat32VBVFVFSF_TUMU, fmin_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfmin_vv_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVV64VFloat64VBVFVFVF_TUMU, fmin_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmin_vf_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVF64VFloat64VBVFVFSF_TUMU, fmin_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfmax_vv_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVV16VFloat16VBVFVFVF_TUMU, fmax_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmax_vf_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVF16VFloat16VBVFVFSF_TUMU, fmax_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfmax_vv_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVV32VFloat32VBVFVFVF_TUMU, fmax_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmax_vf_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVF32VFloat32VBVFVFSF_TUMU, fmax_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfmax_vv_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVV64VFloat64VBVFVFVF_TUMU, fmax_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmax_vf_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVF64VFloat64VBVFVFSF_TUMU, fmax_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfmin_vv_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVV16VFloat16VBVFVF_TAMA, fmin_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmin_vf_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVF16VFloat16VBVFSF_TAMA, fmin_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfmin_vv_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVV32VFloat32VBVFVF_TAMA, fmin_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmin_vf_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVF32VFloat32VBVFSF_TAMA, fmin_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfmin_vv_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVV64VFloat64VBVFVF_TAMA, fmin_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmin_vf_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVF64VFloat64VBVFSF_TAMA, fmin_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfmax_vv_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVV16VFloat16VBVFVF_TAMA, fmax_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmax_vf_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVF16VFloat16VBVFSF_TAMA, fmax_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfmax_vv_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVV32VFloat32VBVFVF_TAMA, fmax_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmax_vf_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVF32VFloat32VBVFSF_TAMA, fmax_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfmax_vv_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVV64VFloat64VBVFVF_TAMA, fmax_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmax_vf_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVF64VFloat64VBVFSF_TAMA, fmax_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfmin_vv_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVV16VFloat16VBVFVFVF_TAMU, fmin_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmin_vf_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVF16VFloat16VBVFVFSF_TAMU, fmin_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfmin_vv_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVV32VFloat32VBVFVFVF_TAMU, fmin_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmin_vf_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVF32VFloat32VBVFVFSF_TAMU, fmin_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfmin_vv_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVV64VFloat64VBVFVFVF_TAMU, fmin_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmin_vf_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FminVF64VFloat64VBVFVFSF_TAMU, fmin_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfmax_vv_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVV16VFloat16VBVFVFVF_TAMU, fmax_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmax_vf_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVF16VFloat16VBVFVFSF_TAMU, fmax_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfmax_vv_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVV32VFloat32VBVFVFVF_TAMU, fmax_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmax_vf_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVF32VFloat32VBVFVFSF_TAMU, fmax_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfmax_vv_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVV64VFloat64VBVFVFVF_TAMU, fmax_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmax_vf_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FmaxVF64VFloat64VBVFVFSF_TAMU, fmax_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) + +// vfloat16m1_t vfsgnj_vv_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVV16VFloat16VFVFVF_TU, fsgnj_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsgnj_vf_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVF16VFloat16VFVFSF_TU, fsgnj_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsgnj_vv_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVV32VFloat32VFVFVF_TU, fsgnj_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsgnj_vf_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVF32VFloat32VFVFSF_TU, fsgnj_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsgnj_vv_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVV64VFloat64VFVFVF_TU, fsgnj_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsgnj_vf_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVF64VFloat64VFVFSF_TU, fsgnj_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfsgnjn_vv_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVV16VFloat16VFVFVF_TU, fsgnjn_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsgnjn_vf_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVF16VFloat16VFVFSF_TU, fsgnjn_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsgnjn_vv_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVV32VFloat32VFVFVF_TU, fsgnjn_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsgnjn_vf_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVF32VFloat32VFVFSF_TU, fsgnjn_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsgnjn_vv_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVV64VFloat64VFVFVF_TU, fsgnjn_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsgnjn_vf_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVF64VFloat64VFVFSF_TU, fsgnjn_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfsgnjx_vv_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVV16VFloat16VFVFVF_TU, fsgnjx_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsgnjx_vf_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVF16VFloat16VFVFSF_TU, fsgnjx_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsgnjx_vv_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVV32VFloat32VFVFVF_TU, fsgnjx_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsgnjx_vf_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVF32VFloat32VFVFSF_TU, fsgnjx_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsgnjx_vv_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVV64VFloat64VFVFVF_TU, fsgnjx_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsgnjx_vf_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVF64VFloat64VFVFSF_TU, fsgnjx_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfsgnj_vv_float16m1_ta (vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVV16VFloat16VFVF_TA, fsgnj_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsgnj_vf_float16m1_ta (vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVF16VFloat16VFSF_TA, fsgnj_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsgnj_vv_float32m1_ta (vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVV32VFloat32VFVF_TA, fsgnj_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsgnj_vf_float32m1_ta (vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVF32VFloat32VFSF_TA, fsgnj_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsgnj_vv_float64m1_ta (vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVV64VFloat64VFVF_TA, fsgnj_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsgnj_vf_float64m1_ta (vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVF64VFloat64VFSF_TA, fsgnj_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfsgnjn_vv_float16m1_ta (vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVV16VFloat16VFVF_TA, fsgnjn_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsgnjn_vf_float16m1_ta (vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVF16VFloat16VFSF_TA, fsgnjn_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsgnjn_vv_float32m1_ta (vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVV32VFloat32VFVF_TA, fsgnjn_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsgnjn_vf_float32m1_ta (vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVF32VFloat32VFSF_TA, fsgnjn_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsgnjn_vv_float64m1_ta (vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVV64VFloat64VFVF_TA, fsgnjn_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsgnjn_vf_float64m1_ta (vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVF64VFloat64VFSF_TA, fsgnjn_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfsgnjx_vv_float16m1_ta (vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVV16VFloat16VFVF_TA, fsgnjx_vv, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsgnjx_vf_float16m1_ta (vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVF16VFloat16VFSF_TA, fsgnjx_vf, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsgnjx_vv_float32m1_ta (vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVV32VFloat32VFVF_TA, fsgnjx_vv, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsgnjx_vf_float32m1_ta (vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVF32VFloat32VFSF_TA, fsgnjx_vf, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsgnjx_vv_float64m1_ta (vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVV64VFloat64VFVF_TA, fsgnjx_vv, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsgnjx_vf_float64m1_ta (vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVF64VFloat64VFSF_TA, fsgnjx_vf, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfsgnj_vv_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVV16VFloat16VBVFVFVF_TUMA, fsgnj_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsgnj_vf_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVF16VFloat16VBVFVFSF_TUMA, fsgnj_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsgnj_vv_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVV32VFloat32VBVFVFVF_TUMA, fsgnj_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsgnj_vf_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVF32VFloat32VBVFVFSF_TUMA, fsgnj_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsgnj_vv_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVV64VFloat64VBVFVFVF_TUMA, fsgnj_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsgnj_vf_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVF64VFloat64VBVFVFSF_TUMA, fsgnj_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfsgnjn_vv_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVV16VFloat16VBVFVFVF_TUMA, fsgnjn_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsgnjn_vf_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVF16VFloat16VBVFVFSF_TUMA, fsgnjn_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsgnjn_vv_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVV32VFloat32VBVFVFVF_TUMA, fsgnjn_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsgnjn_vf_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVF32VFloat32VBVFVFSF_TUMA, fsgnjn_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsgnjn_vv_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVV64VFloat64VBVFVFVF_TUMA, fsgnjn_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsgnjn_vf_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVF64VFloat64VBVFVFSF_TUMA, fsgnjn_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfsgnjx_vv_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVV16VFloat16VBVFVFVF_TUMA, fsgnjx_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsgnjx_vf_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVF16VFloat16VBVFVFSF_TUMA, fsgnjx_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsgnjx_vv_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVV32VFloat32VBVFVFVF_TUMA, fsgnjx_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsgnjx_vf_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVF32VFloat32VBVFVFSF_TUMA, fsgnjx_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsgnjx_vv_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVV64VFloat64VBVFVFVF_TUMA, fsgnjx_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsgnjx_vf_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVF64VFloat64VBVFVFSF_TUMA, fsgnjx_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfsgnj_vv_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVV16VFloat16VBVFVFVF_TUMU, fsgnj_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsgnj_vf_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVF16VFloat16VBVFVFSF_TUMU, fsgnj_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsgnj_vv_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVV32VFloat32VBVFVFVF_TUMU, fsgnj_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsgnj_vf_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVF32VFloat32VBVFVFSF_TUMU, fsgnj_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsgnj_vv_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVV64VFloat64VBVFVFVF_TUMU, fsgnj_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsgnj_vf_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVF64VFloat64VBVFVFSF_TUMU, fsgnj_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfsgnjn_vv_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVV16VFloat16VBVFVFVF_TUMU, fsgnjn_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsgnjn_vf_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVF16VFloat16VBVFVFSF_TUMU, fsgnjn_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsgnjn_vv_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVV32VFloat32VBVFVFVF_TUMU, fsgnjn_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsgnjn_vf_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVF32VFloat32VBVFVFSF_TUMU, fsgnjn_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsgnjn_vv_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVV64VFloat64VBVFVFVF_TUMU, fsgnjn_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsgnjn_vf_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVF64VFloat64VBVFVFSF_TUMU, fsgnjn_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfsgnjx_vv_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVV16VFloat16VBVFVFVF_TUMU, fsgnjx_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsgnjx_vf_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVF16VFloat16VBVFVFSF_TUMU, fsgnjx_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsgnjx_vv_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVV32VFloat32VBVFVFVF_TUMU, fsgnjx_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsgnjx_vf_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVF32VFloat32VBVFVFSF_TUMU, fsgnjx_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsgnjx_vv_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVV64VFloat64VBVFVFVF_TUMU, fsgnjx_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsgnjx_vf_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVF64VFloat64VBVFVFSF_TUMU, fsgnjx_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfsgnj_vv_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVV16VFloat16VBVFVF_TAMA, fsgnj_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsgnj_vf_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVF16VFloat16VBVFSF_TAMA, fsgnj_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsgnj_vv_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVV32VFloat32VBVFVF_TAMA, fsgnj_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsgnj_vf_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVF32VFloat32VBVFSF_TAMA, fsgnj_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsgnj_vv_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVV64VFloat64VBVFVF_TAMA, fsgnj_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsgnj_vf_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVF64VFloat64VBVFSF_TAMA, fsgnj_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfsgnjn_vv_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVV16VFloat16VBVFVF_TAMA, fsgnjn_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsgnjn_vf_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVF16VFloat16VBVFSF_TAMA, fsgnjn_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsgnjn_vv_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVV32VFloat32VBVFVF_TAMA, fsgnjn_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsgnjn_vf_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVF32VFloat32VBVFSF_TAMA, fsgnjn_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsgnjn_vv_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVV64VFloat64VBVFVF_TAMA, fsgnjn_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsgnjn_vf_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVF64VFloat64VBVFSF_TAMA, fsgnjn_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfsgnjx_vv_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVV16VFloat16VBVFVF_TAMA, fsgnjx_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsgnjx_vf_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVF16VFloat16VBVFSF_TAMA, fsgnjx_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsgnjx_vv_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVV32VFloat32VBVFVF_TAMA, fsgnjx_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsgnjx_vf_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVF32VFloat32VBVFSF_TAMA, fsgnjx_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsgnjx_vv_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVV64VFloat64VBVFVF_TAMA, fsgnjx_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsgnjx_vf_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVF64VFloat64VBVFSF_TAMA, fsgnjx_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfsgnj_vv_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVV16VFloat16VBVFVFVF_TAMU, fsgnj_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsgnj_vf_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVF16VFloat16VBVFVFSF_TAMU, fsgnj_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsgnj_vv_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVV32VFloat32VBVFVFVF_TAMU, fsgnj_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsgnj_vf_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVF32VFloat32VBVFVFSF_TAMU, fsgnj_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsgnj_vv_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVV64VFloat64VBVFVFVF_TAMU, fsgnj_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsgnj_vf_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjVF64VFloat64VBVFVFSF_TAMU, fsgnj_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfsgnjn_vv_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVV16VFloat16VBVFVFVF_TAMU, fsgnjn_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsgnjn_vf_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVF16VFloat16VBVFVFSF_TAMU, fsgnjn_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsgnjn_vv_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVV32VFloat32VBVFVFVF_TAMU, fsgnjn_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsgnjn_vf_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVF32VFloat32VBVFVFSF_TAMU, fsgnjn_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsgnjn_vv_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVV64VFloat64VBVFVFVF_TAMU, fsgnjn_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsgnjn_vf_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjnVF64VFloat64VBVFVFSF_TAMU, fsgnjn_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfsgnjx_vv_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVV16VFloat16VBVFVFVF_TAMU, fsgnjx_vv, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfsgnjx_vf_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVF16VFloat16VBVFVFSF_TAMU, fsgnjx_vf, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vfsgnjx_vv_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVV32VFloat32VBVFVFVF_TAMU, fsgnjx_vv, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfsgnjx_vf_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVF32VFloat32VBVFVFSF_TAMU, fsgnjx_vf, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vfsgnjx_vv_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVV64VFloat64VBVFVFVF_TAMU, fsgnjx_vv, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfsgnjx_vf_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FsgnjxVF64VFloat64VBVFVFSF_TAMU, fsgnjx_vf, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vfabs_v_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FabsV16VFloat16VFVF_TU, fabs_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 2, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfabs_v_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FabsV32VFloat32VFVF_TU, fabs_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 2, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfabs_v_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FabsV64VFloat64VFVF_TU, fabs_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 2, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfabs_v_float16m1_ta (vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FabsV16VFloat16VF_TA, fabs_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 1, OneDFloat16) +// vfloat32m1_t vfabs_v_float32m1_ta (vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FabsV32VFloat32VF_TA, fabs_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 1, OneDFloat32) +// vfloat64m1_t vfabs_v_float64m1_ta (vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FabsV64VFloat64VF_TA, fabs_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 1, OneDFloat64) +// vfloat16m1_t vfabs_v_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FabsV16VFloat16VBVFVF_TUMA, fabs_v, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfabs_v_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FabsV32VFloat32VBVFVF_TUMA, fabs_v, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfabs_v_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FabsV64VFloat64VBVFVF_TUMA, fabs_v, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfabs_v_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FabsV16VFloat16VBVFVF_TUMU, fabs_v, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfabs_v_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FabsV32VFloat32VBVFVF_TUMU, fabs_v, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfabs_v_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FabsV64VFloat64VBVFVF_TUMU, fabs_v, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfabs_v_float16m1_tama (vbool16_t mask, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FabsV16VFloat16VBVF_TAMA, fabs_v, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 2, OneDBool, OneDFloat16) +// vfloat32m1_t vfabs_v_float32m1_tama (vbool32_t mask, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FabsV32VFloat32VBVF_TAMA, fabs_v, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 2, OneDBool, OneDFloat32) +// vfloat64m1_t vfabs_v_float64m1_tama (vbool64_t mask, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FabsV64VFloat64VBVF_TAMA, fabs_v, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 2, OneDBool, OneDFloat64) +// vfloat16m1_t vfabs_v_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FabsV16VFloat16VBVFVF_TAMU, fabs_v, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfabs_v_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FabsV32VFloat32VBVFVF_TAMU, fabs_v, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfabs_v_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FabsV64VFloat64VBVFVF_TAMU, fabs_v, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) + +// vbool16_t vmfeq_vv_float16m1_b16_ma (vbool16_t mask, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfeqVV16VBoolVBVFVF_MA, mfeq_vv, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat16, OneDFloat16) +// vbool16_t vmfeq_vf_float16m1_b16_ma (vbool16_t mask, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(MfeqVF16VBoolVBVFSF_MA, mfeq_vf, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat16, ScalarFloat16) +// vbool32_t vmfeq_vv_float32m1_b32_ma (vbool32_t mask, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfeqVV32VBoolVBVFVF_MA, mfeq_vv, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat32, OneDFloat32) +// vbool32_t vmfeq_vf_float32m1_b32_ma (vbool32_t mask, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(MfeqVF32VBoolVBVFSF_MA, mfeq_vf, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat32, ScalarFloat32) +// vbool64_t vmfeq_vv_float64m1_b64_ma (vbool64_t mask, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfeqVV64VBoolVBVFVF_MA, mfeq_vv, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat64, OneDFloat64) +// vbool64_t vmfeq_vf_float64m1_b64_ma (vbool64_t mask, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(MfeqVF64VBoolVBVFSF_MA, mfeq_vf, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat64, ScalarFloat64) +// vbool16_t vmfne_vv_float16m1_b16_ma (vbool16_t mask, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfneVV16VBoolVBVFVF_MA, mfne_vv, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat16, OneDFloat16) +// vbool16_t vmfne_vf_float16m1_b16_ma (vbool16_t mask, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(MfneVF16VBoolVBVFSF_MA, mfne_vf, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat16, ScalarFloat16) +// vbool32_t vmfne_vv_float32m1_b32_ma (vbool32_t mask, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfneVV32VBoolVBVFVF_MA, mfne_vv, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat32, OneDFloat32) +// vbool32_t vmfne_vf_float32m1_b32_ma (vbool32_t mask, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(MfneVF32VBoolVBVFSF_MA, mfne_vf, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat32, ScalarFloat32) +// vbool64_t vmfne_vv_float64m1_b64_ma (vbool64_t mask, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfneVV64VBoolVBVFVF_MA, mfne_vv, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat64, OneDFloat64) +// vbool64_t vmfne_vf_float64m1_b64_ma (vbool64_t mask, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(MfneVF64VBoolVBVFSF_MA, mfne_vf, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat64, ScalarFloat64) +// vbool16_t vmflt_vv_float16m1_b16_ma (vbool16_t mask, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfltVV16VBoolVBVFVF_MA, mflt_vv, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat16, OneDFloat16) +// vbool16_t vmflt_vf_float16m1_b16_ma (vbool16_t mask, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(MfltVF16VBoolVBVFSF_MA, mflt_vf, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat16, ScalarFloat16) +// vbool32_t vmflt_vv_float32m1_b32_ma (vbool32_t mask, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfltVV32VBoolVBVFVF_MA, mflt_vv, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat32, OneDFloat32) +// vbool32_t vmflt_vf_float32m1_b32_ma (vbool32_t mask, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(MfltVF32VBoolVBVFSF_MA, mflt_vf, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat32, ScalarFloat32) +// vbool64_t vmflt_vv_float64m1_b64_ma (vbool64_t mask, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfltVV64VBoolVBVFVF_MA, mflt_vv, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat64, OneDFloat64) +// vbool64_t vmflt_vf_float64m1_b64_ma (vbool64_t mask, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(MfltVF64VBoolVBVFSF_MA, mflt_vf, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat64, ScalarFloat64) +// vbool16_t vmfle_vv_float16m1_b16_ma (vbool16_t mask, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfleVV16VBoolVBVFVF_MA, mfle_vv, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat16, OneDFloat16) +// vbool16_t vmfle_vf_float16m1_b16_ma (vbool16_t mask, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(MfleVF16VBoolVBVFSF_MA, mfle_vf, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat16, ScalarFloat16) +// vbool32_t vmfle_vv_float32m1_b32_ma (vbool32_t mask, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfleVV32VBoolVBVFVF_MA, mfle_vv, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat32, OneDFloat32) +// vbool32_t vmfle_vf_float32m1_b32_ma (vbool32_t mask, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(MfleVF32VBoolVBVFSF_MA, mfle_vf, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat32, ScalarFloat32) +// vbool64_t vmfle_vv_float64m1_b64_ma (vbool64_t mask, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfleVV64VBoolVBVFVF_MA, mfle_vv, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat64, OneDFloat64) +// vbool64_t vmfle_vf_float64m1_b64_ma (vbool64_t mask, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(MfleVF64VBoolVBVFSF_MA, mfle_vf, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat64, ScalarFloat64) +// vbool16_t vmfgt_vv_float16m1_b16_ma (vbool16_t mask, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgtVV16VBoolVBVFVF_MA, mfgt_vv, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat16, OneDFloat16) +// vbool16_t vmfgt_vf_float16m1_b16_ma (vbool16_t mask, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgtVF16VBoolVBVFSF_MA, mfgt_vf, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat16, ScalarFloat16) +// vbool32_t vmfgt_vv_float32m1_b32_ma (vbool32_t mask, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgtVV32VBoolVBVFVF_MA, mfgt_vv, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat32, OneDFloat32) +// vbool32_t vmfgt_vf_float32m1_b32_ma (vbool32_t mask, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgtVF32VBoolVBVFSF_MA, mfgt_vf, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat32, ScalarFloat32) +// vbool64_t vmfgt_vv_float64m1_b64_ma (vbool64_t mask, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgtVV64VBoolVBVFVF_MA, mfgt_vv, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat64, OneDFloat64) +// vbool64_t vmfgt_vf_float64m1_b64_ma (vbool64_t mask, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgtVF64VBoolVBVFSF_MA, mfgt_vf, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat64, ScalarFloat64) +// vbool16_t vmfge_vv_float16m1_b16_ma (vbool16_t mask, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgeVV16VBoolVBVFVF_MA, mfge_vv, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat16, OneDFloat16) +// vbool16_t vmfge_vf_float16m1_b16_ma (vbool16_t mask, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgeVF16VBoolVBVFSF_MA, mfge_vf, 16, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat16, ScalarFloat16) +// vbool32_t vmfge_vv_float32m1_b32_ma (vbool32_t mask, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgeVV32VBoolVBVFVF_MA, mfge_vv, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat32, OneDFloat32) +// vbool32_t vmfge_vf_float32m1_b32_ma (vbool32_t mask, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgeVF32VBoolVBVFSF_MA, mfge_vf, 32, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat32, ScalarFloat32) +// vbool64_t vmfge_vv_float64m1_b64_ma (vbool64_t mask, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgeVV64VBoolVBVFVF_MA, mfge_vv, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat64, OneDFloat64) +// vbool64_t vmfge_vf_float64m1_b64_ma (vbool64_t mask, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgeVF64VBoolVBVFSF_MA, mfge_vf, 64, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | MaskAgnostic, OneDBool, 3, OneDBool, OneDFloat64, ScalarFloat64) +// vbool16_t vmfeq_vv_float16m1_b16_mu (vbool16_t mask, vbool16_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfeqVV16VBoolVBVBVFVF_MU, mfeq_vv, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, OneDFloat16) +// vbool16_t vmfeq_vf_float16m1_b16_mu (vbool16_t mask, vbool16_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(MfeqVF16VBoolVBVBVFSF_MU, mfeq_vf, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, ScalarFloat16) +// vbool32_t vmfeq_vv_float32m1_b32_mu (vbool32_t mask, vbool32_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfeqVV32VBoolVBVBVFVF_MU, mfeq_vv, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, OneDFloat32) +// vbool32_t vmfeq_vf_float32m1_b32_mu (vbool32_t mask, vbool32_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(MfeqVF32VBoolVBVBVFSF_MU, mfeq_vf, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, ScalarFloat32) +// vbool64_t vmfeq_vv_float64m1_b64_mu (vbool64_t mask, vbool64_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfeqVV64VBoolVBVBVFVF_MU, mfeq_vv, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, OneDFloat64) +// vbool64_t vmfeq_vf_float64m1_b64_mu (vbool64_t mask, vbool64_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(MfeqVF64VBoolVBVBVFSF_MU, mfeq_vf, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, ScalarFloat64) +// vbool16_t vmfne_vv_float16m1_b16_mu (vbool16_t mask, vbool16_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfneVV16VBoolVBVBVFVF_MU, mfne_vv, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, OneDFloat16) +// vbool16_t vmfne_vf_float16m1_b16_mu (vbool16_t mask, vbool16_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(MfneVF16VBoolVBVBVFSF_MU, mfne_vf, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, ScalarFloat16) +// vbool32_t vmfne_vv_float32m1_b32_mu (vbool32_t mask, vbool32_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfneVV32VBoolVBVBVFVF_MU, mfne_vv, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, OneDFloat32) +// vbool32_t vmfne_vf_float32m1_b32_mu (vbool32_t mask, vbool32_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(MfneVF32VBoolVBVBVFSF_MU, mfne_vf, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, ScalarFloat32) +// vbool64_t vmfne_vv_float64m1_b64_mu (vbool64_t mask, vbool64_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfneVV64VBoolVBVBVFVF_MU, mfne_vv, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, OneDFloat64) +// vbool64_t vmfne_vf_float64m1_b64_mu (vbool64_t mask, vbool64_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(MfneVF64VBoolVBVBVFSF_MU, mfne_vf, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, ScalarFloat64) +// vbool16_t vmflt_vv_float16m1_b16_mu (vbool16_t mask, vbool16_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfltVV16VBoolVBVBVFVF_MU, mflt_vv, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, OneDFloat16) +// vbool16_t vmflt_vf_float16m1_b16_mu (vbool16_t mask, vbool16_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(MfltVF16VBoolVBVBVFSF_MU, mflt_vf, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, ScalarFloat16) +// vbool32_t vmflt_vv_float32m1_b32_mu (vbool32_t mask, vbool32_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfltVV32VBoolVBVBVFVF_MU, mflt_vv, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, OneDFloat32) +// vbool32_t vmflt_vf_float32m1_b32_mu (vbool32_t mask, vbool32_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(MfltVF32VBoolVBVBVFSF_MU, mflt_vf, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, ScalarFloat32) +// vbool64_t vmflt_vv_float64m1_b64_mu (vbool64_t mask, vbool64_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfltVV64VBoolVBVBVFVF_MU, mflt_vv, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, OneDFloat64) +// vbool64_t vmflt_vf_float64m1_b64_mu (vbool64_t mask, vbool64_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(MfltVF64VBoolVBVBVFSF_MU, mflt_vf, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, ScalarFloat64) +// vbool16_t vmfle_vv_float16m1_b16_mu (vbool16_t mask, vbool16_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfleVV16VBoolVBVBVFVF_MU, mfle_vv, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, OneDFloat16) +// vbool16_t vmfle_vf_float16m1_b16_mu (vbool16_t mask, vbool16_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(MfleVF16VBoolVBVBVFSF_MU, mfle_vf, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, ScalarFloat16) +// vbool32_t vmfle_vv_float32m1_b32_mu (vbool32_t mask, vbool32_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfleVV32VBoolVBVBVFVF_MU, mfle_vv, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, OneDFloat32) +// vbool32_t vmfle_vf_float32m1_b32_mu (vbool32_t mask, vbool32_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(MfleVF32VBoolVBVBVFSF_MU, mfle_vf, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, ScalarFloat32) +// vbool64_t vmfle_vv_float64m1_b64_mu (vbool64_t mask, vbool64_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfleVV64VBoolVBVBVFVF_MU, mfle_vv, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, OneDFloat64) +// vbool64_t vmfle_vf_float64m1_b64_mu (vbool64_t mask, vbool64_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(MfleVF64VBoolVBVBVFSF_MU, mfle_vf, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, ScalarFloat64) +// vbool16_t vmfgt_vv_float16m1_b16_mu (vbool16_t mask, vbool16_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgtVV16VBoolVBVBVFVF_MU, mfgt_vv, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, OneDFloat16) +// vbool16_t vmfgt_vf_float16m1_b16_mu (vbool16_t mask, vbool16_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgtVF16VBoolVBVBVFSF_MU, mfgt_vf, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, ScalarFloat16) +// vbool32_t vmfgt_vv_float32m1_b32_mu (vbool32_t mask, vbool32_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgtVV32VBoolVBVBVFVF_MU, mfgt_vv, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, OneDFloat32) +// vbool32_t vmfgt_vf_float32m1_b32_mu (vbool32_t mask, vbool32_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgtVF32VBoolVBVBVFSF_MU, mfgt_vf, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, ScalarFloat32) +// vbool64_t vmfgt_vv_float64m1_b64_mu (vbool64_t mask, vbool64_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgtVV64VBoolVBVBVFVF_MU, mfgt_vv, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, OneDFloat64) +// vbool64_t vmfgt_vf_float64m1_b64_mu (vbool64_t mask, vbool64_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgtVF64VBoolVBVBVFSF_MU, mfgt_vf, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, ScalarFloat64) +// vbool16_t vmfge_vv_float16m1_b16_mu (vbool16_t mask, vbool16_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgeVV16VBoolVBVBVFVF_MU, mfge_vv, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, OneDFloat16) +// vbool16_t vmfge_vf_float16m1_b16_mu (vbool16_t mask, vbool16_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgeVF16VBoolVBVBVFSF_MU, mfge_vf, 16, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat16, ScalarFloat16) +// vbool32_t vmfge_vv_float32m1_b32_mu (vbool32_t mask, vbool32_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgeVV32VBoolVBVBVFVF_MU, mfge_vv, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, OneDFloat32) +// vbool32_t vmfge_vf_float32m1_b32_mu (vbool32_t mask, vbool32_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgeVF32VBoolVBVBVFSF_MU, mfge_vf, 32, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat32, ScalarFloat32) +// vbool64_t vmfge_vv_float64m1_b64_mu (vbool64_t mask, vbool64_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgeVV64VBoolVBVBVFVF_MU, mfge_vv, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, OneDFloat64) +// vbool64_t vmfge_vf_float64m1_b64_mu (vbool64_t mask, vbool64_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(MfgeVF64VBoolVBVBVFSF_MU, mfge_vf, 64, BOOL, HaveVLParameter | MaskedOperation | MaskUndisturbed, OneDBool, 4, OneDBool, OneDBool, OneDFloat64, ScalarFloat64) + +// vuint16m1_t vfclass_v_u16m1_tu (vuint16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FclassV16VUInt16VUVF_TU, fclass_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 2, OneDUInt16, OneDFloat16) +// vuint32m1_t vfclass_v_u32m1_tu (vuint32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FclassV32VUInt32VUVF_TU, fclass_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 2, OneDUInt32, OneDFloat32) +// vuint64m1_t vfclass_v_u64m1_tu (vuint64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FclassV64VUInt64VUVF_TU, fclass_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 2, OneDUInt64, OneDFloat64) +// vuint16m1_t vfclass_v_u16m1_ta (vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FclassV16VUInt16VF_TA, fclass_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 1, OneDFloat16) +// vuint32m1_t vfclass_v_u32m1_ta (vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FclassV32VUInt32VF_TA, fclass_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 1, OneDFloat32) +// vuint64m1_t vfclass_v_u64m1_ta (vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FclassV64VUInt64VF_TA, fclass_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 1, OneDFloat64) +// vuint16m1_t vfclass_v_u16m1_tuma (vbool16_t mask, vuint16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FclassV16VUInt16VBVUVF_TUMA, fclass_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDFloat16) +// vuint32m1_t vfclass_v_u32m1_tuma (vbool32_t mask, vuint32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FclassV32VUInt32VBVUVF_TUMA, fclass_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat32) +// vuint64m1_t vfclass_v_u64m1_tuma (vbool64_t mask, vuint64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FclassV64VUInt64VBVUVF_TUMA, fclass_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDFloat64) +// vuint16m1_t vfclass_v_u16m1_tumu (vbool16_t mask, vuint16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FclassV16VUInt16VBVUVF_TUMU, fclass_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 3, OneDBool, OneDUInt16, OneDFloat16) +// vuint32m1_t vfclass_v_u32m1_tumu (vbool32_t mask, vuint32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FclassV32VUInt32VBVUVF_TUMU, fclass_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat32) +// vuint64m1_t vfclass_v_u64m1_tumu (vbool64_t mask, vuint64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FclassV64VUInt64VBVUVF_TUMU, fclass_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDFloat64) +// vuint16m1_t vfclass_v_u16m1_tama (vbool16_t mask, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FclassV16VUInt16VBVF_TAMA, fclass_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 2, OneDBool, OneDFloat16) +// vuint32m1_t vfclass_v_u32m1_tama (vbool32_t mask, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FclassV32VUInt32VBVF_TAMA, fclass_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 2, OneDBool, OneDFloat32) +// vuint64m1_t vfclass_v_u64m1_tama (vbool64_t mask, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FclassV64VUInt64VBVF_TAMA, fclass_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 2, OneDBool, OneDFloat64) +// vuint16m1_t vfclass_v_u16m1_tamu (vbool16_t mask, vuint16m1_t merge, vfloat16m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FclassV16VUInt16VBVUVF_TAMU, fclass_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 3, OneDBool, OneDUInt16, OneDFloat16) +// vuint32m1_t vfclass_v_u32m1_tamu (vbool32_t mask, vuint32m1_t merge, vfloat32m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FclassV32VUInt32VBVUVF_TAMU, fclass_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat32) +// vuint64m1_t vfclass_v_u64m1_tamu (vbool64_t mask, vuint64m1_t merge, vfloat64m1_t op1, size_t vl); +CUSTOM_OP_TYPE(FclassV64VUInt64VBVUVF_TAMU, fclass_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDFloat64) + +// vfloat16m1_t vmerge_vvm_float16m1_tu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVVM16VFloat16VBVFVFVF_TU, merge_vvm, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmerge_vfm_float16m1_tu (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FmergeVFM16VFloat16VBVFVFSF_TU, fmerge_vfm, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vmerge_vvm_float32m1_tu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVVM32VFloat32VBVFVFVF_TU, merge_vvm, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmerge_vfm_float32m1_tu (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FmergeVFM32VFloat32VBVFVFSF_TU, fmerge_vfm, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vmerge_vvm_float64m1_tu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVVM64VFloat64VBVFVFVF_TU, merge_vvm, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmerge_vfm_float64m1_tu (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FmergeVFM64VFloat64VBVFVFSF_TU, fmerge_vfm, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vmerge_vvm_float16m1_ta (vbool16_t mask, vfloat16m1_t op1, vfloat16m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVVM16VFloat16VBVFVF_TA, merge_vvm, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmerge_vfm_float16m1_ta (vbool16_t mask, vfloat16m1_t op1, float16_t op2, size_t vl); +CUSTOM_OP_TYPE(FmergeVFM16VFloat16VBVFSF_TA, fmerge_vfm, 16, FLOAT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vmerge_vvm_float32m1_ta (vbool32_t mask, vfloat32m1_t op1, vfloat32m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVVM32VFloat32VBVFVF_TA, merge_vvm, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmerge_vfm_float32m1_ta (vbool32_t mask, vfloat32m1_t op1, float32_t op2, size_t vl); +CUSTOM_OP_TYPE(FmergeVFM32VFloat32VBVFSF_TA, fmerge_vfm, 32, FLOAT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vmerge_vvm_float64m1_ta (vbool64_t mask, vfloat64m1_t op1, vfloat64m1_t op2, size_t vl); +CUSTOM_OP_TYPE(MergeVVM64VFloat64VBVFVF_TA, merge_vvm, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmerge_vfm_float64m1_ta (vbool64_t mask, vfloat64m1_t op1, float64_t op2, size_t vl); +CUSTOM_OP_TYPE(FmergeVFM64VFloat64VBVFSF_TA, fmerge_vfm, 64, FLOAT, HaveVLParameter | NonmaskedOperation | MergeOperation | TailAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, ScalarFloat64) + +// vfloat16m1_t vmv_v_v_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(MvV16VFloat16VFVF_TU, mv_v_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 2, OneDFloat16, OneDFloat16) +// vfloat16m1_t vfmv_v_f_float16m1_tu (vfloat16m1_t merge, float16_t src, size_t vl); +CUSTOM_OP_TYPE(FmvF16VFloat16VFSF_TU, fmv_v_f, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 2, OneDFloat16, ScalarFloat16) +// vfloat32m1_t vmv_v_v_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(MvV32VFloat32VFVF_TU, mv_v_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 2, OneDFloat32, OneDFloat32) +// vfloat32m1_t vfmv_v_f_float32m1_tu (vfloat32m1_t merge, float32_t src, size_t vl); +CUSTOM_OP_TYPE(FmvF32VFloat32VFSF_TU, fmv_v_f, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 2, OneDFloat32, ScalarFloat32) +// vfloat64m1_t vmv_v_v_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(MvV64VFloat64VFVF_TU, mv_v_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 2, OneDFloat64, OneDFloat64) +// vfloat64m1_t vfmv_v_f_float64m1_tu (vfloat64m1_t merge, float64_t src, size_t vl); +CUSTOM_OP_TYPE(FmvF64VFloat64VFSF_TU, fmv_v_f, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 2, OneDFloat64, ScalarFloat64) +// vfloat16m1_t vmv_v_v_float16m1_ta (vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(MvV16VFloat16VF_TA, mv_v_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 1, OneDFloat16) +// vfloat16m1_t vfmv_v_f_float16m1_ta (float16_t src, size_t vl); +CUSTOM_OP_TYPE(FmvF16VFloat16SF_TA, fmv_v_f, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 1, ScalarFloat16) +// vfloat32m1_t vmv_v_v_float32m1_ta (vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(MvV32VFloat32VF_TA, mv_v_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 1, OneDFloat32) +// vfloat32m1_t vfmv_v_f_float32m1_ta (float32_t src, size_t vl); +CUSTOM_OP_TYPE(FmvF32VFloat32SF_TA, fmv_v_f, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 1, ScalarFloat32) +// vfloat64m1_t vmv_v_v_float64m1_ta (vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(MvV64VFloat64VF_TA, mv_v_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 1, OneDFloat64) +// vfloat64m1_t vfmv_v_f_float64m1_ta (float64_t src, size_t vl); +CUSTOM_OP_TYPE(FmvF64VFloat64SF_TA, fmv_v_f, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 1, ScalarFloat64) + +// vint16m1_t vfcvt_x_f_v_i16m1_tu (vint16m1_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VInt16VIVF_TU, fcvt_x_f_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 2, OneDInt16, OneDFloat16) +// vint16m1_t vfcvt_rtz_x_f_v_i16m1_tu (vint16m1_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV16VInt16VIVF_TU, fcvt_rtz_x_f_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt16, 2, OneDInt16, OneDFloat16) +// vuint16m1_t vfcvt_xu_f_v_u16m1_tu (vuint16m1_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VUInt16VUVF_TU, fcvt_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 2, OneDUInt16, OneDFloat16) +// vuint16m1_t vfcvt_rtz_xu_f_v_u16m1_tu (vuint16m1_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV16VUInt16VUVF_TU, fcvt_rtz_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 2, OneDUInt16, OneDFloat16) +// vfloat16m1_t vfcvt_f_x_v_f16m1_tu (vfloat16m1_t merge, vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VFloat16VFVI_TU, fcvt_f_x_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 2, OneDFloat16, OneDInt16) +// vfloat16m1_t vfcvt_f_xu_v_f16m1_tu (vfloat16m1_t merge, vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VFloat16VFVU_TU, fcvt_f_xu_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat16, 2, OneDFloat16, OneDUInt16) +// vint32m1_t vfcvt_x_f_v_i32m1_tu (vint32m1_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VInt32VIVF_TU, fcvt_x_f_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 2, OneDInt32, OneDFloat32) +// vint32m1_t vfcvt_rtz_x_f_v_i32m1_tu (vint32m1_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV32VInt32VIVF_TU, fcvt_rtz_x_f_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt32, 2, OneDInt32, OneDFloat32) +// vuint32m1_t vfcvt_xu_f_v_u32m1_tu (vuint32m1_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VUInt32VUVF_TU, fcvt_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 2, OneDUInt32, OneDFloat32) +// vuint32m1_t vfcvt_rtz_xu_f_v_u32m1_tu (vuint32m1_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV32VUInt32VUVF_TU, fcvt_rtz_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 2, OneDUInt32, OneDFloat32) +// vfloat32m1_t vfcvt_f_x_v_f32m1_tu (vfloat32m1_t merge, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VFloat32VFVI_TU, fcvt_f_x_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 2, OneDFloat32, OneDInt32) +// vfloat32m1_t vfcvt_f_xu_v_f32m1_tu (vfloat32m1_t merge, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VFloat32VFVU_TU, fcvt_f_xu_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat32, 2, OneDFloat32, OneDUInt32) +// vint64m1_t vfcvt_x_f_v_i64m1_tu (vint64m1_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VInt64VIVF_TU, fcvt_x_f_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 2, OneDInt64, OneDFloat64) +// vint64m1_t vfcvt_rtz_x_f_v_i64m1_tu (vint64m1_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV64VInt64VIVF_TU, fcvt_rtz_x_f_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDInt64, 2, OneDInt64, OneDFloat64) +// vuint64m1_t vfcvt_xu_f_v_u64m1_tu (vuint64m1_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VUInt64VUVF_TU, fcvt_xu_f_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 2, OneDUInt64, OneDFloat64) +// vuint64m1_t vfcvt_rtz_xu_f_v_u64m1_tu (vuint64m1_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV64VUInt64VUVF_TU, fcvt_rtz_xu_f_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 2, OneDUInt64, OneDFloat64) +// vfloat64m1_t vfcvt_f_x_v_f64m1_tu (vfloat64m1_t merge, vint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VFloat64VFVI_TU, fcvt_f_x_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 2, OneDFloat64, OneDInt64) +// vfloat64m1_t vfcvt_f_xu_v_f64m1_tu (vfloat64m1_t merge, vuint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VFloat64VFVU_TU, fcvt_f_xu_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDFloat64, 2, OneDFloat64, OneDUInt64) +// vint16m1_t vfcvt_x_f_v_i16m1_ta (vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VInt16VF_TA, fcvt_x_f_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 1, OneDFloat16) +// vint16m1_t vfcvt_rtz_x_f_v_i16m1_ta (vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV16VInt16VF_TA, fcvt_rtz_x_f_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt16, 1, OneDFloat16) +// vuint16m1_t vfcvt_xu_f_v_u16m1_ta (vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VUInt16VF_TA, fcvt_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 1, OneDFloat16) +// vuint16m1_t vfcvt_rtz_xu_f_v_u16m1_ta (vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV16VUInt16VF_TA, fcvt_rtz_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 1, OneDFloat16) +// vfloat16m1_t vfcvt_f_x_v_f16m1_ta (vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VFloat16VI_TA, fcvt_f_x_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 1, OneDInt16) +// vfloat16m1_t vfcvt_f_xu_v_f16m1_ta (vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VFloat16VU_TA, fcvt_f_xu_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat16, 1, OneDUInt16) +// vint32m1_t vfcvt_x_f_v_i32m1_ta (vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VInt32VF_TA, fcvt_x_f_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 1, OneDFloat32) +// vint32m1_t vfcvt_rtz_x_f_v_i32m1_ta (vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV32VInt32VF_TA, fcvt_rtz_x_f_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt32, 1, OneDFloat32) +// vuint32m1_t vfcvt_xu_f_v_u32m1_ta (vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VUInt32VF_TA, fcvt_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 1, OneDFloat32) +// vuint32m1_t vfcvt_rtz_xu_f_v_u32m1_ta (vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV32VUInt32VF_TA, fcvt_rtz_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 1, OneDFloat32) +// vfloat32m1_t vfcvt_f_x_v_f32m1_ta (vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VFloat32VI_TA, fcvt_f_x_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 1, OneDInt32) +// vfloat32m1_t vfcvt_f_xu_v_f32m1_ta (vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VFloat32VU_TA, fcvt_f_xu_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat32, 1, OneDUInt32) +// vint64m1_t vfcvt_x_f_v_i64m1_ta (vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VInt64VF_TA, fcvt_x_f_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 1, OneDFloat64) +// vint64m1_t vfcvt_rtz_x_f_v_i64m1_ta (vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV64VInt64VF_TA, fcvt_rtz_x_f_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDInt64, 1, OneDFloat64) +// vuint64m1_t vfcvt_xu_f_v_u64m1_ta (vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VUInt64VF_TA, fcvt_xu_f_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 1, OneDFloat64) +// vuint64m1_t vfcvt_rtz_xu_f_v_u64m1_ta (vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV64VUInt64VF_TA, fcvt_rtz_xu_f_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 1, OneDFloat64) +// vfloat64m1_t vfcvt_f_x_v_f64m1_ta (vint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VFloat64VI_TA, fcvt_f_x_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 1, OneDInt64) +// vfloat64m1_t vfcvt_f_xu_v_f64m1_ta (vuint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VFloat64VU_TA, fcvt_f_xu_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDFloat64, 1, OneDUInt64) +// vint16m1_t vfcvt_x_f_v_i16m1_tuma (vbool16_t mask, vint16m1_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VInt16VBVIVF_TUMA, fcvt_x_f_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDFloat16) +// vint16m1_t vfcvt_rtz_x_f_v_i16m1_tuma (vbool16_t mask, vint16m1_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV16VInt16VBVIVF_TUMA, fcvt_rtz_x_f_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDFloat16) +// vuint16m1_t vfcvt_xu_f_v_u16m1_tuma (vbool16_t mask, vuint16m1_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VUInt16VBVUVF_TUMA, fcvt_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDFloat16) +// vuint16m1_t vfcvt_rtz_xu_f_v_u16m1_tuma (vbool16_t mask, vuint16m1_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV16VUInt16VBVUVF_TUMA, fcvt_rtz_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDFloat16) +// vfloat16m1_t vfcvt_f_x_v_f16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VFloat16VBVFVI_TUMA, fcvt_f_x_v, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDInt16) +// vfloat16m1_t vfcvt_f_xu_v_f16m1_tuma (vbool16_t mask, vfloat16m1_t merge, vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VFloat16VBVFVU_TUMA, fcvt_f_xu_v, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt16) +// vint32m1_t vfcvt_x_f_v_i32m1_tuma (vbool32_t mask, vint32m1_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VInt32VBVIVF_TUMA, fcvt_x_f_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat32) +// vint32m1_t vfcvt_rtz_x_f_v_i32m1_tuma (vbool32_t mask, vint32m1_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV32VInt32VBVIVF_TUMA, fcvt_rtz_x_f_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat32) +// vuint32m1_t vfcvt_xu_f_v_u32m1_tuma (vbool32_t mask, vuint32m1_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VUInt32VBVUVF_TUMA, fcvt_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat32) +// vuint32m1_t vfcvt_rtz_xu_f_v_u32m1_tuma (vbool32_t mask, vuint32m1_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV32VUInt32VBVUVF_TUMA, fcvt_rtz_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat32) +// vfloat32m1_t vfcvt_f_x_v_f32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VFloat32VBVFVI_TUMA, fcvt_f_x_v, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDInt32) +// vfloat32m1_t vfcvt_f_xu_v_f32m1_tuma (vbool32_t mask, vfloat32m1_t merge, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VFloat32VBVFVU_TUMA, fcvt_f_xu_v, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt32) +// vint64m1_t vfcvt_x_f_v_i64m1_tuma (vbool64_t mask, vint64m1_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VInt64VBVIVF_TUMA, fcvt_x_f_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDFloat64) +// vint64m1_t vfcvt_rtz_x_f_v_i64m1_tuma (vbool64_t mask, vint64m1_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV64VInt64VBVIVF_TUMA, fcvt_rtz_x_f_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDFloat64) +// vuint64m1_t vfcvt_xu_f_v_u64m1_tuma (vbool64_t mask, vuint64m1_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VUInt64VBVUVF_TUMA, fcvt_xu_f_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDFloat64) +// vuint64m1_t vfcvt_rtz_xu_f_v_u64m1_tuma (vbool64_t mask, vuint64m1_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV64VUInt64VBVUVF_TUMA, fcvt_rtz_xu_f_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDFloat64) +// vfloat64m1_t vfcvt_f_x_v_f64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VFloat64VBVFVI_TUMA, fcvt_f_x_v, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDInt64) +// vfloat64m1_t vfcvt_f_xu_v_f64m1_tuma (vbool64_t mask, vfloat64m1_t merge, vuint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VFloat64VBVFVU_TUMA, fcvt_f_xu_v, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDUInt64) +// vint16m1_t vfcvt_x_f_v_i16m1_tumu (vbool16_t mask, vint16m1_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VInt16VBVIVF_TUMU, fcvt_x_f_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 3, OneDBool, OneDInt16, OneDFloat16) +// vint16m1_t vfcvt_rtz_x_f_v_i16m1_tumu (vbool16_t mask, vint16m1_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV16VInt16VBVIVF_TUMU, fcvt_rtz_x_f_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 3, OneDBool, OneDInt16, OneDFloat16) +// vuint16m1_t vfcvt_xu_f_v_u16m1_tumu (vbool16_t mask, vuint16m1_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VUInt16VBVUVF_TUMU, fcvt_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 3, OneDBool, OneDUInt16, OneDFloat16) +// vuint16m1_t vfcvt_rtz_xu_f_v_u16m1_tumu (vbool16_t mask, vuint16m1_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV16VUInt16VBVUVF_TUMU, fcvt_rtz_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 3, OneDBool, OneDUInt16, OneDFloat16) +// vfloat16m1_t vfcvt_f_x_v_f16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VFloat16VBVFVI_TUMU, fcvt_f_x_v, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDInt16) +// vfloat16m1_t vfcvt_f_xu_v_f16m1_tumu (vbool16_t mask, vfloat16m1_t merge, vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VFloat16VBVFVU_TUMU, fcvt_f_xu_v, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt16) +// vint32m1_t vfcvt_x_f_v_i32m1_tumu (vbool32_t mask, vint32m1_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VInt32VBVIVF_TUMU, fcvt_x_f_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat32) +// vint32m1_t vfcvt_rtz_x_f_v_i32m1_tumu (vbool32_t mask, vint32m1_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV32VInt32VBVIVF_TUMU, fcvt_rtz_x_f_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat32) +// vuint32m1_t vfcvt_xu_f_v_u32m1_tumu (vbool32_t mask, vuint32m1_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VUInt32VBVUVF_TUMU, fcvt_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat32) +// vuint32m1_t vfcvt_rtz_xu_f_v_u32m1_tumu (vbool32_t mask, vuint32m1_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV32VUInt32VBVUVF_TUMU, fcvt_rtz_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat32) +// vfloat32m1_t vfcvt_f_x_v_f32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VFloat32VBVFVI_TUMU, fcvt_f_x_v, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDInt32) +// vfloat32m1_t vfcvt_f_xu_v_f32m1_tumu (vbool32_t mask, vfloat32m1_t merge, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VFloat32VBVFVU_TUMU, fcvt_f_xu_v, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt32) +// vint64m1_t vfcvt_x_f_v_i64m1_tumu (vbool64_t mask, vint64m1_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VInt64VBVIVF_TUMU, fcvt_x_f_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 3, OneDBool, OneDInt64, OneDFloat64) +// vint64m1_t vfcvt_rtz_x_f_v_i64m1_tumu (vbool64_t mask, vint64m1_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV64VInt64VBVIVF_TUMU, fcvt_rtz_x_f_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 3, OneDBool, OneDInt64, OneDFloat64) +// vuint64m1_t vfcvt_xu_f_v_u64m1_tumu (vbool64_t mask, vuint64m1_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VUInt64VBVUVF_TUMU, fcvt_xu_f_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDFloat64) +// vuint64m1_t vfcvt_rtz_xu_f_v_u64m1_tumu (vbool64_t mask, vuint64m1_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV64VUInt64VBVUVF_TUMU, fcvt_rtz_xu_f_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDFloat64) +// vfloat64m1_t vfcvt_f_x_v_f64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VFloat64VBVFVI_TUMU, fcvt_f_x_v, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 3, OneDBool, OneDFloat64, OneDInt64) +// vfloat64m1_t vfcvt_f_xu_v_f64m1_tumu (vbool64_t mask, vfloat64m1_t merge, vuint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VFloat64VBVFVU_TUMU, fcvt_f_xu_v, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 3, OneDBool, OneDFloat64, OneDUInt64) +// vint16m1_t vfcvt_x_f_v_i16m1_tama (vbool16_t mask, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VInt16VBVF_TAMA, fcvt_x_f_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 2, OneDBool, OneDFloat16) +// vint16m1_t vfcvt_rtz_x_f_v_i16m1_tama (vbool16_t mask, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV16VInt16VBVF_TAMA, fcvt_rtz_x_f_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt16, 2, OneDBool, OneDFloat16) +// vuint16m1_t vfcvt_xu_f_v_u16m1_tama (vbool16_t mask, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VUInt16VBVF_TAMA, fcvt_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 2, OneDBool, OneDFloat16) +// vuint16m1_t vfcvt_rtz_xu_f_v_u16m1_tama (vbool16_t mask, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV16VUInt16VBVF_TAMA, fcvt_rtz_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 2, OneDBool, OneDFloat16) +// vfloat16m1_t vfcvt_f_x_v_f16m1_tama (vbool16_t mask, vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VFloat16VBVI_TAMA, fcvt_f_x_v, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 2, OneDBool, OneDInt16) +// vfloat16m1_t vfcvt_f_xu_v_f16m1_tama (vbool16_t mask, vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VFloat16VBVU_TAMA, fcvt_f_xu_v, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat16, 2, OneDBool, OneDUInt16) +// vint32m1_t vfcvt_x_f_v_i32m1_tama (vbool32_t mask, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VInt32VBVF_TAMA, fcvt_x_f_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 2, OneDBool, OneDFloat32) +// vint32m1_t vfcvt_rtz_x_f_v_i32m1_tama (vbool32_t mask, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV32VInt32VBVF_TAMA, fcvt_rtz_x_f_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt32, 2, OneDBool, OneDFloat32) +// vuint32m1_t vfcvt_xu_f_v_u32m1_tama (vbool32_t mask, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VUInt32VBVF_TAMA, fcvt_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 2, OneDBool, OneDFloat32) +// vuint32m1_t vfcvt_rtz_xu_f_v_u32m1_tama (vbool32_t mask, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV32VUInt32VBVF_TAMA, fcvt_rtz_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 2, OneDBool, OneDFloat32) +// vfloat32m1_t vfcvt_f_x_v_f32m1_tama (vbool32_t mask, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VFloat32VBVI_TAMA, fcvt_f_x_v, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 2, OneDBool, OneDInt32) +// vfloat32m1_t vfcvt_f_xu_v_f32m1_tama (vbool32_t mask, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VFloat32VBVU_TAMA, fcvt_f_xu_v, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat32, 2, OneDBool, OneDUInt32) +// vint64m1_t vfcvt_x_f_v_i64m1_tama (vbool64_t mask, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VInt64VBVF_TAMA, fcvt_x_f_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 2, OneDBool, OneDFloat64) +// vint64m1_t vfcvt_rtz_x_f_v_i64m1_tama (vbool64_t mask, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV64VInt64VBVF_TAMA, fcvt_rtz_x_f_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDInt64, 2, OneDBool, OneDFloat64) +// vuint64m1_t vfcvt_xu_f_v_u64m1_tama (vbool64_t mask, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VUInt64VBVF_TAMA, fcvt_xu_f_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 2, OneDBool, OneDFloat64) +// vuint64m1_t vfcvt_rtz_xu_f_v_u64m1_tama (vbool64_t mask, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV64VUInt64VBVF_TAMA, fcvt_rtz_xu_f_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 2, OneDBool, OneDFloat64) +// vfloat64m1_t vfcvt_f_x_v_f64m1_tama (vbool64_t mask, vint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VFloat64VBVI_TAMA, fcvt_f_x_v, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 2, OneDBool, OneDInt64) +// vfloat64m1_t vfcvt_f_xu_v_f64m1_tama (vbool64_t mask, vuint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VFloat64VBVU_TAMA, fcvt_f_xu_v, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDFloat64, 2, OneDBool, OneDUInt64) +// vint16m1_t vfcvt_x_f_v_i16m1_tamu (vbool16_t mask, vint16m1_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VInt16VBVIVF_TAMU, fcvt_x_f_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 3, OneDBool, OneDInt16, OneDFloat16) +// vint16m1_t vfcvt_rtz_x_f_v_i16m1_tamu (vbool16_t mask, vint16m1_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV16VInt16VBVIVF_TAMU, fcvt_rtz_x_f_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 3, OneDBool, OneDInt16, OneDFloat16) +// vuint16m1_t vfcvt_xu_f_v_u16m1_tamu (vbool16_t mask, vuint16m1_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VUInt16VBVUVF_TAMU, fcvt_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 3, OneDBool, OneDUInt16, OneDFloat16) +// vuint16m1_t vfcvt_rtz_xu_f_v_u16m1_tamu (vbool16_t mask, vuint16m1_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV16VUInt16VBVUVF_TAMU, fcvt_rtz_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 3, OneDBool, OneDUInt16, OneDFloat16) +// vfloat16m1_t vfcvt_f_x_v_f16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VFloat16VBVFVI_TAMU, fcvt_f_x_v, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDInt16) +// vfloat16m1_t vfcvt_f_xu_v_f16m1_tamu (vbool16_t mask, vfloat16m1_t merge, vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV16VFloat16VBVFVU_TAMU, fcvt_f_xu_v, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt16) +// vint32m1_t vfcvt_x_f_v_i32m1_tamu (vbool32_t mask, vint32m1_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VInt32VBVIVF_TAMU, fcvt_x_f_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat32) +// vint32m1_t vfcvt_rtz_x_f_v_i32m1_tamu (vbool32_t mask, vint32m1_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV32VInt32VBVIVF_TAMU, fcvt_rtz_x_f_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat32) +// vuint32m1_t vfcvt_xu_f_v_u32m1_tamu (vbool32_t mask, vuint32m1_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VUInt32VBVUVF_TAMU, fcvt_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat32) +// vuint32m1_t vfcvt_rtz_xu_f_v_u32m1_tamu (vbool32_t mask, vuint32m1_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV32VUInt32VBVUVF_TAMU, fcvt_rtz_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat32) +// vfloat32m1_t vfcvt_f_x_v_f32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VFloat32VBVFVI_TAMU, fcvt_f_x_v, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDInt32) +// vfloat32m1_t vfcvt_f_xu_v_f32m1_tamu (vbool32_t mask, vfloat32m1_t merge, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV32VFloat32VBVFVU_TAMU, fcvt_f_xu_v, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt32) +// vint64m1_t vfcvt_x_f_v_i64m1_tamu (vbool64_t mask, vint64m1_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VInt64VBVIVF_TAMU, fcvt_x_f_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 3, OneDBool, OneDInt64, OneDFloat64) +// vint64m1_t vfcvt_rtz_x_f_v_i64m1_tamu (vbool64_t mask, vint64m1_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV64VInt64VBVIVF_TAMU, fcvt_rtz_x_f_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 3, OneDBool, OneDInt64, OneDFloat64) +// vuint64m1_t vfcvt_xu_f_v_u64m1_tamu (vbool64_t mask, vuint64m1_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VUInt64VBVUVF_TAMU, fcvt_xu_f_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDFloat64) +// vuint64m1_t vfcvt_rtz_xu_f_v_u64m1_tamu (vbool64_t mask, vuint64m1_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fcvt_rtzV64VUInt64VBVUVF_TAMU, fcvt_rtz_xu_f_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDFloat64) +// vfloat64m1_t vfcvt_f_x_v_f64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VFloat64VBVFVI_TAMU, fcvt_f_x_v, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 3, OneDBool, OneDFloat64, OneDInt64) +// vfloat64m1_t vfcvt_f_xu_v_f64m1_tamu (vbool64_t mask, vfloat64m1_t merge, vuint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FcvtV64VFloat64VBVFVU_TAMU, fcvt_f_xu_v, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 3, OneDBool, OneDFloat64, OneDUInt64) + +// vfloat16m2_t vfwcvt_f_x_v_f16m2_tu (vfloat16m2_t merge, vint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV8VFloat16VFVI_TU, fwcvt_f_x_v, 8, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat16, 2, OneDFloat16, OneDInt8) +// vfloat16m2_t vfwcvt_f_xu_v_f16m2_tu (vfloat16m2_t merge, vuint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV8VFloat16VFVU_TU, fwcvt_f_xu_v, 8, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat16, 2, OneDFloat16, OneDUInt8) +// vint32m2_t vfwcvt_x_f_v_i32m2_tu (vint32m2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VInt32VIVF_TU, fwcvt_x_f_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt32, 2, OneDInt32, OneDFloat16) +// vint32m2_t vfwcvt_rtz_x_f_v_i32m2_tu (vint32m2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV16VInt32VIVF_TU, fwcvt_rtz_x_f_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt32, 2, OneDInt32, OneDFloat16) +// vuint32m2_t vfwcvt_xu_f_v_u32m2_tu (vuint32m2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VUInt32VUVF_TU, fwcvt_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt32, 2, OneDUInt32, OneDFloat16) +// vuint32m2_t vfwcvt_rtz_xu_f_v_u32m2_tu (vuint32m2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV16VUInt32VUVF_TU, fwcvt_rtz_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt32, 2, OneDUInt32, OneDFloat16) +// vfloat32m2_t vfwcvt_f_x_v_f32m2_tu (vfloat32m2_t merge, vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VFloat32VFVI_TU, fwcvt_f_x_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat32, 2, OneDFloat32, OneDInt16) +// vfloat32m2_t vfwcvt_f_xu_v_f32m2_tu (vfloat32m2_t merge, vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VFloat32VFVU_TU, fwcvt_f_xu_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat32, 2, OneDFloat32, OneDUInt16) +// vfloat32m2_t vfwcvt_f_f_v_f32m2_tu (vfloat32m2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VFloat32VFVF_TU, fwcvt_f_f_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat32, 2, OneDFloat32, OneDFloat16) +// vint64m2_t vfwcvt_x_f_v_i64m2_tu (vint64m2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VInt64VIVF_TU, fwcvt_x_f_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt64, 2, OneDInt64, OneDFloat32) +// vint64m2_t vfwcvt_rtz_x_f_v_i64m2_tu (vint64m2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV32VInt64VIVF_TU, fwcvt_rtz_x_f_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDInt64, 2, OneDInt64, OneDFloat32) +// vuint64m2_t vfwcvt_xu_f_v_u64m2_tu (vuint64m2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VUInt64VUVF_TU, fwcvt_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt64, 2, OneDUInt64, OneDFloat32) +// vuint64m2_t vfwcvt_rtz_xu_f_v_u64m2_tu (vuint64m2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV32VUInt64VUVF_TU, fwcvt_rtz_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDUInt64, 2, OneDUInt64, OneDFloat32) +// vfloat64m2_t vfwcvt_f_x_v_f64m2_tu (vfloat64m2_t merge, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VFloat64VFVI_TU, fwcvt_f_x_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat64, 2, OneDFloat64, OneDInt32) +// vfloat64m2_t vfwcvt_f_xu_v_f64m2_tu (vfloat64m2_t merge, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VFloat64VFVU_TU, fwcvt_f_xu_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat64, 2, OneDFloat64, OneDUInt32) +// vfloat64m2_t vfwcvt_f_f_v_f64m2_tu (vfloat64m2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VFloat64VFVF_TU, fwcvt_f_f_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailUndisturbed, OneDFloat64, 2, OneDFloat64, OneDFloat32) +// vfloat16m2_t vfwcvt_f_x_v_f16m2_ta (vint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV8VFloat16VI_TA, fwcvt_f_x_v, 8, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat16, 1, OneDInt8) +// vfloat16m2_t vfwcvt_f_xu_v_f16m2_ta (vuint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV8VFloat16VU_TA, fwcvt_f_xu_v, 8, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat16, 1, OneDUInt8) +// vint32m2_t vfwcvt_x_f_v_i32m2_ta (vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VInt32VF_TA, fwcvt_x_f_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt32, 1, OneDFloat16) +// vint32m2_t vfwcvt_rtz_x_f_v_i32m2_ta (vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV16VInt32VF_TA, fwcvt_rtz_x_f_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt32, 1, OneDFloat16) +// vuint32m2_t vfwcvt_xu_f_v_u32m2_ta (vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VUInt32VF_TA, fwcvt_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt32, 1, OneDFloat16) +// vuint32m2_t vfwcvt_rtz_xu_f_v_u32m2_ta (vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV16VUInt32VF_TA, fwcvt_rtz_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt32, 1, OneDFloat16) +// vfloat32m2_t vfwcvt_f_x_v_f32m2_ta (vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VFloat32VI_TA, fwcvt_f_x_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat32, 1, OneDInt16) +// vfloat32m2_t vfwcvt_f_xu_v_f32m2_ta (vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VFloat32VU_TA, fwcvt_f_xu_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat32, 1, OneDUInt16) +// vfloat32m2_t vfwcvt_f_f_v_f32m2_ta (vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VFloat32VF_TA, fwcvt_f_f_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat32, 1, OneDFloat16) +// vint64m2_t vfwcvt_x_f_v_i64m2_ta (vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VInt64VF_TA, fwcvt_x_f_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt64, 1, OneDFloat32) +// vint64m2_t vfwcvt_rtz_x_f_v_i64m2_ta (vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV32VInt64VF_TA, fwcvt_rtz_x_f_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDInt64, 1, OneDFloat32) +// vuint64m2_t vfwcvt_xu_f_v_u64m2_ta (vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VUInt64VF_TA, fwcvt_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt64, 1, OneDFloat32) +// vuint64m2_t vfwcvt_rtz_xu_f_v_u64m2_ta (vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV32VUInt64VF_TA, fwcvt_rtz_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDUInt64, 1, OneDFloat32) +// vfloat64m2_t vfwcvt_f_x_v_f64m2_ta (vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VFloat64VI_TA, fwcvt_f_x_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat64, 1, OneDInt32) +// vfloat64m2_t vfwcvt_f_xu_v_f64m2_ta (vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VFloat64VU_TA, fwcvt_f_xu_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat64, 1, OneDUInt32) +// vfloat64m2_t vfwcvt_f_f_v_f64m2_ta (vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VFloat64VF_TA, fwcvt_f_f_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | WideningOperation | TailAgnostic, OneDFloat64, 1, OneDFloat32) +// vfloat16m2_t vfwcvt_f_x_v_f16m2_tuma (vbool8_t mask, vfloat16m2_t merge, vint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV8VFloat16VBVFVI_TUMA, fwcvt_f_x_v, 8, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDInt8) +// vfloat16m2_t vfwcvt_f_xu_v_f16m2_tuma (vbool8_t mask, vfloat16m2_t merge, vuint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV8VFloat16VBVFVU_TUMA, fwcvt_f_xu_v, 8, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt8) +// vint32m2_t vfwcvt_x_f_v_i32m2_tuma (vbool16_t mask, vint32m2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VInt32VBVIVF_TUMA, fwcvt_x_f_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat16) +// vint32m2_t vfwcvt_rtz_x_f_v_i32m2_tuma (vbool16_t mask, vint32m2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV16VInt32VBVIVF_TUMA, fwcvt_rtz_x_f_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat16) +// vuint32m2_t vfwcvt_xu_f_v_u32m2_tuma (vbool16_t mask, vuint32m2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VUInt32VBVUVF_TUMA, fwcvt_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat16) +// vuint32m2_t vfwcvt_rtz_xu_f_v_u32m2_tuma (vbool16_t mask, vuint32m2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV16VUInt32VBVUVF_TUMA, fwcvt_rtz_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat16) +// vfloat32m2_t vfwcvt_f_x_v_f32m2_tuma (vbool16_t mask, vfloat32m2_t merge, vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VFloat32VBVFVI_TUMA, fwcvt_f_x_v, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDInt16) +// vfloat32m2_t vfwcvt_f_xu_v_f32m2_tuma (vbool16_t mask, vfloat32m2_t merge, vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VFloat32VBVFVU_TUMA, fwcvt_f_xu_v, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt16) +// vfloat32m2_t vfwcvt_f_f_v_f32m2_tuma (vbool16_t mask, vfloat32m2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VFloat32VBVFVF_TUMA, fwcvt_f_f_v, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat16) +// vint64m2_t vfwcvt_x_f_v_i64m2_tuma (vbool32_t mask, vint64m2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VInt64VBVIVF_TUMA, fwcvt_x_f_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDFloat32) +// vint64m2_t vfwcvt_rtz_x_f_v_i64m2_tuma (vbool32_t mask, vint64m2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV32VInt64VBVIVF_TUMA, fwcvt_rtz_x_f_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDFloat32) +// vuint64m2_t vfwcvt_xu_f_v_u64m2_tuma (vbool32_t mask, vuint64m2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VUInt64VBVUVF_TUMA, fwcvt_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDFloat32) +// vuint64m2_t vfwcvt_rtz_xu_f_v_u64m2_tuma (vbool32_t mask, vuint64m2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV32VUInt64VBVUVF_TUMA, fwcvt_rtz_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDFloat32) +// vfloat64m2_t vfwcvt_f_x_v_f64m2_tuma (vbool32_t mask, vfloat64m2_t merge, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VFloat64VBVFVI_TUMA, fwcvt_f_x_v, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDInt32) +// vfloat64m2_t vfwcvt_f_xu_v_f64m2_tuma (vbool32_t mask, vfloat64m2_t merge, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VFloat64VBVFVU_TUMA, fwcvt_f_xu_v, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDUInt32) +// vfloat64m2_t vfwcvt_f_f_v_f64m2_tuma (vbool32_t mask, vfloat64m2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VFloat64VBVFVF_TUMA, fwcvt_f_f_v, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat32) +// vfloat16m2_t vfwcvt_f_x_v_f16m2_tumu (vbool8_t mask, vfloat16m2_t merge, vint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV8VFloat16VBVFVI_TUMU, fwcvt_f_x_v, 8, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDInt8) +// vfloat16m2_t vfwcvt_f_xu_v_f16m2_tumu (vbool8_t mask, vfloat16m2_t merge, vuint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV8VFloat16VBVFVU_TUMU, fwcvt_f_xu_v, 8, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt8) +// vint32m2_t vfwcvt_x_f_v_i32m2_tumu (vbool16_t mask, vint32m2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VInt32VBVIVF_TUMU, fwcvt_x_f_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat16) +// vint32m2_t vfwcvt_rtz_x_f_v_i32m2_tumu (vbool16_t mask, vint32m2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV16VInt32VBVIVF_TUMU, fwcvt_rtz_x_f_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat16) +// vuint32m2_t vfwcvt_xu_f_v_u32m2_tumu (vbool16_t mask, vuint32m2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VUInt32VBVUVF_TUMU, fwcvt_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat16) +// vuint32m2_t vfwcvt_rtz_xu_f_v_u32m2_tumu (vbool16_t mask, vuint32m2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV16VUInt32VBVUVF_TUMU, fwcvt_rtz_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat16) +// vfloat32m2_t vfwcvt_f_x_v_f32m2_tumu (vbool16_t mask, vfloat32m2_t merge, vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VFloat32VBVFVI_TUMU, fwcvt_f_x_v, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDInt16) +// vfloat32m2_t vfwcvt_f_xu_v_f32m2_tumu (vbool16_t mask, vfloat32m2_t merge, vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VFloat32VBVFVU_TUMU, fwcvt_f_xu_v, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt16) +// vfloat32m2_t vfwcvt_f_f_v_f32m2_tumu (vbool16_t mask, vfloat32m2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VFloat32VBVFVF_TUMU, fwcvt_f_f_v, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat16) +// vint64m2_t vfwcvt_x_f_v_i64m2_tumu (vbool32_t mask, vint64m2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VInt64VBVIVF_TUMU, fwcvt_x_f_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 3, OneDBool, OneDInt64, OneDFloat32) +// vint64m2_t vfwcvt_rtz_x_f_v_i64m2_tumu (vbool32_t mask, vint64m2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV32VInt64VBVIVF_TUMU, fwcvt_rtz_x_f_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 3, OneDBool, OneDInt64, OneDFloat32) +// vuint64m2_t vfwcvt_xu_f_v_u64m2_tumu (vbool32_t mask, vuint64m2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VUInt64VBVUVF_TUMU, fwcvt_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDFloat32) +// vuint64m2_t vfwcvt_rtz_xu_f_v_u64m2_tumu (vbool32_t mask, vuint64m2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV32VUInt64VBVUVF_TUMU, fwcvt_rtz_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDFloat32) +// vfloat64m2_t vfwcvt_f_x_v_f64m2_tumu (vbool32_t mask, vfloat64m2_t merge, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VFloat64VBVFVI_TUMU, fwcvt_f_x_v, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 3, OneDBool, OneDFloat64, OneDInt32) +// vfloat64m2_t vfwcvt_f_xu_v_f64m2_tumu (vbool32_t mask, vfloat64m2_t merge, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VFloat64VBVFVU_TUMU, fwcvt_f_xu_v, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 3, OneDBool, OneDFloat64, OneDUInt32) +// vfloat64m2_t vfwcvt_f_f_v_f64m2_tumu (vbool32_t mask, vfloat64m2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VFloat64VBVFVF_TUMU, fwcvt_f_f_v, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat32) +// vfloat16m2_t vfwcvt_f_x_v_f16m2_tama (vbool8_t mask, vint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV8VFloat16VBVI_TAMA, fwcvt_f_x_v, 8, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 2, OneDBool, OneDInt8) +// vfloat16m2_t vfwcvt_f_xu_v_f16m2_tama (vbool8_t mask, vuint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV8VFloat16VBVU_TAMA, fwcvt_f_xu_v, 8, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 2, OneDBool, OneDUInt8) +// vint32m2_t vfwcvt_x_f_v_i32m2_tama (vbool16_t mask, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VInt32VBVF_TAMA, fwcvt_x_f_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDInt32, 2, OneDBool, OneDFloat16) +// vint32m2_t vfwcvt_rtz_x_f_v_i32m2_tama (vbool16_t mask, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV16VInt32VBVF_TAMA, fwcvt_rtz_x_f_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDInt32, 2, OneDBool, OneDFloat16) +// vuint32m2_t vfwcvt_xu_f_v_u32m2_tama (vbool16_t mask, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VUInt32VBVF_TAMA, fwcvt_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 2, OneDBool, OneDFloat16) +// vuint32m2_t vfwcvt_rtz_xu_f_v_u32m2_tama (vbool16_t mask, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV16VUInt32VBVF_TAMA, fwcvt_rtz_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 2, OneDBool, OneDFloat16) +// vfloat32m2_t vfwcvt_f_x_v_f32m2_tama (vbool16_t mask, vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VFloat32VBVI_TAMA, fwcvt_f_x_v, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 2, OneDBool, OneDInt16) +// vfloat32m2_t vfwcvt_f_xu_v_f32m2_tama (vbool16_t mask, vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VFloat32VBVU_TAMA, fwcvt_f_xu_v, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 2, OneDBool, OneDUInt16) +// vfloat32m2_t vfwcvt_f_f_v_f32m2_tama (vbool16_t mask, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VFloat32VBVF_TAMA, fwcvt_f_f_v, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 2, OneDBool, OneDFloat16) +// vint64m2_t vfwcvt_x_f_v_i64m2_tama (vbool32_t mask, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VInt64VBVF_TAMA, fwcvt_x_f_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDInt64, 2, OneDBool, OneDFloat32) +// vint64m2_t vfwcvt_rtz_x_f_v_i64m2_tama (vbool32_t mask, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV32VInt64VBVF_TAMA, fwcvt_rtz_x_f_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDInt64, 2, OneDBool, OneDFloat32) +// vuint64m2_t vfwcvt_xu_f_v_u64m2_tama (vbool32_t mask, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VUInt64VBVF_TAMA, fwcvt_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDUInt64, 2, OneDBool, OneDFloat32) +// vuint64m2_t vfwcvt_rtz_xu_f_v_u64m2_tama (vbool32_t mask, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV32VUInt64VBVF_TAMA, fwcvt_rtz_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDUInt64, 2, OneDBool, OneDFloat32) +// vfloat64m2_t vfwcvt_f_x_v_f64m2_tama (vbool32_t mask, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VFloat64VBVI_TAMA, fwcvt_f_x_v, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 2, OneDBool, OneDInt32) +// vfloat64m2_t vfwcvt_f_xu_v_f64m2_tama (vbool32_t mask, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VFloat64VBVU_TAMA, fwcvt_f_xu_v, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 2, OneDBool, OneDUInt32) +// vfloat64m2_t vfwcvt_f_f_v_f64m2_tama (vbool32_t mask, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VFloat64VBVF_TAMA, fwcvt_f_f_v, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | WideningOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 2, OneDBool, OneDFloat32) +// vfloat16m2_t vfwcvt_f_x_v_f16m2_tamu (vbool8_t mask, vfloat16m2_t merge, vint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV8VFloat16VBVFVI_TAMU, fwcvt_f_x_v, 8, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDInt8) +// vfloat16m2_t vfwcvt_f_xu_v_f16m2_tamu (vbool8_t mask, vfloat16m2_t merge, vuint8m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV8VFloat16VBVFVU_TAMU, fwcvt_f_xu_v, 8, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt8) +// vint32m2_t vfwcvt_x_f_v_i32m2_tamu (vbool16_t mask, vint32m2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VInt32VBVIVF_TAMU, fwcvt_x_f_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat16) +// vint32m2_t vfwcvt_rtz_x_f_v_i32m2_tamu (vbool16_t mask, vint32m2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV16VInt32VBVIVF_TAMU, fwcvt_rtz_x_f_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat16) +// vuint32m2_t vfwcvt_xu_f_v_u32m2_tamu (vbool16_t mask, vuint32m2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VUInt32VBVUVF_TAMU, fwcvt_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat16) +// vuint32m2_t vfwcvt_rtz_xu_f_v_u32m2_tamu (vbool16_t mask, vuint32m2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV16VUInt32VBVUVF_TAMU, fwcvt_rtz_xu_f_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat16) +// vfloat32m2_t vfwcvt_f_x_v_f32m2_tamu (vbool16_t mask, vfloat32m2_t merge, vint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VFloat32VBVFVI_TAMU, fwcvt_f_x_v, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDInt16) +// vfloat32m2_t vfwcvt_f_xu_v_f32m2_tamu (vbool16_t mask, vfloat32m2_t merge, vuint16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VFloat32VBVFVU_TAMU, fwcvt_f_xu_v, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt16) +// vfloat32m2_t vfwcvt_f_f_v_f32m2_tamu (vbool16_t mask, vfloat32m2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV16VFloat32VBVFVF_TAMU, fwcvt_f_f_v, 16, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat16) +// vint64m2_t vfwcvt_x_f_v_i64m2_tamu (vbool32_t mask, vint64m2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VInt64VBVIVF_TAMU, fwcvt_x_f_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 3, OneDBool, OneDInt64, OneDFloat32) +// vint64m2_t vfwcvt_rtz_x_f_v_i64m2_tamu (vbool32_t mask, vint64m2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV32VInt64VBVIVF_TAMU, fwcvt_rtz_x_f_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 3, OneDBool, OneDInt64, OneDFloat32) +// vuint64m2_t vfwcvt_xu_f_v_u64m2_tamu (vbool32_t mask, vuint64m2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VUInt64VBVUVF_TAMU, fwcvt_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDFloat32) +// vuint64m2_t vfwcvt_rtz_xu_f_v_u64m2_tamu (vbool32_t mask, vuint64m2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fwcvt_rtzV32VUInt64VBVUVF_TAMU, fwcvt_rtz_xu_f_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDFloat32) +// vfloat64m2_t vfwcvt_f_x_v_f64m2_tamu (vbool32_t mask, vfloat64m2_t merge, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VFloat64VBVFVI_TAMU, fwcvt_f_x_v, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 3, OneDBool, OneDFloat64, OneDInt32) +// vfloat64m2_t vfwcvt_f_xu_v_f64m2_tamu (vbool32_t mask, vfloat64m2_t merge, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VFloat64VBVFVU_TAMU, fwcvt_f_xu_v, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 3, OneDBool, OneDFloat64, OneDUInt32) +// vfloat64m2_t vfwcvt_f_f_v_f64m2_tamu (vbool32_t mask, vfloat64m2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FwcvtV32VFloat64VBVFVF_TAMU, fwcvt_f_f_v, 32, FLOAT, HaveVLParameter | MaskedOperation | WideningOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat32) + +// vint8mf2_t vfncvt_x_f_w_i8mf2_tu (vint8mf2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV16VInt8VIVF_TU, fncvt_x_f_w, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDInt8, 2, OneDInt8, OneDFloat16) +// vint8mf2_t vfncvt_rtz_x_f_w_i8mf2_tu (vint8mf2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV16VInt8VIVF_TU, fncvt_rtz_x_f_w, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDInt8, 2, OneDInt8, OneDFloat16) +// vuint8mf2_t vfncvt_xu_f_w_u8mf2_tu (vuint8mf2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV16VUInt8VUVF_TU, fncvt_xu_f_w, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDUInt8, 2, OneDUInt8, OneDFloat16) +// vuint8mf2_t vfncvt_rtz_xu_f_w_u8mf2_tu (vuint8mf2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV16VUInt8VUVF_TU, fncvt_rtz_xu_f_w, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDUInt8, 2, OneDUInt8, OneDFloat16) +// vint16mf2_t vfncvt_x_f_w_i16mf2_tu (vint16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VInt16VIVF_TU, fncvt_x_f_w, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDInt16, 2, OneDInt16, OneDFloat32) +// vint16mf2_t vfncvt_rtz_x_f_w_i16mf2_tu (vint16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV32VInt16VIVF_TU, fncvt_rtz_x_f_w, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDInt16, 2, OneDInt16, OneDFloat32) +// vuint16mf2_t vfncvt_xu_f_w_u16mf2_tu (vuint16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VUInt16VUVF_TU, fncvt_xu_f_w, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDUInt16, 2, OneDUInt16, OneDFloat32) +// vuint16mf2_t vfncvt_rtz_xu_f_w_u16mf2_tu (vuint16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV32VUInt16VUVF_TU, fncvt_rtz_xu_f_w, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDUInt16, 2, OneDUInt16, OneDFloat32) +// vfloat16mf2_t vfncvt_f_x_w_f16mf2_tu (vfloat16mf2_t merge, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VFloat16VFVI_TU, fncvt_f_x_w, 32, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDFloat16, 2, OneDFloat16, OneDInt32) +// vfloat16mf2_t vfncvt_f_xu_w_f16mf2_tu (vfloat16mf2_t merge, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VFloat16VFVU_TU, fncvt_f_xu_w, 32, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDFloat16, 2, OneDFloat16, OneDUInt32) +// vfloat16mf2_t vfncvt_f_f_w_f16mf2_tu (vfloat16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VFloat16VFVF_TU, fncvt_f_f_w, 32, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDFloat16, 2, OneDFloat16, OneDFloat32) +// vfloat16mf2_t vfncvt_rod_f_f_w_f16mf2_tu (vfloat16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rodV32VFloat16VFVF_TU, fncvt_rod_f_f_w, 32, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDFloat16, 2, OneDFloat16, OneDFloat32) +// vint32mf2_t vfncvt_x_f_w_i32mf2_tu (vint32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VInt32VIVF_TU, fncvt_x_f_w, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDInt32, 2, OneDInt32, OneDFloat64) +// vint32mf2_t vfncvt_rtz_x_f_w_i32mf2_tu (vint32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV64VInt32VIVF_TU, fncvt_rtz_x_f_w, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDInt32, 2, OneDInt32, OneDFloat64) +// vuint32mf2_t vfncvt_xu_f_w_u32mf2_tu (vuint32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VUInt32VUVF_TU, fncvt_xu_f_w, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDUInt32, 2, OneDUInt32, OneDFloat64) +// vuint32mf2_t vfncvt_rtz_xu_f_w_u32mf2_tu (vuint32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV64VUInt32VUVF_TU, fncvt_rtz_xu_f_w, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDUInt32, 2, OneDUInt32, OneDFloat64) +// vfloat32mf2_t vfncvt_f_x_w_f32mf2_tu (vfloat32mf2_t merge, vint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VFloat32VFVI_TU, fncvt_f_x_w, 64, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDFloat32, 2, OneDFloat32, OneDInt64) +// vfloat32mf2_t vfncvt_f_xu_w_f32mf2_tu (vfloat32mf2_t merge, vuint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VFloat32VFVU_TU, fncvt_f_xu_w, 64, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDFloat32, 2, OneDFloat32, OneDUInt64) +// vfloat32mf2_t vfncvt_f_f_w_f32mf2_tu (vfloat32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VFloat32VFVF_TU, fncvt_f_f_w, 64, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDFloat32, 2, OneDFloat32, OneDFloat64) +// vfloat32mf2_t vfncvt_rod_f_f_w_f32mf2_tu (vfloat32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rodV64VFloat32VFVF_TU, fncvt_rod_f_f_w, 64, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailUndisturbed, OneDFloat32, 2, OneDFloat32, OneDFloat64) +// vint8mf2_t vfncvt_x_f_w_i8mf2_ta (vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV16VInt8VF_TA, fncvt_x_f_w, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDInt8, 1, OneDFloat16) +// vint8mf2_t vfncvt_rtz_x_f_w_i8mf2_ta (vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV16VInt8VF_TA, fncvt_rtz_x_f_w, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDInt8, 1, OneDFloat16) +// vuint8mf2_t vfncvt_xu_f_w_u8mf2_ta (vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV16VUInt8VF_TA, fncvt_xu_f_w, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDUInt8, 1, OneDFloat16) +// vuint8mf2_t vfncvt_rtz_xu_f_w_u8mf2_ta (vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV16VUInt8VF_TA, fncvt_rtz_xu_f_w, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDUInt8, 1, OneDFloat16) +// vint16mf2_t vfncvt_x_f_w_i16mf2_ta (vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VInt16VF_TA, fncvt_x_f_w, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDInt16, 1, OneDFloat32) +// vint16mf2_t vfncvt_rtz_x_f_w_i16mf2_ta (vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV32VInt16VF_TA, fncvt_rtz_x_f_w, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDInt16, 1, OneDFloat32) +// vuint16mf2_t vfncvt_xu_f_w_u16mf2_ta (vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VUInt16VF_TA, fncvt_xu_f_w, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDUInt16, 1, OneDFloat32) +// vuint16mf2_t vfncvt_rtz_xu_f_w_u16mf2_ta (vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV32VUInt16VF_TA, fncvt_rtz_xu_f_w, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDUInt16, 1, OneDFloat32) +// vfloat16mf2_t vfncvt_f_x_w_f16mf2_ta (vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VFloat16VI_TA, fncvt_f_x_w, 32, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDFloat16, 1, OneDInt32) +// vfloat16mf2_t vfncvt_f_xu_w_f16mf2_ta (vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VFloat16VU_TA, fncvt_f_xu_w, 32, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDFloat16, 1, OneDUInt32) +// vfloat16mf2_t vfncvt_f_f_w_f16mf2_ta (vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VFloat16VF_TA, fncvt_f_f_w, 32, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDFloat16, 1, OneDFloat32) +// vfloat16mf2_t vfncvt_rod_f_f_w_f16mf2_ta (vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rodV32VFloat16VF_TA, fncvt_rod_f_f_w, 32, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDFloat16, 1, OneDFloat32) +// vint32mf2_t vfncvt_x_f_w_i32mf2_ta (vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VInt32VF_TA, fncvt_x_f_w, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDInt32, 1, OneDFloat64) +// vint32mf2_t vfncvt_rtz_x_f_w_i32mf2_ta (vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV64VInt32VF_TA, fncvt_rtz_x_f_w, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDInt32, 1, OneDFloat64) +// vuint32mf2_t vfncvt_xu_f_w_u32mf2_ta (vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VUInt32VF_TA, fncvt_xu_f_w, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDUInt32, 1, OneDFloat64) +// vuint32mf2_t vfncvt_rtz_xu_f_w_u32mf2_ta (vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV64VUInt32VF_TA, fncvt_rtz_xu_f_w, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDUInt32, 1, OneDFloat64) +// vfloat32mf2_t vfncvt_f_x_w_f32mf2_ta (vint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VFloat32VI_TA, fncvt_f_x_w, 64, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDFloat32, 1, OneDInt64) +// vfloat32mf2_t vfncvt_f_xu_w_f32mf2_ta (vuint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VFloat32VU_TA, fncvt_f_xu_w, 64, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDFloat32, 1, OneDUInt64) +// vfloat32mf2_t vfncvt_f_f_w_f32mf2_ta (vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VFloat32VF_TA, fncvt_f_f_w, 64, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDFloat32, 1, OneDFloat64) +// vfloat32mf2_t vfncvt_rod_f_f_w_f32mf2_ta (vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rodV64VFloat32VF_TA, fncvt_rod_f_f_w, 64, FLOAT, HaveVLParameter | NonmaskedOperation | NarrowingOperation | TailAgnostic, OneDFloat32, 1, OneDFloat64) +// vint8mf2_t vfncvt_x_f_w_i8mf2_tuma (vbool16_t mask, vint8mf2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV16VInt8VBVIVF_TUMA, fncvt_x_f_w, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDFloat16) +// vint8mf2_t vfncvt_rtz_x_f_w_i8mf2_tuma (vbool16_t mask, vint8mf2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV16VInt8VBVIVF_TUMA, fncvt_rtz_x_f_w, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDFloat16) +// vuint8mf2_t vfncvt_xu_f_w_u8mf2_tuma (vbool16_t mask, vuint8mf2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV16VUInt8VBVUVF_TUMA, fncvt_xu_f_w, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDFloat16) +// vuint8mf2_t vfncvt_rtz_xu_f_w_u8mf2_tuma (vbool16_t mask, vuint8mf2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV16VUInt8VBVUVF_TUMA, fncvt_rtz_xu_f_w, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDFloat16) +// vint16mf2_t vfncvt_x_f_w_i16mf2_tuma (vbool32_t mask, vint16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VInt16VBVIVF_TUMA, fncvt_x_f_w, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDFloat32) +// vint16mf2_t vfncvt_rtz_x_f_w_i16mf2_tuma (vbool32_t mask, vint16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV32VInt16VBVIVF_TUMA, fncvt_rtz_x_f_w, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDFloat32) +// vuint16mf2_t vfncvt_xu_f_w_u16mf2_tuma (vbool32_t mask, vuint16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VUInt16VBVUVF_TUMA, fncvt_xu_f_w, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDFloat32) +// vuint16mf2_t vfncvt_rtz_xu_f_w_u16mf2_tuma (vbool32_t mask, vuint16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV32VUInt16VBVUVF_TUMA, fncvt_rtz_xu_f_w, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDFloat32) +// vfloat16mf2_t vfncvt_f_x_w_f16mf2_tuma (vbool32_t mask, vfloat16mf2_t merge, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VFloat16VBVFVI_TUMA, fncvt_f_x_w, 32, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDInt32) +// vfloat16mf2_t vfncvt_f_xu_w_f16mf2_tuma (vbool32_t mask, vfloat16mf2_t merge, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VFloat16VBVFVU_TUMA, fncvt_f_xu_w, 32, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt32) +// vfloat16mf2_t vfncvt_f_f_w_f16mf2_tuma (vbool32_t mask, vfloat16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VFloat16VBVFVF_TUMA, fncvt_f_f_w, 32, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat32) +// vfloat16mf2_t vfncvt_rod_f_f_w_f16mf2_tuma (vbool32_t mask, vfloat16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rodV32VFloat16VBVFVF_TUMA, fncvt_rod_f_f_w, 32, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat32) +// vint32mf2_t vfncvt_x_f_w_i32mf2_tuma (vbool64_t mask, vint32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VInt32VBVIVF_TUMA, fncvt_x_f_w, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat64) +// vint32mf2_t vfncvt_rtz_x_f_w_i32mf2_tuma (vbool64_t mask, vint32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV64VInt32VBVIVF_TUMA, fncvt_rtz_x_f_w, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat64) +// vuint32mf2_t vfncvt_xu_f_w_u32mf2_tuma (vbool64_t mask, vuint32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VUInt32VBVUVF_TUMA, fncvt_xu_f_w, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat64) +// vuint32mf2_t vfncvt_rtz_xu_f_w_u32mf2_tuma (vbool64_t mask, vuint32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV64VUInt32VBVUVF_TUMA, fncvt_rtz_xu_f_w, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat64) +// vfloat32mf2_t vfncvt_f_x_w_f32mf2_tuma (vbool64_t mask, vfloat32mf2_t merge, vint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VFloat32VBVFVI_TUMA, fncvt_f_x_w, 64, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDInt64) +// vfloat32mf2_t vfncvt_f_xu_w_f32mf2_tuma (vbool64_t mask, vfloat32mf2_t merge, vuint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VFloat32VBVFVU_TUMA, fncvt_f_xu_w, 64, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt64) +// vfloat32mf2_t vfncvt_f_f_w_f32mf2_tuma (vbool64_t mask, vfloat32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VFloat32VBVFVF_TUMA, fncvt_f_f_w, 64, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat64) +// vfloat32mf2_t vfncvt_rod_f_f_w_f32mf2_tuma (vbool64_t mask, vfloat32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rodV64VFloat32VBVFVF_TUMA, fncvt_rod_f_f_w, 64, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat64) +// vint8mf2_t vfncvt_x_f_w_i8mf2_tumu (vbool16_t mask, vint8mf2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV16VInt8VBVIVF_TUMU, fncvt_x_f_w, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 3, OneDBool, OneDInt8, OneDFloat16) +// vint8mf2_t vfncvt_rtz_x_f_w_i8mf2_tumu (vbool16_t mask, vint8mf2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV16VInt8VBVIVF_TUMU, fncvt_rtz_x_f_w, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 3, OneDBool, OneDInt8, OneDFloat16) +// vuint8mf2_t vfncvt_xu_f_w_u8mf2_tumu (vbool16_t mask, vuint8mf2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV16VUInt8VBVUVF_TUMU, fncvt_xu_f_w, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 3, OneDBool, OneDUInt8, OneDFloat16) +// vuint8mf2_t vfncvt_rtz_xu_f_w_u8mf2_tumu (vbool16_t mask, vuint8mf2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV16VUInt8VBVUVF_TUMU, fncvt_rtz_xu_f_w, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 3, OneDBool, OneDUInt8, OneDFloat16) +// vint16mf2_t vfncvt_x_f_w_i16mf2_tumu (vbool32_t mask, vint16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VInt16VBVIVF_TUMU, fncvt_x_f_w, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 3, OneDBool, OneDInt16, OneDFloat32) +// vint16mf2_t vfncvt_rtz_x_f_w_i16mf2_tumu (vbool32_t mask, vint16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV32VInt16VBVIVF_TUMU, fncvt_rtz_x_f_w, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 3, OneDBool, OneDInt16, OneDFloat32) +// vuint16mf2_t vfncvt_xu_f_w_u16mf2_tumu (vbool32_t mask, vuint16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VUInt16VBVUVF_TUMU, fncvt_xu_f_w, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 3, OneDBool, OneDUInt16, OneDFloat32) +// vuint16mf2_t vfncvt_rtz_xu_f_w_u16mf2_tumu (vbool32_t mask, vuint16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV32VUInt16VBVUVF_TUMU, fncvt_rtz_xu_f_w, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 3, OneDBool, OneDUInt16, OneDFloat32) +// vfloat16mf2_t vfncvt_f_x_w_f16mf2_tumu (vbool32_t mask, vfloat16mf2_t merge, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VFloat16VBVFVI_TUMU, fncvt_f_x_w, 32, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDInt32) +// vfloat16mf2_t vfncvt_f_xu_w_f16mf2_tumu (vbool32_t mask, vfloat16mf2_t merge, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VFloat16VBVFVU_TUMU, fncvt_f_xu_w, 32, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt32) +// vfloat16mf2_t vfncvt_f_f_w_f16mf2_tumu (vbool32_t mask, vfloat16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VFloat16VBVFVF_TUMU, fncvt_f_f_w, 32, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat32) +// vfloat16mf2_t vfncvt_rod_f_f_w_f16mf2_tumu (vbool32_t mask, vfloat16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rodV32VFloat16VBVFVF_TUMU, fncvt_rod_f_f_w, 32, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat32) +// vint32mf2_t vfncvt_x_f_w_i32mf2_tumu (vbool64_t mask, vint32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VInt32VBVIVF_TUMU, fncvt_x_f_w, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat64) +// vint32mf2_t vfncvt_rtz_x_f_w_i32mf2_tumu (vbool64_t mask, vint32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV64VInt32VBVIVF_TUMU, fncvt_rtz_x_f_w, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat64) +// vuint32mf2_t vfncvt_xu_f_w_u32mf2_tumu (vbool64_t mask, vuint32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VUInt32VBVUVF_TUMU, fncvt_xu_f_w, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat64) +// vuint32mf2_t vfncvt_rtz_xu_f_w_u32mf2_tumu (vbool64_t mask, vuint32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV64VUInt32VBVUVF_TUMU, fncvt_rtz_xu_f_w, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat64) +// vfloat32mf2_t vfncvt_f_x_w_f32mf2_tumu (vbool64_t mask, vfloat32mf2_t merge, vint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VFloat32VBVFVI_TUMU, fncvt_f_x_w, 64, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDInt64) +// vfloat32mf2_t vfncvt_f_xu_w_f32mf2_tumu (vbool64_t mask, vfloat32mf2_t merge, vuint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VFloat32VBVFVU_TUMU, fncvt_f_xu_w, 64, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt64) +// vfloat32mf2_t vfncvt_f_f_w_f32mf2_tumu (vbool64_t mask, vfloat32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VFloat32VBVFVF_TUMU, fncvt_f_f_w, 64, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat64) +// vfloat32mf2_t vfncvt_rod_f_f_w_f32mf2_tumu (vbool64_t mask, vfloat32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rodV64VFloat32VBVFVF_TUMU, fncvt_rod_f_f_w, 64, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat64) +// vint8mf2_t vfncvt_x_f_w_i8mf2_tama (vbool16_t mask, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV16VInt8VBVF_TAMA, fncvt_x_f_w, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDInt8, 2, OneDBool, OneDFloat16) +// vint8mf2_t vfncvt_rtz_x_f_w_i8mf2_tama (vbool16_t mask, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV16VInt8VBVF_TAMA, fncvt_rtz_x_f_w, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDInt8, 2, OneDBool, OneDFloat16) +// vuint8mf2_t vfncvt_xu_f_w_u8mf2_tama (vbool16_t mask, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV16VUInt8VBVF_TAMA, fncvt_xu_f_w, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDUInt8, 2, OneDBool, OneDFloat16) +// vuint8mf2_t vfncvt_rtz_xu_f_w_u8mf2_tama (vbool16_t mask, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV16VUInt8VBVF_TAMA, fncvt_rtz_xu_f_w, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDUInt8, 2, OneDBool, OneDFloat16) +// vint16mf2_t vfncvt_x_f_w_i16mf2_tama (vbool32_t mask, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VInt16VBVF_TAMA, fncvt_x_f_w, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDInt16, 2, OneDBool, OneDFloat32) +// vint16mf2_t vfncvt_rtz_x_f_w_i16mf2_tama (vbool32_t mask, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV32VInt16VBVF_TAMA, fncvt_rtz_x_f_w, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDInt16, 2, OneDBool, OneDFloat32) +// vuint16mf2_t vfncvt_xu_f_w_u16mf2_tama (vbool32_t mask, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VUInt16VBVF_TAMA, fncvt_xu_f_w, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 2, OneDBool, OneDFloat32) +// vuint16mf2_t vfncvt_rtz_xu_f_w_u16mf2_tama (vbool32_t mask, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV32VUInt16VBVF_TAMA, fncvt_rtz_xu_f_w, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 2, OneDBool, OneDFloat32) +// vfloat16mf2_t vfncvt_f_x_w_f16mf2_tama (vbool32_t mask, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VFloat16VBVI_TAMA, fncvt_f_x_w, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 2, OneDBool, OneDInt32) +// vfloat16mf2_t vfncvt_f_xu_w_f16mf2_tama (vbool32_t mask, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VFloat16VBVU_TAMA, fncvt_f_xu_w, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 2, OneDBool, OneDUInt32) +// vfloat16mf2_t vfncvt_f_f_w_f16mf2_tama (vbool32_t mask, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VFloat16VBVF_TAMA, fncvt_f_f_w, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 2, OneDBool, OneDFloat32) +// vfloat16mf2_t vfncvt_rod_f_f_w_f16mf2_tama (vbool32_t mask, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rodV32VFloat16VBVF_TAMA, fncvt_rod_f_f_w, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 2, OneDBool, OneDFloat32) +// vint32mf2_t vfncvt_x_f_w_i32mf2_tama (vbool64_t mask, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VInt32VBVF_TAMA, fncvt_x_f_w, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDInt32, 2, OneDBool, OneDFloat64) +// vint32mf2_t vfncvt_rtz_x_f_w_i32mf2_tama (vbool64_t mask, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV64VInt32VBVF_TAMA, fncvt_rtz_x_f_w, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDInt32, 2, OneDBool, OneDFloat64) +// vuint32mf2_t vfncvt_xu_f_w_u32mf2_tama (vbool64_t mask, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VUInt32VBVF_TAMA, fncvt_xu_f_w, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 2, OneDBool, OneDFloat64) +// vuint32mf2_t vfncvt_rtz_xu_f_w_u32mf2_tama (vbool64_t mask, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV64VUInt32VBVF_TAMA, fncvt_rtz_xu_f_w, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 2, OneDBool, OneDFloat64) +// vfloat32mf2_t vfncvt_f_x_w_f32mf2_tama (vbool64_t mask, vint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VFloat32VBVI_TAMA, fncvt_f_x_w, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 2, OneDBool, OneDInt64) +// vfloat32mf2_t vfncvt_f_xu_w_f32mf2_tama (vbool64_t mask, vuint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VFloat32VBVU_TAMA, fncvt_f_xu_w, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 2, OneDBool, OneDUInt64) +// vfloat32mf2_t vfncvt_f_f_w_f32mf2_tama (vbool64_t mask, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VFloat32VBVF_TAMA, fncvt_f_f_w, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 2, OneDBool, OneDFloat64) +// vfloat32mf2_t vfncvt_rod_f_f_w_f32mf2_tama (vbool64_t mask, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rodV64VFloat32VBVF_TAMA, fncvt_rod_f_f_w, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | NarrowingOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 2, OneDBool, OneDFloat64) +// vint8mf2_t vfncvt_x_f_w_i8mf2_tamu (vbool16_t mask, vint8mf2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV16VInt8VBVIVF_TAMU, fncvt_x_f_w, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 3, OneDBool, OneDInt8, OneDFloat16) +// vint8mf2_t vfncvt_rtz_x_f_w_i8mf2_tamu (vbool16_t mask, vint8mf2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV16VInt8VBVIVF_TAMU, fncvt_rtz_x_f_w, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 3, OneDBool, OneDInt8, OneDFloat16) +// vuint8mf2_t vfncvt_xu_f_w_u8mf2_tamu (vbool16_t mask, vuint8mf2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV16VUInt8VBVUVF_TAMU, fncvt_xu_f_w, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 3, OneDBool, OneDUInt8, OneDFloat16) +// vuint8mf2_t vfncvt_rtz_xu_f_w_u8mf2_tamu (vbool16_t mask, vuint8mf2_t merge, vfloat16m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV16VUInt8VBVUVF_TAMU, fncvt_rtz_xu_f_w, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 3, OneDBool, OneDUInt8, OneDFloat16) +// vint16mf2_t vfncvt_x_f_w_i16mf2_tamu (vbool32_t mask, vint16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VInt16VBVIVF_TAMU, fncvt_x_f_w, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 3, OneDBool, OneDInt16, OneDFloat32) +// vint16mf2_t vfncvt_rtz_x_f_w_i16mf2_tamu (vbool32_t mask, vint16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV32VInt16VBVIVF_TAMU, fncvt_rtz_x_f_w, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 3, OneDBool, OneDInt16, OneDFloat32) +// vuint16mf2_t vfncvt_xu_f_w_u16mf2_tamu (vbool32_t mask, vuint16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VUInt16VBVUVF_TAMU, fncvt_xu_f_w, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 3, OneDBool, OneDUInt16, OneDFloat32) +// vuint16mf2_t vfncvt_rtz_xu_f_w_u16mf2_tamu (vbool32_t mask, vuint16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV32VUInt16VBVUVF_TAMU, fncvt_rtz_xu_f_w, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 3, OneDBool, OneDUInt16, OneDFloat32) +// vfloat16mf2_t vfncvt_f_x_w_f16mf2_tamu (vbool32_t mask, vfloat16mf2_t merge, vint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VFloat16VBVFVI_TAMU, fncvt_f_x_w, 32, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDInt32) +// vfloat16mf2_t vfncvt_f_xu_w_f16mf2_tamu (vbool32_t mask, vfloat16mf2_t merge, vuint32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VFloat16VBVFVU_TAMU, fncvt_f_xu_w, 32, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt32) +// vfloat16mf2_t vfncvt_f_f_w_f16mf2_tamu (vbool32_t mask, vfloat16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV32VFloat16VBVFVF_TAMU, fncvt_f_f_w, 32, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat32) +// vfloat16mf2_t vfncvt_rod_f_f_w_f16mf2_tamu (vbool32_t mask, vfloat16mf2_t merge, vfloat32m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rodV32VFloat16VBVFVF_TAMU, fncvt_rod_f_f_w, 32, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat32) +// vint32mf2_t vfncvt_x_f_w_i32mf2_tamu (vbool64_t mask, vint32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VInt32VBVIVF_TAMU, fncvt_x_f_w, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat64) +// vint32mf2_t vfncvt_rtz_x_f_w_i32mf2_tamu (vbool64_t mask, vint32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV64VInt32VBVIVF_TAMU, fncvt_rtz_x_f_w, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDFloat64) +// vuint32mf2_t vfncvt_xu_f_w_u32mf2_tamu (vbool64_t mask, vuint32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VUInt32VBVUVF_TAMU, fncvt_xu_f_w, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat64) +// vuint32mf2_t vfncvt_rtz_xu_f_w_u32mf2_tamu (vbool64_t mask, vuint32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rtzV64VUInt32VBVUVF_TAMU, fncvt_rtz_xu_f_w, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDFloat64) +// vfloat32mf2_t vfncvt_f_x_w_f32mf2_tamu (vbool64_t mask, vfloat32mf2_t merge, vint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VFloat32VBVFVI_TAMU, fncvt_f_x_w, 64, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDInt64) +// vfloat32mf2_t vfncvt_f_xu_w_f32mf2_tamu (vbool64_t mask, vfloat32mf2_t merge, vuint64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VFloat32VBVFVU_TAMU, fncvt_f_xu_w, 64, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt64) +// vfloat32mf2_t vfncvt_f_f_w_f32mf2_tamu (vbool64_t mask, vfloat32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(FncvtV64VFloat32VBVFVF_TAMU, fncvt_f_f_w, 64, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat64) +// vfloat32mf2_t vfncvt_rod_f_f_w_f32mf2_tamu (vbool64_t mask, vfloat32mf2_t merge, vfloat64m1_t src, size_t vl); +CUSTOM_OP_TYPE(Fncvt_rodV64VFloat32VBVFVF_TAMU, fncvt_rod_f_f_w, 64, FLOAT, HaveVLParameter | MaskedOperation | NarrowingOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat64) + +// vbool8_t vmsbf_m_b8_ma (vbool8_t mask, vbool8_t op1, size_t vl); +CUSTOM_OP_TYPE(MsbfM0VBool8VBVB_MA, msbf_m, 8, BOOL, HaveVLParameter | MaskedOperation | LogicalMaskOperation | NoMaskedOff | MaskAgnostic, OneDBool, 2, OneDBool, OneDBool) +// vbool8_t vmsbf_m_b8_mu (vbool8_t mask, vbool8_t merge, vbool8_t op1, size_t vl); +CUSTOM_OP_TYPE(MsbfM0VBool8VBVBVB_MU, msbf_m, 8, BOOL, HaveVLParameter | MaskedOperation | LogicalMaskOperation | MaskUndisturbed, OneDBool, 3, OneDBool, OneDBool, OneDBool) +// vbool8_t vmsif_m_b8_ma (vbool8_t mask, vbool8_t op1, size_t vl); +CUSTOM_OP_TYPE(MsifM0VBool8VBVB_MA, msif_m, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | LogicalMaskOperation | MaskAgnostic, OneDBool, 2, OneDBool, OneDBool) +// vbool8_t vmsif_m_b8_mu (vbool8_t mask, vbool8_t merge, vbool8_t op1, size_t vl); +CUSTOM_OP_TYPE(MsifM0VBool8VBVBVB_MU, msif_m, 8, BOOL, HaveVLParameter | MaskedOperation | LogicalMaskOperation | MaskUndisturbed, OneDBool, 3, OneDBool, OneDBool, OneDBool) +// vbool8_t vmsof_m_b8_ma (vbool8_t mask, vbool8_t op1, size_t vl); +CUSTOM_OP_TYPE(MsofM0VBool8VBVB_MA, msof_m, 8, BOOL, HaveVLParameter | MaskedOperation | NoMaskedOff | LogicalMaskOperation | MaskAgnostic, OneDBool, 2, OneDBool, OneDBool) +// vbool8_t vmsof_m_b8_mu (vbool8_t mask, vbool8_t merge, vbool8_t op1, size_t vl); +CUSTOM_OP_TYPE(MsofM0VBool8VBVBVB_MU, msof_m, 8, BOOL, HaveVLParameter | MaskedOperation | LogicalMaskOperation | MaskUndisturbed, OneDBool, 3, OneDBool, OneDBool, OneDBool) + +// vuint8m1_t viota_m_u8m1_tu (vuint8m1_t merge, vbool8_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM8VUInt8VUVB_TU, iota_m, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 2, OneDUInt8, OneDBool) +// vuint16m1_t viota_m_u16m1_tu (vuint16m1_t merge, vbool16_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM16VUInt16VUVB_TU, iota_m, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 2, OneDUInt16, OneDBool) +// vuint32m1_t viota_m_u32m1_tu (vuint32m1_t merge, vbool32_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM32VUInt32VUVB_TU, iota_m, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 2, OneDUInt32, OneDBool) +// vuint64m1_t viota_m_u64m1_tu (vuint64m1_t merge, vbool64_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM64VUInt64VUVB_TU, iota_m, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 2, OneDUInt64, OneDBool) +// vuint8m1_t viota_m_u8m1_ta (vbool8_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM8VUInt8VB_TA, iota_m, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 1, OneDBool) +// vuint16m1_t viota_m_u16m1_ta (vbool16_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM16VUInt16VB_TA, iota_m, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 1, OneDBool) +// vuint32m1_t viota_m_u32m1_ta (vbool32_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM32VUInt32VB_TA, iota_m, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 1, OneDBool) +// vuint64m1_t viota_m_u64m1_ta (vbool64_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM64VUInt64VB_TA, iota_m, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 1, OneDBool) +// vuint8m1_t viota_m_u8m1_tuma (vbool8_t mask, vuint8m1_t merge, vbool8_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM8VUInt8VBVUVB_TUMA, iota_m, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDBool) +// vuint16m1_t viota_m_u16m1_tuma (vbool16_t mask, vuint16m1_t merge, vbool16_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM16VUInt16VBVUVB_TUMA, iota_m, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDBool) +// vuint32m1_t viota_m_u32m1_tuma (vbool32_t mask, vuint32m1_t merge, vbool32_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM32VUInt32VBVUVB_TUMA, iota_m, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDBool) +// vuint64m1_t viota_m_u64m1_tuma (vbool64_t mask, vuint64m1_t merge, vbool64_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM64VUInt64VBVUVB_TUMA, iota_m, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDBool) +// vuint8m1_t viota_m_u8m1_tumu (vbool8_t mask, vuint8m1_t merge, vbool8_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM8VUInt8VBVUVB_TUMU, iota_m, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 3, OneDBool, OneDUInt8, OneDBool) +// vuint16m1_t viota_m_u16m1_tumu (vbool16_t mask, vuint16m1_t merge, vbool16_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM16VUInt16VBVUVB_TUMU, iota_m, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 3, OneDBool, OneDUInt16, OneDBool) +// vuint32m1_t viota_m_u32m1_tumu (vbool32_t mask, vuint32m1_t merge, vbool32_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM32VUInt32VBVUVB_TUMU, iota_m, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDBool) +// vuint64m1_t viota_m_u64m1_tumu (vbool64_t mask, vuint64m1_t merge, vbool64_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM64VUInt64VBVUVB_TUMU, iota_m, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDBool) +// vuint8m1_t viota_m_u8m1_tama (vbool8_t mask, vbool8_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM8VUInt8VBVB_TAMA, iota_m, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 2, OneDBool, OneDBool) +// vuint16m1_t viota_m_u16m1_tama (vbool16_t mask, vbool16_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM16VUInt16VBVB_TAMA, iota_m, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 2, OneDBool, OneDBool) +// vuint32m1_t viota_m_u32m1_tama (vbool32_t mask, vbool32_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM32VUInt32VBVB_TAMA, iota_m, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 2, OneDBool, OneDBool) +// vuint64m1_t viota_m_u64m1_tama (vbool64_t mask, vbool64_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM64VUInt64VBVB_TAMA, iota_m, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 2, OneDBool, OneDBool) +// vuint8m1_t viota_m_u8m1_tamu (vbool8_t mask, vuint8m1_t merge, vbool8_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM8VUInt8VBVUVB_TAMU, iota_m, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 3, OneDBool, OneDUInt8, OneDBool) +// vuint16m1_t viota_m_u16m1_tamu (vbool16_t mask, vuint16m1_t merge, vbool16_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM16VUInt16VBVUVB_TAMU, iota_m, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 3, OneDBool, OneDUInt16, OneDBool) +// vuint32m1_t viota_m_u32m1_tamu (vbool32_t mask, vuint32m1_t merge, vbool32_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM32VUInt32VBVUVB_TAMU, iota_m, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDBool) +// vuint64m1_t viota_m_u64m1_tamu (vbool64_t mask, vuint64m1_t merge, vbool64_t op1, size_t vl); +CUSTOM_OP_TYPE(IotaM64VUInt64VBVUVB_TAMU, iota_m, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDBool) + +// vuint8m1_t vid_v_u8m1_tu (vuint8m1_t merge, size_t vl); +CUSTOM_OP_TYPE(IdM8VUInt8VU_TU, id_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt8, 1, OneDUInt8) +// vuint16m1_t vid_v_u16m1_tu (vuint16m1_t merge, size_t vl); +CUSTOM_OP_TYPE(IdM16VUInt16VU_TU, id_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt16, 1, OneDUInt16) +// vuint32m1_t vid_v_u32m1_tu (vuint32m1_t merge, size_t vl); +CUSTOM_OP_TYPE(IdM32VUInt32VU_TU, id_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt32, 1, OneDUInt32) +// vuint64m1_t vid_v_u64m1_tu (vuint64m1_t merge, size_t vl); +CUSTOM_OP_TYPE(IdM64VUInt64VU_TU, id_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailUndisturbed, OneDUInt64, 1, OneDUInt64) +// vuint8m1_t vid_v_u8m1_ta (size_t vl); +CUSTOM_OP_TYPE(IdM8VUInt8_TA, id_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt8, 0, ) +// vuint16m1_t vid_v_u16m1_ta (size_t vl); +CUSTOM_OP_TYPE(IdM16VUInt16_TA, id_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt16, 0, ) +// vuint32m1_t vid_v_u32m1_ta (size_t vl); +CUSTOM_OP_TYPE(IdM32VUInt32_TA, id_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt32, 0, ) +// vuint64m1_t vid_v_u64m1_ta (size_t vl); +CUSTOM_OP_TYPE(IdM64VUInt64_TA, id_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | TailAgnostic, OneDUInt64, 0, ) +// vuint8m1_t vid_v_u8m1_tuma (vbool8_t mask, vuint8m1_t merge, size_t vl); +CUSTOM_OP_TYPE(IdM8VUInt8VBVU_TUMA, id_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 2, OneDBool, OneDUInt8) +// vuint16m1_t vid_v_u16m1_tuma (vbool16_t mask, vuint16m1_t merge, size_t vl); +CUSTOM_OP_TYPE(IdM16VUInt16VBVU_TUMA, id_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 2, OneDBool, OneDUInt16) +// vuint32m1_t vid_v_u32m1_tuma (vbool32_t mask, vuint32m1_t merge, size_t vl); +CUSTOM_OP_TYPE(IdM32VUInt32VBVU_TUMA, id_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 2, OneDBool, OneDUInt32) +// vuint64m1_t vid_v_u64m1_tuma (vbool64_t mask, vuint64m1_t merge, size_t vl); +CUSTOM_OP_TYPE(IdM64VUInt64VBVU_TUMA, id_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 2, OneDBool, OneDUInt64) +// vuint8m1_t vid_v_u8m1_tumu (vbool8_t mask, vuint8m1_t merge, size_t vl); +CUSTOM_OP_TYPE(IdM8VUInt8VBVU_TUMU, id_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 2, OneDBool, OneDUInt8) +// vuint16m1_t vid_v_u16m1_tumu (vbool16_t mask, vuint16m1_t merge, size_t vl); +CUSTOM_OP_TYPE(IdM16VUInt16VBVU_TUMU, id_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 2, OneDBool, OneDUInt16) +// vuint32m1_t vid_v_u32m1_tumu (vbool32_t mask, vuint32m1_t merge, size_t vl); +CUSTOM_OP_TYPE(IdM32VUInt32VBVU_TUMU, id_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 2, OneDBool, OneDUInt32) +// vuint64m1_t vid_v_u64m1_tumu (vbool64_t mask, vuint64m1_t merge, size_t vl); +CUSTOM_OP_TYPE(IdM64VUInt64VBVU_TUMU, id_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 2, OneDBool, OneDUInt64) +// vuint8m1_t vid_v_u8m1_tama (vbool8_t mask, size_t vl); +CUSTOM_OP_TYPE(IdM8VUInt8VB_TAMA, id_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt8, 1, OneDBool) +// vuint16m1_t vid_v_u16m1_tama (vbool16_t mask, size_t vl); +CUSTOM_OP_TYPE(IdM16VUInt16VB_TAMA, id_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt16, 1, OneDBool) +// vuint32m1_t vid_v_u32m1_tama (vbool32_t mask, size_t vl); +CUSTOM_OP_TYPE(IdM32VUInt32VB_TAMA, id_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt32, 1, OneDBool) +// vuint64m1_t vid_v_u64m1_tama (vbool64_t mask, size_t vl); +CUSTOM_OP_TYPE(IdM64VUInt64VB_TAMA, id_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | TailAgnostic | MaskAgnostic, OneDUInt64, 1, OneDBool) +// vuint8m1_t vid_v_u8m1_tamu (vbool8_t mask, vuint8m1_t merge, size_t vl); +CUSTOM_OP_TYPE(IdM8VUInt8VBVU_TAMU, id_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 2, OneDBool, OneDUInt8) +// vuint16m1_t vid_v_u16m1_tamu (vbool16_t mask, vuint16m1_t merge, size_t vl); +CUSTOM_OP_TYPE(IdM16VUInt16VBVU_TAMU, id_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 2, OneDBool, OneDUInt16) +// vuint32m1_t vid_v_u32m1_tamu (vbool32_t mask, vuint32m1_t merge, size_t vl); +CUSTOM_OP_TYPE(IdM32VUInt32VBVU_TAMU, id_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 2, OneDBool, OneDUInt32) +// vuint64m1_t vid_v_u64m1_tamu (vbool64_t mask, vuint64m1_t merge, size_t vl); +CUSTOM_OP_TYPE(IdM64VUInt64VBVU_TAMU, id_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 2, OneDBool, OneDUInt64) + +// vint8m1_t vredsum_vs_int8m1_int8m1_tu (vint8m1_t merge, vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS8SInt8VIVI_TU, redsum_vs, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt8, 2, OneDInt8, OneDInt8) +// vint16m1_t vredsum_vs_int16m1_int16m1_tu (vint16m1_t merge, vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS16SInt16VIVI_TU, redsum_vs, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt16, 2, OneDInt16, OneDInt16) +// vint32m1_t vredsum_vs_int32m1_int32m1_tu (vint32m1_t merge, vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS32SInt32VIVI_TU, redsum_vs, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt32, 2, OneDInt32, OneDInt32) +// vint64m1_t vredsum_vs_int64m1_int64m1_tu (vint64m1_t merge, vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS64SInt64VIVI_TU, redsum_vs, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt64, 2, OneDInt64, OneDInt64) +// vuint8m1_t vredsum_vs_uint8m1_uint8m1_tu (vuint8m1_t merge, vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS8SUInt8VUVU_TU, redsum_vs, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint16m1_t vredsum_vs_uint16m1_uint16m1_tu (vuint16m1_t merge, vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS16SUInt16VUVU_TU, redsum_vs, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint32m1_t vredsum_vs_uint32m1_uint32m1_tu (vuint32m1_t merge, vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS32SUInt32VUVU_TU, redsum_vs, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint64m1_t vredsum_vs_uint64m1_uint64m1_tu (vuint64m1_t merge, vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS64SUInt64VUVU_TU, redsum_vs, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vint8m1_t vredmax_vs_int8m1_int8m1_tu (vint8m1_t merge, vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxVS8SInt8VIVI_TU, redmax_vs, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt8, 2, OneDInt8, OneDInt8) +// vint16m1_t vredmax_vs_int16m1_int16m1_tu (vint16m1_t merge, vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxVS16SInt16VIVI_TU, redmax_vs, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt16, 2, OneDInt16, OneDInt16) +// vint32m1_t vredmax_vs_int32m1_int32m1_tu (vint32m1_t merge, vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxVS32SInt32VIVI_TU, redmax_vs, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt32, 2, OneDInt32, OneDInt32) +// vint64m1_t vredmax_vs_int64m1_int64m1_tu (vint64m1_t merge, vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxVS64SInt64VIVI_TU, redmax_vs, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt64, 2, OneDInt64, OneDInt64) +// vuint8m1_t vredmaxu_vs_uint8m1_uint8m1_tu (vuint8m1_t merge, vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxuVS8SUInt8VUVU_TU, redmaxu_vs, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint16m1_t vredmaxu_vs_uint16m1_uint16m1_tu (vuint16m1_t merge, vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxuVS16SUInt16VUVU_TU, redmaxu_vs, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint32m1_t vredmaxu_vs_uint32m1_uint32m1_tu (vuint32m1_t merge, vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxuVS32SUInt32VUVU_TU, redmaxu_vs, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint64m1_t vredmaxu_vs_uint64m1_uint64m1_tu (vuint64m1_t merge, vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxuVS64SUInt64VUVU_TU, redmaxu_vs, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vint8m1_t vredmin_vs_int8m1_int8m1_tu (vint8m1_t merge, vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminVS8SInt8VIVI_TU, redmin_vs, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt8, 2, OneDInt8, OneDInt8) +// vint16m1_t vredmin_vs_int16m1_int16m1_tu (vint16m1_t merge, vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminVS16SInt16VIVI_TU, redmin_vs, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt16, 2, OneDInt16, OneDInt16) +// vint32m1_t vredmin_vs_int32m1_int32m1_tu (vint32m1_t merge, vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminVS32SInt32VIVI_TU, redmin_vs, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt32, 2, OneDInt32, OneDInt32) +// vint64m1_t vredmin_vs_int64m1_int64m1_tu (vint64m1_t merge, vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminVS64SInt64VIVI_TU, redmin_vs, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt64, 2, OneDInt64, OneDInt64) +// vuint8m1_t vredminu_vs_uint8m1_uint8m1_tu (vuint8m1_t merge, vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminuVS8SUInt8VUVU_TU, redminu_vs, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint16m1_t vredminu_vs_uint16m1_uint16m1_tu (vuint16m1_t merge, vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminuVS16SUInt16VUVU_TU, redminu_vs, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint32m1_t vredminu_vs_uint32m1_uint32m1_tu (vuint32m1_t merge, vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminuVS32SUInt32VUVU_TU, redminu_vs, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint64m1_t vredminu_vs_uint64m1_uint64m1_tu (vuint64m1_t merge, vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminuVS64SUInt64VUVU_TU, redminu_vs, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vint8m1_t vredand_vs_int8m1_int8m1_tu (vint8m1_t merge, vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS8SInt8VIVI_TU, redand_vs, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt8, 2, OneDInt8, OneDInt8) +// vint16m1_t vredand_vs_int16m1_int16m1_tu (vint16m1_t merge, vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS16SInt16VIVI_TU, redand_vs, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt16, 2, OneDInt16, OneDInt16) +// vint32m1_t vredand_vs_int32m1_int32m1_tu (vint32m1_t merge, vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS32SInt32VIVI_TU, redand_vs, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt32, 2, OneDInt32, OneDInt32) +// vint64m1_t vredand_vs_int64m1_int64m1_tu (vint64m1_t merge, vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS64SInt64VIVI_TU, redand_vs, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt64, 2, OneDInt64, OneDInt64) +// vuint8m1_t vredand_vs_uint8m1_uint8m1_tu (vuint8m1_t merge, vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS8SUInt8VUVU_TU, redand_vs, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint16m1_t vredand_vs_uint16m1_uint16m1_tu (vuint16m1_t merge, vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS16SUInt16VUVU_TU, redand_vs, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint32m1_t vredand_vs_uint32m1_uint32m1_tu (vuint32m1_t merge, vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS32SUInt32VUVU_TU, redand_vs, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint64m1_t vredand_vs_uint64m1_uint64m1_tu (vuint64m1_t merge, vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS64SUInt64VUVU_TU, redand_vs, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vint8m1_t vredor_vs_int8m1_int8m1_tu (vint8m1_t merge, vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS8SInt8VIVI_TU, redor_vs, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt8, 2, OneDInt8, OneDInt8) +// vint16m1_t vredor_vs_int16m1_int16m1_tu (vint16m1_t merge, vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS16SInt16VIVI_TU, redor_vs, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt16, 2, OneDInt16, OneDInt16) +// vint32m1_t vredor_vs_int32m1_int32m1_tu (vint32m1_t merge, vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS32SInt32VIVI_TU, redor_vs, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt32, 2, OneDInt32, OneDInt32) +// vint64m1_t vredor_vs_int64m1_int64m1_tu (vint64m1_t merge, vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS64SInt64VIVI_TU, redor_vs, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt64, 2, OneDInt64, OneDInt64) +// vuint8m1_t vredor_vs_uint8m1_uint8m1_tu (vuint8m1_t merge, vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS8SUInt8VUVU_TU, redor_vs, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint16m1_t vredor_vs_uint16m1_uint16m1_tu (vuint16m1_t merge, vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS16SUInt16VUVU_TU, redor_vs, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint32m1_t vredor_vs_uint32m1_uint32m1_tu (vuint32m1_t merge, vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS32SUInt32VUVU_TU, redor_vs, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint64m1_t vredor_vs_uint64m1_uint64m1_tu (vuint64m1_t merge, vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS64SUInt64VUVU_TU, redor_vs, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vint8m1_t vredxor_vs_int8m1_int8m1_tu (vint8m1_t merge, vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS8SInt8VIVI_TU, redxor_vs, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt8, 2, OneDInt8, OneDInt8) +// vint16m1_t vredxor_vs_int16m1_int16m1_tu (vint16m1_t merge, vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS16SInt16VIVI_TU, redxor_vs, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt16, 2, OneDInt16, OneDInt16) +// vint32m1_t vredxor_vs_int32m1_int32m1_tu (vint32m1_t merge, vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS32SInt32VIVI_TU, redxor_vs, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt32, 2, OneDInt32, OneDInt32) +// vint64m1_t vredxor_vs_int64m1_int64m1_tu (vint64m1_t merge, vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS64SInt64VIVI_TU, redxor_vs, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt64, 2, OneDInt64, OneDInt64) +// vuint8m1_t vredxor_vs_uint8m1_uint8m1_tu (vuint8m1_t merge, vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS8SUInt8VUVU_TU, redxor_vs, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint16m1_t vredxor_vs_uint16m1_uint16m1_tu (vuint16m1_t merge, vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS16SUInt16VUVU_TU, redxor_vs, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint32m1_t vredxor_vs_uint32m1_uint32m1_tu (vuint32m1_t merge, vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS32SUInt32VUVU_TU, redxor_vs, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint64m1_t vredxor_vs_uint64m1_uint64m1_tu (vuint64m1_t merge, vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS64SUInt64VUVU_TU, redxor_vs, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vint8m1_t vredsum_vs_int8m1_int8m1_ta (vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS8SInt8VI_TA, redsum_vs, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt8, 1, OneDInt8) +// vint16m1_t vredsum_vs_int16m1_int16m1_ta (vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS16SInt16VI_TA, redsum_vs, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt16, 1, OneDInt16) +// vint32m1_t vredsum_vs_int32m1_int32m1_ta (vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS32SInt32VI_TA, redsum_vs, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt32, 1, OneDInt32) +// vint64m1_t vredsum_vs_int64m1_int64m1_ta (vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS64SInt64VI_TA, redsum_vs, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt64, 1, OneDInt64) +// vuint8m1_t vredsum_vs_uint8m1_uint8m1_ta (vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS8SUInt8VU_TA, redsum_vs, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt8, 1, OneDUInt8) +// vuint16m1_t vredsum_vs_uint16m1_uint16m1_ta (vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS16SUInt16VU_TA, redsum_vs, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt16, 1, OneDUInt16) +// vuint32m1_t vredsum_vs_uint32m1_uint32m1_ta (vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS32SUInt32VU_TA, redsum_vs, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt32, 1, OneDUInt32) +// vuint64m1_t vredsum_vs_uint64m1_uint64m1_ta (vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS64SUInt64VU_TA, redsum_vs, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt64, 1, OneDUInt64) +// vint8m1_t vredmax_vs_int8m1_int8m1_ta (vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxVS8SInt8VI_TA, redmax_vs, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt8, 1, OneDInt8) +// vint16m1_t vredmax_vs_int16m1_int16m1_ta (vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxVS16SInt16VI_TA, redmax_vs, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt16, 1, OneDInt16) +// vint32m1_t vredmax_vs_int32m1_int32m1_ta (vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxVS32SInt32VI_TA, redmax_vs, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt32, 1, OneDInt32) +// vint64m1_t vredmax_vs_int64m1_int64m1_ta (vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxVS64SInt64VI_TA, redmax_vs, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt64, 1, OneDInt64) +// vuint8m1_t vredmaxu_vs_uint8m1_uint8m1_ta (vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxuVS8SUInt8VU_TA, redmaxu_vs, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt8, 1, OneDUInt8) +// vuint16m1_t vredmaxu_vs_uint16m1_uint16m1_ta (vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxuVS16SUInt16VU_TA, redmaxu_vs, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt16, 1, OneDUInt16) +// vuint32m1_t vredmaxu_vs_uint32m1_uint32m1_ta (vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxuVS32SUInt32VU_TA, redmaxu_vs, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt32, 1, OneDUInt32) +// vuint64m1_t vredmaxu_vs_uint64m1_uint64m1_ta (vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxuVS64SUInt64VU_TA, redmaxu_vs, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt64, 1, OneDUInt64) +// vint8m1_t vredmin_vs_int8m1_int8m1_ta (vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminVS8SInt8VI_TA, redmin_vs, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt8, 1, OneDInt8) +// vint16m1_t vredmin_vs_int16m1_int16m1_ta (vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminVS16SInt16VI_TA, redmin_vs, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt16, 1, OneDInt16) +// vint32m1_t vredmin_vs_int32m1_int32m1_ta (vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminVS32SInt32VI_TA, redmin_vs, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt32, 1, OneDInt32) +// vint64m1_t vredmin_vs_int64m1_int64m1_ta (vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminVS64SInt64VI_TA, redmin_vs, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt64, 1, OneDInt64) +// vuint8m1_t vredminu_vs_uint8m1_uint8m1_ta (vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminuVS8SUInt8VU_TA, redminu_vs, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt8, 1, OneDUInt8) +// vuint16m1_t vredminu_vs_uint16m1_uint16m1_ta (vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminuVS16SUInt16VU_TA, redminu_vs, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt16, 1, OneDUInt16) +// vuint32m1_t vredminu_vs_uint32m1_uint32m1_ta (vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminuVS32SUInt32VU_TA, redminu_vs, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt32, 1, OneDUInt32) +// vuint64m1_t vredminu_vs_uint64m1_uint64m1_ta (vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminuVS64SUInt64VU_TA, redminu_vs, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt64, 1, OneDUInt64) +// vint8m1_t vredand_vs_int8m1_int8m1_ta (vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS8SInt8VI_TA, redand_vs, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt8, 1, OneDInt8) +// vint16m1_t vredand_vs_int16m1_int16m1_ta (vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS16SInt16VI_TA, redand_vs, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt16, 1, OneDInt16) +// vint32m1_t vredand_vs_int32m1_int32m1_ta (vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS32SInt32VI_TA, redand_vs, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt32, 1, OneDInt32) +// vint64m1_t vredand_vs_int64m1_int64m1_ta (vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS64SInt64VI_TA, redand_vs, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt64, 1, OneDInt64) +// vuint8m1_t vredand_vs_uint8m1_uint8m1_ta (vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS8SUInt8VU_TA, redand_vs, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt8, 1, OneDUInt8) +// vuint16m1_t vredand_vs_uint16m1_uint16m1_ta (vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS16SUInt16VU_TA, redand_vs, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt16, 1, OneDUInt16) +// vuint32m1_t vredand_vs_uint32m1_uint32m1_ta (vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS32SUInt32VU_TA, redand_vs, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt32, 1, OneDUInt32) +// vuint64m1_t vredand_vs_uint64m1_uint64m1_ta (vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS64SUInt64VU_TA, redand_vs, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt64, 1, OneDUInt64) +// vint8m1_t vredor_vs_int8m1_int8m1_ta (vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS8SInt8VI_TA, redor_vs, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt8, 1, OneDInt8) +// vint16m1_t vredor_vs_int16m1_int16m1_ta (vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS16SInt16VI_TA, redor_vs, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt16, 1, OneDInt16) +// vint32m1_t vredor_vs_int32m1_int32m1_ta (vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS32SInt32VI_TA, redor_vs, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt32, 1, OneDInt32) +// vint64m1_t vredor_vs_int64m1_int64m1_ta (vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS64SInt64VI_TA, redor_vs, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt64, 1, OneDInt64) +// vuint8m1_t vredor_vs_uint8m1_uint8m1_ta (vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS8SUInt8VU_TA, redor_vs, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt8, 1, OneDUInt8) +// vuint16m1_t vredor_vs_uint16m1_uint16m1_ta (vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS16SUInt16VU_TA, redor_vs, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt16, 1, OneDUInt16) +// vuint32m1_t vredor_vs_uint32m1_uint32m1_ta (vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS32SUInt32VU_TA, redor_vs, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt32, 1, OneDUInt32) +// vuint64m1_t vredor_vs_uint64m1_uint64m1_ta (vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS64SUInt64VU_TA, redor_vs, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt64, 1, OneDUInt64) +// vint8m1_t vredxor_vs_int8m1_int8m1_ta (vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS8SInt8VI_TA, redxor_vs, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt8, 1, OneDInt8) +// vint16m1_t vredxor_vs_int16m1_int16m1_ta (vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS16SInt16VI_TA, redxor_vs, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt16, 1, OneDInt16) +// vint32m1_t vredxor_vs_int32m1_int32m1_ta (vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS32SInt32VI_TA, redxor_vs, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt32, 1, OneDInt32) +// vint64m1_t vredxor_vs_int64m1_int64m1_ta (vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS64SInt64VI_TA, redxor_vs, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt64, 1, OneDInt64) +// vuint8m1_t vredxor_vs_uint8m1_uint8m1_ta (vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS8SUInt8VU_TA, redxor_vs, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt8, 1, OneDUInt8) +// vuint16m1_t vredxor_vs_uint16m1_uint16m1_ta (vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS16SUInt16VU_TA, redxor_vs, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt16, 1, OneDUInt16) +// vuint32m1_t vredxor_vs_uint32m1_uint32m1_ta (vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS32SUInt32VU_TA, redxor_vs, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt32, 1, OneDUInt32) +// vuint64m1_t vredxor_vs_uint64m1_uint64m1_ta (vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS64SUInt64VU_TA, redxor_vs, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt64, 1, OneDUInt64) + +// vint8m1_t vredsum_vs_int8m1_int8m1_tum (vbool8_t mask, vint8m1_t merge, vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS8SInt8VBVIVI_TUM, redsum_vs, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint16m1_t vredsum_vs_int16m1_int16m1_tum (vbool16_t mask, vint16m1_t merge, vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS16SInt16VBVIVI_TUM, redsum_vs, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint32m1_t vredsum_vs_int32m1_int32m1_tum (vbool32_t mask, vint32m1_t merge, vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS32SInt32VBVIVI_TUM, redsum_vs, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint64m1_t vredsum_vs_int64m1_int64m1_tum (vbool64_t mask, vint64m1_t merge, vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS64SInt64VBVIVI_TUM, redsum_vs, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vuint8m1_t vredsum_vs_uint8m1_uint8m1_tum (vbool8_t mask, vuint8m1_t merge, vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS8SUInt8VBVUVU_TUM, redsum_vs, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint16m1_t vredsum_vs_uint16m1_uint16m1_tum (vbool16_t mask, vuint16m1_t merge, vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS16SUInt16VBVUVU_TUM, redsum_vs, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint32m1_t vredsum_vs_uint32m1_uint32m1_tum (vbool32_t mask, vuint32m1_t merge, vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS32SUInt32VBVUVU_TUM, redsum_vs, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint64m1_t vredsum_vs_uint64m1_uint64m1_tum (vbool64_t mask, vuint64m1_t merge, vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS64SUInt64VBVUVU_TUM, redsum_vs, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vint8m1_t vredmax_vs_int8m1_int8m1_tum (vbool8_t mask, vint8m1_t merge, vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxVS8SInt8VBVIVI_TUM, redmax_vs, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint16m1_t vredmax_vs_int16m1_int16m1_tum (vbool16_t mask, vint16m1_t merge, vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxVS16SInt16VBVIVI_TUM, redmax_vs, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint32m1_t vredmax_vs_int32m1_int32m1_tum (vbool32_t mask, vint32m1_t merge, vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxVS32SInt32VBVIVI_TUM, redmax_vs, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint64m1_t vredmax_vs_int64m1_int64m1_tum (vbool64_t mask, vint64m1_t merge, vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxVS64SInt64VBVIVI_TUM, redmax_vs, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vuint8m1_t vredmaxu_vs_uint8m1_uint8m1_tum (vbool8_t mask, vuint8m1_t merge, vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxuVS8SUInt8VBVUVU_TUM, redmaxu_vs, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint16m1_t vredmaxu_vs_uint16m1_uint16m1_tum (vbool16_t mask, vuint16m1_t merge, vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxuVS16SUInt16VBVUVU_TUM, redmaxu_vs, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint32m1_t vredmaxu_vs_uint32m1_uint32m1_tum (vbool32_t mask, vuint32m1_t merge, vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxuVS32SUInt32VBVUVU_TUM, redmaxu_vs, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint64m1_t vredmaxu_vs_uint64m1_uint64m1_tum (vbool64_t mask, vuint64m1_t merge, vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxuVS64SUInt64VBVUVU_TUM, redmaxu_vs, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vint8m1_t vredmin_vs_int8m1_int8m1_tum (vbool8_t mask, vint8m1_t merge, vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminVS8SInt8VBVIVI_TUM, redmin_vs, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint16m1_t vredmin_vs_int16m1_int16m1_tum (vbool16_t mask, vint16m1_t merge, vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminVS16SInt16VBVIVI_TUM, redmin_vs, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint32m1_t vredmin_vs_int32m1_int32m1_tum (vbool32_t mask, vint32m1_t merge, vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminVS32SInt32VBVIVI_TUM, redmin_vs, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint64m1_t vredmin_vs_int64m1_int64m1_tum (vbool64_t mask, vint64m1_t merge, vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminVS64SInt64VBVIVI_TUM, redmin_vs, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vuint8m1_t vredminu_vs_uint8m1_uint8m1_tum (vbool8_t mask, vuint8m1_t merge, vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminuVS8SUInt8VBVUVU_TUM, redminu_vs, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint16m1_t vredminu_vs_uint16m1_uint16m1_tum (vbool16_t mask, vuint16m1_t merge, vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminuVS16SUInt16VBVUVU_TUM, redminu_vs, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint32m1_t vredminu_vs_uint32m1_uint32m1_tum (vbool32_t mask, vuint32m1_t merge, vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminuVS32SUInt32VBVUVU_TUM, redminu_vs, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint64m1_t vredminu_vs_uint64m1_uint64m1_tum (vbool64_t mask, vuint64m1_t merge, vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminuVS64SUInt64VBVUVU_TUM, redminu_vs, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vint8m1_t vredand_vs_int8m1_int8m1_tum (vbool8_t mask, vint8m1_t merge, vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS8SInt8VBVIVI_TUM, redand_vs, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint16m1_t vredand_vs_int16m1_int16m1_tum (vbool16_t mask, vint16m1_t merge, vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS16SInt16VBVIVI_TUM, redand_vs, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint32m1_t vredand_vs_int32m1_int32m1_tum (vbool32_t mask, vint32m1_t merge, vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS32SInt32VBVIVI_TUM, redand_vs, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint64m1_t vredand_vs_int64m1_int64m1_tum (vbool64_t mask, vint64m1_t merge, vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS64SInt64VBVIVI_TUM, redand_vs, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vuint8m1_t vredand_vs_uint8m1_uint8m1_tum (vbool8_t mask, vuint8m1_t merge, vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS8SUInt8VBVUVU_TUM, redand_vs, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint16m1_t vredand_vs_uint16m1_uint16m1_tum (vbool16_t mask, vuint16m1_t merge, vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS16SUInt16VBVUVU_TUM, redand_vs, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint32m1_t vredand_vs_uint32m1_uint32m1_tum (vbool32_t mask, vuint32m1_t merge, vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS32SUInt32VBVUVU_TUM, redand_vs, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint64m1_t vredand_vs_uint64m1_uint64m1_tum (vbool64_t mask, vuint64m1_t merge, vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS64SUInt64VBVUVU_TUM, redand_vs, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vint8m1_t vredor_vs_int8m1_int8m1_tum (vbool8_t mask, vint8m1_t merge, vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS8SInt8VBVIVI_TUM, redor_vs, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint16m1_t vredor_vs_int16m1_int16m1_tum (vbool16_t mask, vint16m1_t merge, vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS16SInt16VBVIVI_TUM, redor_vs, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed |ReductionOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint32m1_t vredor_vs_int32m1_int32m1_tum (vbool32_t mask, vint32m1_t merge, vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS32SInt32VBVIVI_TUM, redor_vs, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed |ReductionOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint64m1_t vredor_vs_int64m1_int64m1_tum (vbool64_t mask, vint64m1_t merge, vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS64SInt64VBVIVI_TUM, redor_vs, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed |ReductionOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vuint8m1_t vredor_vs_uint8m1_uint8m1_tum (vbool8_t mask, vuint8m1_t merge, vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS8SUInt8VBVUVU_TUM, redor_vs, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed |ReductionOperation, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint16m1_t vredor_vs_uint16m1_uint16m1_tum (vbool16_t mask, vuint16m1_t merge, vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS16SUInt16VBVUVU_TUM, redor_vs, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint32m1_t vredor_vs_uint32m1_uint32m1_tum (vbool32_t mask, vuint32m1_t merge, vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS32SUInt32VBVUVU_TUM, redor_vs, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint64m1_t vredor_vs_uint64m1_uint64m1_tum (vbool64_t mask, vuint64m1_t merge, vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS64SUInt64VBVUVU_TUM, redor_vs, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vint8m1_t vredxor_vs_int8m1_int8m1_tum (vbool8_t mask, vint8m1_t merge, vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS8SInt8VBVIVI_TUM, redxor_vs, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint16m1_t vredxor_vs_int16m1_int16m1_tum (vbool16_t mask, vint16m1_t merge, vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS16SInt16VBVIVI_TUM, redxor_vs, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint32m1_t vredxor_vs_int32m1_int32m1_tum (vbool32_t mask, vint32m1_t merge, vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS32SInt32VBVIVI_TUM, redxor_vs, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint64m1_t vredxor_vs_int64m1_int64m1_tum (vbool64_t mask, vint64m1_t merge, vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS64SInt64VBVIVI_TUM, redxor_vs, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vuint8m1_t vredxor_vs_uint8m1_uint8m1_tum (vbool8_t mask, vuint8m1_t merge, vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS8SUInt8VBVUVU_TUM, redxor_vs, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint16m1_t vredxor_vs_uint16m1_uint16m1_tum (vbool16_t mask, vuint16m1_t merge, vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS16SUInt16VBVUVU_TUM, redxor_vs, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint32m1_t vredxor_vs_uint32m1_uint32m1_tum (vbool32_t mask, vuint32m1_t merge, vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS32SUInt32VBVUVU_TUM, redxor_vs, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint64m1_t vredxor_vs_uint64m1_uint64m1_tum (vbool64_t mask, vuint64m1_t merge, vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS64SUInt64VBVUVU_TUM, redxor_vs, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vint8m1_t vredsum_vs_int8m1_int8m1_tam (vbool8_t mask, vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS8SInt8VBVI_TAM, redsum_vs, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt8, 2, OneDBool, OneDInt8) +// vint16m1_t vredsum_vs_int16m1_int16m1_tam (vbool16_t mask, vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS16SInt16VBVI_TAM, redsum_vs, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt16, 2, OneDBool, OneDInt16) +// vint32m1_t vredsum_vs_int32m1_int32m1_tam (vbool32_t mask, vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS32SInt32VBVI_TAM, redsum_vs, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt32, 2, OneDBool, OneDInt32) +// vint64m1_t vredsum_vs_int64m1_int64m1_tam (vbool64_t mask, vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS64SInt64VBVI_TAM, redsum_vs, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt64, 2, OneDBool, OneDInt64) +// vuint8m1_t vredsum_vs_uint8m1_uint8m1_tam (vbool8_t mask, vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS8SUInt8VBVU_TAM, redsum_vs, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDUInt8, 2, OneDBool, OneDUInt8) +// vuint16m1_t vredsum_vs_uint16m1_uint16m1_tam (vbool16_t mask, vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS16SUInt16VBVU_TAM, redsum_vs, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDUInt16, 2, OneDBool, OneDUInt16) +// vuint32m1_t vredsum_vs_uint32m1_uint32m1_tam (vbool32_t mask, vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS32SUInt32VBVU_TAM, redsum_vs, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDUInt32, 2, OneDBool, OneDUInt32) +// vuint64m1_t vredsum_vs_uint64m1_uint64m1_tam (vbool64_t mask, vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedsumVS64SUInt64VBVU_TAM, redsum_vs, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDUInt64, 2, OneDBool, OneDUInt64) +// vint8m1_t vredmax_vs_int8m1_int8m1_tam (vbool8_t mask, vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxVS8SInt8VBVI_TAM, redmax_vs, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt8, 2, OneDBool, OneDInt8) +// vint16m1_t vredmax_vs_int16m1_int16m1_tam (vbool16_t mask, vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxVS16SInt16VBVI_TAM, redmax_vs, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt16, 2, OneDBool, OneDInt16) +// vint32m1_t vredmax_vs_int32m1_int32m1_tam (vbool32_t mask, vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxVS32SInt32VBVI_TAM, redmax_vs, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt32, 2, OneDBool, OneDInt32) +// vint64m1_t vredmax_vs_int64m1_int64m1_tam (vbool64_t mask, vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxVS64SInt64VBVI_TAM, redmax_vs, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt64, 2, OneDBool, OneDInt64) +// vuint8m1_t vredmaxu_vs_uint8m1_uint8m1_tam (vbool8_t mask, vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxuVS8SUInt8VBVU_TAM, redmaxu_vs, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDUInt8, 2, OneDBool, OneDUInt8) +// vuint16m1_t vredmaxu_vs_uint16m1_uint16m1_tam (vbool16_t mask, vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxuVS16SUInt16VBVU_TAM, redmaxu_vs, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDUInt16, 2, OneDBool, OneDUInt16) +// vuint32m1_t vredmaxu_vs_uint32m1_uint32m1_tam (vbool32_t mask, vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxuVS32SUInt32VBVU_TAM, redmaxu_vs, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDUInt32, 2, OneDBool, OneDUInt32) +// vuint64m1_t vredmaxu_vs_uint64m1_uint64m1_tam (vbool64_t mask, vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedmaxuVS64SUInt64VBVU_TAM, redmaxu_vs, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDUInt64, 2, OneDBool, OneDUInt64) +// vint8m1_t vredmin_vs_int8m1_int8m1_tam (vbool8_t mask, vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminVS8SInt8VBVI_TAM, redmin_vs, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt8, 2, OneDBool, OneDInt8) +// vint16m1_t vredmin_vs_int16m1_int16m1_tam (vbool16_t mask, vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminVS16SInt16VBVI_TAM, redmin_vs, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt16, 2, OneDBool, OneDInt16) +// vint32m1_t vredmin_vs_int32m1_int32m1_tam (vbool32_t mask, vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminVS32SInt32VBVI_TAM, redmin_vs, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt32, 2, OneDBool, OneDInt32) +// vint64m1_t vredmin_vs_int64m1_int64m1_tam (vbool64_t mask, vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminVS64SInt64VBVI_TAM, redmin_vs, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt64, 2, OneDBool, OneDInt64) +// vuint8m1_t vredminu_vs_uint8m1_uint8m1_tam (vbool8_t mask, vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminuVS8SUInt8VBVU_TAM, redminu_vs, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDUInt8, 2, OneDBool, OneDUInt8) +// vuint16m1_t vredminu_vs_uint16m1_uint16m1_tam (vbool16_t mask, vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminuVS16SUInt16VBVU_TAM, redminu_vs, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDUInt16, 2, OneDBool, OneDUInt16) +// vuint32m1_t vredminu_vs_uint32m1_uint32m1_tam (vbool32_t mask, vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminuVS32SUInt32VBVU_TAM, redminu_vs, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDUInt32, 2, OneDBool, OneDUInt32) +// vuint64m1_t vredminu_vs_uint64m1_uint64m1_tam (vbool64_t mask, vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedminuVS64SUInt64VBVU_TAM, redminu_vs, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDUInt64, 2, OneDBool, OneDUInt64) +// vint8m1_t vredand_vs_int8m1_int8m1_tam (vbool8_t mask, vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS8SInt8VBVI_TAM, redand_vs, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt8, 2, OneDBool, OneDInt8) +// vint16m1_t vredand_vs_int16m1_int16m1_tam (vbool16_t mask, vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS16SInt16VBVI_TAM, redand_vs, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt16, 2, OneDBool, OneDInt16) +// vint32m1_t vredand_vs_int32m1_int32m1_tam (vbool32_t mask, vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS32SInt32VBVI_TAM, redand_vs, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt32, 2, OneDBool, OneDInt32) +// vint64m1_t vredand_vs_int64m1_int64m1_tam (vbool64_t mask, vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS64SInt64VBVI_TAM, redand_vs, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt64, 2, OneDBool, OneDInt64) +// vuint8m1_t vredand_vs_uint8m1_uint8m1_tam (vbool8_t mask, vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS8SUInt8VBVU_TAM, redand_vs, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDUInt8, 2, OneDBool, OneDUInt8) +// vuint16m1_t vredand_vs_uint16m1_uint16m1_tam (vbool16_t mask, vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS16SUInt16VBVU_TAM, redand_vs, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic |ReductionOperation, OneDUInt16, 2, OneDBool, OneDUInt16) +// vuint32m1_t vredand_vs_uint32m1_uint32m1_tam (vbool32_t mask, vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS32SUInt32VBVU_TAM, redand_vs, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic |ReductionOperation, OneDUInt32, 2, OneDBool, OneDUInt32) +// vuint64m1_t vredand_vs_uint64m1_uint64m1_tam (vbool64_t mask, vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedandVS64SUInt64VBVU_TAM, redand_vs, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic |ReductionOperation, OneDUInt64, 2, OneDBool, OneDUInt64) +// vint8m1_t vredor_vs_int8m1_int8m1_tam (vbool8_t mask, vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS8SInt8VBVI_TAM, redor_vs, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt8, 2, OneDBool, OneDInt8) +// vint16m1_t vredor_vs_int16m1_int16m1_tam (vbool16_t mask, vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS16SInt16VBVI_TAM, redor_vs, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt16, 2, OneDBool, OneDInt16) +// vint32m1_t vredor_vs_int32m1_int32m1_tam (vbool32_t mask, vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS32SInt32VBVI_TAM, redor_vs, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt32, 2, OneDBool, OneDInt32) +// vint64m1_t vredor_vs_int64m1_int64m1_tam (vbool64_t mask, vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS64SInt64VBVI_TAM, redor_vs, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt64, 2, OneDBool, OneDInt64) +// vuint8m1_t vredor_vs_uint8m1_uint8m1_tam (vbool8_t mask, vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS8SUInt8VBVU_TAM, redor_vs, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDUInt8, 2, OneDBool, OneDUInt8) +// vuint16m1_t vredor_vs_uint16m1_uint16m1_tam (vbool16_t mask, vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS16SUInt16VBVU_TAM, redor_vs, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDUInt16, 2, OneDBool, OneDUInt16) +// vuint32m1_t vredor_vs_uint32m1_uint32m1_tam (vbool32_t mask, vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS32SUInt32VBVU_TAM, redor_vs, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDUInt32, 2, OneDBool, OneDUInt32) +// vuint64m1_t vredor_vs_uint64m1_uint64m1_tam (vbool64_t mask, vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedorVS64SUInt64VBVU_TAM, redor_vs, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDUInt64, 2, OneDBool, OneDUInt64) +// vint8m1_t vredxor_vs_int8m1_int8m1_tam (vbool8_t mask, vint8m1_t vector, vint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS8SInt8VBVI_TAM, redxor_vs, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt8, 2, OneDBool, OneDInt8) +// vint16m1_t vredxor_vs_int16m1_int16m1_tam (vbool16_t mask, vint16m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS16SInt16VBVI_TAM, redxor_vs, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt16, 2, OneDBool, OneDInt16) +// vint32m1_t vredxor_vs_int32m1_int32m1_tam (vbool32_t mask, vint32m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS32SInt32VBVI_TAM, redxor_vs, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt32, 2, OneDBool, OneDInt32) +// vint64m1_t vredxor_vs_int64m1_int64m1_tam (vbool64_t mask, vint64m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS64SInt64VBVI_TAM, redxor_vs, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt64, 2, OneDBool, OneDInt64) +// vuint8m1_t vredxor_vs_uint8m1_uint8m1_tam (vbool8_t mask, vuint8m1_t vector, vuint8m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS8SUInt8VBVU_TAM, redxor_vs, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDUInt8, 2, OneDBool, OneDUInt8) +// vuint16m1_t vredxor_vs_uint16m1_uint16m1_tam (vbool16_t mask, vuint16m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS16SUInt16VBVU_TAM, redxor_vs, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic |ReductionOperation, OneDUInt16, 2, OneDBool, OneDUInt16) +// vuint32m1_t vredxor_vs_uint32m1_uint32m1_tam (vbool32_t mask, vuint32m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS32SUInt32VBVU_TAM, redxor_vs, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic |ReductionOperation, OneDUInt32, 2, OneDBool, OneDUInt32) +// vuint64m1_t vredxor_vs_uint64m1_uint64m1_tam (vbool64_t mask, vuint64m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(RedxorVS64SUInt64VBVU_TAM, redxor_vs, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic |ReductionOperation, OneDUInt64, 2, OneDBool, OneDUInt64) + +// vint16m1_t vwredsum_vs_int8m1_int16m1_tu (vint16m1_t merge, vint8m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumVS8SInt16VIVI_TU, wredsum_vs, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt16, 2, OneDInt16, OneDInt8) +// vint32m1_t vwredsum_vs_int16m1_int32m1_tu (vint32m1_t merge, vint16m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumVS16SInt32VIVI_TU, wredsum_vs, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt32, 2, OneDInt32, OneDInt16) +// vint64m1_t vwredsum_vs_int32m1_int64m1_tu (vint64m1_t merge, vint32m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumVS32SInt64VIVI_TU, wredsum_vs, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDInt64, 2, OneDInt64, OneDInt32) +// vuint16m1_t vwredsumu_vs_uint8m1_uint16m1_tu (vuint16m1_t merge, vuint8m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumuVS8SUInt16VUVU_TU, wredsumu_vs, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt16, 2, OneDUInt16, OneDUInt8) +// vuint32m1_t vwredsumu_vs_uint16m1_uint32m1_tu (vuint32m1_t merge, vuint16m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumuVS16SUInt32VUVU_TU, wredsumu_vs, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt32, 2, OneDUInt32, OneDUInt16) +// vuint64m1_t vwredsumu_vs_uint32m1_uint64m1_tu (vuint64m1_t merge, vuint32m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumuVS32SUInt64VUVU_TU, wredsumu_vs, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDUInt64, 2, OneDUInt64, OneDUInt32) +// vint16m1_t vwredsum_vs_int8m1_int16m1_ta (vint8m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumVS8SInt16VI_TA, wredsum_vs, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt16, 1, OneDInt8) +// vint32m1_t vwredsum_vs_int16m1_int32m1_ta (vint16m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumVS16SInt32VI_TA, wredsum_vs, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt32, 1, OneDInt16) +// vint64m1_t vwredsum_vs_int32m1_int64m1_ta (vint32m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumVS32SInt64VI_TA, wredsum_vs, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDInt64, 1, OneDInt32) +// vuint16m1_t vwredsumu_vs_uint8m1_uint16m1_ta (vuint8m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumuVS8SUInt16VU_TA, wredsumu_vs, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt16, 1, OneDUInt8) +// vuint32m1_t vwredsumu_vs_uint16m1_uint32m1_ta (vuint16m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumuVS16SUInt32VU_TA, wredsumu_vs, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt32, 1, OneDUInt16) +// vuint64m1_t vwredsumu_vs_uint32m1_uint64m1_ta (vuint32m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumuVS32SUInt64VU_TA, wredsumu_vs, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDUInt64, 1, OneDUInt32) + +// vint16m1_t vwredsum_vs_int8m1_int16m1_tum (vbool8_t mask, vint16m1_t merge, vint8m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumVS8SInt16VBVIVI_TUM, wredsum_vs, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt16, 3, OneDBool, OneDInt16, OneDInt8) +// vint32m1_t vwredsum_vs_int16m1_int32m1_tum (vbool16_t mask, vint32m1_t merge, vint16m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumVS16SInt32VBVIVI_TUM, wredsum_vs, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt32, 3, OneDBool, OneDInt32, OneDInt16) +// vint64m1_t vwredsum_vs_int32m1_int64m1_tum (vbool32_t mask, vint64m1_t merge, vint32m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumVS32SInt64VBVIVI_TUM, wredsum_vs, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDInt64, 3, OneDBool, OneDInt64, OneDInt32) +// vuint16m1_t vwredsumu_vs_uint8m1_uint16m1_tum (vbool8_t mask, vuint16m1_t merge, vuint8m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumuVS8SUInt16VBVUVU_TUM, wredsumu_vs, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt8) +// vuint32m1_t vwredsumu_vs_uint16m1_uint32m1_tum (vbool16_t mask, vuint32m1_t merge, vuint16m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumuVS16SUInt32VBVUVU_TUM, wredsumu_vs, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt16) +// vuint64m1_t vwredsumu_vs_uint32m1_uint64m1_tum (vbool32_t mask, vuint64m1_t merge, vuint32m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumuVS32SUInt64VBVUVU_TUM, wredsumu_vs, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt32) +// vint16m1_t vwredsum_vs_int8m1_int16m1_tam (vbool8_t mask, vint8m1_t vector, vint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumVS8SInt16VBVI_TAM, wredsum_vs, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt16, 2, OneDBool, OneDInt8) +// vint32m1_t vwredsum_vs_int16m1_int32m1_tam (vbool16_t mask, vint16m1_t vector, vint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumVS16SInt32VBVI_TAM, wredsum_vs, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt32, 2, OneDBool, OneDInt16) +// vint64m1_t vwredsum_vs_int32m1_int64m1_tam (vbool32_t mask, vint32m1_t vector, vint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumVS32SInt64VBVI_TAM, wredsum_vs, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDInt64, 2, OneDBool, OneDInt32) +// vuint16m1_t vwredsumu_vs_uint8m1_uint16m1_tam (vbool8_t mask, vuint8m1_t vector, vuint16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumuVS8SUInt16VBVU_TAM, wredsumu_vs, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDUInt16, 2, OneDBool, OneDUInt8) +// vuint32m1_t vwredsumu_vs_uint16m1_uint32m1_tam (vbool16_t mask, vuint16m1_t vector, vuint32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumuVS16SUInt32VBVU_TAM, wredsumu_vs, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDUInt32, 2, OneDBool, OneDUInt16) +// vuint64m1_t vwredsumu_vs_uint32m1_uint64m1_tam (vbool32_t mask, vuint32m1_t vector, vuint64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(WredsumuVS32SUInt64VBVU_TAM, wredsumu_vs, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDUInt64, 2, OneDBool, OneDUInt32) + +// vfloat16m1_t vfredosum_vs_float16m1_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredosumVS16SFloat16VFVF_TU, fredosum_vs, 16, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDFloat16, 2, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfredosum_vs_float32m1_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredosumVS32SFloat32VFVF_TU, fredosum_vs, 32, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDFloat32, 2, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfredosum_vs_float64m1_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredosumVS64SFloat64VFVF_TU, fredosum_vs, 64, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDFloat64, 2, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfredusum_vs_float16m1_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredusumVS16SFloat16VFVF_TU, fredusum_vs, 16, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDFloat16, 2, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfredusum_vs_float32m1_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredusumVS32SFloat32VFVF_TU, fredusum_vs, 32, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDFloat32, 2, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfredusum_vs_float64m1_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredusumVS64SFloat64VFVF_TU, fredusum_vs, 64, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDFloat64, 2, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfredmax_vs_float16m1_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredmaxVS16SFloat16VFVF_TU, fredmax_vs, 16, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDFloat16, 2, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfredmax_vs_float32m1_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredmaxVS32SFloat32VFVF_TU, fredmax_vs, 32, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDFloat32, 2, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfredmax_vs_float64m1_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredmaxVS64SFloat64VFVF_TU, fredmax_vs, 64, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDFloat64, 2, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfredmin_vs_float16m1_float16m1_tu (vfloat16m1_t merge, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredminVS16SFloat16VFVF_TU, fredmin_vs, 16, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDFloat16, 2, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfredmin_vs_float32m1_float32m1_tu (vfloat32m1_t merge, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredminVS32SFloat32VFVF_TU, fredmin_vs, 32, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDFloat32, 2, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfredmin_vs_float64m1_float64m1_tu (vfloat64m1_t merge, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredminVS64SFloat64VFVF_TU, fredmin_vs, 64, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDFloat64, 2, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfredosum_vs_float16m1_float16m1_ta (vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredosumVS16SFloat16VF_TA, fredosum_vs, 16, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDFloat16, 1, OneDFloat16) +// vfloat32m1_t vfredosum_vs_float32m1_float32m1_ta (vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredosumVS32SFloat32VF_TA, fredosum_vs, 32, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDFloat32, 1, OneDFloat32) +// vfloat64m1_t vfredosum_vs_float64m1_float64m1_ta (vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredosumVS64SFloat64VF_TA, fredosum_vs, 64, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDFloat64, 1, OneDFloat64) +// vfloat16m1_t vfredusum_vs_float16m1_float16m1_ta (vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredusumVS16SFloat16VF_TA, fredusum_vs, 16, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDFloat16, 1, OneDFloat16) +// vfloat32m1_t vfredusum_vs_float32m1_float32m1_ta (vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredusumVS32SFloat32VF_TA, fredusum_vs, 32, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDFloat32, 1, OneDFloat32) +// vfloat64m1_t vfredusum_vs_float64m1_float64m1_ta (vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredusumVS64SFloat64VF_TA, fredusum_vs, 64, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDFloat64, 1, OneDFloat64) +// vfloat16m1_t vfredmax_vs_float16m1_float16m1_ta (vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredmaxVS16SFloat16VF_TA, fredmax_vs, 16, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDFloat16, 1, OneDFloat16) +// vfloat32m1_t vfredmax_vs_float32m1_float32m1_ta (vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredmaxVS32SFloat32VF_TA, fredmax_vs, 32, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDFloat32, 1, OneDFloat32) +// vfloat64m1_t vfredmax_vs_float64m1_float64m1_ta (vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredmaxVS64SFloat64VF_TA, fredmax_vs, 64, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDFloat64, 1, OneDFloat64) +// vfloat16m1_t vfredmin_vs_float16m1_float16m1_ta (vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredminVS16SFloat16VF_TA, fredmin_vs, 16, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDFloat16, 1, OneDFloat16) +// vfloat32m1_t vfredmin_vs_float32m1_float32m1_ta (vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredminVS32SFloat32VF_TA, fredmin_vs, 32, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDFloat32, 1, OneDFloat32) +// vfloat64m1_t vfredmin_vs_float64m1_float64m1_ta (vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredminVS64SFloat64VF_TA, fredmin_vs, 64, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDFloat64, 1, OneDFloat64) +// vfloat16m1_t vfredosum_vs_float16m1_float16m1_tum (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredosumVS16SFloat16VBVFVF_TUM, fredosum_vs, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfredosum_vs_float32m1_float32m1_tum (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredosumVS32SFloat32VBVFVF_TUM, fredosum_vs, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfredosum_vs_float64m1_float64m1_tum (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredosumVS64SFloat64VBVFVF_TUM, fredosum_vs, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfredusum_vs_float16m1_float16m1_tum (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredusumVS16SFloat16VBVFVF_TUM, fredusum_vs, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfredusum_vs_float32m1_float32m1_tum (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredusumVS32SFloat32VBVFVF_TUM, fredusum_vs, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfredusum_vs_float64m1_float64m1_tum (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredusumVS64SFloat64VBVFVF_TUM, fredusum_vs, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfredmax_vs_float16m1_float16m1_tum (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredmaxVS16SFloat16VBVFVF_TUM, fredmax_vs, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfredmax_vs_float32m1_float32m1_tum (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredmaxVS32SFloat32VBVFVF_TUM, fredmax_vs, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfredmax_vs_float64m1_float64m1_tum (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredmaxVS64SFloat64VBVFVF_TUM, fredmax_vs, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfredmin_vs_float16m1_float16m1_tum (vbool16_t mask, vfloat16m1_t merge, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredminVS16SFloat16VBVFVF_TUM, fredmin_vs, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m1_t vfredmin_vs_float32m1_float32m1_tum (vbool32_t mask, vfloat32m1_t merge, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredminVS32SFloat32VBVFVF_TUM, fredmin_vs, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m1_t vfredmin_vs_float64m1_float64m1_tum (vbool64_t mask, vfloat64m1_t merge, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredminVS64SFloat64VBVFVF_TUM, fredmin_vs, 64, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vfloat16m1_t vfredosum_vs_float16m1_float16m1_tam (vbool16_t mask, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredosumVS16SFloat16VBVF_TAM, fredosum_vs, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDFloat16, 2, OneDBool, OneDFloat16) +// vfloat32m1_t vfredosum_vs_float32m1_float32m1_tam (vbool32_t mask, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredosumVS32SFloat32VBVF_TAM, fredosum_vs, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDFloat32, 2, OneDBool, OneDFloat32) +// vfloat64m1_t vfredosum_vs_float64m1_float64m1_tam (vbool64_t mask, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredosumVS64SFloat64VBVF_TAM, fredosum_vs, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDFloat64, 2, OneDBool, OneDFloat64) +// vfloat16m1_t vfredusum_vs_float16m1_float16m1_tam (vbool16_t mask, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredusumVS16SFloat16VBVF_TAM, fredusum_vs, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDFloat16, 2, OneDBool, OneDFloat16) +// vfloat32m1_t vfredusum_vs_float32m1_float32m1_tam (vbool32_t mask, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredusumVS32SFloat32VBVF_TAM, fredusum_vs, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDFloat32, 2, OneDBool, OneDFloat32) +// vfloat64m1_t vfredusum_vs_float64m1_float64m1_tam (vbool64_t mask, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredusumVS64SFloat64VBVF_TAM, fredusum_vs, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDFloat64, 2, OneDBool, OneDFloat64) +// vfloat16m1_t vfredmax_vs_float16m1_float16m1_tam (vbool16_t mask, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredmaxVS16SFloat16VBVF_TAM, fredmax_vs, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDFloat16, 2, OneDBool, OneDFloat16) +// vfloat32m1_t vfredmax_vs_float32m1_float32m1_tam (vbool32_t mask, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredmaxVS32SFloat32VBVF_TAM, fredmax_vs, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDFloat32, 2, OneDBool, OneDFloat32) +// vfloat64m1_t vfredmax_vs_float64m1_float64m1_tam (vbool64_t mask, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredmaxVS64SFloat64VBVF_TAM, fredmax_vs, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDFloat64, 2, OneDBool, OneDFloat64) +// vfloat16m1_t vfredmin_vs_float16m1_float16m1_tam (vbool16_t mask, vfloat16m1_t vector, vfloat16m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredminVS16SFloat16VBVF_TAM, fredmin_vs, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDFloat16, 2, OneDBool, OneDFloat16) +// vfloat32m1_t vfredmin_vs_float32m1_float32m1_tam (vbool32_t mask, vfloat32m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredminVS32SFloat32VBVF_TAM, fredmin_vs, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDFloat32, 2, OneDBool, OneDFloat32) +// vfloat64m1_t vfredmin_vs_float64m1_float64m1_tam (vbool64_t mask, vfloat64m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FredminVS64SFloat64VBVF_TAM, fredmin_vs, 64, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDFloat64, 2, OneDBool, OneDFloat64) + +// vfloat32m1_t vfwredosum_vs_float16m1_float32m1_tu (vfloat32m1_t merge, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FwredosumVS16SFloat32VFVF_TU, fwredosum_vs, 16, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDFloat32, 2, OneDFloat32, OneDFloat16) +// vfloat64m1_t vfwredosum_vs_float32m1_float64m1_tu (vfloat64m1_t merge, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FwredosumVS32SFloat64VFVF_TU, fwredosum_vs, 32, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDFloat64, 2, OneDFloat64, OneDFloat32) +// vfloat32m1_t vfwredusum_vs_float16m1_float32m1_tu (vfloat32m1_t merge, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FwredusumVS16SFloat32VFVF_TU, fwredusum_vs, 16, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDFloat32, 2, OneDFloat32, OneDFloat16) +// vfloat64m1_t vfwredusum_vs_float32m1_float64m1_tu (vfloat64m1_t merge, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FwredusumVS32SFloat64VFVF_TU, fwredusum_vs, 32, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailUndisturbed, OneDFloat64, 2, OneDFloat64, OneDFloat32) +// vfloat32m1_t vfwredosum_vs_float16m1_float32m1_ta (vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FwredosumVS16SFloat32VF_TA, fwredosum_vs, 16, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDFloat32, 1, OneDFloat16) +// vfloat64m1_t vfwredosum_vs_float32m1_float64m1_ta (vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FwredosumVS32SFloat64VF_TA, fwredosum_vs, 32, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDFloat64, 1, OneDFloat32) +// vfloat32m1_t vfwredusum_vs_float16m1_float32m1_ta (vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FwredusumVS16SFloat32VF_TA, fwredusum_vs, 16, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDFloat32, 1, OneDFloat16) +// vfloat64m1_t vfwredusum_vs_float32m1_float64m1_ta (vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FwredusumVS32SFloat64VF_TA, fwredusum_vs, 32, FLOAT, HaveVLParameter | NonmaskedOperation | ReductionOperation | TailAgnostic, OneDFloat64, 1, OneDFloat32) + +// vfloat32m1_t vfwredosum_vs_float16m1_float32m1_tum (vbool16_t mask, vfloat32m1_t merge, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FwredosumVS16SFloat32VBVFVF_TUM, fwredosum_vs, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat16) +// vfloat64m1_t vfwredosum_vs_float32m1_float64m1_tum (vbool32_t mask, vfloat64m1_t merge, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FwredosumVS32SFloat64VBVFVF_TUM, fwredosum_vs, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat32) +// vfloat32m1_t vfwredusum_vs_float16m1_float32m1_tum (vbool16_t mask, vfloat32m1_t merge, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FwredusumVS16SFloat32VBVFVF_TUM, fwredusum_vs, 16, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat16) +// vfloat64m1_t vfwredusum_vs_float32m1_float64m1_tum (vbool32_t mask, vfloat64m1_t merge, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FwredusumVS32SFloat64VBVFVF_TUM, fwredusum_vs, 32, FLOAT, HaveVLParameter | MaskedOperation | TailUndisturbed | ReductionOperation, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat32) +// vfloat32m1_t vfwredosum_vs_float16m1_float32m1_tam (vbool16_t mask, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FwredosumVS16SFloat32VBVF_TAM, fwredosum_vs, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDFloat32, 2, OneDBool, OneDFloat16) +// vfloat64m1_t vfwredosum_vs_float32m1_float64m1_tam (vbool32_t mask, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FwredosumVS32SFloat64VBVF_TAM, fwredosum_vs, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDFloat64, 2, OneDBool, OneDFloat32) +// vfloat32m1_t vfwredusum_vs_float16m1_float32m1_tam (vbool16_t mask, vfloat16m1_t vector, vfloat32m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FwredusumVS16SFloat32VBVF_TAM, fwredusum_vs, 16, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDFloat32, 2, OneDBool, OneDFloat16) +// vfloat64m1_t vfwredusum_vs_float32m1_float64m1_tam (vbool32_t mask, vfloat32m1_t vector, vfloat64m1_t scalar, size_t vl); +CUSTOM_OP_TYPE(FwredusumVS32SFloat64VBVF_TAM, fwredusum_vs, 32, FLOAT, HaveVLParameter | MaskedOperation | TailAgnostic | ReductionOperation, OneDFloat64, 2, OneDBool, OneDFloat32) + +// vint8m1_t vle8_v_int8m1_tu (vint8m1_t merge, const int8_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle8X8VInt8VISI_TU, le8_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt8, 2, OneDInt8, OneDInt8) +// vint16m1_t vle16_v_int16m1_tu (vint16m1_t merge, const int16_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle16X16VInt16VISI_TU, le16_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt16, 2, OneDInt16, OneDInt16) +// vint32m1_t vle32_v_int32m1_tu (vint32m1_t merge, const int32_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle32X32VInt32VISI_TU, le32_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt32, 2, OneDInt32, OneDInt32) +// vint64m1_t vle64_v_int64m1_tu (vint64m1_t merge, const int64_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle64X64VInt64VISI_TU, le64_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt64, 2, OneDInt64, OneDInt64) +// vuint8m1_t vle8_v_uint8m1_tu (vuint8m1_t merge, const uint8_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle8X8VUInt8VUSU_TU, le8_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint16m1_t vle16_v_uint16m1_tu (vuint16m1_t merge, const uint16_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle16X16VUInt16VUSU_TU, le16_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint32m1_t vle32_v_uint32m1_tu (vuint32m1_t merge, const uint32_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle32X32VUInt32VUSU_TU, le32_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint64m1_t vle64_v_uint64m1_tu (vuint64m1_t merge, const uint64_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle64X64VUInt64VUSU_TU, le64_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vfloat16m1_t vle16_v_float16m1_tu (vfloat16m1_t merge, const float16_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle16X16VFloat16VFSF_TU, le16_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat16, 2, OneDFloat16, OneDFloat16) +// vfloat32m1_t vle32_v_float32m1_tu (vfloat32m1_t merge, const float32_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle32X32VFloat32VFSF_TU, le32_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat32, 2, OneDFloat32, OneDFloat32) +// vfloat64m1_t vle64_v_float64m1_tu (vfloat64m1_t merge, const float64_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle64X64VFloat64VFSF_TU, le64_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat64, 2, OneDFloat64, OneDFloat64) +// vint8m1_t vle8_v_int8m1_ta (const int8_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle8X8VInt8SI_TA, le8_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt8, 1, OneDInt8) +// vint16m1_t vle16_v_int16m1_ta (const int16_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle16X16VInt16SI_TA, le16_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt16, 1, OneDInt16) +// vint32m1_t vle32_v_int32m1_ta (const int32_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle32X32VInt32SI_TA, le32_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt32, 1, OneDInt32) +// vint64m1_t vle64_v_int64m1_ta (const int64_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle64X64VInt64SI_TA, le64_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt64, 1, OneDInt64) +// vuint8m1_t vle8_v_uint8m1_ta (const uint8_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle8X8VUInt8SU_TA, le8_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt8, 1, OneDUInt8) +// vuint16m1_t vle16_v_uint16m1_ta (const uint16_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle16X16VUInt16SU_TA, le16_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt16, 1, OneDUInt16) +// vuint32m1_t vle32_v_uint32m1_ta (const uint32_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle32X32VUInt32SU_TA, le32_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt32, 1, OneDUInt32) +// vuint64m1_t vle64_v_uint64m1_ta (const uint64_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle64X64VUInt64SU_TA, le64_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt64, 1, OneDUInt64) +// vfloat16m1_t vle16_v_float16m1_ta (const float16_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle16X16VFloat16SF_TA, le16_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat16, 1, OneDFloat16) +// vfloat32m1_t vle32_v_float32m1_ta (const float32_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle32X32VFloat32SF_TA, le32_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat32, 1, OneDFloat32) +// vfloat64m1_t vle64_v_float64m1_ta (const float64_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle64X64VFloat64SF_TA, le64_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat64, 1, OneDFloat64) +// vint8m1_t vle8_v_int8m1_tuma (vbool8_t mask, vint8m1_t merge, const int8_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle8X8VInt8VBVISI_TUMA, le8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint16m1_t vle16_v_int16m1_tuma (vbool16_t mask, vint16m1_t merge, const int16_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle16X16VInt16VBVISI_TUMA, le16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint32m1_t vle32_v_int32m1_tuma (vbool32_t mask, vint32m1_t merge, const int32_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle32X32VInt32VBVISI_TUMA, le32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint64m1_t vle64_v_int64m1_tuma (vbool64_t mask, vint64m1_t merge, const int64_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle64X64VInt64VBVISI_TUMA, le64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vuint8m1_t vle8_v_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle8X8VUInt8VBVUSU_TUMA, le8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint16m1_t vle16_v_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle16X16VUInt16VBVUSU_TUMA, le16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint32m1_t vle32_v_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle32X32VUInt32VBVUSU_TUMA, le32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint64m1_t vle64_v_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle64X64VUInt64VBVUSU_TUMA, le64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vfloat16m1_t vle16_v_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle16X16VFloat16VBVFSF_TUMA, le16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m1_t vle32_v_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle32X32VFloat32VBVFSF_TUMA, le32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m1_t vle64_v_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle64X64VFloat64VBVFSF_TUMA, le64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vint8m1_t vle8_v_int8m1_tumu (vbool8_t mask, vint8m1_t merge, const int8_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle8X8VInt8VBVISI_TUMU, le8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint16m1_t vle16_v_int16m1_tumu (vbool16_t mask, vint16m1_t merge, const int16_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle16X16VInt16VBVISI_TUMU, le16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint32m1_t vle32_v_int32m1_tumu (vbool32_t mask, vint32m1_t merge, const int32_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle32X32VInt32VBVISI_TUMU, le32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint64m1_t vle64_v_int64m1_tumu (vbool64_t mask, vint64m1_t merge, const int64_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle64X64VInt64VBVISI_TUMU, le64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vuint8m1_t vle8_v_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle8X8VUInt8VBVUSU_TUMU, le8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint16m1_t vle16_v_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle16X16VUInt16VBVUSU_TUMU, le16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint32m1_t vle32_v_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle32X32VUInt32VBVUSU_TUMU, le32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint64m1_t vle64_v_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle64X64VUInt64VBVUSU_TUMU, le64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vfloat16m1_t vle16_v_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle16X16VFloat16VBVFSF_TUMU, le16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m1_t vle32_v_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle32X32VFloat32VBVFSF_TUMU, le32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m1_t vle64_v_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle64X64VFloat64VBVFSF_TUMU, le64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) +// vint8m1_t vle8_v_int8m1_tama (vbool8_t mask, const int8_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle8X8VInt8VBSI_TAMA, le8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt8, 2, OneDBool, OneDInt8) +// vint16m1_t vle16_v_int16m1_tama (vbool16_t mask, const int16_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle16X16VInt16VBSI_TAMA, le16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt16, 2, OneDBool, OneDInt16) +// vint32m1_t vle32_v_int32m1_tama (vbool32_t mask, const int32_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle32X32VInt32VBSI_TAMA, le32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt32, 2, OneDBool, OneDInt32) +// vint64m1_t vle64_v_int64m1_tama (vbool64_t mask, const int64_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle64X64VInt64VBSI_TAMA, le64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt64, 2, OneDBool, OneDInt64) +// vuint8m1_t vle8_v_uint8m1_tama (vbool8_t mask, const uint8_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle8X8VUInt8VBSU_TAMA, le8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt8, 2, OneDBool, OneDUInt8) +// vuint16m1_t vle16_v_uint16m1_tama (vbool16_t mask, const uint16_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle16X16VUInt16VBSU_TAMA, le16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 2, OneDBool, OneDUInt16) +// vuint32m1_t vle32_v_uint32m1_tama (vbool32_t mask, const uint32_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle32X32VUInt32VBSU_TAMA, le32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 2, OneDBool, OneDUInt32) +// vuint64m1_t vle64_v_uint64m1_tama (vbool64_t mask, const uint64_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle64X64VUInt64VBSU_TAMA, le64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt64, 2, OneDBool, OneDUInt64) +// vfloat16m1_t vle16_v_float16m1_tama (vbool16_t mask, const float16_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle16X16VFloat16VBSF_TAMA, le16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 2, OneDBool, OneDFloat16) +// vfloat32m1_t vle32_v_float32m1_tama (vbool32_t mask, const float32_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle32X32VFloat32VBSF_TAMA, le32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 2, OneDBool, OneDFloat32) +// vfloat64m1_t vle64_v_float64m1_tama (vbool64_t mask, const float64_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle64X64VFloat64VBSF_TAMA, le64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 2, OneDBool, OneDFloat64) +// vint8m1_t vle8_v_int8m1_tamu (vbool8_t mask, vint8m1_t merge, const int8_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle8X8VInt8VBVISI_TAMU, le8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 3, OneDBool, OneDInt8, OneDInt8) +// vint16m1_t vle16_v_int16m1_tamu (vbool16_t mask, vint16m1_t merge, const int16_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle16X16VInt16VBVISI_TAMU, le16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 3, OneDBool, OneDInt16, OneDInt16) +// vint32m1_t vle32_v_int32m1_tamu (vbool32_t mask, vint32m1_t merge, const int32_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle32X32VInt32VBVISI_TAMU, le32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 3, OneDBool, OneDInt32, OneDInt32) +// vint64m1_t vle64_v_int64m1_tamu (vbool64_t mask, vint64m1_t merge, const int64_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle64X64VInt64VBVISI_TAMU, le64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 3, OneDBool, OneDInt64, OneDInt64) +// vuint8m1_t vle8_v_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle8X8VUInt8VBVUSU_TAMU, le8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint16m1_t vle16_v_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle16X16VUInt16VBVUSU_TAMU, le16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint32m1_t vle32_v_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle32X32VUInt32VBVUSU_TAMU, le32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint64m1_t vle64_v_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle64X64VUInt64VBVUSU_TAMU, le64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vfloat16m1_t vle16_v_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle16X16VFloat16VBVFSF_TAMU, le16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 3, OneDBool, OneDFloat16, OneDFloat16) +// vfloat32m1_t vle32_v_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle32X32VFloat32VBVFSF_TAMU, le32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 3, OneDBool, OneDFloat32, OneDFloat32) +// vfloat64m1_t vle64_v_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, size_t vl); +CUSTOM_OP_TYPE(Vle64X64VFloat64VBVFSF_TAMU, le64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 3, OneDBool, OneDFloat64, OneDFloat64) + +// vint8m1_t vlse8_v_int8m1_tu (vint8m1_t merge, const int8_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse8XX8VInt8VISISI_TU, lse8_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, ScalarIntXLen) +// vint16m1_t vlse16_v_int16m1_tu (vint16m1_t merge, const int16_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse16XX16VInt16VISISI_TU, lse16_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, ScalarIntXLen) +// vint32m1_t vlse32_v_int32m1_tu (vint32m1_t merge, const int32_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse32XX32VInt32VISISI_TU, lse32_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, ScalarIntXLen) +// vint64m1_t vlse64_v_int64m1_tu (vint64m1_t merge, const int64_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse64XX64VInt64VISISI_TU, lse64_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, ScalarIntXLen) +// vuint8m1_t vlse8_v_uint8m1_tu (vuint8m1_t merge, const uint8_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse8XX8VUInt8VUSUSI_TU, lse8_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, ScalarIntXLen) +// vuint16m1_t vlse16_v_uint16m1_tu (vuint16m1_t merge, const uint16_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse16XX16VUInt16VUSUSI_TU, lse16_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, ScalarIntXLen) +// vuint32m1_t vlse32_v_uint32m1_tu (vuint32m1_t merge, const uint32_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse32XX32VUInt32VUSUSI_TU, lse32_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, ScalarIntXLen) +// vuint64m1_t vlse64_v_uint64m1_tu (vuint64m1_t merge, const uint64_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse64XX64VUInt64VUSUSI_TU, lse64_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, ScalarIntXLen) +// vfloat16m1_t vlse16_v_float16m1_tu (vfloat16m1_t merge, const float16_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse16XX16VFloat16VFSFSI_TU, lse16_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, ScalarIntXLen) +// vfloat32m1_t vlse32_v_float32m1_tu (vfloat32m1_t merge, const float32_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse32XX32VFloat32VFSFSI_TU, lse32_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, ScalarIntXLen) +// vfloat64m1_t vlse64_v_float64m1_tu (vfloat64m1_t merge, const float64_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse64XX64VFloat64VFSFSI_TU, lse64_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, ScalarIntXLen) +// vint8m1_t vlse8_v_int8m1_ta (const int8_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse8XX8VInt8SISI_TA, lse8_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt8, 2, OneDInt8, ScalarIntXLen) +// vint16m1_t vlse16_v_int16m1_ta (const int16_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse16XX16VInt16SISI_TA, lse16_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt16, 2, OneDInt16, ScalarIntXLen) +// vint32m1_t vlse32_v_int32m1_ta (const int32_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse32XX32VInt32SISI_TA, lse32_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt32, 2, OneDInt32, ScalarIntXLen) +// vint64m1_t vlse64_v_int64m1_ta (const int64_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse64XX64VInt64SISI_TA, lse64_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt64, 2, OneDInt64, ScalarIntXLen) +// vuint8m1_t vlse8_v_uint8m1_ta (const uint8_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse8XX8VUInt8SUSI_TA, lse8_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, ScalarIntXLen) +// vuint16m1_t vlse16_v_uint16m1_ta (const uint16_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse16XX16VUInt16SUSI_TA, lse16_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, ScalarIntXLen) +// vuint32m1_t vlse32_v_uint32m1_ta (const uint32_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse32XX32VUInt32SUSI_TA, lse32_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, ScalarIntXLen) +// vuint64m1_t vlse64_v_uint64m1_ta (const uint64_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse64XX64VUInt64SUSI_TA, lse64_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, ScalarIntXLen) +// vfloat16m1_t vlse16_v_float16m1_ta (const float16_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse16XX16VFloat16SFSI_TA, lse16_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, ScalarIntXLen) +// vfloat32m1_t vlse32_v_float32m1_ta (const float32_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse32XX32VFloat32SFSI_TA, lse32_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, ScalarIntXLen) +// vfloat64m1_t vlse64_v_float64m1_ta (const float64_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse64XX64VFloat64SFSI_TA, lse64_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, ScalarIntXLen) +// vint8m1_t vlse8_v_int8m1_tuma (vbool8_t mask, vint8m1_t merge, const int8_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse8XX8VInt8VBVISISI_TUMA, lse8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarIntXLen) +// vint16m1_t vlse16_v_int16m1_tuma (vbool16_t mask, vint16m1_t merge, const int16_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse16XX16VInt16VBVISISI_TUMA, lse16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarIntXLen) +// vint32m1_t vlse32_v_int32m1_tuma (vbool32_t mask, vint32m1_t merge, const int32_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse32XX32VInt32VBVISISI_TUMA, lse32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarIntXLen) +// vint64m1_t vlse64_v_int64m1_tuma (vbool64_t mask, vint64m1_t merge, const int64_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse64XX64VInt64VBVISISI_TUMA, lse64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarIntXLen) +// vuint8m1_t vlse8_v_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse8XX8VUInt8VBVUSUSI_TUMA, lse8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarIntXLen) +// vuint16m1_t vlse16_v_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse16XX16VUInt16VBVUSUSI_TUMA, lse16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarIntXLen) +// vuint32m1_t vlse32_v_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse32XX32VUInt32VBVUSUSI_TUMA, lse32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarIntXLen) +// vuint64m1_t vlse64_v_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse64XX64VUInt64VBVUSUSI_TUMA, lse64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarIntXLen) +// vfloat16m1_t vlse16_v_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse16XX16VFloat16VBVFSFSI_TUMA, lse16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarIntXLen) +// vfloat32m1_t vlse32_v_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse32XX32VFloat32VBVFSFSI_TUMA, lse32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarIntXLen) +// vfloat64m1_t vlse64_v_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse64XX64VFloat64VBVFSFSI_TUMA, lse64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarIntXLen) +// vint8m1_t vlse8_v_int8m1_tumu (vbool8_t mask, vint8m1_t merge, const int8_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse8XX8VInt8VBVISISI_TUMU, lse8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarIntXLen) +// vint16m1_t vlse16_v_int16m1_tumu (vbool16_t mask, vint16m1_t merge, const int16_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse16XX16VInt16VBVISISI_TUMU, lse16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarIntXLen) +// vint32m1_t vlse32_v_int32m1_tumu (vbool32_t mask, vint32m1_t merge, const int32_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse32XX32VInt32VBVISISI_TUMU, lse32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarIntXLen) +// vint64m1_t vlse64_v_int64m1_tumu (vbool64_t mask, vint64m1_t merge, const int64_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse64XX64VInt64VBVISISI_TUMU, lse64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarIntXLen) +// vuint8m1_t vlse8_v_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse8XX8VUInt8VBVUSUSI_TUMU, lse8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarIntXLen) +// vuint16m1_t vlse16_v_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse16XX16VUInt16VBVUSUSI_TUMU, lse16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarIntXLen) +// vuint32m1_t vlse32_v_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse32XX32VUInt32VBVUSUSI_TUMU, lse32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarIntXLen) +// vuint64m1_t vlse64_v_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse64XX64VUInt64VBVUSUSI_TUMU, lse64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarIntXLen) +// vfloat16m1_t vlse16_v_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse16XX16VFloat16VBVFSFSI_TUMU, lse16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarIntXLen) +// vfloat32m1_t vlse32_v_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse32XX32VFloat32VBVFSFSI_TUMU, lse32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarIntXLen) +// vfloat64m1_t vlse64_v_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse64XX64VFloat64VBVFSFSI_TUMU, lse64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarIntXLen) +// vint8m1_t vlse8_v_int8m1_tama (vbool8_t mask, const int8_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse8XX8VInt8VBSISI_TAMA, lse8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, ScalarIntXLen) +// vint16m1_t vlse16_v_int16m1_tama (vbool16_t mask, const int16_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse16XX16VInt16VBSISI_TAMA, lse16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, ScalarIntXLen) +// vint32m1_t vlse32_v_int32m1_tama (vbool32_t mask, const int32_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse32XX32VInt32VBSISI_TAMA, lse32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, ScalarIntXLen) +// vint64m1_t vlse64_v_int64m1_tama (vbool64_t mask, const int64_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse64XX64VInt64VBSISI_TAMA, lse64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, ScalarIntXLen) +// vuint8m1_t vlse8_v_uint8m1_tama (vbool8_t mask, const uint8_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse8XX8VUInt8VBSUSI_TAMA, lse8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, ScalarIntXLen) +// vuint16m1_t vlse16_v_uint16m1_tama (vbool16_t mask, const uint16_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse16XX16VUInt16VBSUSI_TAMA, lse16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, ScalarIntXLen) +// vuint32m1_t vlse32_v_uint32m1_tama (vbool32_t mask, const uint32_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse32XX32VUInt32VBSUSI_TAMA, lse32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, ScalarIntXLen) +// vuint64m1_t vlse64_v_uint64m1_tama (vbool64_t mask, const uint64_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse64XX64VUInt64VBSUSI_TAMA, lse64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, ScalarIntXLen) +// vfloat16m1_t vlse16_v_float16m1_tama (vbool16_t mask, const float16_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse16XX16VFloat16VBSFSI_TAMA, lse16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, ScalarIntXLen) +// vfloat32m1_t vlse32_v_float32m1_tama (vbool32_t mask, const float32_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse32XX32VFloat32VBSFSI_TAMA, lse32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, ScalarIntXLen) +// vfloat64m1_t vlse64_v_float64m1_tama (vbool64_t mask, const float64_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse64XX64VFloat64VBSFSI_TAMA, lse64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, ScalarIntXLen) +// vint8m1_t vlse8_v_int8m1_tamu (vbool8_t mask, vint8m1_t merge, const int8_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse8XX8VInt8VBVISISI_TAMU, lse8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, ScalarIntXLen) +// vint16m1_t vlse16_v_int16m1_tamu (vbool16_t mask, vint16m1_t merge, const int16_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse16XX16VInt16VBVISISI_TAMU, lse16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, ScalarIntXLen) +// vint32m1_t vlse32_v_int32m1_tamu (vbool32_t mask, vint32m1_t merge, const int32_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse32XX32VInt32VBVISISI_TAMU, lse32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, ScalarIntXLen) +// vint64m1_t vlse64_v_int64m1_tamu (vbool64_t mask, vint64m1_t merge, const int64_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse64XX64VInt64VBVISISI_TAMU, lse64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, ScalarIntXLen) +// vuint8m1_t vlse8_v_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse8XX8VUInt8VBVUSUSI_TAMU, lse8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, ScalarIntXLen) +// vuint16m1_t vlse16_v_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse16XX16VUInt16VBVUSUSI_TAMU, lse16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, ScalarIntXLen) +// vuint32m1_t vlse32_v_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse32XX32VUInt32VBVUSUSI_TAMU, lse32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, ScalarIntXLen) +// vuint64m1_t vlse64_v_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse64XX64VUInt64VBVUSUSI_TAMU, lse64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, ScalarIntXLen) +// vfloat16m1_t vlse16_v_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse16XX16VFloat16VBVFSFSI_TAMU, lse16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, ScalarIntXLen) +// vfloat32m1_t vlse32_v_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse32XX32VFloat32VBVFSFSI_TAMU, lse32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, ScalarIntXLen) +// vfloat64m1_t vlse64_v_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, ptrdiff_t bstride, size_t vl); +CUSTOM_OP_TYPE(Vlse64XX64VFloat64VBVFSFSI_TAMU, lse64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, ScalarIntXLen) + +// vint8m1_t vloxei8_v_int8m1_tu (vint8m1_t merge, const int8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V8VInt8VISIVU_TU, loxei8_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vloxei16_v_int8m1_tu (vint8m1_t merge, const int8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V8VInt8VISIVU_TU, loxei16_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDUInt16) +// vint8m1_t vloxei32_v_int8m1_tu (vint8m1_t merge, const int8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V8VInt8VISIVU_TU, loxei32_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDUInt32) +// vint8m1_t vloxei64_v_int8m1_tu (vint8m1_t merge, const int8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V8VInt8VISIVU_TU, loxei64_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDUInt64) +// vint16m1_t vloxei8_v_int16m1_tu (vint16m1_t merge, const int16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V16VInt16VISIVU_TU, loxei8_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDUInt8) +// vint16m1_t vloxei16_v_int16m1_tu (vint16m1_t merge, const int16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V16VInt16VISIVU_TU, loxei16_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vloxei32_v_int16m1_tu (vint16m1_t merge, const int16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V16VInt16VISIVU_TU, loxei32_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDUInt32) +// vint16m1_t vloxei64_v_int16m1_tu (vint16m1_t merge, const int16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V16VInt16VISIVU_TU, loxei64_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDUInt64) +// vint32m1_t vloxei8_v_int32m1_tu (vint32m1_t merge, const int32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V32VInt32VISIVU_TU, loxei8_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDUInt8) +// vint32m1_t vloxei16_v_int32m1_tu (vint32m1_t merge, const int32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V32VInt32VISIVU_TU, loxei16_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDUInt16) +// vint32m1_t vloxei32_v_int32m1_tu (vint32m1_t merge, const int32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V32VInt32VISIVU_TU, loxei32_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vloxei64_v_int32m1_tu (vint32m1_t merge, const int32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V32VInt32VISIVU_TU, loxei64_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDUInt64) +// vint64m1_t vloxei8_v_int64m1_tu (vint64m1_t merge, const int64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V64VInt64VISIVU_TU, loxei8_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDUInt8) +// vint64m1_t vloxei16_v_int64m1_tu (vint64m1_t merge, const int64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V64VInt64VISIVU_TU, loxei16_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDUInt16) +// vint64m1_t vloxei32_v_int64m1_tu (vint64m1_t merge, const int64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V64VInt64VISIVU_TU, loxei32_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDUInt32) +// vint64m1_t vloxei64_v_int64m1_tu (vint64m1_t merge, const int64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V64VInt64VISIVU_TU, loxei64_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDUInt64) +// vuint8m1_t vloxei8_v_uint8m1_tu (vuint8m1_t merge, const uint8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V8VUInt8VUSUVU_TU, loxei8_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vloxei16_v_uint8m1_tu (vuint8m1_t merge, const uint8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V8VUInt8VUSUVU_TU, loxei16_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt16) +// vuint8m1_t vloxei32_v_uint8m1_tu (vuint8m1_t merge, const uint8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V8VUInt8VUSUVU_TU, loxei32_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt32) +// vuint8m1_t vloxei64_v_uint8m1_tu (vuint8m1_t merge, const uint8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V8VUInt8VUSUVU_TU, loxei64_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt64) +// vuint16m1_t vloxei8_v_uint16m1_tu (vuint16m1_t merge, const uint16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V16VUInt16VUSUVU_TU, loxei8_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt8) +// vuint16m1_t vloxei16_v_uint16m1_tu (vuint16m1_t merge, const uint16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V16VUInt16VUSUVU_TU, loxei16_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vloxei32_v_uint16m1_tu (vuint16m1_t merge, const uint16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V16VUInt16VUSUVU_TU, loxei32_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt32) +// vuint16m1_t vloxei64_v_uint16m1_tu (vuint16m1_t merge, const uint16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V16VUInt16VUSUVU_TU, loxei64_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt64) +// vuint32m1_t vloxei8_v_uint32m1_tu (vuint32m1_t merge, const uint32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V32VUInt32VUSUVU_TU, loxei8_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt8) +// vuint32m1_t vloxei16_v_uint32m1_tu (vuint32m1_t merge, const uint32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V32VUInt32VUSUVU_TU, loxei16_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt16) +// vuint32m1_t vloxei32_v_uint32m1_tu (vuint32m1_t merge, const uint32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V32VUInt32VUSUVU_TU, loxei32_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vloxei64_v_uint32m1_tu (vuint32m1_t merge, const uint32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V32VUInt32VUSUVU_TU, loxei64_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt64) +// vuint64m1_t vloxei8_v_uint64m1_tu (vuint64m1_t merge, const uint64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V64VUInt64VUSUVU_TU, loxei8_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt8) +// vuint64m1_t vloxei16_v_uint64m1_tu (vuint64m1_t merge, const uint64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V64VUInt64VUSUVU_TU, loxei16_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt16) +// vuint64m1_t vloxei32_v_uint64m1_tu (vuint64m1_t merge, const uint64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V64VUInt64VUSUVU_TU, loxei32_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt32) +// vuint64m1_t vloxei64_v_uint64m1_tu (vuint64m1_t merge, const uint64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V64VUInt64VUSUVU_TU, loxei64_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vfloat16m1_t vloxei8_v_float16m1_tu (vfloat16m1_t merge, const float16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V16VFloat16VFSFVU_TU, loxei8_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDUInt8) +// vfloat16m1_t vloxei16_v_float16m1_tu (vfloat16m1_t merge, const float16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V16VFloat16VFSFVU_TU, loxei16_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDUInt16) +// vfloat16m1_t vloxei32_v_float16m1_tu (vfloat16m1_t merge, const float16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V16VFloat16VFSFVU_TU, loxei32_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDUInt32) +// vfloat16m1_t vloxei64_v_float16m1_tu (vfloat16m1_t merge, const float16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V16VFloat16VFSFVU_TU, loxei64_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDUInt64) +// vfloat32m1_t vloxei8_v_float32m1_tu (vfloat32m1_t merge, const float32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V32VFloat32VFSFVU_TU, loxei8_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDUInt8) +// vfloat32m1_t vloxei16_v_float32m1_tu (vfloat32m1_t merge, const float32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V32VFloat32VFSFVU_TU, loxei16_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDUInt16) +// vfloat32m1_t vloxei32_v_float32m1_tu (vfloat32m1_t merge, const float32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V32VFloat32VFSFVU_TU, loxei32_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDUInt32) +// vfloat32m1_t vloxei64_v_float32m1_tu (vfloat32m1_t merge, const float32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V32VFloat32VFSFVU_TU, loxei64_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDUInt64) +// vfloat64m1_t vloxei8_v_float64m1_tu (vfloat64m1_t merge, const float64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V64VFloat64VFSFVU_TU, loxei8_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDUInt8) +// vfloat64m1_t vloxei16_v_float64m1_tu (vfloat64m1_t merge, const float64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V64VFloat64VFSFVU_TU, loxei16_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDUInt16) +// vfloat64m1_t vloxei32_v_float64m1_tu (vfloat64m1_t merge, const float64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V64VFloat64VFSFVU_TU, loxei32_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDUInt32) +// vfloat64m1_t vloxei64_v_float64m1_tu (vfloat64m1_t merge, const float64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V64VFloat64VFSFVU_TU, loxei64_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDUInt64) +// vint8m1_t vluxei8_v_int8m1_tu (vint8m1_t merge, const int8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V8VInt8VISIVU_TU, luxei8_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vluxei16_v_int8m1_tu (vint8m1_t merge, const int8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V8VInt8VISIVU_TU, luxei16_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDUInt16) +// vint8m1_t vluxei32_v_int8m1_tu (vint8m1_t merge, const int8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V8VInt8VISIVU_TU, luxei32_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDUInt32) +// vint8m1_t vluxei64_v_int8m1_tu (vint8m1_t merge, const int8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V8VInt8VISIVU_TU, luxei64_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt8, 3, OneDInt8, OneDInt8, OneDUInt64) +// vint16m1_t vluxei8_v_int16m1_tu (vint16m1_t merge, const int16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V16VInt16VISIVU_TU, luxei8_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDUInt8) +// vint16m1_t vluxei16_v_int16m1_tu (vint16m1_t merge, const int16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V16VInt16VISIVU_TU, luxei16_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vluxei32_v_int16m1_tu (vint16m1_t merge, const int16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V16VInt16VISIVU_TU, luxei32_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDUInt32) +// vint16m1_t vluxei64_v_int16m1_tu (vint16m1_t merge, const int16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V16VInt16VISIVU_TU, luxei64_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt16, 3, OneDInt16, OneDInt16, OneDUInt64) +// vint32m1_t vluxei8_v_int32m1_tu (vint32m1_t merge, const int32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V32VInt32VISIVU_TU, luxei8_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDUInt8) +// vint32m1_t vluxei16_v_int32m1_tu (vint32m1_t merge, const int32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V32VInt32VISIVU_TU, luxei16_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDUInt16) +// vint32m1_t vluxei32_v_int32m1_tu (vint32m1_t merge, const int32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V32VInt32VISIVU_TU, luxei32_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vluxei64_v_int32m1_tu (vint32m1_t merge, const int32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V32VInt32VISIVU_TU, luxei64_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt32, 3, OneDInt32, OneDInt32, OneDUInt64) +// vint64m1_t vluxei8_v_int64m1_tu (vint64m1_t merge, const int64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V64VInt64VISIVU_TU, luxei8_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDUInt8) +// vint64m1_t vluxei16_v_int64m1_tu (vint64m1_t merge, const int64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V64VInt64VISIVU_TU, luxei16_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDUInt16) +// vint64m1_t vluxei32_v_int64m1_tu (vint64m1_t merge, const int64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V64VInt64VISIVU_TU, luxei32_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDUInt32) +// vint64m1_t vluxei64_v_int64m1_tu (vint64m1_t merge, const int64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V64VInt64VISIVU_TU, luxei64_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDInt64, 3, OneDInt64, OneDInt64, OneDUInt64) +// vuint8m1_t vluxei8_v_uint8m1_tu (vuint8m1_t merge, const uint8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V8VUInt8VUSUVU_TU, luxei8_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vluxei16_v_uint8m1_tu (vuint8m1_t merge, const uint8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V8VUInt8VUSUVU_TU, luxei16_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt16) +// vuint8m1_t vluxei32_v_uint8m1_tu (vuint8m1_t merge, const uint8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V8VUInt8VUSUVU_TU, luxei32_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt32) +// vuint8m1_t vluxei64_v_uint8m1_tu (vuint8m1_t merge, const uint8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V8VUInt8VUSUVU_TU, luxei64_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt8, 3, OneDUInt8, OneDUInt8, OneDUInt64) +// vuint16m1_t vluxei8_v_uint16m1_tu (vuint16m1_t merge, const uint16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V16VUInt16VUSUVU_TU, luxei8_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt8) +// vuint16m1_t vluxei16_v_uint16m1_tu (vuint16m1_t merge, const uint16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V16VUInt16VUSUVU_TU, luxei16_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vluxei32_v_uint16m1_tu (vuint16m1_t merge, const uint16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V16VUInt16VUSUVU_TU, luxei32_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt32) +// vuint16m1_t vluxei64_v_uint16m1_tu (vuint16m1_t merge, const uint16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V16VUInt16VUSUVU_TU, luxei64_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt16, 3, OneDUInt16, OneDUInt16, OneDUInt64) +// vuint32m1_t vluxei8_v_uint32m1_tu (vuint32m1_t merge, const uint32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V32VUInt32VUSUVU_TU, luxei8_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt8) +// vuint32m1_t vluxei16_v_uint32m1_tu (vuint32m1_t merge, const uint32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V32VUInt32VUSUVU_TU, luxei16_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt16) +// vuint32m1_t vluxei32_v_uint32m1_tu (vuint32m1_t merge, const uint32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V32VUInt32VUSUVU_TU, luxei32_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vluxei64_v_uint32m1_tu (vuint32m1_t merge, const uint32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V32VUInt32VUSUVU_TU, luxei64_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt32, 3, OneDUInt32, OneDUInt32, OneDUInt64) +// vuint64m1_t vluxei8_v_uint64m1_tu (vuint64m1_t merge, const uint64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V64VUInt64VUSUVU_TU, luxei8_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt8) +// vuint64m1_t vluxei16_v_uint64m1_tu (vuint64m1_t merge, const uint64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V64VUInt64VUSUVU_TU, luxei16_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt16) +// vuint64m1_t vluxei32_v_uint64m1_tu (vuint64m1_t merge, const uint64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V64VUInt64VUSUVU_TU, luxei32_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt32) +// vuint64m1_t vluxei64_v_uint64m1_tu (vuint64m1_t merge, const uint64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V64VUInt64VUSUVU_TU, luxei64_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDUInt64, 3, OneDUInt64, OneDUInt64, OneDUInt64) +// vfloat16m1_t vluxei8_v_float16m1_tu (vfloat16m1_t merge, const float16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V16VFloat16VFSFVU_TU, luxei8_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDUInt8) +// vfloat16m1_t vluxei16_v_float16m1_tu (vfloat16m1_t merge, const float16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V16VFloat16VFSFVU_TU, luxei16_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDUInt16) +// vfloat16m1_t vluxei32_v_float16m1_tu (vfloat16m1_t merge, const float16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V16VFloat16VFSFVU_TU, luxei32_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDUInt32) +// vfloat16m1_t vluxei64_v_float16m1_tu (vfloat16m1_t merge, const float16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V16VFloat16VFSFVU_TU, luxei64_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat16, 3, OneDFloat16, OneDFloat16, OneDUInt64) +// vfloat32m1_t vluxei8_v_float32m1_tu (vfloat32m1_t merge, const float32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V32VFloat32VFSFVU_TU, luxei8_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDUInt8) +// vfloat32m1_t vluxei16_v_float32m1_tu (vfloat32m1_t merge, const float32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V32VFloat32VFSFVU_TU, luxei16_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDUInt16) +// vfloat32m1_t vluxei32_v_float32m1_tu (vfloat32m1_t merge, const float32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V32VFloat32VFSFVU_TU, luxei32_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDUInt32) +// vfloat32m1_t vluxei64_v_float32m1_tu (vfloat32m1_t merge, const float32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V32VFloat32VFSFVU_TU, luxei64_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat32, 3, OneDFloat32, OneDFloat32, OneDUInt64) +// vfloat64m1_t vluxei8_v_float64m1_tu (vfloat64m1_t merge, const float64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V64VFloat64VFSFVU_TU, luxei8_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDUInt8) +// vfloat64m1_t vluxei16_v_float64m1_tu (vfloat64m1_t merge, const float64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V64VFloat64VFSFVU_TU, luxei16_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDUInt16) +// vfloat64m1_t vluxei32_v_float64m1_tu (vfloat64m1_t merge, const float64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V64VFloat64VFSFVU_TU, luxei32_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDUInt32) +// vfloat64m1_t vluxei64_v_float64m1_tu (vfloat64m1_t merge, const float64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V64VFloat64VFSFVU_TU, luxei64_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailUndisturbed, OneDFloat64, 3, OneDFloat64, OneDFloat64, OneDUInt64) +// vint8m1_t vloxei8_v_int8m1_ta (const int8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V8VInt8SIVU_TA, loxei8_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDUInt8) +// vint8m1_t vloxei16_v_int8m1_ta (const int8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V8VInt8SIVU_TA, loxei16_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDUInt16) +// vint8m1_t vloxei32_v_int8m1_ta (const int8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V8VInt8SIVU_TA, loxei32_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDUInt32) +// vint8m1_t vloxei64_v_int8m1_ta (const int8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V8VInt8SIVU_TA, loxei64_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDUInt64) +// vint16m1_t vloxei8_v_int16m1_ta (const int16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V16VInt16SIVU_TA, loxei8_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDUInt8) +// vint16m1_t vloxei16_v_int16m1_ta (const int16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V16VInt16SIVU_TA, loxei16_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDUInt16) +// vint16m1_t vloxei32_v_int16m1_ta (const int16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V16VInt16SIVU_TA, loxei32_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDUInt32) +// vint16m1_t vloxei64_v_int16m1_ta (const int16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V16VInt16SIVU_TA, loxei64_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDUInt64) +// vint32m1_t vloxei8_v_int32m1_ta (const int32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V32VInt32SIVU_TA, loxei8_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDUInt8) +// vint32m1_t vloxei16_v_int32m1_ta (const int32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V32VInt32SIVU_TA, loxei16_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDUInt16) +// vint32m1_t vloxei32_v_int32m1_ta (const int32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V32VInt32SIVU_TA, loxei32_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDUInt32) +// vint32m1_t vloxei64_v_int32m1_ta (const int32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V32VInt32SIVU_TA, loxei64_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDUInt64) +// vint64m1_t vloxei8_v_int64m1_ta (const int64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V64VInt64SIVU_TA, loxei8_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDUInt8) +// vint64m1_t vloxei16_v_int64m1_ta (const int64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V64VInt64SIVU_TA, loxei16_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDUInt16) +// vint64m1_t vloxei32_v_int64m1_ta (const int64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V64VInt64SIVU_TA, loxei32_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDUInt32) +// vint64m1_t vloxei64_v_int64m1_ta (const int64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V64VInt64SIVU_TA, loxei64_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDUInt64) +// vuint8m1_t vloxei8_v_uint8m1_ta (const uint8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V8VUInt8SUVU_TA, loxei8_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint8m1_t vloxei16_v_uint8m1_ta (const uint8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V8VUInt8SUVU_TA, loxei16_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt16) +// vuint8m1_t vloxei32_v_uint8m1_ta (const uint8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V8VUInt8SUVU_TA, loxei32_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt32) +// vuint8m1_t vloxei64_v_uint8m1_ta (const uint8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V8VUInt8SUVU_TA, loxei64_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt64) +// vuint16m1_t vloxei8_v_uint16m1_ta (const uint16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V16VUInt16SUVU_TA, loxei8_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt8) +// vuint16m1_t vloxei16_v_uint16m1_ta (const uint16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V16VUInt16SUVU_TA, loxei16_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint16m1_t vloxei32_v_uint16m1_ta (const uint16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V16VUInt16SUVU_TA, loxei32_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt32) +// vuint16m1_t vloxei64_v_uint16m1_ta (const uint16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V16VUInt16SUVU_TA, loxei64_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt64) +// vuint32m1_t vloxei8_v_uint32m1_ta (const uint32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V32VUInt32SUVU_TA, loxei8_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt8) +// vuint32m1_t vloxei16_v_uint32m1_ta (const uint32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V32VUInt32SUVU_TA, loxei16_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt16) +// vuint32m1_t vloxei32_v_uint32m1_ta (const uint32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V32VUInt32SUVU_TA, loxei32_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint32m1_t vloxei64_v_uint32m1_ta (const uint32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V32VUInt32SUVU_TA, loxei64_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt64) +// vuint64m1_t vloxei8_v_uint64m1_ta (const uint64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V64VUInt64SUVU_TA, loxei8_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt8) +// vuint64m1_t vloxei16_v_uint64m1_ta (const uint64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V64VUInt64SUVU_TA, loxei16_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt16) +// vuint64m1_t vloxei32_v_uint64m1_ta (const uint64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V64VUInt64SUVU_TA, loxei32_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt32) +// vuint64m1_t vloxei64_v_uint64m1_ta (const uint64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V64VUInt64SUVU_TA, loxei64_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vfloat16m1_t vloxei8_v_float16m1_ta (const float16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V16VFloat16SFVU_TA, loxei8_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, OneDUInt8) +// vfloat16m1_t vloxei16_v_float16m1_ta (const float16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V16VFloat16SFVU_TA, loxei16_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, OneDUInt16) +// vfloat16m1_t vloxei32_v_float16m1_ta (const float16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V16VFloat16SFVU_TA, loxei32_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, OneDUInt32) +// vfloat16m1_t vloxei64_v_float16m1_ta (const float16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V16VFloat16SFVU_TA, loxei64_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, OneDUInt64) +// vfloat32m1_t vloxei8_v_float32m1_ta (const float32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V32VFloat32SFVU_TA, loxei8_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, OneDUInt8) +// vfloat32m1_t vloxei16_v_float32m1_ta (const float32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V32VFloat32SFVU_TA, loxei16_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, OneDUInt16) +// vfloat32m1_t vloxei32_v_float32m1_ta (const float32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V32VFloat32SFVU_TA, loxei32_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, OneDUInt32) +// vfloat32m1_t vloxei64_v_float32m1_ta (const float32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V32VFloat32SFVU_TA, loxei64_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, OneDUInt64) +// vfloat64m1_t vloxei8_v_float64m1_ta (const float64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V64VFloat64SFVU_TA, loxei8_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, OneDUInt8) +// vfloat64m1_t vloxei16_v_float64m1_ta (const float64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V64VFloat64SFVU_TA, loxei16_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, OneDUInt16) +// vfloat64m1_t vloxei32_v_float64m1_ta (const float64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V64VFloat64SFVU_TA, loxei32_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, OneDUInt32) +// vfloat64m1_t vloxei64_v_float64m1_ta (const float64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V64VFloat64SFVU_TA, loxei64_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, OneDUInt64) +// vint8m1_t vluxei8_v_int8m1_ta (const int8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V8VInt8SIVU_TA, luxei8_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDUInt8) +// vint8m1_t vluxei16_v_int8m1_ta (const int8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V8VInt8SIVU_TA, luxei16_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDUInt16) +// vint8m1_t vluxei32_v_int8m1_ta (const int8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V8VInt8SIVU_TA, luxei32_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDUInt32) +// vint8m1_t vluxei64_v_int8m1_ta (const int8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V8VInt8SIVU_TA, luxei64_v, 8, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt8, 2, OneDInt8, OneDUInt64) +// vint16m1_t vluxei8_v_int16m1_ta (const int16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V16VInt16SIVU_TA, luxei8_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDUInt8) +// vint16m1_t vluxei16_v_int16m1_ta (const int16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V16VInt16SIVU_TA, luxei16_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDUInt16) +// vint16m1_t vluxei32_v_int16m1_ta (const int16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V16VInt16SIVU_TA, luxei32_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDUInt32) +// vint16m1_t vluxei64_v_int16m1_ta (const int16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V16VInt16SIVU_TA, luxei64_v, 16, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt16, 2, OneDInt16, OneDUInt64) +// vint32m1_t vluxei8_v_int32m1_ta (const int32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V32VInt32SIVU_TA, luxei8_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDUInt8) +// vint32m1_t vluxei16_v_int32m1_ta (const int32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V32VInt32SIVU_TA, luxei16_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDUInt16) +// vint32m1_t vluxei32_v_int32m1_ta (const int32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V32VInt32SIVU_TA, luxei32_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDUInt32) +// vint32m1_t vluxei64_v_int32m1_ta (const int32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V32VInt32SIVU_TA, luxei64_v, 32, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt32, 2, OneDInt32, OneDUInt64) +// vint64m1_t vluxei8_v_int64m1_ta (const int64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V64VInt64SIVU_TA, luxei8_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDUInt8) +// vint64m1_t vluxei16_v_int64m1_ta (const int64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V64VInt64SIVU_TA, luxei16_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDUInt16) +// vint64m1_t vluxei32_v_int64m1_ta (const int64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V64VInt64SIVU_TA, luxei32_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDUInt32) +// vint64m1_t vluxei64_v_int64m1_ta (const int64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V64VInt64SIVU_TA, luxei64_v, 64, SIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDInt64, 2, OneDInt64, OneDUInt64) +// vuint8m1_t vluxei8_v_uint8m1_ta (const uint8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V8VUInt8SUVU_TA, luxei8_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt8) +// vuint8m1_t vluxei16_v_uint8m1_ta (const uint8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V8VUInt8SUVU_TA, luxei16_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt16) +// vuint8m1_t vluxei32_v_uint8m1_ta (const uint8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V8VUInt8SUVU_TA, luxei32_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt32) +// vuint8m1_t vluxei64_v_uint8m1_ta (const uint8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V8VUInt8SUVU_TA, luxei64_v, 8, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt8, 2, OneDUInt8, OneDUInt64) +// vuint16m1_t vluxei8_v_uint16m1_ta (const uint16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V16VUInt16SUVU_TA, luxei8_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt8) +// vuint16m1_t vluxei16_v_uint16m1_ta (const uint16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V16VUInt16SUVU_TA, luxei16_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt16) +// vuint16m1_t vluxei32_v_uint16m1_ta (const uint16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V16VUInt16SUVU_TA, luxei32_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt32) +// vuint16m1_t vluxei64_v_uint16m1_ta (const uint16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V16VUInt16SUVU_TA, luxei64_v, 16, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt16, 2, OneDUInt16, OneDUInt64) +// vuint32m1_t vluxei8_v_uint32m1_ta (const uint32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V32VUInt32SUVU_TA, luxei8_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt8) +// vuint32m1_t vluxei16_v_uint32m1_ta (const uint32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V32VUInt32SUVU_TA, luxei16_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt16) +// vuint32m1_t vluxei32_v_uint32m1_ta (const uint32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V32VUInt32SUVU_TA, luxei32_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt32) +// vuint32m1_t vluxei64_v_uint32m1_ta (const uint32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V32VUInt32SUVU_TA, luxei64_v, 32, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt32, 2, OneDUInt32, OneDUInt64) +// vuint64m1_t vluxei8_v_uint64m1_ta (const uint64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V64VUInt64SUVU_TA, luxei8_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt8) +// vuint64m1_t vluxei16_v_uint64m1_ta (const uint64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V64VUInt64SUVU_TA, luxei16_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt16) +// vuint64m1_t vluxei32_v_uint64m1_ta (const uint64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V64VUInt64SUVU_TA, luxei32_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt32) +// vuint64m1_t vluxei64_v_uint64m1_ta (const uint64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V64VUInt64SUVU_TA, luxei64_v, 64, UNSIGNED_INT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDUInt64, 2, OneDUInt64, OneDUInt64) +// vfloat16m1_t vluxei8_v_float16m1_ta (const float16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V16VFloat16SFVU_TA, luxei8_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, OneDUInt8) +// vfloat16m1_t vluxei16_v_float16m1_ta (const float16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V16VFloat16SFVU_TA, luxei16_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, OneDUInt16) +// vfloat16m1_t vluxei32_v_float16m1_ta (const float16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V16VFloat16SFVU_TA, luxei32_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, OneDUInt32) +// vfloat16m1_t vluxei64_v_float16m1_ta (const float16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V16VFloat16SFVU_TA, luxei64_v, 16, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat16, 2, OneDFloat16, OneDUInt64) +// vfloat32m1_t vluxei8_v_float32m1_ta (const float32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V32VFloat32SFVU_TA, luxei8_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, OneDUInt8) +// vfloat32m1_t vluxei16_v_float32m1_ta (const float32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V32VFloat32SFVU_TA, luxei16_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, OneDUInt16) +// vfloat32m1_t vluxei32_v_float32m1_ta (const float32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V32VFloat32SFVU_TA, luxei32_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, OneDUInt32) +// vfloat32m1_t vluxei64_v_float32m1_ta (const float32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V32VFloat32SFVU_TA, luxei64_v, 32, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat32, 2, OneDFloat32, OneDUInt64) +// vfloat64m1_t vluxei8_v_float64m1_ta (const float64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V64VFloat64SFVU_TA, luxei8_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, OneDUInt8) +// vfloat64m1_t vluxei16_v_float64m1_ta (const float64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V64VFloat64SFVU_TA, luxei16_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, OneDUInt16) +// vfloat64m1_t vluxei32_v_float64m1_ta (const float64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V64VFloat64SFVU_TA, luxei32_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, OneDUInt32) +// vfloat64m1_t vluxei64_v_float64m1_ta (const float64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V64VFloat64SFVU_TA, luxei64_v, 64, FLOAT, HaveVLParameter | NonmaskedOperation | LoadOperation | TailAgnostic, OneDFloat64, 2, OneDFloat64, OneDUInt64) +// vint8m1_t vloxei8_v_int8m1_tuma (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V8VInt8VBVISIVU_TUMA, loxei8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vloxei16_v_int8m1_tuma (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V8VInt8VBVISIVU_TUMA, loxei16_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt16) +// vint8m1_t vloxei32_v_int8m1_tuma (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V8VInt8VBVISIVU_TUMA, loxei32_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt32) +// vint8m1_t vloxei64_v_int8m1_tuma (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V8VInt8VBVISIVU_TUMA, loxei64_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt64) +// vint16m1_t vloxei8_v_int16m1_tuma (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V16VInt16VBVISIVU_TUMA, loxei8_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt8) +// vint16m1_t vloxei16_v_int16m1_tuma (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V16VInt16VBVISIVU_TUMA, loxei16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vloxei32_v_int16m1_tuma (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V16VInt16VBVISIVU_TUMA, loxei32_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt32) +// vint16m1_t vloxei64_v_int16m1_tuma (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V16VInt16VBVISIVU_TUMA, loxei64_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt64) +// vint32m1_t vloxei8_v_int32m1_tuma (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V32VInt32VBVISIVU_TUMA, loxei8_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt8) +// vint32m1_t vloxei16_v_int32m1_tuma (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V32VInt32VBVISIVU_TUMA, loxei16_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt16) +// vint32m1_t vloxei32_v_int32m1_tuma (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V32VInt32VBVISIVU_TUMA, loxei32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vloxei64_v_int32m1_tuma (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V32VInt32VBVISIVU_TUMA, loxei64_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt64) +// vint64m1_t vloxei8_v_int64m1_tuma (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V64VInt64VBVISIVU_TUMA, loxei8_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt8) +// vint64m1_t vloxei16_v_int64m1_tuma (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V64VInt64VBVISIVU_TUMA, loxei16_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt16) +// vint64m1_t vloxei32_v_int64m1_tuma (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V64VInt64VBVISIVU_TUMA, loxei32_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt32) +// vint64m1_t vloxei64_v_int64m1_tuma (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V64VInt64VBVISIVU_TUMA, loxei64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +// vuint8m1_t vloxei8_v_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V8VUInt8VBVUSUVU_TUMA, loxei8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vloxei16_v_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V8VUInt8VBVUSUVU_TUMA, loxei16_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt16) +// vuint8m1_t vloxei32_v_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V8VUInt8VBVUSUVU_TUMA, loxei32_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt32) +// vuint8m1_t vloxei64_v_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V8VUInt8VBVUSUVU_TUMA, loxei64_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt64) +// vuint16m1_t vloxei8_v_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V16VUInt16VBVUSUVU_TUMA, loxei8_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt8) +// vuint16m1_t vloxei16_v_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V16VUInt16VBVUSUVU_TUMA, loxei16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vloxei32_v_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V16VUInt16VBVUSUVU_TUMA, loxei32_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt32) +// vuint16m1_t vloxei64_v_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V16VUInt16VBVUSUVU_TUMA, loxei64_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt64) +// vuint32m1_t vloxei8_v_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V32VUInt32VBVUSUVU_TUMA, loxei8_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt8) +// vuint32m1_t vloxei16_v_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V32VUInt32VBVUSUVU_TUMA, loxei16_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt16) +// vuint32m1_t vloxei32_v_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V32VUInt32VBVUSUVU_TUMA, loxei32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vloxei64_v_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V32VUInt32VBVUSUVU_TUMA, loxei64_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt64) +// vuint64m1_t vloxei8_v_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V64VUInt64VBVUSUVU_TUMA, loxei8_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt8) +// vuint64m1_t vloxei16_v_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V64VUInt64VBVUSUVU_TUMA, loxei16_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt16) +// vuint64m1_t vloxei32_v_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V64VUInt64VBVUSUVU_TUMA, loxei32_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt32) +// vuint64m1_t vloxei64_v_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V64VUInt64VBVUSUVU_TUMA, loxei64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vfloat16m1_t vloxei8_v_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V16VFloat16VBVFSFVU_TUMA, loxei8_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt8) +// vfloat16m1_t vloxei16_v_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V16VFloat16VBVFSFVU_TUMA, loxei16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt16) +// vfloat16m1_t vloxei32_v_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V16VFloat16VBVFSFVU_TUMA, loxei32_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt32) +// vfloat16m1_t vloxei64_v_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V16VFloat16VBVFSFVU_TUMA, loxei64_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt64) +// vfloat32m1_t vloxei8_v_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V32VFloat32VBVFSFVU_TUMA, loxei8_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt8) +// vfloat32m1_t vloxei16_v_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V32VFloat32VBVFSFVU_TUMA, loxei16_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt16) +// vfloat32m1_t vloxei32_v_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V32VFloat32VBVFSFVU_TUMA, loxei32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt32) +// vfloat32m1_t vloxei64_v_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V32VFloat32VBVFSFVU_TUMA, loxei64_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt64) +// vfloat64m1_t vloxei8_v_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V64VFloat64VBVFSFVU_TUMA, loxei8_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt8) +// vfloat64m1_t vloxei16_v_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V64VFloat64VBVFSFVU_TUMA, loxei16_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt16) +// vfloat64m1_t vloxei32_v_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V64VFloat64VBVFSFVU_TUMA, loxei32_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt32) +// vfloat64m1_t vloxei64_v_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V64VFloat64VBVFSFVU_TUMA, loxei64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt64) +// vint8m1_t vluxei8_v_int8m1_tuma (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V8VInt8VBVISIVU_TUMA, luxei8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vluxei16_v_int8m1_tuma (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V8VInt8VBVISIVU_TUMA, luxei16_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt16) +// vint8m1_t vluxei32_v_int8m1_tuma (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V8VInt8VBVISIVU_TUMA, luxei32_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt32) +// vint8m1_t vluxei64_v_int8m1_tuma (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V8VInt8VBVISIVU_TUMA, luxei64_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt64) +// vint16m1_t vluxei8_v_int16m1_tuma (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V16VInt16VBVISIVU_TUMA, luxei8_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt8) +// vint16m1_t vluxei16_v_int16m1_tuma (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V16VInt16VBVISIVU_TUMA, luxei16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vluxei32_v_int16m1_tuma (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V16VInt16VBVISIVU_TUMA, luxei32_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt32) +// vint16m1_t vluxei64_v_int16m1_tuma (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V16VInt16VBVISIVU_TUMA, luxei64_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt64) +// vint32m1_t vluxei8_v_int32m1_tuma (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V32VInt32VBVISIVU_TUMA, luxei8_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt8) +// vint32m1_t vluxei16_v_int32m1_tuma (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V32VInt32VBVISIVU_TUMA, luxei16_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt16) +// vint32m1_t vluxei32_v_int32m1_tuma (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V32VInt32VBVISIVU_TUMA, luxei32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vluxei64_v_int32m1_tuma (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V32VInt32VBVISIVU_TUMA, luxei64_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt64) +// vint64m1_t vluxei8_v_int64m1_tuma (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V64VInt64VBVISIVU_TUMA, luxei8_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt8) +// vint64m1_t vluxei16_v_int64m1_tuma (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V64VInt64VBVISIVU_TUMA, luxei16_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt16) +// vint64m1_t vluxei32_v_int64m1_tuma (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V64VInt64VBVISIVU_TUMA, luxei32_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt32) +// vint64m1_t vluxei64_v_int64m1_tuma (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V64VInt64VBVISIVU_TUMA, luxei64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +// vuint8m1_t vluxei8_v_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V8VUInt8VBVUSUVU_TUMA, luxei8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vluxei16_v_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V8VUInt8VBVUSUVU_TUMA, luxei16_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt16) +// vuint8m1_t vluxei32_v_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V8VUInt8VBVUSUVU_TUMA, luxei32_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt32) +// vuint8m1_t vluxei64_v_uint8m1_tuma (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V8VUInt8VBVUSUVU_TUMA, luxei64_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt64) +// vuint16m1_t vluxei8_v_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V16VUInt16VBVUSUVU_TUMA, luxei8_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt8) +// vuint16m1_t vluxei16_v_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V16VUInt16VBVUSUVU_TUMA, luxei16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vluxei32_v_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V16VUInt16VBVUSUVU_TUMA, luxei32_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt32) +// vuint16m1_t vluxei64_v_uint16m1_tuma (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V16VUInt16VBVUSUVU_TUMA, luxei64_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt64) +// vuint32m1_t vluxei8_v_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V32VUInt32VBVUSUVU_TUMA, luxei8_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt8) +// vuint32m1_t vluxei16_v_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V32VUInt32VBVUSUVU_TUMA, luxei16_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt16) +// vuint32m1_t vluxei32_v_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V32VUInt32VBVUSUVU_TUMA, luxei32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vluxei64_v_uint32m1_tuma (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V32VUInt32VBVUSUVU_TUMA, luxei64_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt64) +// vuint64m1_t vluxei8_v_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V64VUInt64VBVUSUVU_TUMA, luxei8_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt8) +// vuint64m1_t vluxei16_v_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V64VUInt64VBVUSUVU_TUMA, luxei16_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt16) +// vuint64m1_t vluxei32_v_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V64VUInt64VBVUSUVU_TUMA, luxei32_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt32) +// vuint64m1_t vluxei64_v_uint64m1_tuma (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V64VUInt64VBVUSUVU_TUMA, luxei64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vfloat16m1_t vluxei8_v_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V16VFloat16VBVFSFVU_TUMA, luxei8_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt8) +// vfloat16m1_t vluxei16_v_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V16VFloat16VBVFSFVU_TUMA, luxei16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt16) +// vfloat16m1_t vluxei32_v_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V16VFloat16VBVFSFVU_TUMA, luxei32_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt32) +// vfloat16m1_t vluxei64_v_float16m1_tuma (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V16VFloat16VBVFSFVU_TUMA, luxei64_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt64) +// vfloat32m1_t vluxei8_v_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V32VFloat32VBVFSFVU_TUMA, luxei8_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt8) +// vfloat32m1_t vluxei16_v_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V32VFloat32VBVFSFVU_TUMA, luxei16_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt16) +// vfloat32m1_t vluxei32_v_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V32VFloat32VBVFSFVU_TUMA, luxei32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt32) +// vfloat32m1_t vluxei64_v_float32m1_tuma (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V32VFloat32VBVFSFVU_TUMA, luxei64_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt64) +// vfloat64m1_t vluxei8_v_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V64VFloat64VBVFSFVU_TUMA, luxei8_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt8) +// vfloat64m1_t vluxei16_v_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V64VFloat64VBVFSFVU_TUMA, luxei16_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt16) +// vfloat64m1_t vluxei32_v_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V64VFloat64VBVFSFVU_TUMA, luxei32_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt32) +// vfloat64m1_t vluxei64_v_float64m1_tuma (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V64VFloat64VBVFSFVU_TUMA, luxei64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskAgnostic, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt64) +// vint8m1_t vloxei8_v_int8m1_tumu (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V8VInt8VBVISIVU_TUMU, loxei8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vloxei16_v_int8m1_tumu (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V8VInt8VBVISIVU_TUMU, loxei16_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt16) +// vint8m1_t vloxei32_v_int8m1_tumu (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V8VInt8VBVISIVU_TUMU, loxei32_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt32) +// vint8m1_t vloxei64_v_int8m1_tumu (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V8VInt8VBVISIVU_TUMU, loxei64_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt64) +// vint16m1_t vloxei8_v_int16m1_tumu (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V16VInt16VBVISIVU_TUMU, loxei8_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt8) +// vint16m1_t vloxei16_v_int16m1_tumu (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V16VInt16VBVISIVU_TUMU, loxei16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vloxei32_v_int16m1_tumu (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V16VInt16VBVISIVU_TUMU, loxei32_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt32) +// vint16m1_t vloxei64_v_int16m1_tumu (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V16VInt16VBVISIVU_TUMU, loxei64_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt64) +// vint32m1_t vloxei8_v_int32m1_tumu (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V32VInt32VBVISIVU_TUMU, loxei8_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt8) +// vint32m1_t vloxei16_v_int32m1_tumu (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V32VInt32VBVISIVU_TUMU, loxei16_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt16) +// vint32m1_t vloxei32_v_int32m1_tumu (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V32VInt32VBVISIVU_TUMU, loxei32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vloxei64_v_int32m1_tumu (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V32VInt32VBVISIVU_TUMU, loxei64_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt64) +// vint64m1_t vloxei8_v_int64m1_tumu (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V64VInt64VBVISIVU_TUMU, loxei8_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt8) +// vint64m1_t vloxei16_v_int64m1_tumu (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V64VInt64VBVISIVU_TUMU, loxei16_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt16) +// vint64m1_t vloxei32_v_int64m1_tumu (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V64VInt64VBVISIVU_TUMU, loxei32_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt32) +// vint64m1_t vloxei64_v_int64m1_tumu (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V64VInt64VBVISIVU_TUMU, loxei64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +// vuint8m1_t vloxei8_v_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V8VUInt8VBVUSUVU_TUMU, loxei8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vloxei16_v_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V8VUInt8VBVUSUVU_TUMU, loxei16_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt16) +// vuint8m1_t vloxei32_v_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V8VUInt8VBVUSUVU_TUMU, loxei32_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt32) +// vuint8m1_t vloxei64_v_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V8VUInt8VBVUSUVU_TUMU, loxei64_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt64) +// vuint16m1_t vloxei8_v_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V16VUInt16VBVUSUVU_TUMU, loxei8_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt8) +// vuint16m1_t vloxei16_v_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V16VUInt16VBVUSUVU_TUMU, loxei16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vloxei32_v_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V16VUInt16VBVUSUVU_TUMU, loxei32_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt32) +// vuint16m1_t vloxei64_v_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V16VUInt16VBVUSUVU_TUMU, loxei64_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt64) +// vuint32m1_t vloxei8_v_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V32VUInt32VBVUSUVU_TUMU, loxei8_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt8) +// vuint32m1_t vloxei16_v_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V32VUInt32VBVUSUVU_TUMU, loxei16_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt16) +// vuint32m1_t vloxei32_v_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V32VUInt32VBVUSUVU_TUMU, loxei32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vloxei64_v_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V32VUInt32VBVUSUVU_TUMU, loxei64_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt64) +// vuint64m1_t vloxei8_v_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V64VUInt64VBVUSUVU_TUMU, loxei8_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt8) +// vuint64m1_t vloxei16_v_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V64VUInt64VBVUSUVU_TUMU, loxei16_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt16) +// vuint64m1_t vloxei32_v_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V64VUInt64VBVUSUVU_TUMU, loxei32_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt32) +// vuint64m1_t vloxei64_v_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V64VUInt64VBVUSUVU_TUMU, loxei64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vfloat16m1_t vloxei8_v_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V16VFloat16VBVFSFVU_TUMU, loxei8_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt8) +// vfloat16m1_t vloxei16_v_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V16VFloat16VBVFSFVU_TUMU, loxei16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt16) +// vfloat16m1_t vloxei32_v_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V16VFloat16VBVFSFVU_TUMU, loxei32_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt32) +// vfloat16m1_t vloxei64_v_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V16VFloat16VBVFSFVU_TUMU, loxei64_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt64) +// vfloat32m1_t vloxei8_v_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V32VFloat32VBVFSFVU_TUMU, loxei8_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt8) +// vfloat32m1_t vloxei16_v_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V32VFloat32VBVFSFVU_TUMU, loxei16_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt16) +// vfloat32m1_t vloxei32_v_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V32VFloat32VBVFSFVU_TUMU, loxei32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt32) +// vfloat32m1_t vloxei64_v_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V32VFloat32VBVFSFVU_TUMU, loxei64_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt64) +// vfloat64m1_t vloxei8_v_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V64VFloat64VBVFSFVU_TUMU, loxei8_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt8) +// vfloat64m1_t vloxei16_v_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V64VFloat64VBVFSFVU_TUMU, loxei16_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt16) +// vfloat64m1_t vloxei32_v_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V64VFloat64VBVFSFVU_TUMU, loxei32_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt32) +// vfloat64m1_t vloxei64_v_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V64VFloat64VBVFSFVU_TUMU, loxei64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt64) +// vint8m1_t vluxei8_v_int8m1_tumu (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V8VInt8VBVISIVU_TUMU, luxei8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vluxei16_v_int8m1_tumu (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V8VInt8VBVISIVU_TUMU, luxei16_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt16) +// vint8m1_t vluxei32_v_int8m1_tumu (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V8VInt8VBVISIVU_TUMU, luxei32_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt32) +// vint8m1_t vluxei64_v_int8m1_tumu (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V8VInt8VBVISIVU_TUMU, luxei64_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt64) +// vint16m1_t vluxei8_v_int16m1_tumu (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V16VInt16VBVISIVU_TUMU, luxei8_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt8) +// vint16m1_t vluxei16_v_int16m1_tumu (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V16VInt16VBVISIVU_TUMU, luxei16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vluxei32_v_int16m1_tumu (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V16VInt16VBVISIVU_TUMU, luxei32_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt32) +// vint16m1_t vluxei64_v_int16m1_tumu (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V16VInt16VBVISIVU_TUMU, luxei64_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt64) +// vint32m1_t vluxei8_v_int32m1_tumu (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V32VInt32VBVISIVU_TUMU, luxei8_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt8) +// vint32m1_t vluxei16_v_int32m1_tumu (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V32VInt32VBVISIVU_TUMU, luxei16_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt16) +// vint32m1_t vluxei32_v_int32m1_tumu (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V32VInt32VBVISIVU_TUMU, luxei32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vluxei64_v_int32m1_tumu (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V32VInt32VBVISIVU_TUMU, luxei64_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt64) +// vint64m1_t vluxei8_v_int64m1_tumu (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V64VInt64VBVISIVU_TUMU, luxei8_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt8) +// vint64m1_t vluxei16_v_int64m1_tumu (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V64VInt64VBVISIVU_TUMU, luxei16_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt16) +// vint64m1_t vluxei32_v_int64m1_tumu (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V64VInt64VBVISIVU_TUMU, luxei32_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt32) +// vint64m1_t vluxei64_v_int64m1_tumu (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V64VInt64VBVISIVU_TUMU, luxei64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +// vuint8m1_t vluxei8_v_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V8VUInt8VBVUSUVU_TUMU, luxei8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vluxei16_v_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V8VUInt8VBVUSUVU_TUMU, luxei16_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt16) +// vuint8m1_t vluxei32_v_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V8VUInt8VBVUSUVU_TUMU, luxei32_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt32) +// vuint8m1_t vluxei64_v_uint8m1_tumu (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V8VUInt8VBVUSUVU_TUMU, luxei64_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt64) +// vuint16m1_t vluxei8_v_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V16VUInt16VBVUSUVU_TUMU, luxei8_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt8) +// vuint16m1_t vluxei16_v_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V16VUInt16VBVUSUVU_TUMU, luxei16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vluxei32_v_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V16VUInt16VBVUSUVU_TUMU, luxei32_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt32) +// vuint16m1_t vluxei64_v_uint16m1_tumu (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V16VUInt16VBVUSUVU_TUMU, luxei64_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt64) +// vuint32m1_t vluxei8_v_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V32VUInt32VBVUSUVU_TUMU, luxei8_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt8) +// vuint32m1_t vluxei16_v_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V32VUInt32VBVUSUVU_TUMU, luxei16_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt16) +// vuint32m1_t vluxei32_v_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V32VUInt32VBVUSUVU_TUMU, luxei32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vluxei64_v_uint32m1_tumu (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V32VUInt32VBVUSUVU_TUMU, luxei64_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt64) +// vuint64m1_t vluxei8_v_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V64VUInt64VBVUSUVU_TUMU, luxei8_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt8) +// vuint64m1_t vluxei16_v_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V64VUInt64VBVUSUVU_TUMU, luxei16_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt16) +// vuint64m1_t vluxei32_v_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V64VUInt64VBVUSUVU_TUMU, luxei32_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt32) +// vuint64m1_t vluxei64_v_uint64m1_tumu (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V64VUInt64VBVUSUVU_TUMU, luxei64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vfloat16m1_t vluxei8_v_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V16VFloat16VBVFSFVU_TUMU, luxei8_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt8) +// vfloat16m1_t vluxei16_v_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V16VFloat16VBVFSFVU_TUMU, luxei16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt16) +// vfloat16m1_t vluxei32_v_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V16VFloat16VBVFSFVU_TUMU, luxei32_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt32) +// vfloat16m1_t vluxei64_v_float16m1_tumu (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V16VFloat16VBVFSFVU_TUMU, luxei64_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt64) +// vfloat32m1_t vluxei8_v_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V32VFloat32VBVFSFVU_TUMU, luxei8_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt8) +// vfloat32m1_t vluxei16_v_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V32VFloat32VBVFSFVU_TUMU, luxei16_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt16) +// vfloat32m1_t vluxei32_v_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V32VFloat32VBVFSFVU_TUMU, luxei32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt32) +// vfloat32m1_t vluxei64_v_float32m1_tumu (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V32VFloat32VBVFSFVU_TUMU, luxei64_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt64) +// vfloat64m1_t vluxei8_v_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V64VFloat64VBVFSFVU_TUMU, luxei8_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt8) +// vfloat64m1_t vluxei16_v_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V64VFloat64VBVFSFVU_TUMU, luxei16_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt16) +// vfloat64m1_t vluxei32_v_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V64VFloat64VBVFSFVU_TUMU, luxei32_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt32) +// vfloat64m1_t vluxei64_v_float64m1_tumu (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V64VFloat64VBVFSFVU_TUMU, luxei64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailUndisturbed | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt64) +// vint8m1_t vloxei8_v_int8m1_tama (vbool8_t mask, const int8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V8VInt8VBSIVU_TAMA, loxei8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDUInt8) +// vint8m1_t vloxei16_v_int8m1_tama (vbool8_t mask, const int8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V8VInt8VBSIVU_TAMA, loxei16_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDUInt16) +// vint8m1_t vloxei32_v_int8m1_tama (vbool8_t mask, const int8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V8VInt8VBSIVU_TAMA, loxei32_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDUInt32) +// vint8m1_t vloxei64_v_int8m1_tama (vbool8_t mask, const int8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V8VInt8VBSIVU_TAMA, loxei64_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDUInt64) +// vint16m1_t vloxei8_v_int16m1_tama (vbool16_t mask, const int16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V16VInt16VBSIVU_TAMA, loxei8_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDUInt8) +// vint16m1_t vloxei16_v_int16m1_tama (vbool16_t mask, const int16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V16VInt16VBSIVU_TAMA, loxei16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDUInt16) +// vint16m1_t vloxei32_v_int16m1_tama (vbool16_t mask, const int16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V16VInt16VBSIVU_TAMA, loxei32_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDUInt32) +// vint16m1_t vloxei64_v_int16m1_tama (vbool16_t mask, const int16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V16VInt16VBSIVU_TAMA, loxei64_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDUInt64) +// vint32m1_t vloxei8_v_int32m1_tama (vbool32_t mask, const int32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V32VInt32VBSIVU_TAMA, loxei8_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDUInt8) +// vint32m1_t vloxei16_v_int32m1_tama (vbool32_t mask, const int32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V32VInt32VBSIVU_TAMA, loxei16_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDUInt16) +// vint32m1_t vloxei32_v_int32m1_tama (vbool32_t mask, const int32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V32VInt32VBSIVU_TAMA, loxei32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDUInt32) +// vint32m1_t vloxei64_v_int32m1_tama (vbool32_t mask, const int32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V32VInt32VBSIVU_TAMA, loxei64_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDUInt64) +// vint64m1_t vloxei8_v_int64m1_tama (vbool64_t mask, const int64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V64VInt64VBSIVU_TAMA, loxei8_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDUInt8) +// vint64m1_t vloxei16_v_int64m1_tama (vbool64_t mask, const int64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V64VInt64VBSIVU_TAMA, loxei16_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDUInt16) +// vint64m1_t vloxei32_v_int64m1_tama (vbool64_t mask, const int64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V64VInt64VBSIVU_TAMA, loxei32_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDUInt32) +// vint64m1_t vloxei64_v_int64m1_tama (vbool64_t mask, const int64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V64VInt64VBSIVU_TAMA, loxei64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDUInt64) +// vuint8m1_t vloxei8_v_uint8m1_tama (vbool8_t mask, const uint8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V8VUInt8VBSUVU_TAMA, loxei8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint8m1_t vloxei16_v_uint8m1_tama (vbool8_t mask, const uint8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V8VUInt8VBSUVU_TAMA, loxei16_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt16) +// vuint8m1_t vloxei32_v_uint8m1_tama (vbool8_t mask, const uint8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V8VUInt8VBSUVU_TAMA, loxei32_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt32) +// vuint8m1_t vloxei64_v_uint8m1_tama (vbool8_t mask, const uint8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V8VUInt8VBSUVU_TAMA, loxei64_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt64) +// vuint16m1_t vloxei8_v_uint16m1_tama (vbool16_t mask, const uint16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V16VUInt16VBSUVU_TAMA, loxei8_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt8) +// vuint16m1_t vloxei16_v_uint16m1_tama (vbool16_t mask, const uint16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V16VUInt16VBSUVU_TAMA, loxei16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint16m1_t vloxei32_v_uint16m1_tama (vbool16_t mask, const uint16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V16VUInt16VBSUVU_TAMA, loxei32_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt32) +// vuint16m1_t vloxei64_v_uint16m1_tama (vbool16_t mask, const uint16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V16VUInt16VBSUVU_TAMA, loxei64_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt64) +// vuint32m1_t vloxei8_v_uint32m1_tama (vbool32_t mask, const uint32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V32VUInt32VBSUVU_TAMA, loxei8_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt8) +// vuint32m1_t vloxei16_v_uint32m1_tama (vbool32_t mask, const uint32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V32VUInt32VBSUVU_TAMA, loxei16_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt16) +// vuint32m1_t vloxei32_v_uint32m1_tama (vbool32_t mask, const uint32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V32VUInt32VBSUVU_TAMA, loxei32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint32m1_t vloxei64_v_uint32m1_tama (vbool32_t mask, const uint32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V32VUInt32VBSUVU_TAMA, loxei64_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt64) +// vuint64m1_t vloxei8_v_uint64m1_tama (vbool64_t mask, const uint64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V64VUInt64VBSUVU_TAMA, loxei8_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt8) +// vuint64m1_t vloxei16_v_uint64m1_tama (vbool64_t mask, const uint64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V64VUInt64VBSUVU_TAMA, loxei16_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt16) +// vuint64m1_t vloxei32_v_uint64m1_tama (vbool64_t mask, const uint64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V64VUInt64VBSUVU_TAMA, loxei32_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt32) +// vuint64m1_t vloxei64_v_uint64m1_tama (vbool64_t mask, const uint64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V64VUInt64VBSUVU_TAMA, loxei64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vfloat16m1_t vloxei8_v_float16m1_tama (vbool16_t mask, const float16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V16VFloat16VBSFVU_TAMA, loxei8_v, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt8) +// vfloat16m1_t vloxei16_v_float16m1_tama (vbool16_t mask, const float16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V16VFloat16VBSFVU_TAMA, loxei16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt16) +// vfloat16m1_t vloxei32_v_float16m1_tama (vbool16_t mask, const float16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V16VFloat16VBSFVU_TAMA, loxei32_v, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt32) +// vfloat16m1_t vloxei64_v_float16m1_tama (vbool16_t mask, const float16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V16VFloat16VBSFVU_TAMA, loxei64_v, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt64) +// vfloat32m1_t vloxei8_v_float32m1_tama (vbool32_t mask, const float32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V32VFloat32VBSFVU_TAMA, loxei8_v, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt8) +// vfloat32m1_t vloxei16_v_float32m1_tama (vbool32_t mask, const float32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V32VFloat32VBSFVU_TAMA, loxei16_v, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt16) +// vfloat32m1_t vloxei32_v_float32m1_tama (vbool32_t mask, const float32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V32VFloat32VBSFVU_TAMA, loxei32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt32) +// vfloat32m1_t vloxei64_v_float32m1_tama (vbool32_t mask, const float32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V32VFloat32VBSFVU_TAMA, loxei64_v, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt64) +// vfloat64m1_t vloxei8_v_float64m1_tama (vbool64_t mask, const float64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V64VFloat64VBSFVU_TAMA, loxei8_v, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDUInt8) +// vfloat64m1_t vloxei16_v_float64m1_tama (vbool64_t mask, const float64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V64VFloat64VBSFVU_TAMA, loxei16_v, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDUInt16) +// vfloat64m1_t vloxei32_v_float64m1_tama (vbool64_t mask, const float64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V64VFloat64VBSFVU_TAMA, loxei32_v, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDUInt32) +// vfloat64m1_t vloxei64_v_float64m1_tama (vbool64_t mask, const float64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V64VFloat64VBSFVU_TAMA, loxei64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDUInt64) +// vint8m1_t vluxei8_v_int8m1_tama (vbool8_t mask, const int8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V8VInt8VBSIVU_TAMA, luxei8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDUInt8) +// vint8m1_t vluxei16_v_int8m1_tama (vbool8_t mask, const int8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V8VInt8VBSIVU_TAMA, luxei16_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDUInt16) +// vint8m1_t vluxei32_v_int8m1_tama (vbool8_t mask, const int8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V8VInt8VBSIVU_TAMA, luxei32_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDUInt32) +// vint8m1_t vluxei64_v_int8m1_tama (vbool8_t mask, const int8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V8VInt8VBSIVU_TAMA, luxei64_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt8, 3, OneDBool, OneDInt8, OneDUInt64) +// vint16m1_t vluxei8_v_int16m1_tama (vbool16_t mask, const int16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V16VInt16VBSIVU_TAMA, luxei8_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDUInt8) +// vint16m1_t vluxei16_v_int16m1_tama (vbool16_t mask, const int16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V16VInt16VBSIVU_TAMA, luxei16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDUInt16) +// vint16m1_t vluxei32_v_int16m1_tama (vbool16_t mask, const int16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V16VInt16VBSIVU_TAMA, luxei32_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDUInt32) +// vint16m1_t vluxei64_v_int16m1_tama (vbool16_t mask, const int16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V16VInt16VBSIVU_TAMA, luxei64_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt16, 3, OneDBool, OneDInt16, OneDUInt64) +// vint32m1_t vluxei8_v_int32m1_tama (vbool32_t mask, const int32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V32VInt32VBSIVU_TAMA, luxei8_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDUInt8) +// vint32m1_t vluxei16_v_int32m1_tama (vbool32_t mask, const int32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V32VInt32VBSIVU_TAMA, luxei16_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDUInt16) +// vint32m1_t vluxei32_v_int32m1_tama (vbool32_t mask, const int32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V32VInt32VBSIVU_TAMA, luxei32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDUInt32) +// vint32m1_t vluxei64_v_int32m1_tama (vbool32_t mask, const int32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V32VInt32VBSIVU_TAMA, luxei64_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt32, 3, OneDBool, OneDInt32, OneDUInt64) +// vint64m1_t vluxei8_v_int64m1_tama (vbool64_t mask, const int64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V64VInt64VBSIVU_TAMA, luxei8_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDUInt8) +// vint64m1_t vluxei16_v_int64m1_tama (vbool64_t mask, const int64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V64VInt64VBSIVU_TAMA, luxei16_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDUInt16) +// vint64m1_t vluxei32_v_int64m1_tama (vbool64_t mask, const int64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V64VInt64VBSIVU_TAMA, luxei32_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDUInt32) +// vint64m1_t vluxei64_v_int64m1_tama (vbool64_t mask, const int64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V64VInt64VBSIVU_TAMA, luxei64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDInt64, 3, OneDBool, OneDInt64, OneDUInt64) +// vuint8m1_t vluxei8_v_uint8m1_tama (vbool8_t mask, const uint8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V8VUInt8VBSUVU_TAMA, luxei8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt8) +// vuint8m1_t vluxei16_v_uint8m1_tama (vbool8_t mask, const uint8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V8VUInt8VBSUVU_TAMA, luxei16_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt16) +// vuint8m1_t vluxei32_v_uint8m1_tama (vbool8_t mask, const uint8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V8VUInt8VBSUVU_TAMA, luxei32_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt32) +// vuint8m1_t vluxei64_v_uint8m1_tama (vbool8_t mask, const uint8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V8VUInt8VBSUVU_TAMA, luxei64_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt8, 3, OneDBool, OneDUInt8, OneDUInt64) +// vuint16m1_t vluxei8_v_uint16m1_tama (vbool16_t mask, const uint16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V16VUInt16VBSUVU_TAMA, luxei8_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt8) +// vuint16m1_t vluxei16_v_uint16m1_tama (vbool16_t mask, const uint16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V16VUInt16VBSUVU_TAMA, luxei16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt16) +// vuint16m1_t vluxei32_v_uint16m1_tama (vbool16_t mask, const uint16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V16VUInt16VBSUVU_TAMA, luxei32_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt32) +// vuint16m1_t vluxei64_v_uint16m1_tama (vbool16_t mask, const uint16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V16VUInt16VBSUVU_TAMA, luxei64_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt16, 3, OneDBool, OneDUInt16, OneDUInt64) +// vuint32m1_t vluxei8_v_uint32m1_tama (vbool32_t mask, const uint32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V32VUInt32VBSUVU_TAMA, luxei8_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt8) +// vuint32m1_t vluxei16_v_uint32m1_tama (vbool32_t mask, const uint32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V32VUInt32VBSUVU_TAMA, luxei16_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt16) +// vuint32m1_t vluxei32_v_uint32m1_tama (vbool32_t mask, const uint32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V32VUInt32VBSUVU_TAMA, luxei32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt32) +// vuint32m1_t vluxei64_v_uint32m1_tama (vbool32_t mask, const uint32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V32VUInt32VBSUVU_TAMA, luxei64_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt32, 3, OneDBool, OneDUInt32, OneDUInt64) +// vuint64m1_t vluxei8_v_uint64m1_tama (vbool64_t mask, const uint64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V64VUInt64VBSUVU_TAMA, luxei8_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt8) +// vuint64m1_t vluxei16_v_uint64m1_tama (vbool64_t mask, const uint64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V64VUInt64VBSUVU_TAMA, luxei16_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt16) +// vuint64m1_t vluxei32_v_uint64m1_tama (vbool64_t mask, const uint64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V64VUInt64VBSUVU_TAMA, luxei32_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt32) +// vuint64m1_t vluxei64_v_uint64m1_tama (vbool64_t mask, const uint64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V64VUInt64VBSUVU_TAMA, luxei64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDUInt64, 3, OneDBool, OneDUInt64, OneDUInt64) +// vfloat16m1_t vluxei8_v_float16m1_tama (vbool16_t mask, const float16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V16VFloat16VBSFVU_TAMA, luxei8_v, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt8) +// vfloat16m1_t vluxei16_v_float16m1_tama (vbool16_t mask, const float16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V16VFloat16VBSFVU_TAMA, luxei16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt16) +// vfloat16m1_t vluxei32_v_float16m1_tama (vbool16_t mask, const float16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V16VFloat16VBSFVU_TAMA, luxei32_v, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt32) +// vfloat16m1_t vluxei64_v_float16m1_tama (vbool16_t mask, const float16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V16VFloat16VBSFVU_TAMA, luxei64_v, 16, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat16, 3, OneDBool, OneDFloat16, OneDUInt64) +// vfloat32m1_t vluxei8_v_float32m1_tama (vbool32_t mask, const float32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V32VFloat32VBSFVU_TAMA, luxei8_v, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt8) +// vfloat32m1_t vluxei16_v_float32m1_tama (vbool32_t mask, const float32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V32VFloat32VBSFVU_TAMA, luxei16_v, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt16) +// vfloat32m1_t vluxei32_v_float32m1_tama (vbool32_t mask, const float32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V32VFloat32VBSFVU_TAMA, luxei32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt32) +// vfloat32m1_t vluxei64_v_float32m1_tama (vbool32_t mask, const float32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V32VFloat32VBSFVU_TAMA, luxei64_v, 32, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat32, 3, OneDBool, OneDFloat32, OneDUInt64) +// vfloat64m1_t vluxei8_v_float64m1_tama (vbool64_t mask, const float64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V64VFloat64VBSFVU_TAMA, luxei8_v, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDUInt8) +// vfloat64m1_t vluxei16_v_float64m1_tama (vbool64_t mask, const float64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V64VFloat64VBSFVU_TAMA, luxei16_v, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDUInt16) +// vfloat64m1_t vluxei32_v_float64m1_tama (vbool64_t mask, const float64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V64VFloat64VBSFVU_TAMA, luxei32_v, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDUInt32) +// vfloat64m1_t vluxei64_v_float64m1_tama (vbool64_t mask, const float64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V64VFloat64VBSFVU_TAMA, luxei64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | NoMaskedOff | LoadOperation | TailAgnostic | MaskAgnostic, OneDFloat64, 3, OneDBool, OneDFloat64, OneDUInt64) +// vint8m1_t vloxei8_v_int8m1_tamu (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V8VInt8VBVISIVU_TAMU, loxei8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vloxei16_v_int8m1_tamu (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V8VInt8VBVISIVU_TAMU, loxei16_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt16) +// vint8m1_t vloxei32_v_int8m1_tamu (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V8VInt8VBVISIVU_TAMU, loxei32_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt32) +// vint8m1_t vloxei64_v_int8m1_tamu (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V8VInt8VBVISIVU_TAMU, loxei64_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt64) +// vint16m1_t vloxei8_v_int16m1_tamu (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V16VInt16VBVISIVU_TAMU, loxei8_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt8) +// vint16m1_t vloxei16_v_int16m1_tamu (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V16VInt16VBVISIVU_TAMU, loxei16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vloxei32_v_int16m1_tamu (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V16VInt16VBVISIVU_TAMU, loxei32_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt32) +// vint16m1_t vloxei64_v_int16m1_tamu (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V16VInt16VBVISIVU_TAMU, loxei64_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt64) +// vint32m1_t vloxei8_v_int32m1_tamu (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V32VInt32VBVISIVU_TAMU, loxei8_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt8) +// vint32m1_t vloxei16_v_int32m1_tamu (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V32VInt32VBVISIVU_TAMU, loxei16_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt16) +// vint32m1_t vloxei32_v_int32m1_tamu (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V32VInt32VBVISIVU_TAMU, loxei32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vloxei64_v_int32m1_tamu (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V32VInt32VBVISIVU_TAMU, loxei64_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt64) +// vint64m1_t vloxei8_v_int64m1_tamu (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V64VInt64VBVISIVU_TAMU, loxei8_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt8) +// vint64m1_t vloxei16_v_int64m1_tamu (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V64VInt64VBVISIVU_TAMU, loxei16_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt16) +// vint64m1_t vloxei32_v_int64m1_tamu (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V64VInt64VBVISIVU_TAMU, loxei32_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt32) +// vint64m1_t vloxei64_v_int64m1_tamu (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V64VInt64VBVISIVU_TAMU, loxei64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +// vuint8m1_t vloxei8_v_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V8VUInt8VBVUSUVU_TAMU, loxei8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vloxei16_v_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V8VUInt8VBVUSUVU_TAMU, loxei16_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt16) +// vuint8m1_t vloxei32_v_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V8VUInt8VBVUSUVU_TAMU, loxei32_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt32) +// vuint8m1_t vloxei64_v_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V8VUInt8VBVUSUVU_TAMU, loxei64_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt64) +// vuint16m1_t vloxei8_v_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V16VUInt16VBVUSUVU_TAMU, loxei8_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt8) +// vuint16m1_t vloxei16_v_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V16VUInt16VBVUSUVU_TAMU, loxei16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vloxei32_v_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V16VUInt16VBVUSUVU_TAMU, loxei32_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt32) +// vuint16m1_t vloxei64_v_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V16VUInt16VBVUSUVU_TAMU, loxei64_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt64) +// vuint32m1_t vloxei8_v_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V32VUInt32VBVUSUVU_TAMU, loxei8_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt8) +// vuint32m1_t vloxei16_v_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V32VUInt32VBVUSUVU_TAMU, loxei16_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt16) +// vuint32m1_t vloxei32_v_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V32VUInt32VBVUSUVU_TAMU, loxei32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vloxei64_v_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V32VUInt32VBVUSUVU_TAMU, loxei64_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt64) +// vuint64m1_t vloxei8_v_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V64VUInt64VBVUSUVU_TAMU, loxei8_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt8) +// vuint64m1_t vloxei16_v_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V64VUInt64VBVUSUVU_TAMU, loxei16_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt16) +// vuint64m1_t vloxei32_v_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V64VUInt64VBVUSUVU_TAMU, loxei32_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt32) +// vuint64m1_t vloxei64_v_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V64VUInt64VBVUSUVU_TAMU, loxei64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vfloat16m1_t vloxei8_v_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V16VFloat16VBVFSFVU_TAMU, loxei8_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt8) +// vfloat16m1_t vloxei16_v_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V16VFloat16VBVFSFVU_TAMU, loxei16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt16) +// vfloat16m1_t vloxei32_v_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V16VFloat16VBVFSFVU_TAMU, loxei32_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt32) +// vfloat16m1_t vloxei64_v_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V16VFloat16VBVFSFVU_TAMU, loxei64_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt64) +// vfloat32m1_t vloxei8_v_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V32VFloat32VBVFSFVU_TAMU, loxei8_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt8) +// vfloat32m1_t vloxei16_v_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V32VFloat32VBVFSFVU_TAMU, loxei16_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt16) +// vfloat32m1_t vloxei32_v_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V32VFloat32VBVFSFVU_TAMU, loxei32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt32) +// vfloat32m1_t vloxei64_v_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V32VFloat32VBVFSFVU_TAMU, loxei64_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt64) +// vfloat64m1_t vloxei8_v_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei8V64VFloat64VBVFSFVU_TAMU, loxei8_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt8) +// vfloat64m1_t vloxei16_v_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei16V64VFloat64VBVFSFVU_TAMU, loxei16_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt16) +// vfloat64m1_t vloxei32_v_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei32V64VFloat64VBVFSFVU_TAMU, loxei32_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt32) +// vfloat64m1_t vloxei64_v_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vloxei64V64VFloat64VBVFSFVU_TAMU, loxei64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt64) +// vint8m1_t vluxei8_v_int8m1_tamu (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V8VInt8VBVISIVU_TAMU, luxei8_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt8) +// vint8m1_t vluxei16_v_int8m1_tamu (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V8VInt8VBVISIVU_TAMU, luxei16_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt16) +// vint8m1_t vluxei32_v_int8m1_tamu (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V8VInt8VBVISIVU_TAMU, luxei32_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt32) +// vint8m1_t vluxei64_v_int8m1_tamu (vbool8_t mask, vint8m1_t merge, const int8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V8VInt8VBVISIVU_TAMU, luxei64_v, 8, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt8, 4, OneDBool, OneDInt8, OneDInt8, OneDUInt64) +// vint16m1_t vluxei8_v_int16m1_tamu (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V16VInt16VBVISIVU_TAMU, luxei8_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt8) +// vint16m1_t vluxei16_v_int16m1_tamu (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V16VInt16VBVISIVU_TAMU, luxei16_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt16) +// vint16m1_t vluxei32_v_int16m1_tamu (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V16VInt16VBVISIVU_TAMU, luxei32_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt32) +// vint16m1_t vluxei64_v_int16m1_tamu (vbool16_t mask, vint16m1_t merge, const int16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V16VInt16VBVISIVU_TAMU, luxei64_v, 16, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt16, 4, OneDBool, OneDInt16, OneDInt16, OneDUInt64) +// vint32m1_t vluxei8_v_int32m1_tamu (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V32VInt32VBVISIVU_TAMU, luxei8_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt8) +// vint32m1_t vluxei16_v_int32m1_tamu (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V32VInt32VBVISIVU_TAMU, luxei16_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt16) +// vint32m1_t vluxei32_v_int32m1_tamu (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V32VInt32VBVISIVU_TAMU, luxei32_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt32) +// vint32m1_t vluxei64_v_int32m1_tamu (vbool32_t mask, vint32m1_t merge, const int32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V32VInt32VBVISIVU_TAMU, luxei64_v, 32, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt32, 4, OneDBool, OneDInt32, OneDInt32, OneDUInt64) +// vint64m1_t vluxei8_v_int64m1_tamu (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V64VInt64VBVISIVU_TAMU, luxei8_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt8) +// vint64m1_t vluxei16_v_int64m1_tamu (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V64VInt64VBVISIVU_TAMU, luxei16_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt16) +// vint64m1_t vluxei32_v_int64m1_tamu (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V64VInt64VBVISIVU_TAMU, luxei32_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt32) +// vint64m1_t vluxei64_v_int64m1_tamu (vbool64_t mask, vint64m1_t merge, const int64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V64VInt64VBVISIVU_TAMU, luxei64_v, 64, SIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDInt64, 4, OneDBool, OneDInt64, OneDInt64, OneDUInt64) +// vuint8m1_t vluxei8_v_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint8m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V8VUInt8VBVUSUVU_TAMU, luxei8_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt8) +// vuint8m1_t vluxei16_v_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint16m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V8VUInt8VBVUSUVU_TAMU, luxei16_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt16) +// vuint8m1_t vluxei32_v_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint32m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V8VUInt8VBVUSUVU_TAMU, luxei32_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt32) +// vuint8m1_t vluxei64_v_uint8m1_tamu (vbool8_t mask, vuint8m1_t merge, const uint8_t *base, vuint64m8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V8VUInt8VBVUSUVU_TAMU, luxei64_v, 8, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt8, 4, OneDBool, OneDUInt8, OneDUInt8, OneDUInt64) +// vuint16m1_t vluxei8_v_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V16VUInt16VBVUSUVU_TAMU, luxei8_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt8) +// vuint16m1_t vluxei16_v_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V16VUInt16VBVUSUVU_TAMU, luxei16_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt16) +// vuint16m1_t vluxei32_v_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V16VUInt16VBVUSUVU_TAMU, luxei32_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt32) +// vuint16m1_t vluxei64_v_uint16m1_tamu (vbool16_t mask, vuint16m1_t merge, const uint16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V16VUInt16VBVUSUVU_TAMU, luxei64_v, 16, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt16, 4, OneDBool, OneDUInt16, OneDUInt16, OneDUInt64) +// vuint32m1_t vluxei8_v_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V32VUInt32VBVUSUVU_TAMU, luxei8_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt8) +// vuint32m1_t vluxei16_v_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V32VUInt32VBVUSUVU_TAMU, luxei16_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt16) +// vuint32m1_t vluxei32_v_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V32VUInt32VBVUSUVU_TAMU, luxei32_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt32) +// vuint32m1_t vluxei64_v_uint32m1_tamu (vbool32_t mask, vuint32m1_t merge, const uint32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V32VUInt32VBVUSUVU_TAMU, luxei64_v, 32, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt32, 4, OneDBool, OneDUInt32, OneDUInt32, OneDUInt64) +// vuint64m1_t vluxei8_v_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V64VUInt64VBVUSUVU_TAMU, luxei8_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt8) +// vuint64m1_t vluxei16_v_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V64VUInt64VBVUSUVU_TAMU, luxei16_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt16) +// vuint64m1_t vluxei32_v_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V64VUInt64VBVUSUVU_TAMU, luxei32_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt32) +// vuint64m1_t vluxei64_v_uint64m1_tamu (vbool64_t mask, vuint64m1_t merge, const uint64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V64VUInt64VBVUSUVU_TAMU, luxei64_v, 64, UNSIGNED_INT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDUInt64, 4, OneDBool, OneDUInt64, OneDUInt64, OneDUInt64) +// vfloat16m1_t vluxei8_v_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint8mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V16VFloat16VBVFSFVU_TAMU, luxei8_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt8) +// vfloat16m1_t vluxei16_v_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint16m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V16VFloat16VBVFSFVU_TAMU, luxei16_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt16) +// vfloat16m1_t vluxei32_v_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint32m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V16VFloat16VBVFSFVU_TAMU, luxei32_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt32) +// vfloat16m1_t vluxei64_v_float16m1_tamu (vbool16_t mask, vfloat16m1_t merge, const float16_t *base, vuint64m4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V16VFloat16VBVFSFVU_TAMU, luxei64_v, 16, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat16, 4, OneDBool, OneDFloat16, OneDFloat16, OneDUInt64) +// vfloat32m1_t vluxei8_v_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint8mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V32VFloat32VBVFSFVU_TAMU, luxei8_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt8) +// vfloat32m1_t vluxei16_v_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint16mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V32VFloat32VBVFSFVU_TAMU, luxei16_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt16) +// vfloat32m1_t vluxei32_v_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint32m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V32VFloat32VBVFSFVU_TAMU, luxei32_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt32) +// vfloat32m1_t vluxei64_v_float32m1_tamu (vbool32_t mask, vfloat32m1_t merge, const float32_t *base, vuint64m2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V32VFloat32VBVFSFVU_TAMU, luxei64_v, 32, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat32, 4, OneDBool, OneDFloat32, OneDFloat32, OneDUInt64) +// vfloat64m1_t vluxei8_v_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint8mf8_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei8V64VFloat64VBVFSFVU_TAMU, luxei8_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt8) +// vfloat64m1_t vluxei16_v_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint16mf4_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei16V64VFloat64VBVFSFVU_TAMU, luxei16_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt16) +// vfloat64m1_t vluxei32_v_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint32mf2_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei32V64VFloat64VBVFSFVU_TAMU, luxei32_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt32) +// vfloat64m1_t vluxei64_v_float64m1_tamu (vbool64_t mask, vfloat64m1_t merge, const float64_t *base, vuint64m1_t bindex, size_t vl); +CUSTOM_OP_TYPE(Vluxei64V64VFloat64VBVFSFVU_TAMU, luxei64_v, 64, FLOAT, HaveVLParameter | MaskedOperation | LoadOperation | TailAgnostic | MaskUndisturbed, OneDFloat64, 4, OneDBool, OneDFloat64, OneDFloat64, OneDUInt64) diff --git a/include/CustomValue.def b/include/CustomValue.def new file mode 100644 index 0000000..bc5243a --- /dev/null +++ b/include/CustomValue.def @@ -0,0 +1,58 @@ +// CustomValue.def +/* +The CUSTOM_ONE_D_TYPE(CUSTOM_NAME, DATA_TYPE, DATA_WIDTH, DATA_CLASS, MIN_VALUE, +MAX_VALUE) macro is unrolled in Basic.hpp, Graph.hpp, Oeprator.cpp, Value.hpp, +Value.cpp +*/ +#ifndef CUSTOM_ONE_D_TYPE +#define CUSTOM_ONE_D_TYPE(...) +#endif + +// unsigned integer +CUSTOM_ONE_D_TYPE(UInt8, uint8_t, 8, UNSIGNED_INT, 0, +100) +CUSTOM_ONE_D_TYPE(UInt16, uint16_t, 16, UNSIGNED_INT, 0, +10000) +CUSTOM_ONE_D_TYPE(UInt32, uint32_t, 32, UNSIGNED_INT, 0, +10000000) +CUSTOM_ONE_D_TYPE(UInt64, uint64_t, 64, UNSIGNED_INT, 0, +10000000) + +// signed integer +CUSTOM_ONE_D_TYPE(Int8, int8_t, 8, SIGNED_INT, -100, +100) +CUSTOM_ONE_D_TYPE(Int16, int16_t, 16, SIGNED_INT, -10000, +10000) +CUSTOM_ONE_D_TYPE(Int32, int32_t, 32, SIGNED_INT, -10000000, +10000000) +CUSTOM_ONE_D_TYPE(Int64, int64_t, 64, SIGNED_INT, -10000000, +10000000) + +// boolean +CUSTOM_ONE_D_TYPE(Bool, int8_t, 8, BOOL, 0, 1) + +// softfloat +CUSTOM_ONE_D_TYPE(Float16, float16_t, 16, FLOAT, 0, +20000) +CUSTOM_ONE_D_TYPE(Float32, float32_t, 32, FLOAT, 0, +20000000) +CUSTOM_ONE_D_TYPE(Float64, float64_t, 64, FLOAT, 0, +20000000) + +/* +The CUSTOM_SCALAR_TYPE(CUSTOM_NAME, DATA_TYPE, DATA_WIDTH, DATA_CLASS, +DISTRIBUTION_TYPE, MIN_VALUE, MAX_VALUE) macro is unrolled in Basic.hpp, +Graph.hpp, Oeprator.cpp, Value.hpp, Value.cpp +*/ +#ifndef CUSTOM_SCALAR_TYPE +#define CUSTOM_SCALAR_TYPE(...) +#endif + +// unsigned integer +CUSTOM_SCALAR_TYPE(UInt8, uint8_t, 8, UNSIGNED_INT, 0, +100) +CUSTOM_SCALAR_TYPE(UInt16, uint16_t, 16, UNSIGNED_INT, 0, +10000) +CUSTOM_SCALAR_TYPE(UInt32, uint32_t, 32, UNSIGNED_INT, 0, +10000000) +CUSTOM_SCALAR_TYPE(UInt64, uint64_t, 64, UNSIGNED_INT, 0, +10000000) + +// signed integer +CUSTOM_SCALAR_TYPE(Int8, int8_t, 8, SIGNED_INT, -100, +100) +CUSTOM_SCALAR_TYPE(Int16, int16_t, 16, SIGNED_INT, -10000, +10000) +CUSTOM_SCALAR_TYPE(Int32, int32_t, 32, SIGNED_INT, -10000000, +10000000) +CUSTOM_SCALAR_TYPE(Int64, int64_t, 64, SIGNED_INT, -10000000, +10000000) + +CUSTOM_SCALAR_TYPE(Float16, float16_t, 16, FLOAT, 0, +20000) +CUSTOM_SCALAR_TYPE(Float32, float32_t, 32, FLOAT, 0, +20000000) +CUSTOM_SCALAR_TYPE(Float64, float64_t, 64, FLOAT, 0, +20000000) + +// machine dependent +CUSTOM_SCALAR_TYPE(IntXLen, ptrdiff_t, 32, SIGNED_INT, 0, 10000000) +CUSTOM_SCALAR_TYPE(UIntXLen, size_t, 32, UNSIGNED_INT, 0, 10000000) diff --git a/include/Decode.hpp b/include/Decode.hpp new file mode 100644 index 0000000..807e6d3 --- /dev/null +++ b/include/Decode.hpp @@ -0,0 +1,920 @@ +#ifndef RIF_DECODE_H +#define RIF_DECODE_H +#include + +#include "Processor.hpp" + +#include "softfloat.h" +#include "specialize.h" + +#if (-1 != ~0) || ((-1 >> 1) != -1) +#error spike requires a two''s-complement c++ implementation +#endif + +#ifdef __SIZEOF_INT128__ +typedef __int128 int128_t; +typedef unsigned __int128 uint128_t; +#endif + +// Vector macros +#define e8 8 // 8b elements +#define e16 16 // 16b elements +#define e32 32 // 32b elements +#define e64 64 // 64b elements + +#define VI_VV_LOOP(BODY) \ + auto vs2 = dataA[i]; \ + auto vs1 = dataB[i]; \ + auto &vd = dataOut[i]; \ + BODY + +#define VI_VX_LOOP(BODY) \ + auto vs2 = dataA[i]; \ + auto rs1 = *dataB; \ + auto &vd = dataOut[i]; \ + BODY + +#define VI_VV_ULOOP(BODY) \ + auto vs2 = dataA[i]; \ + auto vs1 = dataB[i]; \ + auto &vd = dataOut[i]; \ + BODY + +#define VI_VX_ULOOP(BODY) \ + auto vs2 = dataA[i]; \ + auto rs1 = *dataB; \ + auto &vd = dataOut[i]; \ + BODY + +#define VI_V_LOOP(BODY) \ + auto vs = dataA[i]; \ + auto &vd = dataOut[i]; \ + BODY + +#define VI_X_LOOP(BODY) \ + auto rs = *dataA; \ + auto &vd = dataOut[i]; \ + BODY + +#define VI_VV_SU_LOOP(BODY) \ + auto vs2 = dataA[i]; \ + auto vs1 = dataB[i]; \ + auto &vd = dataOut[i]; \ + BODY + +#define VI_VX_SU_LOOP(BODY) \ + auto vs2 = dataA[i]; \ + auto rs1 = *dataB; \ + auto &vd = dataOut[i]; \ + BODY + +#define VI_VV_MUL_ADD_LOOP(BODY) \ + auto vd1 = dataA[i]; \ + auto vs1 = dataB[i]; \ + auto vs2 = dataC[i]; \ + auto &vd0 = dataOut[i]; \ + BODY + +#define VI_VX_MUL_ADD_LOOP(BODY) \ + auto vd1 = dataA[i]; \ + auto rs1 = *dataB; \ + auto vs2 = dataC[i]; \ + auto &vd0 = dataOut[i]; \ + BODY + +#define VI_VV_LOOP_WIDEN(BODY) \ + auto vs2 = dataA[i]; \ + auto vs1 = dataB[i]; \ + auto &vd = dataOut[i]; \ + BODY + +#define VI_VX_LOOP_WIDEN(BODY) \ + auto vs2 = dataA[i]; \ + auto rs1 = *dataB; \ + auto &vd = dataOut[i]; \ + BODY + +#define VI_VV_MUL_ADD_LOOP_WIDEN(BODY) \ + auto vd_w = dataA[i]; \ + auto vs1 = dataB[i]; \ + auto vs2 = dataC[i]; \ + auto &vd = dataOut[i]; \ + BODY + +#define VI_VX_MUL_ADD_LOOP_WIDEN(BODY) \ + auto vd_w = dataA[i]; \ + auto rs1 = *dataB; \ + auto vs2 = dataC[i]; \ + auto &vd = dataOut[i]; \ + BODY + +#define VI_VV_LOOP_CMP(BODY) \ + auto vs2 = dataA[i]; \ + auto vs1 = dataB[i]; \ + auto &res = dataOut[i]; \ + BODY + +#define VI_VX_LOOP_CMP(BODY) \ + auto vs2 = dataA[i]; \ + auto rs1 = *dataB; \ + auto &res = dataOut[i]; \ + BODY + +#define VI_VV_ULOOP_CMP(BODY) \ + auto vs2 = dataA[i]; \ + auto vs1 = dataB[i]; \ + auto &res = dataOut[i]; \ + BODY + +#define VI_VX_ULOOP_CMP(BODY) \ + auto vs2 = dataA[i]; \ + auto rs1 = *dataB; \ + auto &res = dataOut[i]; \ + BODY + +#define VI_VV_LOOP_NSHIFT(BODY) \ + auto vs2 = dataA[i]; \ + auto vs2_u = dataA[i]; \ + auto vs1 = dataB[i]; \ + auto &vd = dataOut[i]; \ + BODY + +#define VI_VX_LOOP_NSHIFT(BODY) \ + auto vs2 = dataA[i]; \ + auto vs2_u = dataA[i]; \ + auto rs1 = *dataB; \ + auto &vd = dataOut[i]; \ + BODY + +#define VI_VV_LOOP_NARROW(BODY) \ + auto vs2 = dataA[i]; \ + auto vs2_u = dataA[i]; \ + auto vs1 = dataB[i]; \ + auto &vd = dataOut[i]; \ + BODY + +#define VI_VX_LOOP_NARROW(BODY) \ + auto vs2 = dataA[i]; \ + auto vs2_u = dataA[i]; \ + auto rs1 = *dataB; \ + auto &vd = dataOut[i]; \ + BODY + +#define VI_VV_LOOP_WITH_CARRY(BODY) \ + auto vs2 = dataA[i]; \ + auto vs1 = dataB[i]; \ + auto carry = dataC[i]; \ + auto &vd = dataOut[i]; \ + BODY + +#define VI_VX_LOOP_WITH_CARRY(BODY) \ + auto vs2 = dataA[i]; \ + auto rs1 = *dataB; \ + auto carry = dataC[i]; \ + auto &vd = dataOut[i]; \ + BODY + +#define VI_WIDE_OP_AND_ASSIGN(var0, var1, var2, op0, op1, sign) \ + switch (sew) { \ + case e8: \ + vd = op1((sign##16_t)(sign##8_t)var0 op0(sign##16_t)(sign##8_t) var1) + \ + var2; \ + break; \ + case e16: \ + vd = op1((sign##32_t)(sign##16_t)var0 op0(sign##32_t)(sign##16_t) var1) + \ + var2; \ + break; \ + default: \ + vd = op1((sign##64_t)(sign##32_t)var0 op0(sign##64_t)(sign##32_t) var1) + \ + var2; \ + break; \ + } + +#define VI_WIDE_OP_AND_ASSIGN_MIX(var0, var1, var2, op0, op1, sign_d, sign_1, \ + sign_2) \ + switch (sew) { \ + case e8: \ + vd = op1((sign_1##16_t)(sign_1##8_t)var0 op0(sign_2##16_t)(sign_2##8_t) \ + var1) + \ + var2; \ + break; \ + case e16: \ + vd = op1((sign_1##32_t)(sign_1##16_t)var0 op0(sign_2##32_t)(sign_2##16_t) \ + var1) + \ + var2; \ + break; \ + default: \ + vd = op1((sign_1##64_t)(sign_1##32_t)var0 op0(sign_2##64_t)(sign_2##32_t) \ + var1) + \ + var2; \ + break; \ + } + +#define VI_WIDE_WVX_OP(var0, op0, sign) \ + switch (sew) { \ + case e8: \ + vd = vs2 op0(sign##16_t)(sign##8_t) var0; \ + break; \ + case e16: \ + vd = vs2 op0(sign##32_t)(sign##16_t) var0; \ + break; \ + default: \ + vd = vs2 op0(sign##64_t)(sign##32_t) var0; \ + break; \ + } + +#define VI_VV_MERGE_LOOP(BODY) \ + auto use_first = dataA[i]; \ + auto vs2 = dataB[i]; \ + auto vs1 = dataC[i]; \ + auto &vd = dataOut[i]; \ + BODY + +#define VI_VX_MERGE_LOOP(BODY) \ + auto use_first = dataA[i]; \ + auto vs2 = dataB[i]; \ + auto rs1 = *dataC; \ + auto &vd = dataOut[i]; \ + BODY + +#define VI_VF_MERGE_LOOP(BODY) \ + bool use_first = dataA[i]; \ + RIF::RawDatumOperand vs2(dataB[i]); \ + RIF::RawDatumOperand rs1(*dataC); \ + RIF::RawDatumOperand vd; \ + BODY; \ + dataOut[i] = vd; + +#define VI_VV_EXT(dummy, sign) \ + auto vs = dataA[i]; \ + auto &vd = dataOut[i]; \ + vd = (sign##128_t)vs; + +#define VV_PARAMS(...) \ + auto vs2 = dataA[i]; \ + auto vs1 = dataB[i]; \ + auto &vd = dataOut[i]; + +#define VV_U_PARAMS(...) \ + auto vs2 = dataA[i]; \ + auto vs1 = dataB[i]; \ + auto &vd = dataOut[i]; + +#define VX_PARAMS(...) \ + auto vs2 = dataA[i]; \ + auto rs1 = *dataB; \ + auto &vd = dataOut[i]; + +#define VX_U_PARAMS(...) \ + auto vs2 = dataA[i]; \ + auto rs1 = *dataB; \ + auto &vd = dataOut[i]; + +#define INT_ROUNDING(result, xrm, gb) \ + do { \ + const uint64_t lsb = 1UL << (gb); \ + const uint64_t lsb_half = lsb >> 1; \ + switch (xrm) { \ + case VRM::RNU: \ + result += lsb_half; \ + break; \ + case VRM::RNE: \ + if ((result & lsb_half) && \ + ((result & (lsb_half - 1)) || (result & lsb))) \ + result += lsb; \ + break; \ + case VRM::RDN: \ + break; \ + case VRM::ROD: \ + if (result & (lsb - 1)) \ + result |= lsb; \ + break; \ + case VRM::INVALID_RM: \ + assert(true); \ + break; \ + } \ + } while (0) + +#define VI_VV_LOOP_AVG(op) \ + VRM xrm = p->VU.get_vround_mode(); \ + VI_VV_LOOP({ \ + uint128_t res = (uint128_t)vs2 op vs1; \ + INT_ROUNDING(res, xrm, 1); \ + vd = res >> 1; \ + }) + +#define VI_VX_LOOP_AVG(op) \ + VRM xrm = p->VU.get_vround_mode(); \ + VI_VX_LOOP({ \ + uint128_t res = (uint128_t)vs2 op rs1; \ + INT_ROUNDING(res, xrm, 1); \ + vd = res >> 1; \ + }) + +#define VI_VV_ULOOP_AVG(op) \ + VRM xrm = p->VU.get_vround_mode(); \ + VI_VV_ULOOP({ \ + uint128_t res = (uint128_t)vs2 op vs1; \ + INT_ROUNDING(res, xrm, 1); \ + vd = res >> 1; \ + }) + +#define VI_VX_ULOOP_AVG(op) \ + VRM xrm = p->VU.get_vround_mode(); \ + VI_VX_ULOOP({ \ + uint128_t res = (uint128_t)vs2 op rs1; \ + INT_ROUNDING(res, xrm, 1); \ + vd = res >> 1; \ + }) + +#define VI_VV_LOOP_REDUCTION(BODY) \ + auto vs2 = dataA[i]; \ + auto &vd_0_res = *dataOut; \ + BODY + +#define VI_VV_ULOOP_REDUCTION(BODY) \ + auto vs2 = dataA[i]; \ + auto &vd_0_res = *dataOut; \ + BODY + +#define VI_VV_LOOP_WIDE_REDUCTION(BODY) \ + auto vs2 = dataA[i]; \ + auto &vd_0_res = *dataOut; \ + BODY + +#define VI_VV_ULOOP_WIDE_REDUCTION(BODY) \ + auto vs2 = dataA[i]; \ + auto &vd_0_res = *dataOut; \ + BODY + +#define VI_VFP_VV_LOOP(BODY16, BODY32, BODY64) \ + RIF::RawDatumOperand vs2(dataA[i]); \ + RIF::RawDatumOperand vs1(dataB[i]); \ + RIF::RawDatumOperand vd; \ + switch (sew) { \ + case e16: \ + BODY16; \ + break; \ + case e32: \ + BODY32; \ + break; \ + case e64: \ + BODY64; \ + break; \ + default: \ + assert(0); \ + break; \ + } \ + dataOut[i] = vd; + +/*=================================*/ +/* Floating Point related */ +/*=================================*/ +/* Convenience wrappers to simplify softfloat code sequences */ +inline float16_t f16(uint16_t v) { return {v}; } +inline float32_t f32(uint32_t v) { return {v}; } +inline float64_t f64(uint64_t v) { return {v}; } +#define F16_SIGN ((uint16_t)1 << 15) +#define F32_SIGN ((uint32_t)1 << 31) +#define F64_SIGN ((uint64_t)1 << 63) +#define fsgnj16(a, b, n, x) \ + f16((f16(a).v & ~F16_SIGN) | ((((x) ? f16(a).v \ + : (n) ? F16_SIGN \ + : 0) ^ \ + f16(b).v) & \ + F16_SIGN)) +#define fsgnj32(a, b, n, x) \ + f32((f32(a).v & ~F32_SIGN) | ((((x) ? f32(a).v \ + : (n) ? F32_SIGN \ + : 0) ^ \ + f32(b).v) & \ + F32_SIGN)) +#define fsgnj64(a, b, n, x) \ + f64((f64(a).v & ~F64_SIGN) | ((((x) ? f64(a).v \ + : (n) ? F64_SIGN \ + : 0) ^ \ + f64(b).v) & \ + F64_SIGN)) + +#define VI_VFP_V_LOOP(BODY16, BODY32, BODY64) \ + RIF::RawDatumOperand vs(dataA[i]); \ + RIF::RawDatumOperand vs2(dataA[i]); \ + RIF::RawDatumOperand vd; \ + switch (sew) { \ + case e16: \ + BODY16; \ + break; \ + case e32: \ + BODY32; \ + break; \ + case e64: \ + BODY64; \ + break; \ + default: \ + assert(0); \ + break; \ + } \ + dataOut[i] = vd; + +#define VI_VFP_F_LOOP(BODY16, BODY32, BODY64) \ + RIF::RawDatumOperand rs1(*dataA); \ + RIF::RawDatumOperand vd; \ + switch (sew) { \ + case e16: \ + BODY16; \ + break; \ + case e32: \ + BODY32; \ + break; \ + case e64: \ + BODY64; \ + break; \ + default: \ + assert(0); \ + break; \ + } \ + dataOut[i] = vd; + +#define VI_VFP_VF_LOOP(BODY16, BODY32, BODY64) \ + RIF::RawDatumOperand vs2(dataA[i]); \ + RIF::RawDatumOperand rs1(*dataB); \ + RIF::RawDatumOperand vd; \ + switch (sew) { \ + case e16: \ + BODY16; \ + break; \ + case e32: \ + BODY32; \ + break; \ + case e64: \ + BODY64; \ + break; \ + default: \ + assert(0); \ + break; \ + } \ + dataOut[i] = vd; + +#define VI_VFP_VV_LOOP_WIDE(BODY16, BODY32) \ + RIF::RawDatumOperand vs2(dataA[i]); \ + RIF::RawDatumOperand vs1(dataB[i]); \ + RIF::RawDatumOperand vd; \ + switch (sew) { \ + case e16: \ + vs2 = f16_to_f32(vs2); \ + vs1 = f16_to_f32(vs1); \ + BODY16; \ + break; \ + case e32: \ + vs2 = f32_to_f64(vs2); \ + vs1 = f32_to_f64(vs1); \ + BODY32; \ + break; \ + default: \ + assert(0); \ + break; \ + } \ + dataOut[i] = vd; + +#define VI_VFP_WV_LOOP_WIDE(BODY16, BODY32) \ + RIF::RawDatumOperand vs2(dataA[i]); \ + RIF::RawDatumOperand vs1(dataB[i]); \ + RIF::RawDatumOperand vd; \ + switch (sew) { \ + case e16: \ + vs1 = f16_to_f32(vs1); \ + BODY16; \ + break; \ + case e32: \ + vs1 = f32_to_f64(vs1); \ + BODY32; \ + break; \ + default: \ + assert(0); \ + break; \ + } \ + dataOut[i] = vd; + +#define VI_VFP_VF_LOOP_WIDE(BODY16, BODY32) \ + RIF::RawDatumOperand vs2(dataA[i]); \ + RIF::RawDatumOperand rs1(*dataB); \ + RIF::RawDatumOperand vd; \ + switch (sew) { \ + case e16: \ + vs2 = f16_to_f32(vs2); \ + rs1 = f16_to_f32(rs1); \ + BODY16; \ + break; \ + case e32: \ + vs2 = f32_to_f64(vs2); \ + rs1 = f32_to_f64(rs1); \ + BODY32; \ + break; \ + default: \ + assert(0); \ + break; \ + } \ + dataOut[i] = vd; + +#define VI_VFP_WF_LOOP_WIDE(BODY16, BODY32) \ + RIF::RawDatumOperand vs2(dataA[i]); \ + RIF::RawDatumOperand rs1(*dataB); \ + RIF::RawDatumOperand vd; \ + switch (sew) { \ + case e16: \ + rs1 = f16_to_f32(rs1); \ + BODY16; \ + break; \ + case e32: \ + rs1 = f32_to_f64(rs1); \ + BODY32; \ + break; \ + default: \ + assert(0); \ + break; \ + } \ + dataOut[i] = vd; + +#define VI_VFP_VV_LOOP_CMP(BODY16, BODY32, BODY64) \ + RIF::RawDatumOperand vs2(dataA[i]); \ + RIF::RawDatumOperand vs1(dataB[i]); \ + bool res; \ + switch (sew) { \ + case e16: \ + BODY16; \ + break; \ + case e32: \ + BODY32; \ + break; \ + case e64: \ + BODY64; \ + break; \ + default: \ + assert(0); \ + break; \ + } \ + dataOut[i] = res; + +#define VI_VFP_VF_LOOP_CMP(BODY16, BODY32, BODY64) \ + RIF::RawDatumOperand vs2(dataA[i]); \ + RIF::RawDatumOperand rs1(*dataB); \ + bool res; \ + switch (sew) { \ + case e16: \ + BODY16; \ + break; \ + case e32: \ + BODY32; \ + break; \ + case e64: \ + BODY64; \ + break; \ + default: \ + assert(0); \ + break; \ + } \ + dataOut[i] = res; + +// floating point conversions +#define VI_VFP_CVT_INT_TO_FP(BODY16, BODY32, BODY64, ...) \ + auto vs2(dataA[i]); \ + RIF::RawDatumOperand vd; \ + switch (sew) { \ + case e16: \ + BODY16; \ + break; \ + case e32: \ + BODY32; \ + break; \ + case e64: \ + BODY64; \ + break; \ + default: \ + assert(0); \ + break; \ + } \ + dataOut[i] = vd; + +#define VI_VFP_CVT_FP_TO_INT(BODY16, BODY32, BODY64, ...) \ + RIF::RawDatumOperand vs2(dataA[i]); \ + auto &vd = dataOut[i]; \ + switch (sew) { \ + case e16: \ + BODY16; \ + break; \ + case e32: \ + BODY32; \ + break; \ + case e64: \ + BODY64; \ + break; \ + default: \ + assert(0); \ + break; \ + } + +#define VI_VFP_WCVT_FP_TO_FP(BODY8, BODY16, BODY32, ...) \ + RIF::RawDatumOperand vs2(dataA[i]); \ + RIF::RawDatumOperand vd; \ + switch (sew) { \ + case e8: \ + BODY8; \ + break; \ + case e16: \ + BODY16; \ + break; \ + case e32: \ + BODY32; \ + break; \ + default: \ + assert(0); \ + break; \ + } \ + dataOut[i] = vd; + +#define VI_VFP_WCVT_INT_TO_FP(BODY8, BODY16, BODY32, ...) \ + auto vs2 = dataA[i]; \ + RIF::RawDatumOperand vd; \ + switch (sew) { \ + case e8: \ + BODY8; \ + break; \ + case e16: \ + BODY16; \ + break; \ + case e32: \ + BODY32; \ + break; \ + default: \ + assert(0); \ + break; \ + } \ + dataOut[i] = vd; + +#define VI_VFP_WCVT_FP_TO_INT(BODY8, BODY16, BODY32, ...) \ + RIF::RawDatumOperand vs2(dataA[i]); \ + auto &vd = dataOut[i]; \ + switch (sew) { \ + case e8: \ + BODY8; \ + break; \ + case e16: \ + BODY16; \ + break; \ + case e32: \ + BODY32; \ + break; \ + default: \ + assert(0); \ + break; \ + } + +#define VI_VFP_NCVT_FP_TO_FP(BODY16, BODY32, BODY64, ...) \ + RIF::RawDatumOperand vs2(dataA[i]); \ + RIF::RawDatumOperand vd; \ + switch (sew) { \ + case e16: \ + BODY16; \ + break; \ + case e32: \ + BODY32; \ + break; \ + case e64: \ + BODY64; \ + break; \ + default: \ + assert(0); \ + break; \ + } \ + dataOut[i] = vd; + +#define VI_VFP_NCVT_INT_TO_FP(BODY16, BODY32, BODY64, ...) \ + VI_VFP_CVT_INT_TO_FP(BODY16, BODY32, BODY64); + +#define VI_VFP_NCVT_FP_TO_INT(BODY16, BODY32, BODY64, ...) \ + VI_VFP_CVT_FP_TO_INT(BODY16, BODY32, BODY64); + +#define VI_VFP_VV_LOOP_REDUCTION(BODY16, BODY32, BODY64) \ + RIF::RawDatumOperand vs2(dataA[i]); \ + RIF::RawDatumOperand vd_0(*dataOut); \ + switch (sew) { \ + case e16: { \ + BODY16; \ + if (is_propagate) { \ + auto ret = f16_classify(f16(vd_0)); \ + if (ret & 0x300) { \ + if (ret & 0x100) \ + softfloat_exceptionFlags |= softfloat_flag_invalid; \ + vd_0 = defaultNaNF16UI; \ + } \ + } \ + *dataOut = vd_0; \ + } break; \ + case e32: { \ + BODY32; \ + if (is_propagate) { \ + auto ret = f32_classify(f32(vd_0)); \ + if (ret & 0x300) { \ + if (ret & 0x100) \ + softfloat_exceptionFlags |= softfloat_flag_invalid; \ + vd_0 = defaultNaNF32UI; \ + } \ + } \ + *dataOut = vd_0; \ + } break; \ + case e64: { \ + BODY64; \ + if (is_propagate) { \ + auto ret = f64_classify(f64(vd_0)); \ + if (ret & 0x300) { \ + if (ret & 0x100) \ + softfloat_exceptionFlags |= softfloat_flag_invalid; \ + vd_0 = defaultNaNF64UI; \ + } \ + } \ + *dataOut = vd_0; \ + } break; \ + } + +#define VI_VFP_VV_LOOP_WIDE_REDUCTION(BODY16, BODY32) \ + RIF::RawDatumOperand vs2(dataA[i]); \ + RIF::RawDatumOperand vd_0(*dataOut); \ + switch (sew) { \ + case e16: { \ + vs2 = f16_to_f32(vs2); \ + BODY16; \ + if (is_propagate) { \ + auto ret = f32_classify(f32(vd_0)); \ + if (ret & 0x300) { \ + if (ret & 0x100) \ + softfloat_exceptionFlags |= softfloat_flag_invalid; \ + vd_0 = defaultNaNF32UI; \ + } \ + } \ + *dataOut = vd_0; \ + } break; \ + case e32: { \ + vs2 = f32_to_f64(vs2); \ + BODY32; \ + if (is_propagate) { \ + auto ret = f64_classify(f64(vd_0)); \ + if (ret & 0x300) { \ + if (ret & 0x100) \ + softfloat_exceptionFlags |= softfloat_flag_invalid; \ + vd_0 = defaultNaNF64UI; \ + } \ + } \ + *dataOut = vd_0; \ + } break; \ + } + +/*=================================*/ +/* Mask family */ +/*=================================*/ +#define VI_LOOP_MASK(BODY) \ + uint8_t vs2 = dataA[i]; \ + uint8_t vs1 = dataB[i]; \ + uint8_t vd = (BODY); \ + dataOut[i] = (vd & 1); + +#define VI_LOOP_PSUEDO_MASK(BODY) \ + uint8_t vs = dataA[i]; \ + uint8_t vd = (BODY); \ + dataOut[i] = (vd & 1); + +#define VI_LOOP_PSUEDO_NOINPUT_MASK(BODY) \ + uint8_t vd = (BODY); \ + dataOut[i] = (vd & 1); + +#define VI_CPOP_LOOP \ + auto vs2 = dataA[i]; \ + pop_count += vs2; + +#define VI_VFIRST_LOOP \ + auto vs2 = dataA[i]; \ + if (vs2) { \ + first = i; \ + break; \ + } + +#define VI_VMSBF_LOOP \ + auto vs2 = dataA[i]; \ + auto &vd = dataOut[i]; \ + if (vs2) \ + break; \ + vd = true; + +#define VI_VMSIF_LOOP \ + auto vs2 = dataA[i]; \ + auto &vd = dataOut[i]; \ + vd = true; \ + if (vs2) { \ + ++i; \ + break; \ + } + +#define VI_VMSOF_LOOP \ + auto vs2 = dataA[i]; \ + auto &vd = dataOut[i]; \ + vd = false; \ + if (vs2) { \ + vd = true; \ + ++i; \ + break; \ + } + +#define VI_VIOTA_LOOP \ + auto vs2 = dataA[i]; \ + auto &vd = dataOut[i]; \ + vd = acculateMask; \ + acculateMask += vs2; + +#define VI_VID_LOOP \ + auto &vd = dataOut[i]; \ + vd = i; + +/*=================================*/ +/* Load / store family */ +/*=================================*/ +#define UNIT_STRIDE_LOAD dataOut[i] = dataA[i]; +#define UNIT_STRIDE_STORE dataOut[i] = dataA[i]; +#define INDEX_LOAD_8 \ + { \ + uint128_t index = dataB[i]; \ + uint128_t shift = dataASew / 8; \ + dataOut[i] = \ + dataA[((index % a->length) * shift) % (((uint128_t)1) << 8) / shift]; \ + } + +#define INDEX_LOAD_16 \ + { \ + uint128_t index = dataB[i]; \ + uint128_t shift = dataASew / 8; \ + dataOut[i] = \ + dataA[((index % a->length) * shift) % (((uint128_t)1) << 16) / shift]; \ + } + +#define INDEX_LOAD_32 \ + { \ + uint128_t index = dataB[i]; \ + uint128_t shift = dataASew / 8; \ + dataOut[i] = \ + dataA[((index % a->length) * shift) % (((uint128_t)1) << 32) / shift]; \ + } + +#define INDEX_LOAD_64 \ + { \ + uint128_t index = dataB[i]; \ + uint128_t shift = dataASew / 8; \ + dataOut[i] = \ + dataA[((index % a->length) * shift) % (((uint128_t)1) << 64) / shift]; \ + } + +#define INDEX_STORE_8 \ + { \ + uint128_t index = dataB[i]; \ + uint128_t shift = dataASew / 8; \ + uint64_t real_id = \ + ((index % a->length) * shift) % (((uint128_t)1) << 8) / shift; \ + dataOut[((index % a->length) * shift) % (((uint128_t)1) << 8) / shift] = \ + dataA[i]; \ + } + +#define INDEX_STORE_16 \ + { \ + uint128_t index = dataB[i]; \ + uint128_t shift = dataASew / 8; \ + dataOut[((index % a->length) * shift) % (((uint128_t)1) << 16) / shift] = \ + dataA[i]; \ + } + +#define INDEX_STORE_32 \ + { \ + uint128_t index = dataB[i]; \ + uint128_t shift = dataASew / 8; \ + dataOut[((index % a->length) * shift) % (((uint128_t)1) << 32) / shift] = \ + dataA[i]; \ + } + +#define INDEX_STORE_64 \ + { \ + uint128_t index = dataB[i]; \ + uint128_t shift = dataASew / 8; \ + dataOut[((index % a->length) * shift) % (((uint128_t)1) << 64) / shift] = \ + dataA[i]; \ + } + +#define STRIDED_LOAD dataOut[i] = *(dataA + i * stride); +#define STRIDED_STORE *(dataOut + i * stride) = dataA[i]; + +// dummy macro-s +#define VI_CHECK_DDS(...) +#define VI_CHECK_DSS(...) +#define VI_CHECK_SSS(...) +#define require_vector(...) +#define require_extension(...) +#define VI_LOOP_BASE +#define VI_LOOP_END +#define P_SET_OV(...) + +#endif diff --git a/include/FuseGraph.hpp b/include/FuseGraph.hpp new file mode 100644 index 0000000..b4dcd31 --- /dev/null +++ b/include/FuseGraph.hpp @@ -0,0 +1,52 @@ +#include "Graph.hpp" + +#include +#include +#include + +namespace RIF { + +extern int fgIndex; + +struct SewDiffs { + // Constructs sew shift lut for graph + SewDiffs(Graph &_graph); + + // Utility to get sew shift difference between 2 values + int getSewDiff(ValueBase *from, ValueBase *to); + void calcSewDiff(ValueBase *from, ValueBase *to); + void calcSewDiff(OperatorBase *op); + + Graph &graph; + std::map lut; +}; + +struct FuseGraph { + FuseGraph(Graph &graph); + + void assignLmul(SewDiffs &sd); + void add(OperatorBase *op); + std::vector getOperatorsInTopologicalOrder(); + void generateGraphviz(std::ostream &os); + void generateCCode(std::ostream &os); + + const std::string id; + Graph &graph; + std::set operators; + std::set values; +}; + +struct FuseGraphs { + FuseGraphs(Graph &graph); + + std::vector getFuseGraphsInTopologicalOrder(); + void generateGraphviz(std::ostream &os); + void generateCCode(std::ostream &os, uint32_t seed = 0xdeadbeef); + + Graph &graph; + SewDiffs sd; + std::vector subgraphs; + std::map operatorLUT; +}; + +} // namespace RIF diff --git a/include/Graph.hpp b/include/Graph.hpp new file mode 100644 index 0000000..f2ca622 --- /dev/null +++ b/include/Graph.hpp @@ -0,0 +1,148 @@ +// Graph.hpp +/* +This file defines the 2 main node type - Operator & Value. Value is the place +holder in-between the use-define chain of the graph. Operator labels the +actual operation done to the value. + +The graph is a bipartite graph consisting Operator and Value. Essentially the +graph is a data flow graph. Any control flow semantics shall be transformed into +data flow. +*/ +#ifndef RIF_GRAPH_HPP +#define RIF_GRAPH_HPP + +#include "Operator.hpp" +#include "Utils.hpp" +#include "Value.hpp" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace RIF { + +struct Graph { + using Operator = OperatorBase; + using Value = ValueBase; + + using OperatorLookup = std::map; + using ValueLookup = std::map; + + using OperatorCollection = std::set; + using ValueCollection = std::set; + + // key = enum of Values + // value = enum of Operators + // The 2 lookup tables are used in graph generation, when a value + // is selected it has 2 directions to expand. The first is to create an + // operator that defines it. The second is to create an operator that uses it + // (alongside of this, other values are created to be used by the new + // operator) + using UseCandidateLookup = std::map>; + using DefineCandidateLookup = + std::map>; + using EnumLoopkup = std::map; + + static bool isConstructedUseDefineCandidate; + static UseCandidateLookup useCandidateLUT; + static DefineCandidateLookup defineCandidateLUT; + static EnumLoopkup operatorEnumLUT; + + void removeOperator(Operator *op); + + Graph(); + + Operator *getNewOperator(const CustomValType type, const std::string &id, + const LmulType lmul = LmulType::m1) { + if (operatorLUT.find(id) != end(operatorLUT)) { + std::cerr << "Found duplicate name in operatorLUT\n"; + exit(1); + } + if (valueLUT.find(id) != end(valueLUT)) { + std::cerr << "Found duplicate name in valueLUT\n"; + exit(1); + } + Operator *op = nullptr; + + if (type == CustomValType::Initialize) + op = new InitializeOp(id); +#define CUSTOM_OP_TYPE(OP_TYPE, ...) \ + if (type == CustomValType::OP_TYPE) \ + op = new OP_TYPE##Op(id, lmul); +#include "CustomOperator.def" +#undef CUSTOM_OP_TYPE + + assert(op != nullptr && "Operator type not defined in CustomOperator.def"); + + operatorLUT[id] = op; + operators.insert(op); + return op; + } + + Value *getNewValue(const CustomValType type, const std::string &id, + const int &length, const LmulType lmul = LmulType::m1) { + if (operatorLUT.find(id) != end(operatorLUT)) { + std::cerr << "Found duplicate name in operatorLUT\n"; + exit(1); + } + if (valueLUT.find(id) != end(valueLUT)) { + std::cerr << "Found duplicate name in valueLUT\n"; + exit(1); + } + Value *value = nullptr; + +#define CUSTOM_ONE_D_TYPE(CUSTOM_NAME, ...) \ + if (type == OneD##CUSTOM_NAME) \ + value = new OneD##CUSTOM_NAME##Val(id, length, lmul); +#include "CustomValue.def" +#undef CUSTOM_ONE_D_TYPE +#undef CUSTOM_SCALAR_TYPE +#define CUSTOM_SCALAR_TYPE(CUSTOM_NAME, ...) \ + if (type == Scalar##CUSTOM_NAME) \ + value = new Scalar##CUSTOM_NAME##Val(id, length, lmul); +#include "CustomValue.def" +#undef CUSTOM_ONE_D_TYPE +#undef CUSTOM_SCALAR_TYPE + + assert(value != nullptr && "Value type not defined in CustomValue.def"); + + valueLUT[id] = value; + values.insert(value); + return value; + } + + bool isOperator(const std::string &id); + bool isValue(const std::string &id); + + void generateData(uint32_t seed = InitialSeed); + void generateGraphViz(std::ostream &os); + void generateCCode(std::ostream &os, uint32_t seed = InitialSeed); + + std::vector + getOperatorsInTopologicalOrder(uint32_t seed = InitialSeed); + std::vector + getOperatorsInReverseTopologicalOrder(uint32_t seed = InitialSeed); + + // Misc sub-functions (utilities) + void emitHeader(std::ostream &os); + + OperatorLookup operatorLUT; + ValueLookup valueLUT; + std::vector validOpTypes; + + OperatorCollection operators; + ValueCollection values; +}; + +} // namespace RIF +#endif // #define RIF_GRAPH_HPP diff --git a/include/Operator.hpp b/include/Operator.hpp new file mode 100644 index 0000000..6f46cb6 --- /dev/null +++ b/include/Operator.hpp @@ -0,0 +1,109 @@ +// Operator.hpp +/* +CustomOperator template and declarations extended by MACRO in the .def file. +*/ +#ifndef RIF_OPERATOR_HPP +#define RIF_OPERATOR_HPP + +#include "Basic.hpp" + +#include + +namespace RIF { + +struct InitializeOp : OperatorBase { + InitializeOp(const std::string &id) + : OperatorBase(CustomValType::Initialize, "vinit_rif", id, NoVLParameter, + 0, {}, NumberOfValTypes, 0, NumberOfLmuls, + NumberOfTypeClasses) {} + virtual ~InitializeOp() = default; + virtual void generateData() override; + virtual void generateCCode(std::ostream &os) override; +}; + +#define CUSTOM_OP_TYPE(OP_TYPE, OP_ID, SEW, TYPE_CLASS, OP_ATTR, OUTPUT_TYPE, \ + NUM_OF_INPUTS, ...) \ + struct OP_TYPE##Op : OperatorBase { \ + OP_TYPE##Op(const std::string &id, LmulType lmul) \ + : OperatorBase(CustomValType::OP_TYPE, "v" #OP_ID, id, OP_ATTR, \ + NUM_OF_INPUTS, {__VA_ARGS__}, OUTPUT_TYPE, SEW, lmul, \ + TYPE_CLASS) {} \ + virtual ~OP_TYPE##Op() = default; \ + virtual void generateData() override; \ + virtual void generateCCode(std::ostream &os) override; \ + }; + +#include "CustomOperator.def" +#undef CUSTOM_OP_TYPE + +extern int placeholderIndex; + +// Utilites with C code generate as side effect. Return strings are placeholders +std::string loadOneDToVector(std::ostream &os, ValueBase *value, + const std::string &holder, OperatorBase *op); +std::string genOpString(std::ostream &os, OperatorBase *op, + const std::vector &args, + ValueBase *output); +void storeVectorToOneD(std::ostream &os, const std::string rawBase, + const std::string vec, ValueBase *value); +void incrementRawPointerByVLEN(std::ostream &os, std::string ptrID); + +// Utility to get input / output of operator +ValueBase *getVd(OperatorBase *op); +ValueBase *getMask(OperatorBase *op); +ValueBase *getMaskedoff(OperatorBase *op); +ValueBase *getVs2(OperatorBase *op); +bool isExistVs1Rs1(OperatorBase *op); +ValueBase *getVs1(OperatorBase *op); +bool isMaskOfOperator(OperatorBase *op, ValueBase *value); +bool isMaskedoffOfOperator(OperatorBase *op, ValueBase *value); +bool isVs2OfOperator(OperatorBase *op, ValueBase *value); +bool isVs1OfOperator(OperatorBase *op, ValueBase *value); +bool isWideningOperator(OperatorBase *op); +bool isWideningValue(ValueBase *x, ValueBase *y); +bool isNarrowingOperator(OperatorBase *op); +bool isNarrowingValue(ValueBase *x, ValueBase *y); + +// Verify for the operator +void generateVerificationCode(std::ostream &os, OperatorBase *op); + +// CodeGen structures +struct CodeGenForOperator { + + using ValuePair = std::pair; + + CodeGenForOperator() = delete; + CodeGenForOperator(std::ostream &os, OperatorBase *op, TypeInfo &typeInfo, + size_t length); + + std::ostream &os; + OperatorBase *op; + TypeInfo vlTypeInfo; + size_t loopLength; + + // Loads raw data into pointer placeholders. The names of generated + // placeholders are stored in `opInputs` and opOutput. + std::vector opInputs; + ValuePair opOutput; + void getRawPointers(std::vector inputs, ValueBase *output); + + // With the pointers of the raw pointers, we will need to use vle or vmv to + // load raw data into rvv data type. This is done inside this function. + std::vector getIntrinsicArguments(); + + // At the end of for loops, the raw pointer place holders need to be increased + // by the number of data elements processed in this iteration, which is `vl`. + void incrementRawPointerByVLEN(); + + // Save the results of the operator into raw data slots. + void storeResult(std::string opResult); + static std::string getCounter(std::ostream &os, size_t length); + static void getLoopStart(std::ostream &os, std::string counter); + static void getLoopEnd(std::ostream &os); + void getVL(std::string counter); + + void generateSingleOperatorCode(); +}; + +} // namespace RIF +#endif // #define RIF_OPERATOR_HPP diff --git a/include/Processor.hpp b/include/Processor.hpp new file mode 100644 index 0000000..d85f357 --- /dev/null +++ b/include/Processor.hpp @@ -0,0 +1,25 @@ +#ifndef RIF_PROCESSOR_H +#define RIF_PROCESSOR_H +#include + +enum VRM { + RNU = 0, // round-to-nearest-up + RNE, // round-to-nearest-even + RDN, // round-to-nearest-down + ROD, // round-to-nearest-odd + INVALID_RM +}; + +struct Processor { + struct VectorUnit { + unsigned vsew; // sew + VRM xrm = VRM::RNU; // rounding mode + VRM get_vround_mode() { return xrm; } + }; + VectorUnit VU; +}; + +extern Processor P; +extern Processor *p; + +#endif \ No newline at end of file diff --git a/include/RawDatumOperand.hpp b/include/RawDatumOperand.hpp new file mode 100644 index 0000000..59d10fb --- /dev/null +++ b/include/RawDatumOperand.hpp @@ -0,0 +1,133 @@ +// RawDatumOperand.hpp +/* +The spike golden headers have 2 problems that needs to be resolved. +1. (TODO, FIXME) Don't follow SSA. For example, code like vmacc_vv.h + + // vmacc.vv: vd[i] = +(vs1[i] * vs2[i]) + vd[i] + VI_VV_LOOP + ({ + vd = vs1 * vs2 + vd; + }) + +2. Not strongly typed. For example, code like vfadd_vv.h + + // vfadd.vv vd, vs2, vs1 + VI_VFP_VV_LOOP + ({ + vd = f16_add(vs1, vs2); + }, + { + vd = f32_add(vs1, vs2); + }, + { + vd = f64_add(vs1, vs2); + }) + +Primitive C/C++ arithmetic can't compute/compile the spike headers correctly, +whichi is why we need to have this RawDatumOperand wrapper class for it. +*/ +#ifndef RIF_RAW_DATUM_OPERAND_HPP +#define RIF_RAW_DATUM_OPERAND_HPP + +#include + +#include "softfloat.h" + +namespace RIF { + +struct RawDatumOperand { + + typedef union { + int8_t i8; + int16_t i16; + int32_t i32; + int64_t i64; + uint8_t ui8; + uint16_t ui16; + uint32_t ui32; + uint64_t ui64; + float16_t f16; + float32_t f32; + float64_t f64; + } datum_t; + + RawDatumOperand() {} + RawDatumOperand(const int8_t v) { datum.i8 = v; }; + RawDatumOperand(const int16_t v) { datum.i16 = v; }; + RawDatumOperand(const int32_t v) { datum.i32 = v; }; + RawDatumOperand(const int64_t v) { datum.i64 = v; }; + RawDatumOperand(const uint8_t v) { datum.ui8 = v; }; + RawDatumOperand(const uint16_t v) { datum.ui16 = v; }; + RawDatumOperand(const uint32_t v) { datum.ui32 = v; }; + RawDatumOperand(const uint64_t v) { datum.ui64 = v; }; + RawDatumOperand(const float16_t v) : v(v.v) { datum.f16 = v; }; + RawDatumOperand(const float32_t v) : v(v.v) { datum.f32 = v; }; + RawDatumOperand(const float64_t v) : v(v.v) { datum.f64 = v; }; + + operator int8_t() const { return datum.i8; } + operator int16_t() const { return datum.i16; } + operator int32_t() const { return datum.i32; } + operator int64_t() const { return datum.i64; } + operator uint8_t() const { return datum.ui8; } + operator uint16_t() const { return datum.ui16; } + operator uint32_t() const { return datum.ui32; } + operator uint64_t() const { return datum.ui64; } + operator float16_t() const { return datum.f16; } + operator float32_t() const { return datum.f32; } + operator float64_t() const { return datum.f64; } + + RawDatumOperand &operator=(const int8_t i8) { + datum.i8 = i8; + return *this; + } + RawDatumOperand &operator=(const int16_t i16) { + datum.i16 = i16; + return *this; + } + RawDatumOperand &operator=(const int32_t i32) { + datum.i32 = i32; + return *this; + } + RawDatumOperand &operator=(const int64_t i64) { + datum.i64 = i64; + return *this; + } + RawDatumOperand &operator=(const uint8_t ui8) { + datum.ui8 = ui8; + return *this; + } + RawDatumOperand &operator=(const uint16_t ui16) { + datum.ui16 = ui16; + return *this; + } + RawDatumOperand &operator=(const uint32_t ui32) { + datum.ui32 = ui32; + return *this; + } + RawDatumOperand &operator=(const uint64_t ui64) { + datum.ui64 = ui64; + return *this; + } + RawDatumOperand &operator=(const float16_t f16) { + datum.f16 = f16; + v = f16.v; + return *this; + } + RawDatumOperand &operator=(const float32_t f32) { + datum.f32 = f32; + v = f32.v; + return *this; + } + RawDatumOperand &operator=(const float64_t f64) { + datum.f64 = f64; + v = f64.v; + return *this; + } + + datum_t datum; + uint64_t v; +}; + +} // namespace RIF + +#endif diff --git a/include/TypeInfo.hpp b/include/TypeInfo.hpp new file mode 100644 index 0000000..61e11c0 --- /dev/null +++ b/include/TypeInfo.hpp @@ -0,0 +1,133 @@ +/* +TypeInfo +*/ +#ifndef RIF_TYPEINFO_HPP +#define RIF_TYPEINFO_HPP + +#include +#include + +#include +#include + +namespace RIF { + +enum TypeClass { + SIGNED_INT, + UNSIGNED_INT, + FLOAT, + BOOL, + NumberOfTypeClasses, +}; + +#define TYPE_CLASS_STR(TC) \ + (TC) == SIGNED_INT ? "int" \ + : (TC) == UNSIGNED_INT ? "uint" \ + : (TC) == FLOAT ? "float" \ + : (TC) == BOOL ? "bool" \ + : (assert("Unknown type class!?"), "") + +#define TYPE_CLASS_SHORT_STR(TC) \ + (TC) == SIGNED_INT ? "i" \ + : (TC) == UNSIGNED_INT ? "u" \ + : (TC) == FLOAT ? "f" \ + : (TC) == BOOL ? "b" \ + : (assert("Unknown type class!?"), "") + +enum LmulType { + mf8, + mf4, + mf2, + m1, + m2, + m4, + m8, + NumberOfLmuls, +}; +#define LMUL_STR(LMUL) \ + (LMUL) == LmulType::mf8 ? "mf8" \ + : (LMUL) == LmulType::mf4 ? "mf4" \ + : (LMUL) == LmulType::mf2 ? "mf2" \ + : (LMUL) == LmulType::m1 ? "m1" \ + : (LMUL) == LmulType::m2 ? "m2" \ + : (LMUL) == LmulType::m4 ? "m4" \ + : (LMUL) == LmulType::m8 \ + ? "m8" \ + : (assert("Unknown type class!?"), "") + +class SewType { +public: + enum class Value { e8, e16, e32, e64, NumberOfSews }; + + explicit SewType(int); + explicit SewType(Value); + + operator Value() const { return value; } + + std::string to_string() const; + int to_int() const; + size_t to_index() const; + +private: + // The underlying value of SEW + Value value; +}; + +struct TypeInfo { + static TypeInfo *create(LmulType lmul, SewType sew, TypeClass typeClass); + + static TypeInfo *getNarrowed(const TypeInfo &typeInfo, TypeClass typeClass); + static TypeInfo *getWidened(const TypeInfo &typeInfo, TypeClass typeClass); + static TypeInfo *setLmul(const TypeInfo &typeInfo, LmulType lmul); + + TypeInfo(const TypeInfo &) = default; + TypeInfo &operator=(const TypeInfo &) = delete; + + bool operator==(const TypeInfo &rhs) const { + return lmul == rhs.lmul && sew == rhs.sew && typeClass == rhs.typeClass; + } + bool operator!=(const TypeInfo &rhs) const { + return lmul != rhs.lmul || sew != rhs.sew || typeClass != rhs.typeClass; + } + + static std::map> validSewLmul; + const LmulType lmul; + const SewType sew; + + const TypeClass typeClass; + + const std::string scalarTypeName; + const std::string vectorTypeName; + const std::string shortScalarTypeName; + const std::string shortVectorTypeName; + const std::string setvlTypeName; + const std::string setvlmaxTypeName; + + bool isIntegerType() const { + return isSignedIntegerType() || isUnsigedIntegerType(); + }; + bool isSignedIntegerType() const { return typeClass == SIGNED_INT; }; + bool isUnsigedIntegerType() const { return typeClass == UNSIGNED_INT; }; + bool isFloatType() const { return typeClass == FLOAT; }; + bool isBoolType() const { return typeClass == BOOL; }; + +private: + TypeInfo(LmulType lmul, SewType sew, TypeClass typeClass) + : lmul(lmul), sew(sew), typeClass(typeClass), + scalarTypeName(std::string(TYPE_CLASS_STR(typeClass)) + + sew.to_string() + "_t"), + vectorTypeName(("v" + std::string(TYPE_CLASS_STR(typeClass)) + + sew.to_string() + std::string(LMUL_STR(lmul)) + "_t")), + shortScalarTypeName(std::string(TYPE_CLASS_SHORT_STR(typeClass)) + + sew.to_string()), + shortVectorTypeName((std::string(TYPE_CLASS_SHORT_STR(typeClass)) + + sew.to_string() + std::string(LMUL_STR(lmul)))), + setvlTypeName("vsetvl_e" + sew.to_string() + + std::string(LMUL_STR(lmul))), + setvlmaxTypeName("vsetvlmax_e" + sew.to_string() + + std::string(LMUL_STR(lmul))) {} +}; + +} // namespace RIF + +#endif // #define RIF_TYPEINFO_HPP diff --git a/include/Utils.hpp b/include/Utils.hpp new file mode 100644 index 0000000..58ec008 --- /dev/null +++ b/include/Utils.hpp @@ -0,0 +1,53 @@ +// Utils.hpp +/* +Utility functions. +*/ +#ifndef RIF_UTILS_HPP +#define RIF_UTILS_HPP + +#include "Decode.hpp" +#include +#include +#include +#include +#include +#include + +namespace RIF { + +// default filename +extern std::string GraphVizFilename; +extern std::string CCodeFilename; +extern std::string InitialRootName; +extern uint32_t InitialLength; +extern uint32_t InitialSeed; +extern uint32_t NodesToGenerate; +extern std::mt19937 rng; +extern std::string VerificationMode; +extern bool VerifyTailPolicy; +extern bool VerifyMaskPolicy; +extern bool HasPolicy; +extern bool HasTA; +extern bool HasMA; + +void parseArguments(int argc, char **argv); +void initializeRNG(uint32_t seed = 0xdeadbeef); +template +T getRandomNumber(T2 minValue, T2 maxValue, uint64_t *raw = nullptr) { + static_assert(std::is_integral::value, + "non integral type should be handeled explicitly"); + T ret = std::uniform_int_distribution(minValue, maxValue)(rng); + if (raw != nullptr) + *raw = ret; + return ret; +} +template <> +float16_t getRandomNumber(int minValue, int maxValue, uint64_t *raw); +template <> +float32_t getRandomNumber(int minValue, int maxValue, uint64_t *raw); +template <> +float64_t getRandomNumber(int minValue, int maxValue, uint64_t *raw); + +} // namespace RIF + +#endif // #define RIF_UTILS_HPP diff --git a/include/Value.hpp b/include/Value.hpp new file mode 100644 index 0000000..14312bb --- /dev/null +++ b/include/Value.hpp @@ -0,0 +1,67 @@ +// Value.hpp +/* +CustomValue template and declarations extended by MACRO in the .def file. +*/ +#ifndef RIF_VALUE_HPP +#define RIF_VALUE_HPP +#include "Basic.hpp" + +#include +#include +#include + +namespace RIF { + +#define CUSTOM_ONE_D_TYPE(CUSTOM_NAME, DATA_TYPE, DATA_WIDTH, DATA_CLASS, \ + MIN_VALUE, MAX_VALUE) \ + struct OneD##CUSTOM_NAME##Val : ValueBase { \ + OneD##CUSTOM_NAME##Val(const std::string &id, const int length, \ + LmulType lmul) \ + : ValueBase(CustomValType::OneD##CUSTOM_NAME, "OneD" #CUSTOM_NAME, id, \ + #DATA_TYPE, length, DATA_CLASS, DATA_WIDTH, lmul) { \ + ptr = new DATA_TYPE[length]; \ + raw = new uint64_t[length]; \ + } \ + virtual ~OneD##CUSTOM_NAME##Val() { \ + delete ptr; \ + delete raw; \ + } \ + virtual void generateCCode(std::ostream &os) override; \ + void generateData() override; \ + DATA_TYPE *ptr; \ + uint64_t *raw; \ + }; \ + DATA_TYPE *getRawPointer(OneD##CUSTOM_NAME##Val *val); +#include "CustomValue.def" +#undef CUSTOM_ONE_D_TYPE +#undef CUSTOM_SCALAR_TYPE + +#define CUSTOM_SCALAR_TYPE(CUSTOM_NAME, DATA_TYPE, DATA_WIDTH, DATA_CLASS, \ + MIN_VALUE, MAX_VALUE) \ + struct Scalar##CUSTOM_NAME##Val : ValueBase { \ + Scalar##CUSTOM_NAME##Val(const std::string &id, const int length, \ + LmulType lmul) \ + : ValueBase(CustomValType::Scalar##CUSTOM_NAME, "Scalar" #CUSTOM_NAME, \ + id, #DATA_TYPE, 1, DATA_CLASS, DATA_WIDTH, lmul) { \ + if (length != 1) \ + std::cerr \ + << "Receive length > 1 when creating scalar value, ignore\n"; \ + ptr = new DATA_TYPE; \ + raw = new uint64_t; \ + } \ + virtual ~Scalar##CUSTOM_NAME##Val() { \ + delete ptr; \ + delete raw; \ + } \ + virtual void generateCCode(std::ostream &os) override; \ + void generateData() override; \ + DATA_TYPE *ptr; \ + uint64_t *raw; \ + }; \ + DATA_TYPE *getRawPointer(Scalar##CUSTOM_NAME##Val *val); +#include "CustomValue.def" +#undef CUSTOM_ONE_D_TYPE +#undef CUSTOM_SCALAR_TYPE + +} // namespace RIF +#endif // #define RIF_VALUE_HPP diff --git a/include/rif-local/vadc_vvm.h b/include/rif-local/vadc_vvm.h new file mode 100644 index 0000000..bbf1a09 --- /dev/null +++ b/include/rif-local/vadc_vvm.h @@ -0,0 +1,7 @@ +// vadc.vvm vd, vs2, vs1, carry +VI_VV_LOOP_WITH_CARRY +({ + const uint128_t op_mask = (UINT64_MAX >> (64 - sew)); + uint128_t res = (op_mask & vs1) + (op_mask & vs2) + carry; + vd = res; +}) diff --git a/include/rif-local/vadc_vxm.h b/include/rif-local/vadc_vxm.h new file mode 100644 index 0000000..562d6b3 --- /dev/null +++ b/include/rif-local/vadc_vxm.h @@ -0,0 +1,7 @@ +// vadc.vxm vd, vs2, rs1, carry +VI_VX_LOOP_WITH_CARRY +({ + const uint128_t op_mask = (UINT64_MAX >> (64 - sew)); + uint128_t res = (op_mask & rs1) + (op_mask & vs2) + carry; + vd = res; +}) diff --git a/include/rif-local/vcpop_m.h b/include/rif-local/vcpop_m.h new file mode 100644 index 0000000..bdd459c --- /dev/null +++ b/include/rif-local/vcpop_m.h @@ -0,0 +1,2 @@ +// vcpop.m rd, vs2, vm +VI_CPOP_LOOP; \ No newline at end of file diff --git a/include/rif-local/vfabs_v.h b/include/rif-local/vfabs_v.h new file mode 100644 index 0000000..6fbaeef --- /dev/null +++ b/include/rif-local/vfabs_v.h @@ -0,0 +1,11 @@ +// vfabs.v vd,vs = vfsgnjx.vv vd,vs,vs +VI_VFP_V_LOOP +({ + vd = fsgnj16(vs.v, vs.v, false, true); +}, +{ + vd = fsgnj32(vs.v, vs.v, false, true); +}, +{ + vd = fsgnj64(vs.v, vs.v, false, true); +}) diff --git a/include/rif-local/vfirst_m.h b/include/rif-local/vfirst_m.h new file mode 100644 index 0000000..c8d885c --- /dev/null +++ b/include/rif-local/vfirst_m.h @@ -0,0 +1,2 @@ +// vfirst.m rd, vs2, vm +VI_VFIRST_LOOP; diff --git a/include/rif-local/vfneg_v.h b/include/rif-local/vfneg_v.h new file mode 100644 index 0000000..fdd0ed0 --- /dev/null +++ b/include/rif-local/vfneg_v.h @@ -0,0 +1,11 @@ +// vfneg.v vd,vs = vfsgnjn.vv vd,vs,vs +VI_VFP_V_LOOP +({ + vd = fsgnj16(vs.v, vs.v, true, false); +}, +{ + vd = fsgnj32(vs.v, vs.v, true, false); +}, +{ + vd = fsgnj64(vs.v, vs.v, true, false); +}) diff --git a/include/rif-local/vid_v.h b/include/rif-local/vid_v.h new file mode 100644 index 0000000..92b2055 --- /dev/null +++ b/include/rif-local/vid_v.h @@ -0,0 +1,2 @@ +// vid.v vd, vm +VI_VID_LOOP; diff --git a/include/rif-local/viota_m.h b/include/rif-local/viota_m.h new file mode 100644 index 0000000..089c3d4 --- /dev/null +++ b/include/rif-local/viota_m.h @@ -0,0 +1,2 @@ +// viota.m vd, vs2, vm +VI_VIOTA_LOOP; diff --git a/include/rif-local/vle16_v.h b/include/rif-local/vle16_v.h new file mode 100644 index 0000000..f13bdc1 --- /dev/null +++ b/include/rif-local/vle16_v.h @@ -0,0 +1,2 @@ +// vle16.v vd, (rs1), vm # 16-bit unit-stride load +UNIT_STRIDE_LOAD; diff --git a/include/rif-local/vle32_v.h b/include/rif-local/vle32_v.h new file mode 100644 index 0000000..e80a469 --- /dev/null +++ b/include/rif-local/vle32_v.h @@ -0,0 +1,2 @@ +// vle32.v vd, (rs1), vm # 32-bit unit-stride load +UNIT_STRIDE_LOAD; diff --git a/include/rif-local/vle64_v.h b/include/rif-local/vle64_v.h new file mode 100644 index 0000000..85c5a05 --- /dev/null +++ b/include/rif-local/vle64_v.h @@ -0,0 +1,2 @@ +// vle64.v vd, (rs1), vm # 64-bit unit-stride load +UNIT_STRIDE_LOAD; diff --git a/include/rif-local/vle8_v.h b/include/rif-local/vle8_v.h new file mode 100644 index 0000000..b0e32e6 --- /dev/null +++ b/include/rif-local/vle8_v.h @@ -0,0 +1,2 @@ +// vle8.v vd, (rs1), vm # 8-bit unit-stride load +UNIT_STRIDE_LOAD; diff --git a/include/rif-local/vloxei16_v.h b/include/rif-local/vloxei16_v.h new file mode 100644 index 0000000..0e560a2 --- /dev/null +++ b/include/rif-local/vloxei16_v.h @@ -0,0 +1,2 @@ +// vloxei16.v vd, (rs1), vs2, vm # ordered 16-bit indexed load of SEW data +INDEX_LOAD_16; diff --git a/include/rif-local/vloxei32_v.h b/include/rif-local/vloxei32_v.h new file mode 100644 index 0000000..381cce1 --- /dev/null +++ b/include/rif-local/vloxei32_v.h @@ -0,0 +1,2 @@ +// vloxei32.v vd, (rs1), vs2, vm # ordered 32-bit indexed load of SEW data +INDEX_LOAD_32; diff --git a/include/rif-local/vloxei64_v.h b/include/rif-local/vloxei64_v.h new file mode 100644 index 0000000..e414a69 --- /dev/null +++ b/include/rif-local/vloxei64_v.h @@ -0,0 +1,2 @@ +// vloxei64.v vd, (rs1), vs2, vm # ordered 64-bit indexed load of SEW data +INDEX_LOAD_64; diff --git a/include/rif-local/vloxei8_v.h b/include/rif-local/vloxei8_v.h new file mode 100644 index 0000000..92ac6e3 --- /dev/null +++ b/include/rif-local/vloxei8_v.h @@ -0,0 +1,2 @@ +// vloxei8.v vd, (rs1), vs2, vm # ordered 8-bit indexed load of SEW data +INDEX_LOAD_8; diff --git a/include/rif-local/vlse16_v.h b/include/rif-local/vlse16_v.h new file mode 100644 index 0000000..34fc90a --- /dev/null +++ b/include/rif-local/vlse16_v.h @@ -0,0 +1,2 @@ +// vlse16.v vd, (rs1), rs2, vm # 16-bit strided load +STRIDED_LOAD; diff --git a/include/rif-local/vlse32_v.h b/include/rif-local/vlse32_v.h new file mode 100644 index 0000000..dee74f8 --- /dev/null +++ b/include/rif-local/vlse32_v.h @@ -0,0 +1,2 @@ +// vlse32.v vd, (rs1), rs2, vm # 32-bit strided load +STRIDED_LOAD; diff --git a/include/rif-local/vlse64_v.h b/include/rif-local/vlse64_v.h new file mode 100644 index 0000000..2f864eb --- /dev/null +++ b/include/rif-local/vlse64_v.h @@ -0,0 +1,2 @@ +// vlse64.v vd, (rs1), rs2, vm # 64-bit strided load +STRIDED_LOAD; diff --git a/include/rif-local/vlse8_v.h b/include/rif-local/vlse8_v.h new file mode 100644 index 0000000..65198e6 --- /dev/null +++ b/include/rif-local/vlse8_v.h @@ -0,0 +1,2 @@ +// vlse8.v vd, (rs1), rs2, vm # 8-bit strided load +STRIDED_LOAD; diff --git a/include/rif-local/vluxei16_v.h b/include/rif-local/vluxei16_v.h new file mode 100644 index 0000000..318f48a --- /dev/null +++ b/include/rif-local/vluxei16_v.h @@ -0,0 +1,2 @@ +// vluxei16.v vd, (rs1), vs2, vm # ordered 16-bit indexed load of SEW data +INDEX_LOAD_16; diff --git a/include/rif-local/vluxei32_v.h b/include/rif-local/vluxei32_v.h new file mode 100644 index 0000000..ac8f298 --- /dev/null +++ b/include/rif-local/vluxei32_v.h @@ -0,0 +1,2 @@ +// vluxei32.v vd, (rs1), vs2, vm # unordered 32-bit indexed load of SEW data +INDEX_LOAD_32; diff --git a/include/rif-local/vluxei64_v.h b/include/rif-local/vluxei64_v.h new file mode 100644 index 0000000..b4443ef --- /dev/null +++ b/include/rif-local/vluxei64_v.h @@ -0,0 +1,2 @@ +// vluxei64.v vd, (rs1), vs2, vm # unordered 64-bit indexed load of SEW data +INDEX_LOAD_64; diff --git a/include/rif-local/vluxei8_v.h b/include/rif-local/vluxei8_v.h new file mode 100644 index 0000000..a7ff62e --- /dev/null +++ b/include/rif-local/vluxei8_v.h @@ -0,0 +1,2 @@ +// vluxei8.v vd, (rs1), vs2, vm # unordered 8-bit indexed load of SEW data +INDEX_LOAD_8; diff --git a/include/rif-local/vmacc_vv.h b/include/rif-local/vmacc_vv.h new file mode 100644 index 0000000..34cc9bf --- /dev/null +++ b/include/rif-local/vmacc_vv.h @@ -0,0 +1,5 @@ +// vmacc.vv: vd[i] = +(vs1[i] * vs2[i]) + vd[i] +VI_VV_MUL_ADD_LOOP +({ + vd0 = vs1 * vs2 + vd1; +}) \ No newline at end of file diff --git a/include/rif-local/vmacc_vx.h b/include/rif-local/vmacc_vx.h new file mode 100644 index 0000000..2e6e9f5 --- /dev/null +++ b/include/rif-local/vmacc_vx.h @@ -0,0 +1,5 @@ +// vmacc.vx: vd[i] = +(x[rs1] * vs2[i]) + vd[i] +VI_VX_MUL_ADD_LOOP +({ + vd0 = rs1 * vs2 + vd1; +}) \ No newline at end of file diff --git a/include/rif-local/vmadc_vv.h b/include/rif-local/vmadc_vv.h new file mode 100644 index 0000000..eb819cd --- /dev/null +++ b/include/rif-local/vmadc_vv.h @@ -0,0 +1,8 @@ +// vmadc.vv vd, vs2, vs1 +VI_VV_LOOP +({ + const uint64_t mmask = 1; + const uint128_t op_mask = (UINT64_MAX >> (64 - sew)); + uint128_t res = (op_mask & vs1) + (op_mask & vs2); + vd = (res >> sew) & mmask; +}) diff --git a/include/rif-local/vmadc_vvm.h b/include/rif-local/vmadc_vvm.h new file mode 100644 index 0000000..6dec7e8 --- /dev/null +++ b/include/rif-local/vmadc_vvm.h @@ -0,0 +1,8 @@ +// vmadc.vv vd, vs2, vs1 +VI_VV_LOOP_WITH_CARRY +({ + const uint64_t mmask = 1; + const uint128_t op_mask = (UINT64_MAX >> (64 - sew)); + uint128_t res = (op_mask & vs1) + (op_mask & vs2) + carry; + vd = (res >> sew) & mmask; +}) diff --git a/include/rif-local/vmadc_vx.h b/include/rif-local/vmadc_vx.h new file mode 100644 index 0000000..08e58b7 --- /dev/null +++ b/include/rif-local/vmadc_vx.h @@ -0,0 +1,8 @@ +// vmadc.vx vd, vs2, rs1 +VI_VX_LOOP +({ + const uint64_t mmask = 1; + const uint128_t op_mask = (UINT64_MAX >> (64 - sew)); + uint128_t res = (op_mask & rs1) + (op_mask & vs2); + vd = (res >> sew) & mmask; +}) diff --git a/include/rif-local/vmadc_vxm.h b/include/rif-local/vmadc_vxm.h new file mode 100644 index 0000000..c6f64d0 --- /dev/null +++ b/include/rif-local/vmadc_vxm.h @@ -0,0 +1,8 @@ +// vmadc.vx vd, vs2, rs1 +VI_VX_LOOP_WITH_CARRY +({ + const uint64_t mmask = 1; + const uint128_t op_mask = (UINT64_MAX >> (64 - sew)); + uint128_t res = (op_mask & rs1) + (op_mask & vs2) + carry; + vd = (res >> sew) & mmask; +}) diff --git a/include/rif-local/vmadd_vv.h b/include/rif-local/vmadd_vv.h new file mode 100644 index 0000000..2280fcc --- /dev/null +++ b/include/rif-local/vmadd_vv.h @@ -0,0 +1,5 @@ +// vmadd: vd[i] = (vd[i] * vs1[i]) + vs2[i] +VI_VV_MUL_ADD_LOOP +({ + vd0 = vd1 * vs1 + vs2; +}) \ No newline at end of file diff --git a/include/rif-local/vmadd_vx.h b/include/rif-local/vmadd_vx.h new file mode 100644 index 0000000..756e45f --- /dev/null +++ b/include/rif-local/vmadd_vx.h @@ -0,0 +1,5 @@ +// vmadd: vd[i] = (vd[i] * x[rs1]) + vs2[i] +VI_VX_MUL_ADD_LOOP +({ + vd0 = vd1 * rs1 + vs2; +}) \ No newline at end of file diff --git a/include/rif-local/vmclr_m.h b/include/rif-local/vmclr_m.h new file mode 100644 index 0000000..6636848 --- /dev/null +++ b/include/rif-local/vmclr_m.h @@ -0,0 +1,2 @@ +// vmclr.m vd => vmxor.mm vd, vd, vd # Clear mask register +VI_LOOP_PSUEDO_NOINPUT_MASK(0); diff --git a/include/rif-local/vmerge_vvm.h b/include/rif-local/vmerge_vvm.h new file mode 100644 index 0000000..c7cab75 --- /dev/null +++ b/include/rif-local/vmerge_vvm.h @@ -0,0 +1,4 @@ +VI_VV_MERGE_LOOP +({ + vd = use_first ? vs1 : vs2; +}) diff --git a/include/rif-local/vmerge_vxm.h b/include/rif-local/vmerge_vxm.h new file mode 100644 index 0000000..0de9cfb --- /dev/null +++ b/include/rif-local/vmerge_vxm.h @@ -0,0 +1,4 @@ +VI_VX_MERGE_LOOP +({ + vd = use_first ? rs1 : vs2; +}) diff --git a/include/rif-local/vmfge_vv.h b/include/rif-local/vmfge_vv.h new file mode 100644 index 0000000..c6dd4f1 --- /dev/null +++ b/include/rif-local/vmfge_vv.h @@ -0,0 +1,11 @@ +// vmfle.vv vd, vb, va, vm = vmfge.vv vd, va, vb, vm +VI_VFP_VV_LOOP_CMP +({ + res = f16_le(vs1, vs2); +}, +{ + res = f32_le(vs1, vs2); +}, +{ + res = f64_le(vs1, vs2); +}) diff --git a/include/rif-local/vmfgt_vv.h b/include/rif-local/vmfgt_vv.h new file mode 100644 index 0000000..5adf7ef --- /dev/null +++ b/include/rif-local/vmfgt_vv.h @@ -0,0 +1,11 @@ +// vmflt.vv vd, vb, va, vm = vmfgt.vv vd, va, vb, vm +VI_VFP_VV_LOOP_CMP +({ + res = f16_lt(vs1, vs2); +}, +{ + res = f32_lt(vs1, vs2); +}, +{ + res = f64_lt(vs1, vs2); +}) diff --git a/include/rif-local/vmmv_m.h b/include/rif-local/vmmv_m.h new file mode 100644 index 0000000..cc12674 --- /dev/null +++ b/include/rif-local/vmmv_m.h @@ -0,0 +1,2 @@ +// vmmv.m vd, vs => vmand.mm vd, vs, vs # Copy mask register +VI_LOOP_PSUEDO_MASK(vs & vs); diff --git a/include/rif-local/vmnot_m.h b/include/rif-local/vmnot_m.h new file mode 100644 index 0000000..94b481e --- /dev/null +++ b/include/rif-local/vmnot_m.h @@ -0,0 +1,2 @@ +// vmnot.m vd, vs => vmnand.mm vd, vs, vs # Invert bits +VI_LOOP_PSUEDO_MASK(~(vs & vs)); diff --git a/include/rif-local/vmsbc_vv.h b/include/rif-local/vmsbc_vv.h new file mode 100644 index 0000000..cbb6aa8 --- /dev/null +++ b/include/rif-local/vmsbc_vv.h @@ -0,0 +1,8 @@ +// vmsbc.vv vd, vs2, vs1 +VI_VV_LOOP +({ + const uint64_t mmask = 1; + const uint128_t op_mask = (UINT64_MAX >> (64 - sew)); + uint128_t res = (op_mask & vs2) - (op_mask & vs1); + vd = (res >> sew) & mmask; +}) diff --git a/include/rif-local/vmsbc_vvm.h b/include/rif-local/vmsbc_vvm.h new file mode 100644 index 0000000..05f4dec --- /dev/null +++ b/include/rif-local/vmsbc_vvm.h @@ -0,0 +1,8 @@ +// vmsbc.vvm vd, vs2, vs1 +VI_VV_LOOP_WITH_CARRY +({ + const uint64_t mmask = 1; + const uint128_t op_mask = (UINT64_MAX >> (64 - sew)); + uint128_t res = (op_mask & vs2) - (op_mask & vs1) - carry; + vd = (res >> sew) & mmask; +}) diff --git a/include/rif-local/vmsbc_vx.h b/include/rif-local/vmsbc_vx.h new file mode 100644 index 0000000..c736d0e --- /dev/null +++ b/include/rif-local/vmsbc_vx.h @@ -0,0 +1,8 @@ +// vmsbc.vx vd, vs2, rs1 +VI_VX_LOOP +({ + const uint64_t mmask = 1; + const uint128_t op_mask = (UINT64_MAX >> (64 - sew)); + uint128_t res = (op_mask & vs2) - (op_mask & rs1); + vd = (res >> sew) & mmask; +}) diff --git a/include/rif-local/vmsbc_vxm.h b/include/rif-local/vmsbc_vxm.h new file mode 100644 index 0000000..ebc1f99 --- /dev/null +++ b/include/rif-local/vmsbc_vxm.h @@ -0,0 +1,8 @@ +// vmsbc.vxm vd, vs2, vs1 +VI_VX_LOOP_WITH_CARRY +({ + const uint64_t mmask = 1; + const uint128_t op_mask = (UINT64_MAX >> (64 - sew)); + uint128_t res = (op_mask & vs2) - (op_mask & rs1) - carry; + vd = (res >> sew) & mmask; +}) diff --git a/include/rif-local/vmsbf_m.h b/include/rif-local/vmsbf_m.h new file mode 100644 index 0000000..82875f2 --- /dev/null +++ b/include/rif-local/vmsbf_m.h @@ -0,0 +1,2 @@ +// vmsbf.m vd, vs2, vm +VI_VMSBF_LOOP; \ No newline at end of file diff --git a/include/rif-local/vmset_m.h b/include/rif-local/vmset_m.h new file mode 100644 index 0000000..34295f4 --- /dev/null +++ b/include/rif-local/vmset_m.h @@ -0,0 +1,2 @@ +// vmset.m vd => vmxnor.mm vd, vd, vd # Set mask register +VI_LOOP_PSUEDO_NOINPUT_MASK(1); diff --git a/include/rif-local/vmsge_vv.h b/include/rif-local/vmsge_vv.h new file mode 100644 index 0000000..6b6f26b --- /dev/null +++ b/include/rif-local/vmsge_vv.h @@ -0,0 +1,6 @@ +// vmsgeu.vv vd, vs2, vs1, vm +VI_VV_LOOP_CMP +({ + res = vs2 >= vs1; +}) + diff --git a/include/rif-local/vmsge_vx.h b/include/rif-local/vmsge_vx.h new file mode 100644 index 0000000..6b5a374 --- /dev/null +++ b/include/rif-local/vmsge_vx.h @@ -0,0 +1,6 @@ +// vmsgeu.vx vd, vs2, rs1, vm +VI_VX_LOOP_CMP +({ + res = vs2 >= rs1; +}) + diff --git a/include/rif-local/vmsgeu_vv.h b/include/rif-local/vmsgeu_vv.h new file mode 100644 index 0000000..31ca981 --- /dev/null +++ b/include/rif-local/vmsgeu_vv.h @@ -0,0 +1,5 @@ +// vmsgeu.vv vd, vs2, vs1 +VI_VV_ULOOP_CMP +({ + res = vs2 >= vs1; +}) diff --git a/include/rif-local/vmsgeu_vx.h b/include/rif-local/vmsgeu_vx.h new file mode 100644 index 0000000..5c072d2 --- /dev/null +++ b/include/rif-local/vmsgeu_vx.h @@ -0,0 +1,5 @@ +// vmsgeu.vx vd, vs2, rs1 +VI_VX_ULOOP_CMP +({ + res = vs2 >= rs1; +}) diff --git a/include/rif-local/vmsgt_vv.h b/include/rif-local/vmsgt_vv.h new file mode 100644 index 0000000..2af0ef9 --- /dev/null +++ b/include/rif-local/vmsgt_vv.h @@ -0,0 +1,5 @@ +// vmsgt.vv vd, vs2, vs1 +VI_VV_LOOP_CMP +({ + res = vs2 > vs1; +}) diff --git a/include/rif-local/vmsgtu_vv.h b/include/rif-local/vmsgtu_vv.h new file mode 100644 index 0000000..eeea98e --- /dev/null +++ b/include/rif-local/vmsgtu_vv.h @@ -0,0 +1,5 @@ +// vmsgtu.vv vd, vs2, vs1 +VI_VV_ULOOP_CMP +({ + res = vs2 > vs1; +}) diff --git a/include/rif-local/vmsif_m.h b/include/rif-local/vmsif_m.h new file mode 100644 index 0000000..c0b5409 --- /dev/null +++ b/include/rif-local/vmsif_m.h @@ -0,0 +1,2 @@ +// vmsif.m vd, vs2, vm +VI_VMSIF_LOOP; diff --git a/include/rif-local/vmsof_m.h b/include/rif-local/vmsof_m.h new file mode 100644 index 0000000..98ed45a --- /dev/null +++ b/include/rif-local/vmsof_m.h @@ -0,0 +1,2 @@ +// vmsof.m vd, vs2, vm +VI_VMSOF_LOOP; diff --git a/include/rif-local/vmv_v_v.h b/include/rif-local/vmv_v_v.h new file mode 100644 index 0000000..e2f915f --- /dev/null +++ b/include/rif-local/vmv_v_v.h @@ -0,0 +1,2 @@ +// vmv.v.v vd, vs # vd[i] = vs[i] +VI_V_LOOP({ vd = vs; }) diff --git a/include/rif-local/vmv_v_x.h b/include/rif-local/vmv_v_x.h new file mode 100644 index 0000000..e867dd9 --- /dev/null +++ b/include/rif-local/vmv_v_x.h @@ -0,0 +1,2 @@ +// vmv.v.x vd, rs # vd[i] = x[rs] +VI_X_LOOP({ vd = rs; }) diff --git a/include/rif-local/vncvt_x_x_w.h b/include/rif-local/vncvt_x_x_w.h new file mode 100644 index 0000000..0bcf958 --- /dev/null +++ b/include/rif-local/vncvt_x_x_w.h @@ -0,0 +1,3 @@ +// vncvt.x.x.w vd,vs,vm +// (vncvt.x.x.w vd,vs,vm = vnsrl.wx vd,vs,x0,vm) +VI_V_LOOP({ vd = vs; }) diff --git a/include/rif-local/vneg_v.h b/include/rif-local/vneg_v.h new file mode 100644 index 0000000..241a27e --- /dev/null +++ b/include/rif-local/vneg_v.h @@ -0,0 +1,3 @@ +// vneg.v vd,vs +// (vneg.v vd,vs = vrsub.vx vd,vs,x0) +VI_V_LOOP({ vd = -vs; }) diff --git a/include/rif-local/vnmsac_vv.h b/include/rif-local/vnmsac_vv.h new file mode 100644 index 0000000..85e32de --- /dev/null +++ b/include/rif-local/vnmsac_vv.h @@ -0,0 +1,5 @@ +// vmsac.vv: vd[i] = -(vs1[i] * vs2[i]) + vd[i] +VI_VV_MUL_ADD_LOOP +({ + vd0 = -(vs1 * vs2) + vd1; +}) \ No newline at end of file diff --git a/include/rif-local/vnmsac_vx.h b/include/rif-local/vnmsac_vx.h new file mode 100644 index 0000000..24ebc1c --- /dev/null +++ b/include/rif-local/vnmsac_vx.h @@ -0,0 +1,5 @@ +// vmsac: vd[i] = -(x[rs1] * vs2[i]) + vd[i] +VI_VX_MUL_ADD_LOOP +({ + vd0 = -(rs1 * vs2) + vd1; +}) \ No newline at end of file diff --git a/include/rif-local/vnmsub_vv.h b/include/rif-local/vnmsub_vv.h new file mode 100644 index 0000000..a8dafab --- /dev/null +++ b/include/rif-local/vnmsub_vv.h @@ -0,0 +1,5 @@ +// vnmsub.vv: vd[i] = -(vd[i] * vs1[i]) + vs2[i] +VI_VV_MUL_ADD_LOOP +({ + vd0 = -(vd1 * vs1) + vs2; +}) \ No newline at end of file diff --git a/include/rif-local/vnmsub_vx.h b/include/rif-local/vnmsub_vx.h new file mode 100644 index 0000000..ca853ee --- /dev/null +++ b/include/rif-local/vnmsub_vx.h @@ -0,0 +1,5 @@ +// vnmsub.vx: vd[i] = -(vd[i] * x[rs1]) + vs2[i] +VI_VX_MUL_ADD_LOOP +({ + vd0 = -(vd1 * rs1) + vs2; +}) \ No newline at end of file diff --git a/include/rif-local/vnot_v.h b/include/rif-local/vnot_v.h new file mode 100644 index 0000000..a5a4a00 --- /dev/null +++ b/include/rif-local/vnot_v.h @@ -0,0 +1,2 @@ +// vnot.v vd,vs,vm = vxor.vi vd,vs,-1,vm +VI_V_LOOP({ vd = ~vs; }) diff --git a/include/rif-local/vsbc_vvm.h b/include/rif-local/vsbc_vvm.h new file mode 100644 index 0000000..ddadb74 --- /dev/null +++ b/include/rif-local/vsbc_vvm.h @@ -0,0 +1,7 @@ +// vsbc.vvm vd, vs2, vs1, carry +VI_VV_LOOP_WITH_CARRY +({ + const uint128_t op_mask = (UINT64_MAX >> (64 - sew)); + uint128_t res = (op_mask & vs2) - (op_mask & vs1) - carry; + vd = res; +}) diff --git a/include/rif-local/vsbc_vxm.h b/include/rif-local/vsbc_vxm.h new file mode 100644 index 0000000..0cc261a --- /dev/null +++ b/include/rif-local/vsbc_vxm.h @@ -0,0 +1,7 @@ +// vsbc.vxm vd, vs2, rs1, carry +VI_VX_LOOP_WITH_CARRY +({ + const uint128_t op_mask = (UINT64_MAX >> (64 - sew)); + uint128_t res = (op_mask & vs2) - (op_mask & rs1) - carry; + vd = res; +}) diff --git a/include/rif-local/vse16_v.h b/include/rif-local/vse16_v.h new file mode 100644 index 0000000..72beb01 --- /dev/null +++ b/include/rif-local/vse16_v.h @@ -0,0 +1,2 @@ +// vse16.v vs3, (rs1), vm # 16-bit unit-stride store +UNIT_STRIDE_STORE; diff --git a/include/rif-local/vse32_v.h b/include/rif-local/vse32_v.h new file mode 100644 index 0000000..3f7e826 --- /dev/null +++ b/include/rif-local/vse32_v.h @@ -0,0 +1,2 @@ +// vse32.v vs3, (rs1), vm # 32-bit unit-stride store +UNIT_STRIDE_STORE; diff --git a/include/rif-local/vse64_v.h b/include/rif-local/vse64_v.h new file mode 100644 index 0000000..e639348 --- /dev/null +++ b/include/rif-local/vse64_v.h @@ -0,0 +1,2 @@ +// vse64.v vs3, (rs1), vm # 64-bit unit-stride store +UNIT_STRIDE_STORE; diff --git a/include/rif-local/vse8_v.h b/include/rif-local/vse8_v.h new file mode 100644 index 0000000..f17f6ec --- /dev/null +++ b/include/rif-local/vse8_v.h @@ -0,0 +1,2 @@ +// vse8.v vs3, (rs1), vm # 8-bit unit-stride store +UNIT_STRIDE_STORE; diff --git a/include/rif-local/vsext_v.h b/include/rif-local/vsext_v.h new file mode 100644 index 0000000..fc6b2f3 --- /dev/null +++ b/include/rif-local/vsext_v.h @@ -0,0 +1,4 @@ +// vsext.vf2 vd, vs2, vm # Sign-extend SEW/2 source to SEW destination +// vsext.vf4 vd, vs2, vm # Sign-extend SEW/4 source to SEW destination +// vsext.vf8 vd, vs2, vm # Sign-extend SEW/8 source to SEW destination +VI_V_LOOP({ vd = vs; }) diff --git a/include/rif-local/vsoxei16_v.h b/include/rif-local/vsoxei16_v.h new file mode 100644 index 0000000..f766578 --- /dev/null +++ b/include/rif-local/vsoxei16_v.h @@ -0,0 +1,2 @@ +// vsoxei16.v vs3, (rs1), vs2, vm # ordered 16-bit indexed store of SEW data +INDEX_STORE_16; diff --git a/include/rif-local/vsoxei32_v.h b/include/rif-local/vsoxei32_v.h new file mode 100644 index 0000000..5585a29 --- /dev/null +++ b/include/rif-local/vsoxei32_v.h @@ -0,0 +1,2 @@ +// vsoxei32.v vs3, (rs1), vs2, vm # ordered 32-bit indexed store of SEW data +INDEX_STORE_32; diff --git a/include/rif-local/vsoxei64_v.h b/include/rif-local/vsoxei64_v.h new file mode 100644 index 0000000..5942ae6 --- /dev/null +++ b/include/rif-local/vsoxei64_v.h @@ -0,0 +1,2 @@ +// vsoxei64.v vs3, (rs1), vs2, vm # ordered 64-bit indexed store of SEW data +INDEX_STORE_64; diff --git a/include/rif-local/vsoxei8_v.h b/include/rif-local/vsoxei8_v.h new file mode 100644 index 0000000..0d72104 --- /dev/null +++ b/include/rif-local/vsoxei8_v.h @@ -0,0 +1,2 @@ +// vsoxei8.v vs3, (rs1), vs2, vm # ordered 8-bit indexed store of SEW data +INDEX_STORE_8; diff --git a/include/rif-local/vsse16_v.h b/include/rif-local/vsse16_v.h new file mode 100644 index 0000000..84c567c --- /dev/null +++ b/include/rif-local/vsse16_v.h @@ -0,0 +1,2 @@ +// vsse16.v vs3, (rs1), rs2, vm # 16-bit strided store +STRIDED_STORE; diff --git a/include/rif-local/vsse32_v.h b/include/rif-local/vsse32_v.h new file mode 100644 index 0000000..979ac75 --- /dev/null +++ b/include/rif-local/vsse32_v.h @@ -0,0 +1,2 @@ +// vsse32.v vs3, (rs1), rs2, vm # 32-bit strided store +STRIDED_STORE; diff --git a/include/rif-local/vsse64_v.h b/include/rif-local/vsse64_v.h new file mode 100644 index 0000000..1ea2a86 --- /dev/null +++ b/include/rif-local/vsse64_v.h @@ -0,0 +1,2 @@ +// vsse64.v vs3, (rs1), rs2, vm # 64-bit strided store +STRIDED_STORE; diff --git a/include/rif-local/vsse8_v.h b/include/rif-local/vsse8_v.h new file mode 100644 index 0000000..2617291 --- /dev/null +++ b/include/rif-local/vsse8_v.h @@ -0,0 +1,2 @@ +// vsse8.v vs3, (rs1), rs2, vm # 8-bit strided store +STRIDED_STORE; diff --git a/include/rif-local/vsuxei16_v.h b/include/rif-local/vsuxei16_v.h new file mode 100644 index 0000000..7d97ee3 --- /dev/null +++ b/include/rif-local/vsuxei16_v.h @@ -0,0 +1,2 @@ +// vsuxei16.v vs3, (rs1), vs2, vm # unordered 16-bit indexed store of SEW data +INDEX_STORE_16; diff --git a/include/rif-local/vsuxei32_v.h b/include/rif-local/vsuxei32_v.h new file mode 100644 index 0000000..25edb8c --- /dev/null +++ b/include/rif-local/vsuxei32_v.h @@ -0,0 +1,2 @@ +// vsuxei32.v vs3, (rs1), vs2, vm # unordered 32-bit indexed store of SEW data +INDEX_STORE_32; diff --git a/include/rif-local/vsuxei64_v.h b/include/rif-local/vsuxei64_v.h new file mode 100644 index 0000000..623884d --- /dev/null +++ b/include/rif-local/vsuxei64_v.h @@ -0,0 +1,2 @@ +// vsuxei64.v vs3, (rs1), vs2, vm # unordered 64-bit indexed store of SEW data +INDEX_STORE_64; diff --git a/include/rif-local/vsuxei8_v.h b/include/rif-local/vsuxei8_v.h new file mode 100644 index 0000000..877dbb3 --- /dev/null +++ b/include/rif-local/vsuxei8_v.h @@ -0,0 +1,2 @@ +// vsuxei8.v vs3, (rs1), vs2, vm # unordered 8-bit indexed store of SEW data +INDEX_STORE_8; diff --git a/include/rif-local/vwcvt_x_x_v.h b/include/rif-local/vwcvt_x_x_v.h new file mode 100644 index 0000000..18adffa --- /dev/null +++ b/include/rif-local/vwcvt_x_x_v.h @@ -0,0 +1,3 @@ +// vwcvt.x.x.v vd,vs,vm +// (vwcvt.x.x.v vd,vs,vm = vwadd.vx vd,vs,x0,vm) +VI_V_LOOP({ vd = vs; }) diff --git a/include/rif-local/vwcvtu_x_x_v.h b/include/rif-local/vwcvtu_x_x_v.h new file mode 100644 index 0000000..4bf12ed --- /dev/null +++ b/include/rif-local/vwcvtu_x_x_v.h @@ -0,0 +1,4 @@ + +// vwcvtu.x.x.v vd,vs,vm +// (vwcvtu.x.x.v vd,vs,vm = vwaddu.vx vd,vs,x0,vm) +VI_V_LOOP({ vd = vs; }) diff --git a/include/rif-local/vwmacc_vv.h b/include/rif-local/vwmacc_vv.h new file mode 100644 index 0000000..58b0553 --- /dev/null +++ b/include/rif-local/vwmacc_vv.h @@ -0,0 +1,6 @@ +// vwmacc.vv vd, vs2, vs1 +VI_CHECK_DSS(true); +VI_VV_MUL_ADD_LOOP_WIDEN +({ + VI_WIDE_OP_AND_ASSIGN(vs2, vs1, vd_w, *, +, int); +}) \ No newline at end of file diff --git a/include/rif-local/vwmacc_vx.h b/include/rif-local/vwmacc_vx.h new file mode 100644 index 0000000..36bdf90 --- /dev/null +++ b/include/rif-local/vwmacc_vx.h @@ -0,0 +1,6 @@ +// vwmacc.vx vd, vs2, rs1 +VI_CHECK_DSS(false); +VI_VX_MUL_ADD_LOOP_WIDEN +({ + VI_WIDE_OP_AND_ASSIGN(vs2, rs1, vd_w, *, +, int); +}) \ No newline at end of file diff --git a/include/rif-local/vwmaccsu_vv.h b/include/rif-local/vwmaccsu_vv.h new file mode 100644 index 0000000..a36f7d4 --- /dev/null +++ b/include/rif-local/vwmaccsu_vv.h @@ -0,0 +1,6 @@ +// vwmaccsu.vv vd, vs2, vs1 +VI_CHECK_DSS(true); +VI_VV_MUL_ADD_LOOP_WIDEN +({ + VI_WIDE_OP_AND_ASSIGN_MIX(vs2, vs1, vd_w, *, +, int, uint, int); +}) \ No newline at end of file diff --git a/include/rif-local/vwmaccsu_vx.h b/include/rif-local/vwmaccsu_vx.h new file mode 100644 index 0000000..df94cc5 --- /dev/null +++ b/include/rif-local/vwmaccsu_vx.h @@ -0,0 +1,6 @@ +// vwmaccsu.vx vd, vs2, rs1 +VI_CHECK_DSS(false); +VI_VX_MUL_ADD_LOOP_WIDEN +({ + VI_WIDE_OP_AND_ASSIGN_MIX(vs2, rs1, vd_w, *, +, int, uint, int); +}) \ No newline at end of file diff --git a/include/rif-local/vwmaccu_vv.h b/include/rif-local/vwmaccu_vv.h new file mode 100644 index 0000000..76f15fd --- /dev/null +++ b/include/rif-local/vwmaccu_vv.h @@ -0,0 +1,6 @@ +// vwmacc.vv vd, vs2, vs1 +VI_CHECK_DSS(true); +VI_VV_MUL_ADD_LOOP_WIDEN +({ + VI_WIDE_OP_AND_ASSIGN(vs2, vs1, vd_w, *, +, uint); +}) diff --git a/include/rif-local/vwmaccu_vx.h b/include/rif-local/vwmaccu_vx.h new file mode 100644 index 0000000..0358944 --- /dev/null +++ b/include/rif-local/vwmaccu_vx.h @@ -0,0 +1,6 @@ +// vwmacc.vx vd, vs2, rs1 +VI_CHECK_DSS(false); +VI_VX_MUL_ADD_LOOP_WIDEN +({ + VI_WIDE_OP_AND_ASSIGN(vs2, rs1, vd_w, *, +, uint); +}) diff --git a/include/rif-local/vwmaccus_vx.h b/include/rif-local/vwmaccus_vx.h new file mode 100644 index 0000000..b09c69e --- /dev/null +++ b/include/rif-local/vwmaccus_vx.h @@ -0,0 +1,6 @@ +// vwmaccus.vx vd, vs2, rs1 +VI_CHECK_DSS(false); +VI_VX_MUL_ADD_LOOP_WIDEN +({ + VI_WIDE_OP_AND_ASSIGN_MIX(vs2, rs1, vd_w, *, +, int, int, uint); +}) \ No newline at end of file diff --git a/include/rif-local/vzext_v.h b/include/rif-local/vzext_v.h new file mode 100644 index 0000000..e87d43f --- /dev/null +++ b/include/rif-local/vzext_v.h @@ -0,0 +1,4 @@ +// vzext.vf2 vd, vs2, vm # Zero-extend SEW/2 source to SEW destination +// vzext.vf4 vd, vs2, vm # Zero-extend SEW/4 source to SEW destination +// vzext.vf8 vd, vs2, vm # Zero-extend SEW/8 source to SEW destination +VI_V_LOOP({ vd = vs; }) diff --git a/jenkins-ci.sh b/jenkins-ci.sh new file mode 100755 index 0000000..f5ed410 --- /dev/null +++ b/jenkins-ci.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +set -e + +source /sifive/tools/Modules/init-chooser + +if module is-loaded kitware/cmake +then + module unload kitware/cmake +fi +if module is-loaded python/python +then + module unload python/python +fi +if module is-loaded clang +then + module unload clang +fi +if module is-loaded gcc/gcc +then + module unload gcc/gcc +fi +module load kitware/cmake/3.18.4 +module load python/python/3.9.2 +module load clang/12.0.1.1 +module load gcc/gcc/11.2.0 + +hostname + +mkdir build && cd build +cmake .. +make -j$(nproc) +make test ARGS=-V diff --git a/library/Basic.cpp b/library/Basic.cpp new file mode 100644 index 0000000..31d352a --- /dev/null +++ b/library/Basic.cpp @@ -0,0 +1,267 @@ +// Basic.cpp +/* +Implementations. +*/ +#include "Basic.hpp" + +#include + +using namespace std; + +namespace RIF { + +string ValueBase::getNameWithType() const { return typeID + "_" + id; } + +bool isScalarValue(const ValueBase *value) { + if (value->typeID.find("Op") != std::string::npos) { + std::cerr << "[isScalarValue] Should not feed operator to isScalarValue\n"; + exit(1); + } + return value->typeID.find("Scalar") != std::string::npos; +} + +bool isOneDValue(const ValueBase *value) { + if (value->typeID.find("Op") != std::string::npos) { + std::cerr << "[isScalarValue] Should not feed operator to isOneDValue\n"; + exit(1); + } + return value->typeID.find("OneD") != std::string::npos; +} + +DataTypeEnum getDataTypeEnum(const char *dataTypeString) { + if (strcmp(dataTypeString, "uint8_t") == 0) + return DataTypeEnum::Uint8_t; + else if (strcmp(dataTypeString, "uint16_t") == 0) + return DataTypeEnum::Uint16_t; + else if (strcmp(dataTypeString, "uint32_t") == 0) + return DataTypeEnum::Uint32_t; + else if (strcmp(dataTypeString, "uint64_t") == 0) + return DataTypeEnum::Uint64_t; + else if (strcmp(dataTypeString, "int8_t") == 0) + return DataTypeEnum::Int8_t; + else if (strcmp(dataTypeString, "int16_t") == 0) + return DataTypeEnum::Int16_t; + else if (strcmp(dataTypeString, "int32_t") == 0) + return DataTypeEnum::Int32_t; + else if (strcmp(dataTypeString, "int64_t") == 0) + return DataTypeEnum::Int64_t; + else if (strcmp(dataTypeString, "float16_t") == 0) + return DataTypeEnum::Float16_t; + else if (strcmp(dataTypeString, "float32_t") == 0) + return DataTypeEnum::Float32_t; + else if (strcmp(dataTypeString, "float64_t") == 0) + return DataTypeEnum::Float64_t; + else if (strcmp(dataTypeString, "ptrdiff_t") == 0) + return DataTypeEnum::Ptrdiff_t; + else if (strcmp(dataTypeString, "size_t") == 0) + return DataTypeEnum::Size_t; + else + assert(false && "Unhandled type"); +} + +bool isIntegral(DataTypeEnum dt) { + return dt == DataTypeEnum::Uint8_t || dt == DataTypeEnum::Uint16_t || + dt == DataTypeEnum::Uint32_t || dt == DataTypeEnum::Uint64_t || + dt == DataTypeEnum::Int8_t || dt == DataTypeEnum::Int16_t || + dt == DataTypeEnum::Int32_t || dt == DataTypeEnum::Int64_t || + dt == DataTypeEnum::Ptrdiff_t || dt == DataTypeEnum::Size_t; +} + +bool isWideningOperator(OperatorBase *op) { + return op->opAttr & WideningOperation; +} + +// is X Widen of Y +bool isWideningValue(ValueBase *x, ValueBase *y) { + if (x == nullptr || y == nullptr) + return false; + return x->typeInfo->sew.to_int() == y->typeInfo->sew.to_int() * 2; +} + +bool isNarrowingOperator(OperatorBase *op) { + return op->opAttr & NarrowingOperation; +} + +// is X Narrow of Y +bool isNarrowingValue(ValueBase *x, ValueBase *y) { + if (x == nullptr || y == nullptr) + return false; + return x->typeInfo->sew.to_int() * 2 == y->typeInfo->sew.to_int(); +} + +bool hasMask(const OperatorBase *op) { return op->opAttr & MaskedOperation; } + +bool hasNonmask(const OperatorBase *op) { + return op->opAttr & NonmaskedOperation; +} + +bool hasTA(const OperatorBase *op) { return op->opAttr & TailAgnostic; } + +bool hasTU(const OperatorBase *op) { return op->opAttr & TailUndisturbed; } + +bool hasMA(const OperatorBase *op) { return op->opAttr & MaskAgnostic; } + +bool hasMU(const OperatorBase *op) { return op->opAttr & MaskUndisturbed; } + +bool hasTAMA(const OperatorBase *op) { return hasTA(op) && hasMA(op); } + +bool hasTAMU(const OperatorBase *op) { return hasTA(op) && hasMU(op); } + +bool hasTUMA(const OperatorBase *op) { return hasTU(op) && hasMA(op); } + +bool hasTUMU(const OperatorBase *op) { return hasTU(op) && hasMU(op); } + +bool isExplicitPolicy(OperatorBase *op) { + return hasTA(op) || hasTU(op) || hasMA(op) || hasMU(op); +} + +bool haveTailPolicy(OperatorBase *op) { return hasTA(op) || hasTU(op); } + +bool haveMaskPolicy(OperatorBase *op) { return hasMA(op) || hasMU(op); } + +ValueBase *getVd(OperatorBase *op) { return op->outputs[0]; } + +ValueBase *getMask(OperatorBase *op) { + ValueBase *mask = nullptr; + if (hasMask(op)) + mask = op->inputs[0]; + return mask; +} + +ValueBase *getMaskedoff(OperatorBase *op) { + ValueBase *maskedoff = nullptr; + if (hasMask(op)) { + if (op->opAttr & ReductionOperation && !hasTU(op)) + maskedoff = nullptr; + else if (op->opAttr & NoMaskedOff) + maskedoff = nullptr; + else + maskedoff = op->inputs[1]; + } else if (op->opAttr & MulAddOperation) + maskedoff = op->inputs[0]; + else if (hasTU(op)) + maskedoff = op->inputs[0]; + return maskedoff; +} + +ValueBase *getVs2(OperatorBase *op) { + ValueBase *vs2 = nullptr; + if (!(op->opAttr & NoInputOperation)) { + if (op->opAttr & MulAddOperation) + vs2 = hasMask(op) ? op->inputs[3] : op->inputs[2]; + else if (op->opAttr & ReductionOperation) + vs2 = hasMask(op) ? hasTU(op) ? op->inputs[2] : op->inputs[1] + : hasTU(op) ? op->inputs[1] + : op->inputs[0]; + else if (op->opAttr & MergeOperation) { + assert(hasNonmask(op)); + vs2 = hasTU(op) ? op->inputs[2] : op->inputs[1]; + } else + vs2 = hasMask(op) + ? (op->opAttr & NoMaskedOff ? op->inputs[1] : op->inputs[2]) + : hasTU(op) ? op->inputs[1] + : op->inputs[0]; + } + return vs2; +} + +bool isExistVs1Rs1(OperatorBase *op) { + std::string typeID = op->typeID; + std::string operandType = typeID.substr(typeID.find("_") + 1); + + if (operandType == "m") + return false; + + if (ends_with(typeID, "_v") || ends_with(typeID, "_x") || + ends_with(typeID, "_w") || ends_with(typeID, "_f")) + return false; + + if (operandType == "vf2" || operandType == "vf4" || operandType == "vf8") + return false; + + if (op->opAttr & ReductionOperation) + return false; + + return true; +} + +ValueBase *getVs1(OperatorBase *op) { + ValueBase *vs1 = nullptr; + if (!(op->opAttr & NoInputOperation) && isExistVs1Rs1(op)) { + if (op->opAttr & MulAddOperation) + vs1 = hasMask(op) ? op->inputs[2] : op->inputs[1]; + else if (op->opAttr & ReductionOperation) + return vs1; + else if (op->opAttr & MergeOperation) { + assert(hasNonmask(op)); + vs1 = hasTU(op) ? op->inputs[3] : op->inputs[2]; + } else + vs1 = hasMask(op) + ? (op->opAttr & NoMaskedOff ? op->inputs[2] : op->inputs[3]) + : hasTU(op) ? op->inputs[2] + : op->inputs[1]; + } + return vs1; +} + +bool isMaskOfOperator(OperatorBase *op, ValueBase *value) { + return getMask(op) == value; +} + +bool isMaskedoffOfOperator(OperatorBase *op, ValueBase *value) { + return getMaskedoff(op) == value; +} + +bool isVs2OfOperator(OperatorBase *op, ValueBase *value) { + return getVs2(op) == value; +} + +bool isVs1OfOperator(OperatorBase *op, ValueBase *value) { + return getVs1(op) == value; +} + +void initializeLmul(OperatorBase *op) { + std::string typeID = op->typeID; + std::string operandType = typeID.substr(typeID.find("_") + 1); + + int gap = op->typeInfo->lmul - getSmallestLmulForSew(op->typeInfo->sew); + assert(gap >= 0); + + for (auto input : op->inputs) { + assert(input != nullptr); + input->typeInfo = TypeInfo::setLmul( + *input->typeInfo, + static_cast(gap + + getSmallestLmulForSew(input->typeInfo->sew))); + } + + auto vd = getVd(op); + assert(vd != nullptr); + vd->typeInfo = TypeInfo::setLmul( + *vd->typeInfo, + static_cast(gap + getSmallestLmulForSew(vd->typeInfo->sew))); + + if (op->opAttr & ReductionOperation) { + // Note: Output of reduction result is fixed to m1 + vd->typeInfo = TypeInfo::create(LmulType::m1, vd->typeInfo->sew, + vd->typeInfo->typeClass); + } + + auto maskedoff = getMaskedoff(op); + if (maskedoff) + maskedoff->typeInfo = vd->typeInfo; +} + +bool ends_with(std::string const &value, std::string const &ending) { + if (ending.size() > value.size()) + return false; + return std::equal(ending.rbegin(), ending.rend(), value.rbegin()); +} + +LmulType getSmallestLmulForSew(SewType sew) { + static std::map log2LUT = {{1, 0}, {2, 1}, {4, 2}, {8, 3}, + {16, 4}, {32, 5}, {64, 6}}; + return static_cast(log2LUT[sew.to_int()] - 3); +} + +} // namespace RIF diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt new file mode 100644 index 0000000..cb2c918 --- /dev/null +++ b/library/CMakeLists.txt @@ -0,0 +1,22 @@ +include_directories(${INC}) +include_directories(${INC}/rif-local) +include_directories(${SPIKE}/riscv/insns) +include_directories(${SPIKE}/riscv) +include_directories(${SOFTFLOAT}/include) + +add_library(Utils Utils.cpp) +target_link_libraries(Utils softfloat) +add_library(Basic Basic.cpp) +add_library(Processor Processor.cpp) +add_library(Operator Operator.cpp) +target_link_libraries(Operator softfloat) +add_library(Value Value.cpp Utils) +target_link_libraries(Value softfloat) +add_library(TypeInfo TypeInfo.cpp) +add_library(Graph Graph.cpp Basic Processor Operator Value TypeInfo Utils) +target_link_libraries(Graph softfloat) +add_library(FuseGraph FuseGraph.cpp Graph) +target_link_libraries(FuseGraph Graph) + +add_dependencies(Operator generate_headers softfloat) +add_dependencies(Graph generate_headers softfloat) diff --git a/library/FuseGraph.cpp b/library/FuseGraph.cpp new file mode 100644 index 0000000..ae15cc3 --- /dev/null +++ b/library/FuseGraph.cpp @@ -0,0 +1,572 @@ +#include "FuseGraph.hpp" +#include "Basic.hpp" + +#include + +namespace RIF { + +int fgIndex = 0; + +// Constructs sew shift lut for graph +SewDiffs::SewDiffs(Graph &_graph) : graph(_graph) { + std::cerr << "SewDiffs construction for Graph......\n"; + + std::vector endValues; + for (ValueBase *value : graph.values) { + if (value->outputs.size() == 0) + endValues.push_back(value); + } + std::set visited; + + auto pushStackIfNotVisited = [&visited](std::stack &stk, + ValueBase *value) -> void { + if (!visited.count(value)) + stk.push(value); + visited.insert(value); + }; + + // Start from endValues + for (ValueBase *endValue : endValues) { + if (visited.count(endValue)) + continue; + visited.insert(endValue); + lut[endValue] = 0; + std::stack stk; + stk.push(endValue); + while (!stk.empty()) { + ValueBase *value = stk.top(); + stk.pop(); + assert(!graph.isOperator(value->id)); + for (auto user : value->outputs) { + auto op = static_cast(user); + if (visited.count(op) || op->type == CustomValType::Initialize) + continue; + for (auto input : op->inputs) + pushStackIfNotVisited(stk, input); + auto output = op->outputs[0]; + pushStackIfNotVisited(stk, output); + calcSewDiff(op); + visited.insert(op); + } + auto op = static_cast(value->inputs[0]); + if (!visited.count(op) && op->type != CustomValType::Initialize) { + for (auto input : op->inputs) + pushStackIfNotVisited(stk, input); + auto output = op->outputs[0]; + pushStackIfNotVisited(stk, output); + calcSewDiff(op); + visited.insert(op); + } + } + } + + // All operators follows its only output (which is its define) + for (OperatorBase *op : graph.operators) { + ValueBase *value = op->outputs[0]; + if (!lut.count(value)) { + std::cerr << value->id << " not visited\n"; + } + assert(lut.count(value)); + lut[op] = lut[value]; + } + + std::cerr << "Finish SewDiffs construction =================\n"; +} + +// Utility to get sew shift difference between 2 values +int SewDiffs::getSewDiff(ValueBase *from, ValueBase *to) { + if (!from || !to) + return 0; + if (isScalarValue(from) || isScalarValue(to)) + return 0; + if (from->type == CustomValType::OneDBool) + return 0; + if (to->type == CustomValType::OneDBool) + return 0; + + if (to->typeInfo->sew == from->typeInfo->sew) + return 0; + if (to->typeInfo->sew.to_int() * 2 == from->typeInfo->sew.to_int()) + return -1; + if (to->typeInfo->sew.to_int() == from->typeInfo->sew.to_int() * 2) + return +1; + return 0; +} + +void SewDiffs::calcSewDiff(ValueBase *from, ValueBase *to) { + assert(from); + assert(to); + assert(lut.count(from)); + + lut[to] = lut[from] + getSewDiff(from, to); +} + +void SewDiffs::calcSewDiff(OperatorBase *op) { + std::vector values; + ValueBase *pivot = nullptr; + for (ValueBase *input : op->inputs) { + assert(input); + if (lut.count(input)) + pivot = input; + values.push_back(input); + } + ValueBase *output = op->outputs[0]; + if (lut.count(output)) + pivot = output; + values.push_back(output); + + assert(pivot); + for (ValueBase *value : values) + calcSewDiff(pivot, value); +} + +FuseGraph::FuseGraph(Graph &graph) + : graph(graph), id("fused_graph_" + std::to_string(fgIndex++)) {} + +void FuseGraph::assignLmul(SewDiffs &sd) { + // An immediate example on why we need lmul shifting is that an operator + // widening operator using a value generated by an int8m8 operator. In this + // case the widening operator will generate value of int16m16 and there are + // currently no intrinsic function for it. + // Note: Currently we are assigning the smallest LMUL possible right now, the + // range [smallestDiff, largestDiff] is not effecting anything + // currently. + int smallestDiff = INT_MAX; + int largestDiff = INT_MIN; + for (OperatorBase *op : operators) { + smallestDiff = std::min(smallestDiff, sd.lut[op]); + largestDiff = std::max(largestDiff, sd.lut[op]); + for (ValueBase *input : op->inputs) { + smallestDiff = std::min(smallestDiff, sd.lut[input]); + largestDiff = std::max(largestDiff, sd.lut[input]); + } + for (ValueBase *output : op->outputs) { + smallestDiff = std::min(smallestDiff, sd.lut[output]); + largestDiff = std::max(largestDiff, sd.lut[output]); + } + } + + for (OperatorBase *op : operators) { + if (op->type == CustomValType::Initialize) + continue; + ValueBase *output = op->outputs[0]; + + op->typeInfo = op->typeInfo->setLmul( + *op->typeInfo, getSmallestLmulForSew(op->typeInfo->sew)); + + initializeLmul(op); + } + + if (operators.size() > 1 || + (operators.size() == 1 && + (*operators.begin())->type != CustomValType::Initialize)) { + std::cerr << "SewDiff range for " << id << ": " << smallestDiff << ", " + << largestDiff << "\n"; + std::cerr << "TypeInfo for " << id << "\n"; + for (OperatorBase *op : getOperatorsInTopologicalOrder()) { + std::cerr << "Op: " << op->id << ", " << op->typeInfo->shortVectorTypeName + << "\n"; + std::cerr << "Inputs\n"; + for (auto input : op->inputs) + std::cerr << "\t" << input->id << ", " + << input->typeInfo->shortVectorTypeName << "\n"; + std::cerr << "Outputs\n"; + for (auto output : op->outputs) + std::cerr << "\t" << output->id << ", " + << output->typeInfo->shortVectorTypeName << "\n"; + } + std::cerr << "============================\n"; + } +} + +void FuseGraph::add(OperatorBase *op) { + operators.insert(op); + assert(graph.isOperator(op->id)); + + // Bookkeeping for values that is generated within the FuseGraph + ValueBase *definedValue = op->outputs[0]; + + for (ValueBase *user : definedValue->outputs) { + OperatorBase *userOp = static_cast(user); + if (operators.count(userOp)) { + values.insert(definedValue); + } + } + + for (ValueBase *use : op->inputs) { + OperatorBase *defineOp = static_cast(use->inputs[0]); + if (operators.count(defineOp)) { + values.insert(use); + } + } +} + +/* + subgraph cluster_food { + eggs; chicken; ham; + label="Food"; + graph[style=dotted]; + } +*/ +void FuseGraph::generateGraphviz(std::ostream &os) { + static int index = 0; + os << "subgraph cluster_" << index++ << " {\n"; + for (auto op : operators) { + os << op->getNameWithType() << "; "; + } + for (auto value : values) { + os << value->getNameWithType() << "; "; + } + os << "\n"; + os << "label=\"" << id << "\";\n"; + os << "graph[style=dotted];\n"; + os << "}\n"; +} + +std::vector FuseGraph::getOperatorsInTopologicalOrder() { + std::vector ordering; + std::queue candidates; + std::map inDegreeCnt; + for (auto op : operators) { + for (auto input : op->inputs) { + if (values.count(input)) + continue; + inDegreeCnt[op]++; + } + if (inDegreeCnt[op] == op->inputs.size()) + candidates.push(op); + } + while (!candidates.empty()) { + auto candidate = candidates.front(); + candidates.pop(); + ordering.push_back(candidate); + auto output = candidate->outputs[0]; + for (auto user : output->outputs) { + auto op = static_cast(user); + if (operators.count(op)) { + inDegreeCnt[op]++; + if (inDegreeCnt[op] == op->inputs.size()) + candidates.push(op); + } + } + } + assert(ordering.size() == operators.size()); + return ordering; +} + +void FuseGraph::generateCCode(std::ostream &os) { + os << "void " << id << "() {\n"; + if (operators.size() == 1) { + OperatorBase *op = *operators.begin(); + op->generateCCode(os); + } else { + size_t loopLength = 0; + std::map codegens; + + for (OperatorBase *op : operators) { + CodeGenForOperator *codegen = + new CodeGenForOperator(os, op, *op->typeInfo, op->outputs[0]->length); + codegens[op] = codegen; + + if (loopLength && loopLength != op->outputs[0]->length) { + // Currently there won't be multiple node fuse graph that contains + // reduction node, so all output values should have the same length. + assert(false && + "Operators of a FuseGraph should share the same length"); + } + loopLength = op->outputs[0]->length; + } + + for (OperatorBase *op : operators) { + auto codegen = codegens[op]; + codegen->getRawPointers(op->inputs, op->outputs[0]); + } + + std::string counter = CodeGenForOperator::getCounter(os, loopLength); + + CodeGenForOperator::getLoopStart(os, counter); + { + // Use some random CodeGenForOperator structure for calling getVL + codegens.begin()->second->getVL(counter); + + // Book keep values loaded + std::map loadedValues; + + // Load values outside of the fuse graph + for (OperatorBase *op : operators) { + auto codegen = codegens[op]; + for (auto p : codegen->opInputs) { + std::string rawID = p.first; + ValueBase *input = p.second; + if (!values.count(input)) { + if (isOneDValue(input)) { + loadedValues[input] = loadOneDToVector(os, input, rawID, op); + } else { + loadedValues[input] = rawID; + } + } + } + } + + // Execute the operators in topological order (within the fuse graph) + // Store intermediate results to loadedValues[] + for (OperatorBase *op : getOperatorsInTopologicalOrder()) { + ValueBase *output = op->outputs[0]; + + // getIntrinsicArguments() + std::vector args; + for (ValueBase *input : op->inputs) { + if (!loadedValues.count(input)) { + assert(false && "Should have using values loaded"); + } + args.push_back(loadedValues[input]); + } + + std::string opResult = genOpString(os, op, args, output); + loadedValues[output] = opResult; + } + + // Store results + for (OperatorBase *op : operators) { + ValueBase *output = op->outputs[0]; + auto codegen = codegens[op]; + std::string opResult = loadedValues[output]; + + storeVectorToOneD(os, codegen->opOutput.first, opResult, + codegen->opOutput.second); + } + + // Increment raw pointer placeholders + for (OperatorBase *op : operators) { + auto output = op->outputs[0]; + auto codegen = codegens[op]; + for (auto p : codegen->opInputs) { + if (isOneDValue(p.second)) + incrementRawPointerByVLEN(os, p.first); + } + if (isOneDValue(codegen->opOutput.second)) + incrementRawPointerByVLEN(os, codegen->opOutput.first); + } + } + CodeGenForOperator::getLoopEnd(os); + } + os << "}\n"; +} + +// Filter out operators we should not fuse +bool isFusable(OperatorBase *op) { + const CustomValType &type = op->type; + const OperatorAttrT &opAttr = op->opAttr; + const std::string &typeID = op->typeID; + + if (type == CustomValType::Initialize) + return false; + if (opAttr & ReductionOperation || opAttr & LoadOperation || + opAttr & StoreOperation) + return false; + if (typeID == "vcpop_m" || typeID == "vfirst_m" || typeID == "vmsbf_m" || + typeID == "vmsif_m" || typeID == "vmsof_m" || typeID == "viota_m" || + typeID == "vid_v") + return false; + if (op->opAttr & TailAgnostic || op->opAttr & TailUndisturbed || + op->opAttr & MaskAgnostic || op->opAttr & MaskUndisturbed) + return false; + return true; +} + +FuseGraphs::FuseGraphs(Graph &graph) : graph(graph), sd(graph) { + std::vector ordering = + graph.getOperatorsInReverseTopologicalOrder(); + std::set fusedOperators; + + for (std::string opID : ordering) { + OperatorBase *initialOp = graph.operatorLUT[opID]; + if (fusedOperators.count(initialOp)) + continue; + + FuseGraph subgraph(graph); + subgraph.add(initialOp); + fusedOperators.insert(initialOp); + + std::stack stk; + if (isFusable(initialOp)) + stk.push(initialOp); + while (!stk.empty()) { + OperatorBase *pivot = stk.top(); + stk.pop(); + + assert(graph.isOperator(pivot->id)); + assert(pivot->outputs.size() == 1); + assert(pivot->outputs[0]); + + ValueBase *definedValue = pivot->outputs[0]; + for (ValueBase *user : definedValue->outputs) { + assert(graph.isOperator(user->id)); + OperatorBase *op = static_cast(user); + if (fusedOperators.count(op)) { + continue; + } + if (isFusable(op)) { + subgraph.add(op); + if (!fusedOperators.count(op)) { + stk.push(op); + } + fusedOperators.insert(op); + } + } + + for (ValueBase *use : pivot->inputs) { + assert(use); + ValueBase *definer = use->inputs[0]; + assert(graph.isOperator(definer->id)); + if (definer->type == CustomValType::Initialize) + continue; + OperatorBase *op = static_cast(definer); + if (fusedOperators.count(op)) + continue; + if (isFusable(op)) { + subgraph.add(op); + if (!fusedOperators.count(op)) + stk.push(op); + fusedOperators.insert(op); + } + } + } + + // Add operator into reverse look-up in FusedGraphs + for (OperatorBase *op : subgraph.operators) + operatorLUT[op] = subgraphs.size(); + + subgraphs.emplace_back(subgraph); + } +} + +std::vector FuseGraphs::getFuseGraphsInTopologicalOrder() { + std::vector ordering; + std::map inDegreeCnt; + std::map inDegreeTotal; + std::queue candidates; + int numOfSubGraph = subgraphs.size(); + for (int i = 0; i < numOfSubGraph; ++i) { + FuseGraph &fg = subgraphs[i]; + int total = 0; + for (auto op : fg.operators) { + for (auto input : op->inputs) { + if (!fg.values.count(input)) + ++total; + } + } + inDegreeTotal[i] = total; + if (inDegreeTotal[i] == 0) + candidates.push(i); + } + while (!candidates.empty()) { + int candidate = candidates.front(); + candidates.pop(); + ordering.push_back(candidate); + FuseGraph &fromFg = subgraphs[candidate]; + for (auto op : fromFg.operators) { + auto output = op->outputs[0]; + for (auto user : output->outputs) { + auto userOp = static_cast(user); + if (!fromFg.operators.count(userOp)) { + int toFgIdx = operatorLUT[userOp]; + inDegreeCnt[toFgIdx]++; + if (inDegreeCnt[toFgIdx] == inDegreeTotal[toFgIdx]) { + candidates.push(toFgIdx); + } + } + } + } + } + assert(ordering.size() == numOfSubGraph); + return ordering; +} + +void FuseGraphs::generateGraphviz(std::ostream &os) { + os << "digraph{\n"; + for (auto subgraph : subgraphs) + subgraph.generateGraphviz(os); + for (auto op : graph.operators) + os << op->getNameWithType() << "[shape=oval]\n"; + for (auto value : graph.values) + os << value->getNameWithType() << "[shape=rectangle]\n"; + for (auto value : graph.values) { + if (value->inputs[0] == nullptr) { + std::cerr << "Value '" << value->id + << "'-'s definer is not set, abort.\n"; + exit(1); + } + os << value->inputs[0]->getNameWithType() << " -> " + << value->getNameWithType() << "\n"; + for (auto user : value->outputs) + os << value->getNameWithType() << " -> " << user->getNameWithType() + << "\n"; + } + os << "}\n"; +} + +void FuseGraphs::generateCCode(std::ostream &os, uint32_t seed) { + placeholderIndex = 0; + graph.emitHeader(os); + for (auto value : graph.values) + value->generateCCode(os); + std::set fgGenerated; + fgGenerated.clear(); + + auto opOrdering = graph.getOperatorsInTopologicalOrder(seed); + auto fgOrdering = getFuseGraphsInTopologicalOrder(); + for (int fgIdx : fgOrdering) { + if (fgGenerated.count(fgIdx)) + continue; + fgGenerated.insert(fgIdx); + FuseGraph &fg = subgraphs[fgIdx]; + std::cerr << "Generate function for " << fg.id << "\n"; + // The reason why we adjust the LMUL here is that different subgraph-s share + // the same `Value` in between. Adjusting the LMUL at FuseGraphs creation + // will let `Value`-s be only suitable for emission of the last sub-graph + // called to them. Therefore we should assign LMUL right before each + // FuseGraph code generation. + fg.assignLmul(sd); + + fg.generateCCode(os); + } + + // generate function calls for verify golden + for (auto id : opOrdering) { + auto op = graph.operatorLUT[id]; + // Note: RIF is still generating golden check function for debug purpose. + // The function will not be called since fused_gen runs under "short" + // mode. + os << "int golden_" << op->getNameWithType() << "() {\n"; + generateVerificationCode(os, op); + os << "}\n"; + } + + // start of main function + os << "int main () {\n"; + // call fuseGraph in topological order + fgGenerated.clear(); + for (int fgIdx : fgOrdering) { + if (fgGenerated.count(fgIdx)) + continue; + fgGenerated.insert(fgIdx); + FuseGraph &fg = subgraphs[fgIdx]; + os << fg.id << "();\n"; + } + + // verify + for (auto id : opOrdering) { + auto op = graph.operatorLUT[id]; + // Note: For 'short' mode, RIF will only generate verification only for + // values that are non-intermediate results. + if (VerificationMode == "short" && op->outputs[0]->outputs.size() != 0) + continue; + os << "printf(\"" << id << " : %s\\n\", golden_" << op->getNameWithType() + << "() ? \"pass\" : \"fail\");\n"; + } + // end of main function + os << "return 0; }\n"; +} + +} // namespace RIF diff --git a/library/Graph.cpp b/library/Graph.cpp new file mode 100644 index 0000000..5c1d462 --- /dev/null +++ b/library/Graph.cpp @@ -0,0 +1,321 @@ +#include "Graph.hpp" +#include "Basic.hpp" +#include "Utils.hpp" +#include "Value.hpp" + +#include +#include +#include +#include +#include +#include + +using namespace RIF; + +// This structure is used to encapsulate the operation definition in +// CustomOperator.def , these information can be used further, e.g. filters, +// counters, etc. +struct OpDefinition { + CustomValType opType; + std::string opTypeStr; + std::string opId; + int sew; + TypeClass typeClass; + uint32_t opAttr; + CustomValType outputType; + int numOfInputs; + std::vector inputTypes; + OpDefinition(CustomValType opType, std::string &&opTypeStr, + std::string &&opId, int sew, TypeClass typeClass, + uint32_t opAttr, CustomValType outputType, int numOfInputs, + std::vector inputTypes) + : opType(opType), opTypeStr(std::move(opTypeStr)), opId(std::move(opId)), + sew(sew), typeClass(typeClass), opAttr(opAttr), outputType(outputType), + numOfInputs(numOfInputs), inputTypes(inputTypes) {} +}; + +bool Graph::isConstructedUseDefineCandidate = false; +Graph::DefineCandidateLookup Graph::defineCandidateLUT; +Graph::UseCandidateLookup Graph::useCandidateLUT; +Graph::EnumLoopkup Graph::operatorEnumLUT; +static std::vector opDefs; + +void Graph::removeOperator(Operator *op) { + auto id = op->id; + operatorLUT.erase(id); + operators.erase(op); + delete op; +} + +static void getOpDefinitions() { +#define CUSTOM_OP_TYPE(OP_TYPE, OP_ID, SEW, TYPE_CLASS, OP_ATTR, OUTPUT_TYPE, \ + NUM_OF_INPUTS, ...) \ + { \ + OpDefinition opDef{OP_TYPE, #OP_TYPE, std::string(#OP_ID), \ + SEW, TYPE_CLASS, OP_ATTR, \ + OUTPUT_TYPE, NUM_OF_INPUTS, {__VA_ARGS__}}; \ + opDefs.push_back(opDef); \ + } +#include "CustomOperator.def" +#undef CUSTOM_OP_TYPE +} + +// The attribute filter used to filter out the operators that contain +// attributes that are not enabled. +static bool hasPolicyAttr(const OpDefinition &opDef) { + if (!HasPolicy) { + return (opDef.opAttr & (TailUndisturbed | MaskUndisturbed)) == 0; + } + return true; +} + +static bool hasTAAttr(const OpDefinition &opDef) { + if (!HasTA) + return (opDef.opAttr & TailAgnostic) == 0; + return true; +} + +static bool hasMAAttr(const OpDefinition &opDef) { + if (!HasMA) + return (opDef.opAttr & MaskAgnostic) == 0; + return true; +} + +Graph::Graph() { + if (isConstructedUseDefineCandidate == false) { + getOpDefinitions(); + std::vector> filters = { + hasPolicyAttr, hasTAAttr, hasMAAttr}; + for (const auto &opDef : opDefs) { + bool valid = true; + for (auto &filter : filters) { + valid &= filter(opDef); + } + if (valid) { + validOpTypes.push_back(opDef.opType); + operatorEnumLUT[opDef.opTypeStr] = opDef.opType; + } + } + + // Try create all operators and build mapping of them + for (const auto &opType : validOpTypes) { + auto op = getNewOperator(opType, "trashOp"); + + defineCandidateLUT[op->outputType].insert(op->type); + for (int j = 0; j < op->inputs.size(); ++j) + useCandidateLUT[op->inputTypes[j]].insert(op->type); + + removeOperator(op); + } + isConstructedUseDefineCandidate = true; + } +} + +void Graph::generateGraphViz(std::ostream &os) { + os << "digraph{\n"; + + for (auto op : operators) + os << op->getNameWithType() << "[shape=oval]\n"; + for (auto value : values) + os << value->getNameWithType() << "[shape=rectangle]\n"; + + for (auto value : values) { + if (value->inputs[0] == nullptr) { + std::cerr << "Value '" << value->id + << "'-'s definer is not set, abort.\n"; + exit(1); + } + os << value->inputs[0]->getNameWithType() << " -> " + << value->getNameWithType() << "\n"; + for (auto user : value->outputs) + os << value->getNameWithType() << " -> " << user->getNameWithType() + << "\n"; + } + + os << "}\n"; +} + +bool Graph::isOperator(const std::string &id) { + return operatorLUT.find(id) != std::end(operatorLUT); +} +bool Graph::isValue(const std::string &id) { + return valueLUT.find(id) != std::end(valueLUT); +} + +template +static void remove_at(std::vector &v, + typename std::vector::size_type position) { + std::swap(v[position], v.back()); + v.pop_back(); +} + +std::vector Graph::getOperatorsInTopologicalOrder(uint32_t seed) { + initializeRNG(seed); + + // generate adjacency list with string + std::map> edges; + std::map inDegreeCount; + + for (auto value : values) { + if (value->inputs[0] == nullptr) { + std::cerr << "Value '" << value->id + << "'-'s definer is not set, abort.\n"; + exit(1); + } + + edges[value->inputs[0]->id].push_back(value->id); + ++inDegreeCount[value->id]; + for (auto user : value->outputs) { + edges[value->id].push_back(user->id); + ++inDegreeCount[user->id]; + } + } + + std::set visited; + + std::vector topologicalSequence; + std::vector candidates; + + int totalNodes = edges.size(); + int visitedNodes = 0; + + for (auto node : edges) { + auto id = node.first; + if (inDegreeCount[id] == 0) + candidates.push_back(id); + } + + while (candidates.empty() == false) { + auto pick = getRandomNumber(0, (int)candidates.size() - 1); + auto id = candidates[pick]; + assert(visited.find(id) == std::end(visited)); + + if (isOperator(id)) + topologicalSequence.push_back(id); + + for (auto to : edges[id]) { + inDegreeCount[to]--; + if (inDegreeCount[to] == 0) + candidates.push_back(to); + } + + visited.insert(id); + remove_at(candidates, pick); + } + + return topologicalSequence; +} + +std::vector +Graph::getOperatorsInReverseTopologicalOrder(uint32_t seed) { + std::vector ordering = getOperatorsInTopologicalOrder(seed); + std::reverse(begin(ordering), end(ordering)); + return ordering; +} + +void Graph::emitHeader(std::ostream &os) { + os << "#include \n"; + os << "#include \n"; + os << "#include \n"; + os << "#include \n"; + os << "#include \n"; + os << "#include \n"; + os << "#include \n"; + os << "typedef _Float16 float16_t;\n"; + os << "typedef float float32_t;\n"; + os << "typedef double float64_t;\n"; + os << "#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF))\n"; + os << "#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & " + "0x007FFFFF))\n"; + os << "#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == " + "0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF )))\n"; +} + +void Graph::generateData(uint32_t seed) { + // FIXME: increase parameter of this function (or add a global under + // Utils.hpp) so that topological order and data gen can have separate seeds + auto ordering = getOperatorsInTopologicalOrder(seed); + initializeRNG(seed); + // generate data for the operators + for (auto id : ordering) { + auto op = operatorLUT[id]; + if (op->type == CustomValType::Initialize) { + auto value = op->outputs[0]; + value->generateData(); + } else { + uint8_t save_roundingMode = softfloat_roundingMode; // save + op->generateData(); + softfloat_roundingMode = save_roundingMode; // restore + } + } +} + +void Graph::generateCCode(std::ostream &os, uint32_t seed) { + placeholderIndex = 0; + auto ordering = getOperatorsInTopologicalOrder(seed); + + emitHeader(os); + + // declare values in global (avoid stack overflow) + for (auto value : values) + value->generateCCode(os); + + // generate function calls for the operators + for (auto id : ordering) { + auto op = operatorLUT[id]; + + if (op->type != Initialize) + initializeLmul(op); + + os << "void " << op->getNameWithType() << "() {\n"; + op->generateCCode(os); + os << "}\n"; + } + + // generate function calls for verify golden + for (auto id : ordering) { + auto op = operatorLUT[id]; + + // Note: For 'short' mode, RIF will only generate verification only for + // values that are non-intermediate results. + if (VerificationMode == "short" && op->outputs[0]->outputs.size() != 0) + continue; + + os << "int golden_" << op->getNameWithType() << "() {\n"; + + generateVerificationCode(os, op); + + os << "}\n"; + } + + // start of main function + os << "int main () {\n"; + + // call operators in topological order + for (auto id : ordering) { + auto op = operatorLUT[id]; + os << op->getNameWithType() << "();\n"; + } + + // verify + for (auto id : ordering) { + auto op = operatorLUT[id]; + // Note: For 'short' mode, RIF will only generate verification only for + // values that are non-intermediate results. + if (VerificationMode == "short" && op->outputs[0]->outputs.size() != 0) + continue; + os << "printf(\"" << id << " : %s\\n\", golden_" << op->getNameWithType() + << "() ? \"pass\" : \"fail\");\n"; + } + + // return 1 if any there is any failure in the operator + os << "int ret = 1; // 1 = success\n"; + for (auto id : ordering) { + auto op = operatorLUT[id]; + os << "ret &= golden_" << op->getNameWithType() << "();\n"; + } + os << "if (!ret) return 1;\n"; + + // end of main function + os << "return 0; }\n"; +} \ No newline at end of file diff --git a/library/Operator.cpp b/library/Operator.cpp new file mode 100644 index 0000000..30ca944 --- /dev/null +++ b/library/Operator.cpp @@ -0,0 +1,1882 @@ +#include "Operator.hpp" +#include "Basic.hpp" +#include "TypeInfo.hpp" +#include "Utils.hpp" +#include "Value.hpp" + +#include +#include +#include +#include +#include +#include +#include + +// This header file would be auto-generated by +// scripts/GenerateOperatorComputeHeaders.py +#include "AutoGenComputeOp.h" +#include "softfloat_types.h" + +namespace RIF { + +int placeholderIndex; + +static std::string getNewPlaceholderName() { + return "placeholder" + std::to_string(placeholderIndex++); +} + +static std::string getUniqueName(std::string name) { + static std::map nameCount; + return name + '_' + std::to_string(nameCount[name]++); +} + +void InitializeOp::generateData() { + // Please go to Graph::generateData() for the data generation call + assert(false && "This function shall not be triggered"); +} + +template +void generateOneDInitCCode(std::ostream &os, ValueBase *value, + const std::string &dataType) { + auto oned = static_cast(value); + auto length = oned->length; + if (isIntegral(value->dt)) { + os << dataType << " tmp[] = {"; + } else { + if (value->dt == DataTypeEnum::Float16_t) { + os << "uint16_t tmp[] = {"; + } else if (value->dt == DataTypeEnum::Float32_t) { + os << "uint32_t tmp[] = {"; + } else if (value->dt == DataTypeEnum::Float64_t) { + os << "uint64_t tmp[] = {"; + } else { + assert(false && "Unhandled type"); + } + } + + auto raw = oned->raw; + for (int i = 0; i < length; ++i) { + if (value->dt == DataTypeEnum::Int8_t) { + os << std::to_string((int8_t)raw[i]); + } else if (value->dt == DataTypeEnum::Int16_t) { + os << std::to_string((int16_t)raw[i]); + } else if (value->dt == DataTypeEnum::Int32_t) { + os << std::to_string((int32_t)raw[i]); + } else if (value->dt == DataTypeEnum::Int64_t) { + os << std::to_string((int64_t)raw[i]) << "ll"; + } else if (value->dt == DataTypeEnum::Uint8_t) { + os << std::to_string((uint8_t)raw[i]); + } else if (value->dt == DataTypeEnum::Uint16_t) { + os << std::to_string((uint16_t)raw[i]); + } else if (value->dt == DataTypeEnum::Uint32_t) { + os << std::to_string((uint32_t)raw[i]) << "u"; + } else if (value->dt == DataTypeEnum::Uint64_t) { + os << std::to_string((uint64_t)raw[i]) << "ull"; + } else if (value->dt == DataTypeEnum::Float16_t) { + os << std::to_string((uint16_t)raw[i]); + } else if (value->dt == DataTypeEnum::Float32_t) { + os << std::to_string((uint32_t)raw[i]) << "u"; + } else if (value->dt == DataTypeEnum::Float64_t) { + os << std::to_string((uint64_t)raw[i]) << "ull"; + } else if (value->dt == DataTypeEnum::Ptrdiff_t) { + os << std::to_string((long)raw[i]) << "ll"; + } else if (value->dt == DataTypeEnum::Size_t) { + os << std::to_string((unsigned long)raw[i]) << "ull"; + } else { + assert(false && "Unkown dataType"); + } + + os << ","; + } + os << "};\n"; + os << "for (int i=0; i<" << length << ";++i) {"; + if (!isIntegral(value->dt)) { + if (value->dt == DataTypeEnum::Float16_t) { + os << "union { uint16_t u16; " << dataType << " f; } converter;\n"; + os << "converter.u16 = tmp[i];\n"; + } else if (value->dt == DataTypeEnum::Float32_t) { + os << "union { uint32_t u32; " << dataType << " f; } converter;\n"; + os << "converter.u32 = tmp[i];\n"; + } else if (value->dt == DataTypeEnum::Float64_t) { + os << "union { uint64_t u64; " << dataType << " f; } converter;\n"; + os << "converter.u64 = tmp[i];\n"; + } else { + assert(false && "Unhandled type"); + } + os << oned->id << "[i] = converter.f;\n"; + } else { + os << oned->id << "[i] = tmp[i];\n"; + } + os << "}\n"; +} + +template +void generateScalarInitCCode(std::ostream &os, ValueBase *value, + const std::string &dataType) { + auto scalar = static_cast(value); + assert(scalar->length == 1); + auto raw = scalar->raw; + if (isIntegral(value->dt)) { + os << dataType << " tmp = "; + } else { + if (value->dt == DataTypeEnum::Float16_t) { + os << "uint16_t tmp = "; + } else if (value->dt == DataTypeEnum::Float32_t) { + os << "uint32_t tmp = "; + } else if (value->dt == DataTypeEnum::Float64_t) { + os << "uint64_t tmp = "; + } else { + assert(false && "Unhandled type"); + } + } + if (value->dt == DataTypeEnum::Int8_t) { + os << std::to_string((int8_t)*raw); + } else if (value->dt == DataTypeEnum::Int16_t) { + os << std::to_string((int16_t)*raw); + } else if (value->dt == DataTypeEnum::Int32_t) { + os << std::to_string((int32_t)*raw); + } else if (value->dt == DataTypeEnum::Int64_t) { + os << std::to_string((int64_t)*raw) << "ll"; + } else if (value->dt == DataTypeEnum::Uint8_t) { + os << std::to_string((uint8_t)*raw); + } else if (value->dt == DataTypeEnum::Uint16_t) { + os << std::to_string((uint16_t)*raw); + } else if (value->dt == DataTypeEnum::Uint32_t) { + os << std::to_string((uint32_t)*raw) << "u"; + } else if (value->dt == DataTypeEnum::Uint64_t) { + os << std::to_string((uint64_t)*raw) << "ull"; + } else if (value->dt == DataTypeEnum::Float16_t) { + os << std::to_string((uint16_t)*raw); + } else if (value->dt == DataTypeEnum::Float32_t) { + os << std::to_string((uint32_t)*raw) << "u"; + } else if (value->dt == DataTypeEnum::Float64_t) { + os << std::to_string((uint64_t)*raw) << "ull"; + } else if (value->dt == DataTypeEnum::Ptrdiff_t) { + os << std::to_string((long)*raw) << "ll"; + } else if (value->dt == DataTypeEnum::Size_t) { + os << std::to_string((unsigned long)*raw) << "ull"; + } else { + assert(false && "Unkown dataType"); + } + + os << ";\n"; + + if (!isIntegral(value->dt)) { + if (value->dt == DataTypeEnum::Float16_t) { + os << "union { uint16_t u16; " << dataType << " f; } converter;\n"; + os << "converter.u16 = tmp;\n"; + } else if (value->dt == DataTypeEnum::Float32_t) { + os << "union { uint32_t u32; " << dataType << " f; } converter;\n"; + os << "converter.u32 = tmp;\n"; + } else if (value->dt == DataTypeEnum::Float64_t) { + os << "union { uint64_t u64; " << dataType << " f; } converter;\n"; + os << "converter.u64 = tmp;\n"; + } else { + assert(false && "Unhandled type"); + } + os << scalar->id << " = converter.f;\n"; + } else { + os << scalar->id << " = tmp;\n"; + } +} + +void InitializeOp::generateCCode(std::ostream &os) { + auto value = outputs[0]; + auto typeInfo = value->typeInfo; + int trigger = 0; +#define CUSTOM_ONE_D_TYPE(CUSTOM_NAME, DATA_TYPE, DATA_WIDTH, DATA_CLASS, \ + MIN_VALUE, MAX_VALUE) \ + if (value->type == CustomValType::OneD##CUSTOM_NAME) { \ + generateOneDInitCCode(os, value, #DATA_TYPE); \ + ++trigger; \ + } +#include "CustomValue.def" +#undef CUSTOM_ONE_D_TYPE +#undef CUSTOM_SCALAR_TYPE +#define CUSTOM_SCALAR_TYPE(CUSTOM_NAME, DATA_TYPE, DATA_WIDTH, DATA_CLASS, \ + MIN_VALUE, MAX_VALUE) \ + if (value->type == CustomValType::Scalar##CUSTOM_NAME) { \ + generateScalarInitCCode(os, value, #DATA_TYPE); \ + ++trigger; \ + } +#include "CustomValue.def" +#undef CUSTOM_ONE_D_TYPE +#undef CUSTOM_SCALAR_TYPE + + if (trigger != 1) { + std::cerr + << "InitializeOp::generateCCode: Value not recognized correctly\n"; + exit(1); + } +} + +static std::string getRawPointerString(std::ostream &os, ValueBase *value, + bool isWrite = false) { + std::string holder = getNewPlaceholderName(); + if (isOneDValue(value)) + os << value->dataTypeID << " *" << holder << " = " << value->id << ";\n"; + else if (isScalarValue(value)) { + if (isWrite) + os << value->dataTypeID << " *" << holder << " = &" << value->id << ";\n"; + else + os << value->dataTypeID << " " << holder << " = " << value->id << ";\n"; + } else + assert(false); // unreachable + + return holder; +} + +static std::string getVectorFromConstant(std::ostream &os, int constant, + const TypeInfo &typeInfo) { + std::string result = getNewPlaceholderName(); + os << typeInfo.vectorTypeName << " " << result + << (typeInfo.typeClass == FLOAT ? "= vfmv_v_f_" : "= vmv_v_x_") + << typeInfo.shortVectorTypeName << "(" << constant << ", " + << typeInfo.setvlmaxTypeName << "());\n"; + return result; +} +static std::string getVectorFromVector(std::ostream &os, + const std::string &vecPlaceholder, + const TypeInfo &typeInfo) { + std::string result = getNewPlaceholderName(); + os << typeInfo.vectorTypeName << " " << result << "= vmv_v_v_" + << typeInfo.shortVectorTypeName << "(" << vecPlaceholder << ", " + << typeInfo.setvlmaxTypeName << "());\n"; + return result; +} + +static std::map log2LUT = {{1, 0}, {2, 1}, {4, 2}, {8, 3}, + {16, 4}, {32, 5}, {64, 6}}; +size_t getBooleanSew(const TypeInfo &typeInfo) { + return 64 >> (typeInfo.lmul - (log2LUT[typeInfo.sew.to_int()] - 3)); +} +size_t getBooleanLmul(const TypeInfo &typeInfo) { + return 6 - log2LUT[getBooleanSew(typeInfo)]; +} + +static std::string getVmsetMaskReg(std::ostream &os, const TypeInfo &typeInfo) { + std::string result = getNewPlaceholderName(); + int booleanSew = getBooleanSew(typeInfo); + os << "vbool" << std::to_string(booleanSew) << "_t " << result + << " = vmset_m_b" << std::to_string(booleanSew) << "(" + << typeInfo.setvlmaxTypeName << "());\n"; + return result; +} + +static std::string getVmclrMaskReg(std::ostream &os, const TypeInfo &typeInfo) { + std::string result = getNewPlaceholderName(); + int booleanSew = getBooleanSew(typeInfo); + os << "vbool" << std::to_string(booleanSew) << "_t " << result + << " = vmclr_m_b" << std::to_string(booleanSew) << "(" + << typeInfo.setvlmaxTypeName << "());\n"; + return result; +} + +static std::string getFlippedMaskReg(std::ostream &os, + const std::string &maskReg, + const TypeInfo &typeInfo) { + int booleanSew = getBooleanSew(typeInfo); + std::string vecMaskSet = getVmsetMaskReg(os, typeInfo); + std::string flippedMaskReg = getNewPlaceholderName(); + os << "vbool" << booleanSew << "_t " << flippedMaskReg << " = vmandn_mm_b" + << booleanSew << "(" << vecMaskSet << ", " << maskReg << ", vl);\n"; + return flippedMaskReg; +} + +std::string getFirst(std::ostream &os) { + std::string first = getNewPlaceholderName(); + os << "int32_t " << first << " = -1;\n"; + return first; +} + +static void setVLMax(std::ostream &os, const TypeInfo &typeInfo) { + os << "int vlmax = " << typeInfo.setvlmaxTypeName << "();\n"; +} +static void setVL(std::ostream &os, const std::string &counter, + const TypeInfo &typeInfo, bool isBoolean = false) { + if (isBoolean) { + int booleanSew = getBooleanSew(typeInfo); + int booleanLmul = getBooleanLmul(typeInfo); + std::string lmulStr = LMUL_STR(static_cast(booleanLmul)); + os << "vl = vsetvl_e8" << lmulStr << "(" << counter << ");\n"; + } else + os << "vl = " << typeInfo.setvlTypeName << "(" << counter << ");\n"; +} + +std::string loadOneDToVector(std::ostream &os, ValueBase *value, + const std::string &holder, OperatorBase *op) { + auto typeInfo = *value->typeInfo; + std::string resultVec; + if (value->type == OneDBool) { + std::string vecHolder = "vec_" + value->id; + resultVec = getUniqueName("mask_" + value->id); + + size_t booleanSew = + (op->opAttr & WideningOperation || op->opAttr & NarrowingOperation) + ? getBooleanSew(*getVs2(op)->typeInfo) + : getBooleanSew(*op->typeInfo); + size_t booleanLmul = + (op->opAttr & WideningOperation || op->opAttr & NarrowingOperation) + ? getBooleanLmul(*getVs2(op)->typeInfo) + : getBooleanLmul(*op->typeInfo); + + std::string lmulStr = LMUL_STR(static_cast(booleanLmul)); + + os << "vint8" << lmulStr << "_t " << vecHolder << "= vle8_v_i8" << lmulStr + << "(" << holder << ", vl);\n"; + os << "vbool" << booleanSew << "_t " << resultVec << "= vmseq_vx_i8" + << lmulStr << "_b" << booleanSew << "(" << vecHolder << ", 1, vl);\n"; + } else { // normal + resultVec = getUniqueName("vec_" + value->id); + os << typeInfo.vectorTypeName << " " << resultVec << "= vle" + << typeInfo.sew.to_string() << "_v_" << typeInfo.shortVectorTypeName + << "(" << holder << ", vl);\n"; + } + return resultVec; +} + +static void genIntrinsicFuncSuffix(std::ostream &os, OperatorBase *op, + const std::vector &args) { + const OperatorAttrT &opAttr = op->opAttr; + if (isExplicitPolicy(op)) { + os << "_"; + if (hasTA(op)) { + assert(!hasTU(op)); + os << "ta"; + } + if (hasTU(op)) { + assert(!hasTA(op)); + os << "tu"; + } + if (hasMA(op)) { + assert(hasMask(op) && !hasMU(op)); + os << "ma"; + } + if (hasMU(op)) { + assert(hasMask(op) && !hasMA(op)); + os << "mu"; + } + if (opAttr & ReductionOperation && hasMask(op)) { + os << "m"; + } + + os << "("; + } else { + if (hasMask(op)) + os << "_m ("; + else if (hasNonmask(op)) + os << "("; + else { + std::cerr << "Masking attribute for operator is not set correctly.\n"; + exit(1); + } + } + + for (auto arg : args) + os << arg << ", "; + + if (opAttr & OperatorAttr::HaveVLParameter) { + if (haveTailPolicy(op) && !(op->opAttr & ReductionOperation)) + os << "tail_vl);\n"; + else + os << "vl);\n"; + } else if (opAttr & OperatorAttr::NoVLParameter) + os << ");\n"; + else { + std::cerr << "VL attribute for operator is not set correctly.\n"; + exit(1); + } +} + +static void genReductionOpString(std::ostream &os, OperatorBase *op, + const std::string &vecReduction, + const std::vector &args) { + const std::string &instrisicFuncPrefix = op->typeID; + ValueBase *vd = getVd(op); + ValueBase *vs2 = getVs2(op); + assert(vd != nullptr); + assert(vs2 != nullptr); + + os << vecReduction << " = " << instrisicFuncPrefix << "_" + << vs2->typeInfo->shortVectorTypeName << "_" + << vd->typeInfo->shortVectorTypeName; + + genIntrinsicFuncSuffix(os, op, args); +} + +std::string genOpString(std::ostream &os, OperatorBase *op, + const std::vector &args, + ValueBase *output) { + const auto &typeInfo = *op->typeInfo; + const auto &opAttr = op->opAttr; + const auto &instrisicFuncPrefix = op->typeID; + + std::string resultVec = ""; + + if (!(opAttr & VoidOperation)) { // non void operation + resultVec = getUniqueName("vec_" + output->id); + if (output->type == CustomValType::OneDBool) + os << "vbool" << getBooleanSew(typeInfo) << "_t " << resultVec << "= "; + else + os << output->typeInfo->vectorTypeName << " " << resultVec << "= "; + } + + if (output->type == CustomValType::OneDBool) { + int booleanSew = getBooleanSew(typeInfo); + std::string vectorTypeName = "vbool" + std::to_string(booleanSew) + "_t"; + + if (opAttr & LogicalMaskOperation) + os << op->typeID << "_b" << getBooleanSew(typeInfo); + else { + ValueBase *vs2 = getVs2(op); + std::string shortVectorTypeName = vs2->typeInfo->shortVectorTypeName + + "_b" + + std::to_string(getBooleanSew(typeInfo)); + os << op->typeID << "_" << shortVectorTypeName; + } + } else // normal operator + os << instrisicFuncPrefix << "_" << output->typeInfo->shortVectorTypeName; + + genIntrinsicFuncSuffix(os, op, args); + + return resultVec; +} + +void storeVectorToOneD(std::ostream &os, const std::string rawBase, + const std::string vec, ValueBase *value) { + if (value->type == OneDBool) { // store bool into int8_t + auto op = value->inputs[0]; + size_t booleanSew = getBooleanSew(*op->typeInfo); + + LmulType booleanLmul = static_cast(log2LUT[64 / booleanSew]); + auto typeInfo = TypeInfo::create(booleanLmul, SewType{8}, SIGNED_INT); + os << "{\n"; + os << "size_t vlmax = " << typeInfo->setvlmaxTypeName << "();\n"; + os << typeInfo->vectorTypeName << " zero = " + << "vmv_v_x_" << typeInfo->shortVectorTypeName << "(0, vlmax);\n"; + os << typeInfo->vectorTypeName << " vec_store = " + << "vmerge_vxm_" << typeInfo->shortVectorTypeName << "(" << vec << ", " + << "zero, 1, vl);\n"; + os << "vse8_v_" << typeInfo->shortVectorTypeName << "(" << rawBase << ", " + << "vec_store, vl);\n"; + os << "}\n"; + } else { + auto typeInfo = *value->typeInfo; + os << "vse" << typeInfo.sew.to_string() << "_v_" + << typeInfo.shortVectorTypeName << "(" << rawBase << ", " << vec + << ", vl);\n"; + } +} + +static void storeVectorToOneD(std::ostream &os, const std::string &vecM, + const std::string rawBase, + const std::string vecVal, ValueBase *value) { + if (value->type == OneDBool) { // store bool into int8_t + assert(false && "FIXME: implement this in the future"); + } else { + auto typeInfo = *value->typeInfo; + os << "vse" << typeInfo.sew.to_string() << "_v_" + << typeInfo.shortVectorTypeName << "_m(" << vecM << ", " << rawBase + << ", " << vecVal << ", vl);\n"; + } +} + +static void storeVectorToScalar(std::ostream &os, const std::string rawBase, + const std::string &vec, + const TypeInfo &typeInfo) { + os << "*" << rawBase << "= " + << (typeInfo.typeClass == FLOAT ? "vfmv_f_s_" : "vmv_x_s_") + << typeInfo.shortVectorTypeName << "_" << typeInfo.shortScalarTypeName + << "(" << vec << ");\n"; +} + +static void storeScalarToScalar(std::ostream &os, const std::string &lhs, + const std::string &rhs) { + os << "*" << lhs << " = " << rhs << ";\n"; +} + +static std::string getOpSuffix(OperatorBase *op) { + std::string s = "_"; + if (hasTA(op)) + s += "ta"; + if (hasTU(op)) + s += "tu"; + if (hasMA(op)) + s += "ma"; + if (hasMU(op)) + s += "mu"; + if (s == "_" && hasMask(op)) + s += "m"; + if (s == "_") + s = ""; + return s; +} + +void incrementRawPointerByVLEN(std::ostream &os, std::string ptrID) { + os << ptrID << " += vl;\n"; +} + +CodeGenForOperator::CodeGenForOperator(std::ostream &os, OperatorBase *op, + TypeInfo &typeInfo, size_t length) + : os(os), op(op), vlTypeInfo(typeInfo), loopLength(length) {} + +void CodeGenForOperator::getRawPointers(std::vector inputs, + ValueBase *output) { + for (ValueBase *input : inputs) + opInputs.push_back({getRawPointerString(os, input), input}); + opOutput = {getRawPointerString(os, output), output}; +} + +std::vector CodeGenForOperator::getIntrinsicArguments() { + std::vector ret; + + for (auto &input : opInputs) { + std::string &rawID = input.first; + ValueBase *value = input.second; + + if (isOneDValue(value)) { + std::string loadVec = loadOneDToVector(os, value, rawID, op); + ret.push_back(loadVec); + } else { + ret.push_back(rawID); + } + } + + return ret; +} + +void CodeGenForOperator::incrementRawPointerByVLEN() { + for (auto &input : opInputs) { + std::string &rawID = input.first; + ValueBase *value = input.second; + if (isScalarValue(value)) + continue; + RIF::incrementRawPointerByVLEN(os, rawID); + } + if (isOneDValue(opOutput.second)) + RIF::incrementRawPointerByVLEN(os, opOutput.first); +} + +void CodeGenForOperator::storeResult(std::string opResult) { + storeVectorToOneD(os, opOutput.first, opResult, opOutput.second); +} + +std::string CodeGenForOperator::getCounter(std::ostream &os, size_t length) { + std::string counter = getNewPlaceholderName(); + os << "int " << counter << " = " << length << ";\n"; + os << "\n"; + return counter; +} + +void CodeGenForOperator::getLoopStart(std::ostream &os, std::string counter) { + os << "for (size_t vl; " << counter << " > 0; " << counter << " -= vl) {\n"; +} +void CodeGenForOperator::getLoopEnd(std::ostream &os) { os << "}\n"; } + +void CodeGenForOperator::getVL(std::string counter) { + setVL(os, counter, vlTypeInfo); +} + +void CodeGenForOperator::generateSingleOperatorCode() { + auto output = op->outputs[0]; + getRawPointers(op->inputs, output); + os << "\n"; + std::string counter = CodeGenForOperator::getCounter(os, loopLength); + CodeGenForOperator::getLoopStart(os, counter); + { + if (haveTailPolicy(op)) { + os << "vl = 2;\n"; + os << "size_t tail_vl = 1;\n"; + } else { + getVL(counter); + } + std::vector args = getIntrinsicArguments(); + os << "\n"; + auto opResult = genOpString(os, op, args, output); + os << "\n"; + storeResult(opResult); + os << "\n"; + incrementRawPointerByVLEN(); + } + CodeGenForOperator::getLoopEnd(os); +} + +struct CodeGenForReductionOperator : CodeGenForOperator { + CodeGenForReductionOperator() = delete; + CodeGenForReductionOperator(std::ostream &os, OperatorBase *op, + TypeInfo &typeInfo, size_t length) + : CodeGenForOperator(os, op, typeInfo, length) {} + + void getRawPointers(std::vector inputs, ValueBase *output) { + for (ValueBase *input : inputs) + opInputs.push_back({getRawPointerString(os, input), input}); + opOutput = {getRawPointerString(os, output, true), output}; + } + void generateSingleOperatorCode() { + auto output = op->outputs[0]; + getRawPointers(op->inputs, output); + + std::string counter = CodeGenForOperator::getCounter(os, loopLength); + + std::string vecZero = getVectorFromConstant(os, 0, *output->typeInfo); + std::string vecReduction = + getVectorFromVector(os, vecZero, *output->typeInfo); + if (hasTA(op) || hasTU(op)) { + os << "// This function initializes the output elements according to\n" + "// its\n" + "// tail policy and\n" + "// the reason doing so is to maintain VLA style.\n" + "// For ta policy, it initializes the value to all 1's, for tu it\n" + "// initializes to values of merge instead. E.g.\n" + "// in[5]: [1, 1, 2, 2, 3]\n" + "// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0)\n" + "// vl: 4\n" + "// If we apply redsum_ta(out, in, vl), We want the result to be:\n" + "// [9, -1, -1, -1, -1].\n" + "// However, the vl is only 4, so it might result in something\n" + "// like:\n" + "// [6, -1, -1, -1, 3],\n" + "// but we want to maintain the output consistent as it's in VLA\n" + "// style,\n" + "// so one of the most convinent way to do so is to initialize\n" + "// the\n" + "// tail value in the beginning\n" + "// before performing actual computing, namely, getting into the\n" + "// loop.\n"; + if (hasTA(op)) { + os << "memset(" << output->id << ", 0xff, sizeof(" << output->id + << "));\n"; + } else if (hasTU(op)) { + auto &merge = hasMask(op) ? op->inputs[1]->id : op->inputs[0]->id; + os << "memcpy(" << output->id << ", " << merge << ", sizeof(" + << output->id << "));\n"; + } + } + + CodeGenForOperator::getLoopStart(os, counter); + { + getVL(counter); + + std::vector loaded = getIntrinsicArguments(); + std::vector args; + if (loaded.size() == 1) { + if (hasTA(op)) { + args = {loaded[0], vecReduction}; + } else { + args = {vecReduction, loaded[0], vecReduction}; + } + } else if (loaded.size() == 2) { + if (hasTA(op) || hasTU(op)) { // tu or tam + args = {loaded[0], loaded[1], vecReduction}; + } else { // normal _m + args = {loaded[0], vecReduction, loaded[1], vecReduction}; + } + } else if (loaded.size() == 3) { // tum + args = {loaded[0], loaded[1], loaded[2], vecReduction}; + } + + genReductionOpString(os, op, vecReduction, args); + incrementRawPointerByVLEN(); + } + CodeGenForOperator::getLoopEnd(os); + + storeVectorToScalar(os, getRawPointerString(os, output, true), vecReduction, + *output->typeInfo); + } +}; + +struct CodeGenForVcpop : CodeGenForOperator { + CodeGenForVcpop() = delete; + CodeGenForVcpop(std::ostream &os, OperatorBase *op, TypeInfo &typeInfo, + size_t length) + : CodeGenForOperator(os, op, typeInfo, length) {} + + void getRawPointers(std::vector inputs, ValueBase *output) { + for (ValueBase *input : inputs) + opInputs.push_back({getRawPointerString(os, input), input}); + opOutput = {getRawPointerString(os, output, true), output}; + } + void genVcpopOpString(const std::string &popcountStr, + const std::vector &args) { + os << popcountStr << " += vcpop_m_b" << getBooleanSew(*op->typeInfo); + genIntrinsicFuncSuffix(os, op, args); + } + std::string getPopcountCounter() { + std::string popcountCounter = getNewPlaceholderName(); + os << "uint32_t " << popcountCounter << " = 0;\n"; + return popcountCounter; + } + void generateSingleOperatorCode() { + auto output = op->outputs[0]; + getRawPointers(op->inputs, output); + std::string counter = CodeGenForOperator::getCounter(os, loopLength); + std::string popcount = getPopcountCounter(); + CodeGenForOperator::getLoopStart(os, counter); + { + getVL(counter); + std::vector args = getIntrinsicArguments(); + genVcpopOpString(popcount, args); + incrementRawPointerByVLEN(); + } + CodeGenForOperator::getLoopEnd(os); + storeScalarToScalar(os, opOutput.first, popcount); + } +}; + +struct CodeGenForVfirst : CodeGenForOperator { + CodeGenForVfirst() = delete; + CodeGenForVfirst(std::ostream &os, OperatorBase *op, TypeInfo &typeInfo, + size_t length) + : CodeGenForOperator(os, op, typeInfo, length) {} + + std::string getLengthCounter() { + std::string lengthCounter = getNewPlaceholderName(); + os << "uint32_t " << lengthCounter << " = 0;\n"; + return lengthCounter; + } + + void getRawPointers(std::vector inputs, ValueBase *output) { + for (ValueBase *input : inputs) + opInputs.push_back({getRawPointerString(os, input), input}); + opOutput = {getRawPointerString(os, output, true), output}; + } + void genVfirstOpString(const std::string &first, + const std::vector &args) { + os << first << " = vfirst_m_b" << getBooleanSew(*op->typeInfo); + genIntrinsicFuncSuffix(os, op, args); + } + void getLoopStart(const std::string &counter, const std::string &first, + const std::string &lengthCounter) { + os << "for (size_t vl = 0; " << first << " == -1 && " << counter << " > 0; " + << counter << " -= vl) {\n"; + os << lengthCounter << " += vl;\n"; + } + void getLoopEnd(const std::string &first, const std::string &lengthCounter) { + os << "}\n"; + os << "if (" << first << " != -1) " << first << " += " << lengthCounter + << ";\n"; + } + + void generateSingleOperatorCode() { + auto output = op->outputs[0]; + getRawPointers(op->inputs, output); + std::string counter = CodeGenForOperator::getCounter(os, loopLength); + std::string first = getFirst(os); + std::string lengthCounter = getLengthCounter(); + getLoopStart(counter, first, lengthCounter); + { + getVL(counter); + std::vector args = getIntrinsicArguments(); + genVfirstOpString(first, args); + incrementRawPointerByVLEN(); + } + getLoopEnd(first, lengthCounter); + storeScalarToScalar(os, opOutput.first, first); + } +}; + +struct CodeGenForVmsbfVmsifVmsof : CodeGenForOperator { + CodeGenForVmsbfVmsifVmsof() = delete; + CodeGenForVmsbfVmsifVmsof(std::ostream &os, OperatorBase *op, + TypeInfo &typeInfo, size_t length) + : CodeGenForOperator(os, op, typeInfo, length) {} + + std::string getLoopEndStoreMask(std::vector args) { + std::string vecM = args[0]; + std::string vecMO = args[1]; + std::string vecStored = getNewPlaceholderName(); + int booleanSew = getBooleanSew(vlTypeInfo); + os << "vbool" << booleanSew << "_t " << vecStored << " = "; + if (hasMA(op)) { + os << "vmnot_m_b" << booleanSew << "(" << vecM << ", vl);\n"; + } else { + os << "vmandn_mm_b" << booleanSew << "(" << vecMO << ", " << vecM + << ", vl);\n"; + } + return vecStored; + } + void getLoopStart(const std::string &counter, const std::string &first) { + os << "for (size_t vl = 0; " << counter << " > 0 && " << first << " == -1; " + << counter << " -= vl) {\n"; + } + void getLoopEnd(const std::string &counter) { + os << "}\n"; + os << "for (size_t vl;" << counter << " > 0; " << counter << " -= vl) {\n"; + { + getVL(counter); + if (!hasMask(op)) { + std::string vecMaskClr = getVmclrMaskReg(os, vlTypeInfo); + storeVectorToOneD(os, opOutput.first, vecMaskClr, opOutput.second); + } else { + auto args = getIntrinsicArguments(); + std::string vecStored = getLoopEndStoreMask(args); + storeVectorToOneD(os, opOutput.first, vecStored, opOutput.second); + } + incrementRawPointerByVLEN(); + } + os << "}\n"; + } + void updateFirst(const std::string &first, std::vector &args) { + int booleanSew = getBooleanSew(vlTypeInfo); + auto vecVs2 = + hasMask(op) ? op->opAttr & NoMaskedOff ? args[1] : args[2] : args[0]; + if (hasMask(op)) { + auto vecM = args[0]; + os << first << " = vfirst_m_b" << booleanSew << "_m(" << vecM << ", " + << vecVs2 << ", vl);\n"; + } else { + os << first << " = vfirst_m_b" << booleanSew << "(" << vecVs2 + << ", vl);\n"; + } + } + void generateSingleOperatorCode() { + auto output = op->outputs[0]; + getRawPointers(op->inputs, output); + std::string counter = CodeGenForOperator::getCounter(os, loopLength); + std::string first = getFirst(os); + getLoopStart(counter, first); + { + getVL(counter); + std::vector args = getIntrinsicArguments(); + auto opResult = genOpString(os, op, args, output); + storeResult(opResult); + incrementRawPointerByVLEN(); + updateFirst(first, args); + } + getLoopEnd(counter); + } +}; + +struct CodeGenForViota : CodeGenForOperator { + CodeGenForViota() = delete; + CodeGenForViota(std::ostream &os, OperatorBase *op, TypeInfo &typeInfo, + size_t length) + : CodeGenForOperator(os, op, typeInfo, length) {} + + void storeResult(const std::string &opResult, std::string &accumulateMask, + std::vector &args) { + os << opResult << " = vadd_vx_" << vlTypeInfo.shortVectorTypeName + << getOpSuffix(op) + "("; + if (hasNonmask(op)) { + if (hasTU(op)) + os << args[0] << ", "; + } else { + auto vecM = args[0]; + auto vecMO = hasTAMA(op) ? "" : args[1]; + os << vecM << ", "; + if (vecMO != "") { + os << vecMO << ", "; + } + } + os << opResult << ", " << accumulateMask; + + if (haveTailPolicy(op)) { + os << ", tail_vl);\n"; + } else { + os << ", vl);\n"; + } + storeVectorToOneD(os, opOutput.first, opResult, opOutput.second); + } + std::string getAccumulateMask() { + std::string accumulateMask = getNewPlaceholderName(); + os << "unsigned " << accumulateMask << " = 0;\n"; + return accumulateMask; + } + void updateAccumulateMask(const std::string &accumulateMask, + std::vector &args) { + auto vecInputA = hasNonmask(op) ? hasTU(op) ? args[1] : args[0] + : hasTAMA(op) ? args[1] + : args[2]; + if (hasNonmask(op)) + os << accumulateMask << " += vcpop_m_b" << getBooleanSew(vlTypeInfo) + << "(" << vecInputA << ", " << (haveTailPolicy(op) ? "tail_vl" : "vl") + << ");\n"; + else { + auto vecM = args[0]; + os << accumulateMask << " += vcpop_m_b" << getBooleanSew(vlTypeInfo) + << "_m(" << vecM << ", " << vecInputA << ", " + << (haveTailPolicy(op) ? "tail_vl" : "vl") << ");\n"; + } + } + void generateSingleOperatorCode() { + auto output = op->outputs[0]; + getRawPointers(op->inputs, output); + std::string counter = CodeGenForOperator::getCounter(os, loopLength); + std::string accumulateMask = getAccumulateMask(); + CodeGenForOperator::getLoopStart(os, counter); + { + if (haveTailPolicy(op)) { + os << "vl = 2;\n"; + os << "size_t tail_vl = 1;\n"; + } else { + getVL(counter); + } + std::vector args = getIntrinsicArguments(); + auto opResult = genOpString(os, op, args, output); + storeResult(opResult, accumulateMask, args); + updateAccumulateMask(accumulateMask, args); + incrementRawPointerByVLEN(); + } + CodeGenForOperator::getLoopEnd(os); + } +}; + +struct CodeGenForVid : CodeGenForOperator { + CodeGenForVid() = delete; + CodeGenForVid(std::ostream &os, OperatorBase *op, TypeInfo &typeInfo, + size_t length) + : CodeGenForOperator(os, op, typeInfo, length) {} + + void storeResult(const std::string &opResult, std::string &accumulateLength, + std::vector &args) { + os << opResult << " = vadd_vx_" << vlTypeInfo.shortVectorTypeName + << getOpSuffix(op) + "("; + if (hasNonmask(op)) { + if (hasTU(op)) + os << args[0] << ", "; + } else { + auto vecM = args[0]; + auto vecMO = hasTAMA(op) ? "" : args[1]; + os << vecM << ", "; + if (vecMO != "") { + os << vecMO << ", "; + } + } + os << opResult << ", " << accumulateLength; + + if (haveTailPolicy(op)) { + os << ", tail_vl);\n"; + } else { + os << ", vl);\n"; + } + storeVectorToOneD(os, opOutput.first, opResult, opOutput.second); + } + std::string getAccumulateLength() { + std::string accumulateLength = getNewPlaceholderName(); + os << "unsigned " << accumulateLength << " = 0;\n"; + return accumulateLength; + } + void updateAccumulateLength(const std::string &accumulateLength) { + os << accumulateLength << " += vl;\n"; + } + void generateSingleOperatorCode() { + auto output = op->outputs[0]; + getRawPointers(op->inputs, output); + std::string counter = CodeGenForOperator::getCounter(os, loopLength); + std::string accumulateLength = getAccumulateLength(); + CodeGenForOperator::getLoopStart(os, counter); + { + if (haveTailPolicy(op)) { + os << "vl = 2;\n"; + os << "size_t tail_vl = 1;\n"; + } else { + getVL(counter); + } + std::vector args = getIntrinsicArguments(); + auto opResult = genOpString(os, op, args, output); + storeResult(opResult, accumulateLength, args); + updateAccumulateLength(accumulateLength); + incrementRawPointerByVLEN(); + } + CodeGenForOperator::getLoopEnd(os); + } +}; + +static std::set unitLoadTypeID = { + "vle8_v", + "vle16_v", + "vle32_v", + "vle64_v", +}; + +static std::set unitStoreTypeID = { + "vse8_v", + "vse16_v", + "vse32_v", + "vse64_v", +}; + +static std::set stridedLoadTypeID = { + "vlse8_v", + "vlse16_v", + "vlse32_v", + "vlse64_v", +}; + +static std::set stridedStoreTypeID = { + "vsse8_v", + "vsse16_v", + "vsse32_v", + "vsse64_v", +}; + +static std::set indexedLoadTypeID = { + "vluxei8_v", "vluxei16_v", "vluxei32_v", "vluxei64_v", + "vloxei8_v", "vloxei16_v", "vloxei32_v", "vloxei64_v", +}; + +static std::set indexedStoreTypeID = { + "vsuxei8_v", "vsuxei16_v", "vsuxei32_v", "vsuxei64_v", + "vsoxei8_v", "vsoxei16_v", "vsoxei32_v", "vsoxei64_v", +}; + +struct CodeGenForLoadStore : CodeGenForOperator { + enum LoadStoreType { + Le, + Se, // unit-stride load / store + Lxei, + Sxei, // indexed load / store + Lse, + Sse, // strided load / store + }; + + CodeGenForLoadStore() = delete; + CodeGenForLoadStore(std::ostream &os, OperatorBase *op, TypeInfo &typeInfo, + size_t length) + : CodeGenForOperator(os, op, typeInfo, length) { + + if (unitLoadTypeID.count(op->typeID)) { + type = Le; + } else if (unitStoreTypeID.count(op->typeID)) { + type = Se; + } else if (indexedLoadTypeID.count(op->typeID)) { + type = Lxei; + } else if (indexedStoreTypeID.count(op->typeID)) { + type = Sxei; + } else if (stridedLoadTypeID.count(op->typeID)) { + type = Lse; + } else if (stridedStoreTypeID.count(op->typeID)) { + type = Sse; + } else { + assert(false && "[CodeGenForLoadStore] Unknown typeID"); + } + } + + LoadStoreType type; + + bool isStoreType() const { + return type == LoadStoreType::Se || type == LoadStoreType::Sxei || + type == LoadStoreType::Sse; + } + bool isLoadType() const { + return type == LoadStoreType::Le || type == LoadStoreType::Lxei || + type == LoadStoreType::Lse; + } + + std::vector getUnitStrideArguments() { + std::vector ret; + if (hasMask(op)) { + auto inputM = opInputs[0]; // mask + ret.push_back(loadOneDToVector(os, inputM.second, inputM.first, op)); + if (isLoadType() && !(op->opAttr & NoMaskedOff)) { // non-tama load + auto inputMO = opInputs[1]; // maskedoff + ret.push_back(loadOneDToVector(os, inputMO.second, inputMO.first, op)); + } + } else if (isLoadType() && hasTU(op)) { // tu load + auto inputMO = opInputs[0]; // maskedoff + ret.push_back(loadOneDToVector(os, inputMO.second, inputMO.first, op)); + } + if (isLoadType()) { + auto inputBase = + hasMask(op) ? op->opAttr & NoMaskedOff ? opInputs[1] : opInputs[2] + : hasTU(op) ? opInputs[1] + : opInputs[0]; + ret.push_back(inputBase.first); + } else { + ret.push_back(opOutput.first); + auto inputVal = hasMask(op) ? opInputs[1] : opInputs[0]; + ret.push_back(loadOneDToVector(os, inputVal.second, inputVal.first, op)); + } + return ret; + } + + std::vector getIndexArguments() { + std::vector ret; + if (hasMask(op)) { + auto inputM = opInputs[0]; // mask + ret.push_back(loadOneDToVector(os, inputM.second, inputM.first, op)); + if (isLoadType() && + !(op->opAttr & NoMaskedOff)) { // non-tama indexed load + auto inputMO = opInputs[1]; // maskedoff + ret.push_back(loadOneDToVector(os, inputMO.second, inputMO.first, op)); + } + } else if (isLoadType() && hasTU(op)) { // tu load + auto inputMO = opInputs[0]; // maskedoff + ret.push_back(loadOneDToVector(os, inputMO.second, inputMO.first, op)); + } + + std::pair inputIdx = + isLoadType() ? (hasMask(op) ? op->opAttr & NoMaskedOff ? opInputs[2] + : opInputs[3] + : hasTU(op) ? opInputs[2] + : opInputs[1]) + : (hasMask(op) ? opInputs[2] : opInputs[1]); + + // Adjust LMUL for index + int opSew = op->typeInfo->sew.to_int(); + int idxSew = inputIdx.second->typeInfo->sew.to_int(); + if (opSew > idxSew) { + TypeInfo *updateTypeInfo = op->typeInfo; + while (opSew > idxSew) { + updateTypeInfo = TypeInfo::getNarrowed( + *updateTypeInfo, inputIdx.second->typeInfo->typeClass); + opSew /= 2; + } + inputIdx.second->typeInfo = updateTypeInfo; + } + if (opSew < idxSew) { + TypeInfo *updateTypeInfo = op->typeInfo; + while (opSew < idxSew) { + updateTypeInfo = TypeInfo::getWidened( + *updateTypeInfo, inputIdx.second->typeInfo->typeClass); + opSew *= 2; + } + inputIdx.second->typeInfo = updateTypeInfo; + } + + std::string vecIdx = + loadOneDToVector(os, inputIdx.second, inputIdx.first, op); + if (isLoadType()) { + auto inputBase = + hasMask(op) ? op->opAttr & NoMaskedOff ? opInputs[1] : opInputs[2] + : hasTU(op) ? opInputs[1] + : opInputs[0]; + ret.push_back(inputBase.first); + ret.push_back(vecIdx); + } else { + auto inputVal = hasMask(op) ? opInputs[1] : opInputs[0]; + ret.push_back(opOutput.first); + ret.push_back(vecIdx); + ret.push_back(loadOneDToVector(os, inputVal.second, inputVal.first, op)); + } + + // Calculate remainder for inputIdx + // If length is always safe, we don't need to calculate the remainder + if (inputIdx.second->typeInfo->sew.to_int() != 64) { + os << "if (" << opOutput.second->length << " < " + << (1ull << inputIdx.second->typeInfo->sew.to_int()) - 1 << ") {\n"; + } else { + os << "{\n"; + } + { + if (hasMask(op)) { + auto vecM = ret[0]; + auto vecZero = getVectorFromConstant(os, 0, *inputIdx.second->typeInfo); + os << vecIdx << " = vremu_vx_" + << inputIdx.second->typeInfo->shortVectorTypeName; + os << "_m(" << vecM << ", " << vecZero << ", " << vecIdx << ", " + << opOutput.second->length << ", vl);\n"; + } else { + os << vecIdx << " = vremu_vx_" + << inputIdx.second->typeInfo->shortVectorTypeName; + os << "(" << vecIdx << ", " << opOutput.second->length << ", vl);\n"; + } + } + os << "}\n"; + + // Align the index with sew of the operator + os << vecIdx << " = vmul_vx_" + << inputIdx.second->typeInfo->shortVectorTypeName << "(" << vecIdx + << ", " << op->typeInfo->sew.to_int() / 8 << ", vl);\n"; + + return ret; + } + + std::vector getStrideArguments() { + std::vector ret; + if (hasMask(op)) { + auto inputM = opInputs[0]; // mask + ret.push_back(loadOneDToVector(os, inputM.second, inputM.first, op)); + if (isLoadType() && + !(op->opAttr & NoMaskedOff)) { // tama doesn't have maskedoff + auto inputMO = opInputs[1]; // maskedoff + ret.push_back(loadOneDToVector(os, inputMO.second, inputMO.first, op)); + } + } else if (isLoadType() && hasTU(op)) { // strided load for tu + auto inputMO = opInputs[0]; // maskedoff + ret.push_back(loadOneDToVector(os, inputMO.second, inputMO.first, op)); + } + + if (isLoadType()) { + auto inputBase = + hasMask(op) ? op->opAttr & NoMaskedOff ? opInputs[1] : opInputs[2] + : hasTU(op) ? opInputs[1] + : opInputs[0]; + auto inputStride = + hasMask(op) ? op->opAttr & NoMaskedOff ? opInputs[2] : opInputs[3] + : hasTU(op) ? opInputs[2] + : opInputs[1]; + ret.push_back(inputBase.first); + ret.push_back(inputStride.first); + } else { + auto inputStride = hasMask(op) ? opInputs[2] : opInputs[1]; + auto inputVal = hasMask(op) ? opInputs[1] : opInputs[0]; + ret.push_back(opOutput.first); + ret.push_back(inputStride.first); + ret.push_back(loadOneDToVector(os, inputVal.second, inputVal.first, op)); + } + + return ret; + } + + std::vector getIntrinsicArguments(const LoadStoreType &type) { + if (type == Le || type == Se) + return getUnitStrideArguments(); + else if (type == Lxei || type == Sxei) + return getIndexArguments(); + else if (type == Lse || type == Sse) + return getStrideArguments(); + else + assert(false); // unreachable + } + + void storeResult(std::string opResult, std::vector &args) { + if (isLoadType()) + storeVectorToOneD(os, opOutput.first, opResult, opOutput.second); + else if (isStoreType()) { + } else + assert(false); + } + + void incrementRawPointerByVLEN() { + int skipBaseAddress = -1; + int increaseBaseAddressByStrideVlen = -1; + if (type == Lxei) + skipBaseAddress = hasMask(op) ? op->opAttr & NoMaskedOff ? 1 : 2 + : hasTU(op) ? 1 + : 0; + if (type == Lse) { + increaseBaseAddressByStrideVlen = hasMask(op) + ? op->opAttr & NoMaskedOff ? 1 : 2 + : hasTU(op) ? 1 + : 0; + } + for (int i = 0; i < opInputs.size(); ++i) { + if (i == skipBaseAddress) + continue; + auto input = opInputs[i]; + std::string &rawID = input.first; + ValueBase *value = input.second; + if (i == increaseBaseAddressByStrideVlen) { + auto strideID = hasMask(op) ? op->opAttr & NoMaskedOff + ? opInputs[2].first + : opInputs[3].first + : hasTU(op) ? opInputs[2].first + : opInputs[1].first; + os << rawID << " += vl * " << strideID << ";\n"; + continue; + } + if (isScalarValue(value)) + continue; + RIF::incrementRawPointerByVLEN(os, rawID); + } + if (type == Sse) { + auto strideID = hasMask(op) ? opInputs[2].first : opInputs[1].first; + os << opOutput.first << " += vl * " << strideID << ";\n"; + } else if (isOneDValue(opOutput.second) && type != Sxei) + RIF::incrementRawPointerByVLEN(os, opOutput.first); + } + + void generateSingleOperatorCode() { + auto output = op->outputs[0]; + getRawPointers(op->inputs, output); + if (type == Se || type == Sxei || type == Lse || type == Sse) { + auto rawOut = getRawPointerString(os, output); + std::string counter = CodeGenForOperator::getCounter(os, loopLength); + CodeGenForOperator::getLoopStart(os, + counter); // init destinations to zero + { + getVL(counter); + std::string vecZero = + getVectorFromConstant(os, 0, *opOutput.second->typeInfo); + storeVectorToOneD(os, rawOut, vecZero, opOutput.second); + RIF::incrementRawPointerByVLEN(os, rawOut); + } + CodeGenForOperator::getLoopEnd(os); + } + + if (type == Lse) { // strided load + auto inputStride = + hasMask(op) ? op->opAttr & NoMaskedOff ? opInputs[2] : opInputs[3] + : hasTU(op) ? opInputs[2] + : opInputs[1]; + auto strideID = inputStride.first; + os << strideID << " = (" << strideID << " % 4) + 1;\n"; + + auto stride = *static_cast(inputStride.second)->ptr; + if (stride < 0) { + auto inputBase = + hasMask(op) ? op->opAttr & NoMaskedOff ? opInputs[1] : opInputs[2] + : hasTU(op) ? opInputs[1] + : opInputs[0]; + auto baseAddr = inputBase.first; + os << baseAddr << " += " << inputBase.second->length << " - 1;\n"; + } + } + if (type == Sse) { // strided store + auto inputStride = hasMask(op) ? opInputs[2] : opInputs[1]; + auto strideID = inputStride.first; + os << strideID << " = (" << strideID << " % 4) + 1;\n"; + + auto stride = *static_cast(inputStride.second)->ptr; + if (stride < 0) { + auto outputBaseAddr = opOutput.first; + os << outputBaseAddr << " += " << opOutput.second->length << " - 1;\n"; + } + } + + std::string counter = CodeGenForOperator::getCounter(os, loopLength); + std::string tripCounter = getNewPlaceholderName(); + os << "size_t " << tripCounter << " = 0;\n"; + CodeGenForOperator::getLoopStart(os, counter); + { + if (haveTailPolicy(op)) { + os << "vl = 2;\n"; + os << "size_t tail_vl = 1;\n"; + } else { + getVL(counter); + } + std::vector args = getIntrinsicArguments(type); + if (type == Sse) { + auto inputStride = hasMask(op) ? opInputs[2] : opInputs[1]; + auto stride = inputStride.second; + std::string strideID = inputStride.first; + auto storeBase = opOutput.first; + os << "if (" << tripCounter << " < " << op->inputs[0]->length + << ") {\n"; + { + // std::string saveVL = getNewPlaceholderName(); + + // os << "size_t " << saveVL << " = vl;\n"; + os << "vl = vl < (" << op->inputs[0]->length << " - " << tripCounter + << " + " << strideID << " - 1) / " << strideID << " ? \n"; + os << "vl : (" << op->inputs[0]->length << " - " << tripCounter + << " + " << strideID << " - 1) / " << strideID << ";\n"; + + std::string saveStride = getNewPlaceholderName(); + os << stride->typeInfo->scalarTypeName << " " << saveStride << " = " + << strideID << ";\n"; + os << strideID << " *= " << op->typeInfo->sew.to_int() / 8 << ";\n"; + + auto opResult = genOpString(os, op, args, output); + // storeResult(opResult, args); + + // os << "vl = " << saveVL << "; // recover vl\n"; + os << strideID << " = " << saveStride << "; // recover stride\n"; + } + os << "}\n"; + os << "else {}\n"; + } else if (type == Lse) { + auto inputStride = + hasMask(op) ? op->opAttr & NoMaskedOff ? opInputs[2] : opInputs[3] + : hasTU(op) ? opInputs[2] + : opInputs[1]; + auto stride = inputStride.second; + std::string strideID = inputStride.first; + auto storeBase = opOutput.first; + os << "if (" << tripCounter << " < " << op->inputs[0]->length + << ") {\n"; + { + auto vecZero = getVectorFromConstant(os, 0, *output->typeInfo); + storeVectorToOneD(os, storeBase, vecZero, output); + std::string saveVL = getNewPlaceholderName(); + + os << "size_t " << saveVL << " = vl;\n"; + os << "vl = vl < (" << op->inputs[0]->length << " - " << tripCounter + << " + " << strideID << " - 1) / " << strideID << " ? \n"; + os << "vl : (" << op->inputs[0]->length << " - " << tripCounter + << " + " << strideID << " - 1) / " << strideID << ";\n"; + + std::string saveStride = getNewPlaceholderName(); + os << stride->typeInfo->scalarTypeName << " " << saveStride << " = " + << strideID << ";\n"; + os << strideID << " *= " << op->typeInfo->sew.to_int() / 8 << ";\n"; + + auto opResult = genOpString(os, op, args, output); + storeResult(opResult, args); + + os << "vl = " << saveVL << "; // recover vl\n"; + os << strideID << " = " << saveStride << "; // recover stride\n"; + } + os << "}\n"; + os << "else {\n"; + { + auto vecZero = getVectorFromConstant(os, 0, *output->typeInfo); + storeVectorToOneD(os, storeBase, vecZero, output); + } + os << "};\n"; + } else { + auto opResult = genOpString(os, op, args, output); + storeResult(opResult, args); + } + incrementRawPointerByVLEN(); + if (type == Lse) { + std::string strideID = + hasMask(op) ? op->opAttr & NoMaskedOff ? args[2] : args[3] + : (hasTU(op)) ? args[2] + : args[1]; + os << tripCounter << " += vl * " << strideID << ";\n"; + } + if (type == Sse) { + std::string strideID = hasMask(op) ? args[2] : args[1]; + os << tripCounter << " += vl * " << strideID << ";\n"; + } + } + CodeGenForOperator::getLoopEnd(os); + } +}; + +// Single input operator (e.g. op_id with suffux _v, _f, _x, ...) +static void generateVOperatorCode(std::ostream &os, OperatorBase *op) { + ValueBase *vd = getVd(op); + ValueBase *maskedoff = getMaskedoff(op); + ValueBase *vs2 = getVs2(op); + assert(getVs1(op) == nullptr); + assert(vd != nullptr); + assert(vs2 != nullptr); + + CodeGenForOperator codegen(os, op, *op->typeInfo, vd->length); + codegen.generateSingleOperatorCode(); +} + +static void generateLoadStoreOperatorCode(std::ostream &os, OperatorBase *op) { + ValueBase *vd = getVd(op); + assert(vd != nullptr); + + CodeGenForLoadStore codegen(os, op, *op->typeInfo, vd->length); + codegen.generateSingleOperatorCode(); +} + +// Nonmasked VV / VX operation +static void generateVVOrVXOperatorCode(std::ostream &os, OperatorBase *op) { + ValueBase *vd = getVd(op); + ValueBase *maskedoff = getMaskedoff(op); + ValueBase *vs2 = getVs2(op); + ValueBase *vs1 = getVs1(op); + assert(vs2 != nullptr); + assert(vs1 != nullptr); + assert(vd != nullptr); + + CodeGenForOperator codegen(os, op, *vs2->typeInfo, vd->length); + codegen.generateSingleOperatorCode(); +} + +static void generateMulAddOperatorCode(std::ostream &os, OperatorBase *op) { + ValueBase *vd = getVd(op); + ValueBase *maskedoff = getMaskedoff(op); + ValueBase *vs2 = getVs2(op); + ValueBase *vs1 = getVs1(op); + if (!(op->opAttr & NoMaskedOff)) + assert(maskedoff != nullptr); + assert(vs2 != nullptr); + assert(vs1 != nullptr); + assert(vd != nullptr); + + CodeGenForOperator codegen(os, op, *vs2->typeInfo, vd->length); + codegen.generateSingleOperatorCode(); +} + +// Operators with suffix vvm / vxm / vfm +static void generateVVMVXMOperatorCode(std::ostream &os, OperatorBase *op) { + ValueBase *vs2 = getVs2(op); + assert(vs2 != nullptr); + + CodeGenForOperator codegen(os, op, *vs2->typeInfo, op->outputs[0]->length); + codegen.generateSingleOperatorCode(); +} + +// Operators with suffix vf2 / vf4 / vf8 +static void generateExtensionOperatorCode(std::ostream &os, OperatorBase *op) { + ValueBase *vd = getVd(op); + ValueBase *maskedoff = getMaskedoff(op); + ValueBase *vs2 = getVs2(op); + ValueBase *vs1 = getVs1(op); + assert(vd != nullptr); + assert(vs2 != nullptr); + assert(vs1 == nullptr); + + CodeGenForOperator codegen(os, op, *op->typeInfo, vd->length); + codegen.generateSingleOperatorCode(); +} + +// Operators with suffix vs +// These are reduction ops and require specialized code gen +static void generateVSOperatorCode(std::ostream &os, OperatorBase *op) { + ValueBase *vd = getVd(op); + ValueBase *vs2 = getVs2(op); + + CodeGenForReductionOperator codegen(os, op, *op->typeInfo, vs2->length); + codegen.generateSingleOperatorCode(); +} + +// Operators with suffix mm / m +static void generateMMOrMOperatorCode(std::ostream &os, OperatorBase *op) { + auto output = op->outputs[0]; + + TypeInfo typeInfo = *op->typeInfo; + size_t length = output->length; + + CodeGenForOperator codegen(os, op, typeInfo, length); + codegen.generateSingleOperatorCode(); +} + +static void generateVcpopOperatorCode(std::ostream &os, OperatorBase *op) { + auto output = op->outputs[0]; + + TypeInfo typeInfo = *op->typeInfo; + size_t length = op->inputs[0]->length; + + CodeGenForVcpop codegen(os, op, typeInfo, length); + codegen.generateSingleOperatorCode(); +} + +static void generateVfirstOperatorCode(std::ostream &os, OperatorBase *op) { + auto output = op->outputs[0]; + + TypeInfo typeInfo = *op->typeInfo; + size_t length = op->inputs[0]->length; + + CodeGenForVfirst codegen(os, op, typeInfo, length); + codegen.generateSingleOperatorCode(); +} + +static void generateVmsbfVmsifVmsofOperatorCode(std::ostream &os, + OperatorBase *op) { + auto output = op->outputs[0]; + + TypeInfo typeInfo = *op->typeInfo; + size_t length = op->inputs[0]->length; + + CodeGenForVmsbfVmsifVmsof codegen(os, op, typeInfo, length); + codegen.generateSingleOperatorCode(); +} + +static void generateViotaOperatorCode(std::ostream &os, OperatorBase *op) { + auto typeInfo = *op->typeInfo; + auto length = op->outputs[0]->length; + + CodeGenForViota codegen(os, op, typeInfo, length); + codegen.generateSingleOperatorCode(); +} + +static void generateVidOperatorCode(std::ostream &os, OperatorBase *op) { + auto typeInfo = *op->typeInfo; + auto length = op->outputs[0]->length; + + CodeGenForVid codegen(os, op, typeInfo, length); + codegen.generateSingleOperatorCode(); +} + +static void generateOperatorCode(std::ostream &os, OperatorBase *op) { + if (!hasMask(op) && !hasNonmask(op)) + assert(false && "Masking attribute not set"); + + std::string typeID = op->typeID; + std::string operandType = typeID.substr(typeID.find("_") + 1); + + if (operandType == "vv" || operandType == "wv" || operandType == "vx" || + operandType == "wx" || operandType == "vf" || operandType == "wf") { + if (op->opAttr & MulAddOperation) + generateMulAddOperatorCode(os, op); + else + generateVVOrVXOperatorCode(os, op); + } else if (operandType == "mm") { + if (hasMask(op)) + assert(false); + else + generateMMOrMOperatorCode(os, op); + } else if (operandType == "m") { + if (typeID == "vcpop_m") + generateVcpopOperatorCode(os, op); + else if (typeID == "vfirst_m") + generateVfirstOperatorCode(os, op); + else if (typeID == "vmsbf_m" || typeID == "vmsif_m" || typeID == "vmsof_m") + generateVmsbfVmsifVmsofOperatorCode(os, op); + else if (typeID == "viota_m") + generateViotaOperatorCode(os, op); + else if (hasMask(op)) { + assert(false && "No mask operations for _m suffix"); + } else + generateMMOrMOperatorCode(os, op); + } else if (ends_with(typeID, "_v") || ends_with(typeID, "_x") || + ends_with(typeID, "_w") || ends_with(typeID, "_f")) { + if (typeID == "vid_v") + generateVidOperatorCode(os, op); + else if (op->opAttr & LoadOperation || op->opAttr & StoreOperation) + generateLoadStoreOperatorCode(os, op); + else + generateVOperatorCode(os, op); + } else if (operandType == "vvm" || operandType == "vfm" || + operandType == "vxm") { + generateVVMVXMOperatorCode(os, op); + } else if (operandType == "vf2" || operandType == "vf4" || + operandType == "vf8") { + generateExtensionOperatorCode(os, op); + } else if (operandType == "vs") { + generateVSOperatorCode(os, op); + } else { + std::cerr << "Encounter unknown operand type\n"; + exit(1); + } +} + +#define CUSTOM_OP_TYPE(OP_TYPE, OP_ID, SEW, TYPE_CLASS, OP_ATTR, OUTPUT_TYPE, \ + NUM_OF_INPUTS, ...) \ + void OP_TYPE##Op::generateData() { compute##OP_TYPE##Op(this); } \ + void OP_TYPE##Op::generateCCode(std::ostream &os) { \ + generateOperatorCode(os, this); \ + } +#include "CustomOperator.def" +#undef CUSTOM_OP_TYPE + +template +static void emitOneDVerificationCode(std::ostream &os, OperatorBase *op, + ValueBase *output) { + auto scalarOutput = static_cast(output); + auto length = scalarOutput->length; + auto dataOut = getRawPointer(scalarOutput); + + os << output->dataTypeID << " tmp[] = {"; + for (int i = 0; i < length; ++i) { + if (output->dt == DataTypeEnum::Int8_t) { + os << std::to_string((int8_t)dataOut[i]); + } else if (output->dt == DataTypeEnum::Int16_t) { + os << std::to_string((int16_t)dataOut[i]); + } else if (output->dt == DataTypeEnum::Int32_t) { + os << std::to_string((int32_t)dataOut[i]); + } else if (output->dt == DataTypeEnum::Int64_t) { + os << std::to_string((int64_t)dataOut[i]); + } else if (output->dt == DataTypeEnum::Uint8_t) { + os << std::to_string((uint8_t)dataOut[i]); + } else if (output->dt == DataTypeEnum::Uint16_t) { + os << std::to_string((uint16_t)dataOut[i]); + } else if (output->dt == DataTypeEnum::Uint32_t) { + os << std::to_string((uint32_t)dataOut[i]); + } else if (output->dt == DataTypeEnum::Uint64_t) { + os << std::to_string((uint64_t)dataOut[i]); + } else if (output->dt == DataTypeEnum::Ptrdiff_t) { + os << std::to_string((long)dataOut[i]); + } else if (output->dt == DataTypeEnum::Size_t) { + os << std::to_string((unsigned long)dataOut[i]); + } else { + assert(false && "Unkown dataType"); + } + + if (output->dt == DataTypeEnum::Uint32_t) + os << "u"; + if (output->dt == DataTypeEnum::Int64_t) + os << "ll"; + if (output->dt == DataTypeEnum::Uint64_t) + os << "ull"; + os << ","; + } + os << "};\n"; + + os << "for (int i=0; i<" << length << ";++i)\n"; + os << "if(" << output->id << "[i] != tmp[i]) {\nreturn 0;\n}\n"; + + os << "return 1;\n"; +} + +template <> +void emitOneDVerificationCode(std::ostream &os, + OperatorBase *op, + ValueBase *output) { + auto value = static_cast(output); + auto length = value->length; + float16_t *fp16 = getRawPointer(value); + + os << "uint64_t tmp[] = {"; + for (int i = 0; i < length; ++i) { + os << std::to_string(fp16[i].v) << ","; + } + os << "};\n"; + + os << "union { float16_t f16; uint16_t u16; } converter;\n"; + os << "union { float16_t f16; uint16_t u16; } converter2;\n"; + os << "for (int i=0; i<" << length << ";++i){\n"; + os << "converter.u16 = tmp[i];\n"; + os << "converter2.f16 = " << output->id << "[i];\n"; + os << "if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && " + "isNaNF16UI(converter2.u16))) {\n"; + os << "return 0;\n}\n"; + os << "}\n"; + os << "return 1;\n"; +} + +template <> +void emitOneDVerificationCode(std::ostream &os, + OperatorBase *op, + ValueBase *output) { + auto value = static_cast(output); + auto length = value->length; + float32_t *fp32 = getRawPointer(value); + + os << "uint64_t tmp[] = {"; + for (int i = 0; i < length; ++i) { + os << std::to_string(fp32[i].v) << "u,"; + } + os << "};\n"; + + os << "union { float32_t f32; uint32_t u32; } converter;\n"; + os << "union { float32_t f32; uint32_t u32; } converter2;\n"; + os << "for (int i=0; i<" << length << ";++i){\n"; + os << "converter.u32 = tmp[i];\n"; + os << "converter2.f32 = " << output->id << "[i];\n"; + os << "if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && " + "isNaNF32UI(converter2.u32))) {\n"; + os << "return 0;\n}\n"; + os << "}\n"; + os << "return 1;\n"; +} + +template <> +void emitOneDVerificationCode(std::ostream &os, + OperatorBase *op, + ValueBase *output) { + auto value = static_cast(output); + auto length = value->length; + float64_t *fp64 = getRawPointer(value); + + os << "uint64_t tmp[] = {"; + for (int i = 0; i < length; ++i) { + os << std::to_string(fp64[i].v) << "ull,"; + } + os << "};\n"; + + os << "union { float64_t f64; uint64_t u64; } converter;\n"; + os << "union { float64_t f64; uint64_t u64; } converter2;\n"; + os << "for (int i=0; i<" << length << ";++i){\n"; + os << "converter.u64 = tmp[i];\n"; + os << "converter2.f64 = " << output->id << "[i];\n"; + os << "if(converter.f64 != converter2.f64 && !(isNaNF64UI(converter.u64) && " + "isNaNF64UI(converter2.u64))) {\n"; + os << "return 0;\n}\n"; + os << "}\n"; + os << "return 1;\n"; +} +template +static void emitScalarVerificationCode(std::ostream &os, OperatorBase *op, + ValueBase *output) { + auto scalarOutput = static_cast(output); + auto dataOut = getRawPointer(scalarOutput); + + os << output->dataTypeID << " tmp = "; + if (output->dt == DataTypeEnum::Int8_t) { + os << std::to_string((int8_t)*dataOut); + } else if (output->dt == DataTypeEnum::Int16_t) { + os << std::to_string((int16_t)*dataOut); + } else if (output->dt == DataTypeEnum::Int32_t) { + os << std::to_string((int32_t)*dataOut); + } else if (output->dt == DataTypeEnum::Int64_t) { + os << std::to_string((int64_t)*dataOut); + } else if (output->dt == DataTypeEnum::Uint8_t) { + os << std::to_string((uint8_t)*dataOut); + } else if (output->dt == DataTypeEnum::Uint16_t) { + os << std::to_string((uint16_t)*dataOut); + } else if (output->dt == DataTypeEnum::Uint32_t) { + os << std::to_string((uint32_t)*dataOut); + } else if (output->dt == DataTypeEnum::Uint64_t) { + os << std::to_string((uint64_t)*dataOut); + } else if (output->dt == DataTypeEnum::Ptrdiff_t) { + os << std::to_string((long)*dataOut); + } else if (output->dt == DataTypeEnum::Size_t) { + os << std::to_string((unsigned long)*dataOut); + } else { + assert(false && "Unkown dataType"); + } + + if (output->dt == DataTypeEnum::Int64_t) + os << "ll"; + if (output->dt == DataTypeEnum::Uint64_t) + os << "ull"; + + os << ";\n"; + + os << "if(" << output->id << " != tmp) {\n"; + os << "return 0;\n}\n"; + + os << "return 1;\n"; +} + +template <> +void emitScalarVerificationCode(std::ostream &os, + OperatorBase *op, + ValueBase *output) { + auto scalarOutput = static_cast(output); + float16_t *dataOut = getRawPointer(scalarOutput); + + os << "uint16_t tmp = " << std::to_string(dataOut->v) << ";\n"; + os << "union { float16_t f16; uint16_t u16; } converter, converter2;\n"; + os << "converter.u16 = tmp;\n"; + os << "converter2.f16 = " << output->id << ";\n"; + os << "if(converter.f16 != " << output->id + << " && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) {\n"; + os << "return 0;\n}\n"; + os << "return 1;\n"; +} + +template <> +void emitScalarVerificationCode(std::ostream &os, + OperatorBase *op, + ValueBase *output) { + auto scalarOutput = static_cast(output); + auto dataOut = getRawPointer(scalarOutput); + + os << "uint32_t tmp = " << std::to_string(dataOut->v) << "u;\n"; + os << "union { float32_t f32; uint32_t u32; } converter, converter2;\n"; + os << "converter.u32 = tmp;\n"; + os << "converter2.f32 = " << output->id << ";\n"; + os << "if(converter.f32 != " << output->id + << " && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) {\n"; + os << "return 0;\n}\n"; + os << "return 1;\n"; +} + +template <> +void emitScalarVerificationCode(std::ostream &os, + OperatorBase *op, + ValueBase *output) { + auto scalarOutput = static_cast(output); + auto dataOut = getRawPointer(scalarOutput); + + os << "uint64_t tmp = " << std::to_string(dataOut->v) << "ull;\n"; + os << "union { float64_t f64; uint64_t u64; } converter, converter2;\n"; + os << "converter.u64 = tmp;\n"; + os << "converter2.f64 = " << output->id << ";\n"; + os << "if(converter.f64 != " << output->id + << " && !(isNaNF64UI(converter.u64) && isNaNF64UI(converter2.u64))) {\n"; + os << "return 0;\n}\n"; + os << "return 1;\n"; +} + +void generateVerificationCode(std::ostream &os, OperatorBase *op) { + if (op->type == Initialize) { + os << "return 1;\n"; + return; + } + auto output = op->outputs[0]; + auto type = output->type; + +#define CUSTOM_ONE_D_TYPE(CUSTOM_NAME, ...) \ + if (type == OneD##CUSTOM_NAME) { \ + emitOneDVerificationCode(os, op, output); \ + return; \ + } +#include "CustomValue.def" +#undef CUSTOM_ONE_D_TYPE +#undef CUSTOM_SCALAR_TYPE + +#define CUSTOM_SCALAR_TYPE(CUSTOM_NAME, ...) \ + if (type == Scalar##CUSTOM_NAME) { \ + emitScalarVerificationCode(os, op, output); \ + return; \ + } +#include "CustomValue.def" +#undef CUSTOM_ONE_D_TYPE +#undef CUSTOM_SCALAR_TYPE + + assert(false && "output type is not recognized"); +} + +} // namespace RIF diff --git a/library/Processor.cpp b/library/Processor.cpp new file mode 100644 index 0000000..1712899 --- /dev/null +++ b/library/Processor.cpp @@ -0,0 +1,4 @@ +#include "Processor.hpp" + +Processor P; +Processor *p = &P; diff --git a/library/TypeInfo.cpp b/library/TypeInfo.cpp new file mode 100644 index 0000000..a017055 --- /dev/null +++ b/library/TypeInfo.cpp @@ -0,0 +1,136 @@ +#include "TypeInfo.hpp" + +#include +#include +#include +#include + +using namespace RIF; + +#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0])) + +std::map> TypeInfo::validSewLmul = { + {SewType::Value::e8, + {LmulType::mf8, LmulType::mf4, LmulType::mf2, LmulType::m1, LmulType::m2, + LmulType::m4, LmulType::m8}}, + {SewType::Value::e16, + {LmulType::mf4, LmulType::mf2, LmulType::m1, LmulType::m2, LmulType::m4, + LmulType::m8}}, + {SewType::Value::e32, + {LmulType::mf2, LmulType::m1, LmulType::m2, LmulType::m4, LmulType::m8}}, + {SewType::Value::e64, + {LmulType::m1, LmulType::m2, LmulType::m4, LmulType::m8}}, +}; + +static std::map lmulToIdx = { + {LmulType::mf8, 0}, {LmulType::mf4, 1}, {LmulType::mf2, 2}, + {LmulType::m1, 3}, {LmulType::m2, 4}, {LmulType::m4, 5}, + {LmulType::m8, 6}, +}; + +static constexpr size_t TotalSew = + static_cast(SewType::Value::NumberOfSews); +static constexpr size_t TotalLmul = + static_cast(LmulType::NumberOfLmuls); +static TypeInfo *typeInfos[TotalSew][TotalLmul][NumberOfTypeClasses]; + +SewType::SewType(int sew) { + switch (sew) { + // this case is for InitializeOp in Operator.hpp + case 0: + break; + case 8: + value = Value::e8; + break; + case 16: + value = Value::e16; + break; + case 32: + value = Value::e32; + break; + case 64: + value = Value::e64; + break; + default: + assert(false && "unsupported sew!"); + } +} + +SewType::SewType(SewType::Value sew) : value(sew) {} + +std::string SewType::to_string() const { return std::to_string(to_int()); } + +int SewType::to_int() const { return 8 << static_cast(value); } + +size_t SewType::to_index() const { return static_cast(value); } + +TypeInfo *TypeInfo::create(LmulType lmul, SewType sew, TypeClass typeClass) { + static bool inited = false; + // Isn't fully thread-safe, but I assume we don't need multi-therad. + if (!inited) { + memset(typeInfos, 0, sizeof(typeInfos)); + for (auto it : validSewLmul) { + const auto sew = it.first; + for (LmulType lmul : it.second) { + size_t sewIdx = static_cast(sew); + size_t lmulIdx = lmulToIdx[lmul]; + for (size_t typeClassIdx = 0; typeClassIdx < NumberOfTypeClasses; + ++typeClassIdx) { + typeInfos[sewIdx][lmulIdx][typeClassIdx] = new TypeInfo( + lmul, SewType{sew}, static_cast(typeClassIdx)); + } + } + } + inited = true; + } + + static TypeInfo *dummy = new TypeInfo(lmul, sew, typeClass); + // Used for Initialize node. + if (typeClass == NumberOfTypeClasses) + return dummy; + + assert(lmulToIdx.find(lmul) != lmulToIdx.end()); + + size_t sewIdx = sew.to_index(); + size_t lmulIdx = lmulToIdx[lmul]; + size_t typeClassIdx = static_cast(typeClass); + + if (!typeInfos[sewIdx][lmulIdx][typeClassIdx]) { + std::cerr + << "WARNING: calling ctor for TypeInfo with invalid sew/lmul pair\n"; + exit(1); + } + return typeInfos[sewIdx][lmulIdx][typeClassIdx]; +} + +TypeInfo *TypeInfo::getNarrowed(const TypeInfo &typeInfo, TypeClass typeClass) { + if (typeInfo.sew.to_int() == 8) { + std::cerr << "sew = 8, can't be narrowed\n"; + exit(1); + } + size_t sewIdx = typeInfo.sew.to_index(); + size_t lmulIdx = lmulToIdx[typeInfo.lmul]; + return typeInfos[sewIdx - 1][lmulIdx - 1][typeClass]; +} + +TypeInfo *TypeInfo::getWidened(const TypeInfo &typeInfo, TypeClass typeClass) { + if (typeInfo.sew.to_int() == 64) { + std::cerr << "sew = 64, can't be widened\n"; + exit(1); + } + size_t sewIdx = typeInfo.sew.to_index(); + size_t lmulIdx = lmulToIdx[typeInfo.lmul]; + return typeInfos[sewIdx + 1][lmulIdx + 1][typeClass]; +} + +TypeInfo *TypeInfo::setLmul(const TypeInfo &typeInfo, LmulType lmul) { + if (!validSewLmul[typeInfo.sew].count(lmul)) { + std::cerr << "Sew " << typeInfo.sew.to_int() << " can't be set to " + << std::string(LMUL_STR(lmul)) << "\n"; + exit(1); + } + size_t sewIdx = typeInfo.sew.to_index(); + size_t lmulIdx = lmulToIdx[lmul]; + size_t typeClassIdx = static_cast(typeInfo.typeClass); + return typeInfos[sewIdx][lmulIdx][typeClassIdx]; +} diff --git a/library/Utils.cpp b/library/Utils.cpp new file mode 100644 index 0000000..c713906 --- /dev/null +++ b/library/Utils.cpp @@ -0,0 +1,175 @@ +#include "Utils.hpp" + +#include +#include +#include +#include +#include +#include +#include + +#include + +using namespace std; + +namespace RIF { + +std::string GraphVizFilename; +std::string CCodeFilename; +std::string InitialRootName = "AddVV32VInt32"; +uint32_t InitialLength = 500; +uint32_t InitialSeed = 0xdeadbeef; +uint32_t NodesToGenerate = 5; +std::mt19937 rng; +bool VerboseMode = false; +std::string TargetArch = "rv64gcv"; +std::string VerificationMode = "long"; +bool VerifyTailPolicy = true; +bool VerifyMaskPolicy = true; +bool HasPolicy = false; +bool HasTA = false; +bool HasMA = false; +static char *Progname = nullptr; + +/* The options we understand. */ +static struct argp_option options[] = { + {"verbose", 'v', 0, 0, "Produce verbose output"}, + {"disable-tail-policy", 't', "VERIFY_TAIL", 0, + "Disable verification for tail policy"}, + {"disable-mask-policy", 'a', "VERIFY_MASK", 0, + "Disable verification for mask policy"}, + {"code", 'c', "FILE", 0, "C code file, default filename: 'output.c'"}, + {"dot", 'd', "FILE", 0, + "Graphviz visualization file, default filename is 'output.dot'"}, + {"length", 'l', "DATA_LENGTH", 0, + "Data length for the initial node (root)"}, + {"march", 'm', "ARCH_STRING", 0, + "Arch string for testing, default is rv64gcv"}, + {"seed", 's', "RANDOM_SEED", 0, + "Seed for random number generator, default seed is '0xdeadbeef'"}, + {"root", 'r', "OPERATOR_ENUM", 0, + "Initial node for the graph generation, default root is 'AddVV32'"}, + {"nodes-to-gen", 'n', "NODES_TO_GEN", 0, + "The number of nodes to generate for the graph."}, + {"verification-mode", 'f', "VERIFICATION_MODE", 0, + "'short' lets RIF generate verification only to result nodes, 'long' lets " + "RIF generate verification to all nodes. Default to 'long'."}, + {"has-policy", 'p', 0, 0, + "The flag that specifies whether to enable policy intrinsics or not"}, + {"has-ta", 'z', 0, 0, + "The flag that specifies whether to enable ta intrinsics or not"}, + {"has-ma", 'x', 0, 0, + "The flag that specifies whether to enable ma intrinsics or not"}, + {0, 'h', 0, 0, "Give this help list"}, + {0}}; + +static error_t parse_opt(int key, char *arg, struct argp_state *state); +// Our argp parser. +static struct argp argp = {options, parse_opt, "", ""}; + +// Parse a single option. +static error_t parse_opt(int key, char *arg, struct argp_state *state) { + switch (key) { + case 'v': + VerboseMode = true; + break; + case 't': + VerifyTailPolicy = false; + break; + case 'a': + VerifyMaskPolicy = false; + break; + case 'p': + HasPolicy = true; + break; + case 'z': + HasTA = true; + break; + case 'x': + HasMA = true; + break; + case 'c': + CCodeFilename = arg; + break; + case 'd': + GraphVizFilename = arg; + break; + case 'l': + InitialLength = std::stoul(std::string(arg), nullptr, 10); + case 'm': + // TODO: Verify the arch string and parse the capability. + TargetArch = arg; + break; + case 's': + InitialSeed = std::stoul(std::string(arg), nullptr, 16); + break; + case 'r': + InitialRootName = arg; + break; + case 'n': + NodesToGenerate = std::stoul(std::string(arg), nullptr, 10); + break; + case 'f': + VerificationMode = std::string(arg); + case 'h': + argp_help(&argp, stdout, ARGP_HELP_STD_HELP, Progname); + exit(0); + break; + + case ARGP_KEY_ARG: + // Too many arguments. + if (state->arg_num >= 0) { + std::cerr << "Receive unknown argument " << arg << "\n"; + argp_usage(state); + } + break; + + case ARGP_KEY_END: + break; + + default: + return ARGP_ERR_UNKNOWN; + } + return 0; +} + +void parseArguments(int argc, char **argv) { + Progname = argv[0]; + // default filename + GraphVizFilename = "output.dot"; + CCodeFilename = "output.c"; + + // Parse our arguments; every option seen by parse_opt will + // be reflected in arguments. + argp_parse(&argp, argc, argv, 0, 0, nullptr); +} + +void initializeRNG(uint32_t seed) { rng = std::mt19937(seed); } + +// Simple linear transformation from generator 'rng' +template <> +float16_t getRandomNumber(int minValue, int maxValue, uint64_t *raw) { + uint64_t x = getRandomNumber(minValue, maxValue, nullptr); + float16_t ret = ui64_to_f16(x); + if (raw != nullptr) + *raw = ret.v; + return ret; +} +template <> +float32_t getRandomNumber(int minValue, int maxValue, uint64_t *raw) { + uint64_t x = getRandomNumber(minValue, maxValue, nullptr); + float32_t ret = ui64_to_f32(x); + if (raw != nullptr) + *raw = ret.v; + return ret; +} +template <> +float64_t getRandomNumber(int minValue, int maxValue, uint64_t *raw) { + uint64_t x = getRandomNumber(minValue, maxValue, nullptr); + float64_t ret = ui64_to_f64(x); + if (raw != nullptr) + *raw = ret.v; + return ret; +} + +} // namespace RIF diff --git a/library/Value.cpp b/library/Value.cpp new file mode 100644 index 0000000..c4c7ddc --- /dev/null +++ b/library/Value.cpp @@ -0,0 +1,40 @@ +// Value.cpp +#include "Value.hpp" +#include "Utils.hpp" + +#include + +namespace RIF { + +#define CUSTOM_ONE_D_TYPE(CUSTOM_NAME, DATA_TYPE, DATA_WIDTH, DATA_CLASS, \ + MIN_VALUE, MAX_VALUE) \ + DATA_TYPE *getRawPointer(OneD##CUSTOM_NAME##Val *val) { return val->ptr; } \ + void OneD##CUSTOM_NAME##Val::generateData() { \ + auto length = this->length; \ + auto data = getRawPointer(this); \ + for (int i = 0; i < length; ++i) \ + data[i] = getRandomNumber(MIN_VALUE, MAX_VALUE, &raw[i]); \ + } \ + void OneD##CUSTOM_NAME##Val::generateCCode(std::ostream &os) { \ + os << this->dataTypeID << " " << this->id << "[" << this->length \ + << "];\n"; \ + } +#include "CustomValue.def" +#undef CUSTOM_ONE_D_TYPE +#undef CUSTOM_SCALAR_TYPE + +#define CUSTOM_SCALAR_TYPE(CUSTOM_NAME, DATA_TYPE, DATA_WIDTH, DATA_CLASS, \ + MIN_VALUE, MAX_VALUE) \ + DATA_TYPE *getRawPointer(Scalar##CUSTOM_NAME##Val *val) { return val->ptr; } \ + void Scalar##CUSTOM_NAME##Val::generateData() { \ + auto data = getRawPointer(this); \ + *data = getRandomNumber(MIN_VALUE, MAX_VALUE, raw); \ + } \ + void Scalar##CUSTOM_NAME##Val::generateCCode(std::ostream &os) { \ + os << this->dataTypeID << " " << this->id << ";\n"; \ + } +#include "CustomValue.def" +#undef CUSTOM_ONE_D_TYPE +#undef CUSTOM_SCALAR_TYPE + +} // namespace RIF diff --git a/prebuilt/metal-run/.gitignore b/prebuilt/metal-run/.gitignore new file mode 100644 index 0000000..48b374b --- /dev/null +++ b/prebuilt/metal-run/.gitignore @@ -0,0 +1,2 @@ +__pycache__ +prebuilt/.lock diff --git a/prebuilt/metal-run/.gitmodules b/prebuilt/metal-run/.gitmodules new file mode 100644 index 0000000..c019de1 --- /dev/null +++ b/prebuilt/metal-run/.gitmodules @@ -0,0 +1,13 @@ +[submodule "sifive-gem5"] + path = sifive-gem5 + url = git@github.com:sifive/sifive-gem5.git + branch = gem5-run +[submodule "prebuilt/prebuilt-qemu"] + path = prebuilt/prebuilt-qemu + url = git@github.com:sifive/prebuilt-qemu.git +[submodule "prebuilt/prebuilt-gdb"] + path = prebuilt/prebuilt-gdb + url = git@github.com:sifive/prebuilt-gdb.git +[submodule "prebuilt/prebuilt-spike"] + path = prebuilt/prebuilt-spike + url = git@github.com:sifive/prebuilt-spike.git diff --git a/prebuilt/metal-run/README.md b/prebuilt/metal-run/README.md new file mode 100644 index 0000000..313d7b3 --- /dev/null +++ b/prebuilt/metal-run/README.md @@ -0,0 +1,79 @@ +# metal-run: wrapper for running program from freedom-metal on qemu + +## Step by step demo + +### Program built with freedom-metal + +``` +$ make TARGET=sifive-hifive1 PROGRAM=hello software +``` + +### And you want to run with qemu. + +``` +./metal-run software/hello/debug/hello.elf +Hello, World! +``` + +Exit with out `ctrl+a x` or `kill`! and get correct return code from main/exit/abort! + +## Usage: + +``` +$ ./metal-run -h +usage: metal-run [-h] [--qemu QEMU] [--machine MACHINE] [--gdb GDB] + [--port PORT] + prog + +positional arguments: + prog executable file + +optional arguments: + -h, --help show this help message and exit + --qemu QEMU path for qemu + --machine MACHINE, -m MACHINE + machine type used in qemu, default is sifive_e + --gdb GDB path for gdb + --port PORT port for communicate between gdb and qemu (auto detect + if not given) +``` +# arty-run: + wrapper for running program from freedom-mental on arty. see [README](docs/README.arty_run.md) + +# Testing metal-run + +## Prerequisites + +Install python packages + +``` +$ pip3 install --user -r requirements.txt +``` + +Have functional in-house toolchain in `PATH` + +``` +module load sifive/freedom-tools/toolsuite-linux/2022.08.1 +``` + +## Run pytest in top-level dir + +``` +$ pytest -sv ./testsuite +``` + +The expected output should be as follows + +``` +❯ pytest -sv ./testsuite +============ test session starts ============ +platform linux -- Python 3.9.2, pytest-7.1.2, pluggy-1.0.0 -- /sifive/tools/python/python/rhel8/3.9.2b/bin/python3.9 +cachedir: .pytest_cache +rootdir: /ssdscratch/jzhangjian/metal-run +plugins: datadir-1.3.1 +collected 1 item + +testsuite/test_qemu.py::test_hello PASSED + +============ 1 passed in 0.25s ============ +``` diff --git a/prebuilt/metal-run/arty-run b/prebuilt/metal-run/arty-run new file mode 100755 index 0000000..0e2be45 --- /dev/null +++ b/prebuilt/metal-run/arty-run @@ -0,0 +1,299 @@ +#! /usr/bin/env python3 +''' +return code: + 10 : this script hit exception + 0 : this script exit without error, and return value after running on arty is 0. + ex: running timeout + non zero: this script exit without error, the value is the return value after running on arty. +''' + +import time +import re +import os +import subprocess +import argparse +import signal +import threading +import sys + +import utils +utils.check_package('pexpect', version=3) +utils.check_package('pyserial', version=3) + +import pexpect +import serial + + +GDB_PID = None +OPENOCD_PID = None +GET_OUTPUT_PID = None +HIT_EXIT_FUNC = None +HIT_EXCEPTION = False +RET_CODE = 0 + +def handle_ctrlc(*args): + print("fetch Ctrl-C !") + kill_qemu_and_openocd_sig_handler() + +def kill_qemu_and_openocd_sig_handler(): + print("#### cleaning ####") + global OPENOCD_PID + global GDB_PID + global GET_OUTPUT_PID + global HIT_EXCEPTION + global RET_CODE + + if GDB_PID: + print("killing gdb: %d"%GDB_PID) + os.kill(int(GDB_PID), signal.SIGTERM) + if OPENOCD_PID: + print("killing openocd: %d"%OPENOCD_PID) + os.kill(int(OPENOCD_PID), signal.SIGTERM) + if GET_OUTPUT_PID: + print("killing process of get output: %d"%GET_OUTPUT_PID) + os.kill(int(GET_OUTPUT_PID), signal.SIGTERM) + + print("#### end of cleaning, then exiting ####") + if HIT_EXCEPTION == True: + os._exit(10) + else: + os._exit(RET_CODE) + +def get_output( timeout, serial_port_id, file_path=None, + mode="a", baudrate=115200, debug=False): + + port = serial.Serial(serial_port_id, baudrate=baudrate, timeout=1) + global HIT_EXIT_FUNC + time.sleep(2) + port.reset_output_buffer() + port.reset_input_buffer() + if debug: + print("start to receive output ......") + while HIT_EXIT_FUNC != True: + if debug == True: + print(".") + time.sleep(1) + + # if we really want expact some string, remember use string as byte. + #rcv = port.read_until(b"USER EXIT") + # this aims to expact a string never happen, could be a problem + rcv = port.read_until(b"") + rcv = rcv.decode("utf-8") + + # decorate log + rcv = "start tty({2}) output ({1}s)\n{0}\nend of tty({2}) output ({1}s)".\ + format(rcv, timeout, serial_port_id) + if file_path == None: + print(rcv) + # need to use flush to really print, don't know why + sys.stdout.flush() + else: + with open(file_path, mode) as output_file: + output_file.write(rcv) + port.close() + +def get_gdb_port(config_file): + with open(config_file, "r") as config: + re_match = re.search("gdb_port\s*[0-9]*", config.read()) + if re_match is not None: + port_number = re_match.group().split(" ")[-1] + else: + # use default port in OpenOCD + port_number = 3333 + return port_number + +def run_a_binary(sys_args, clean_log=True): + global OPENOCD_PID + global GDB_PID + global GET_OUTPUT_PID + global HIT_EXIT_FUNC + global RET_CODE + binary_path = sys_args["executable"] + openocd_config = sys_args["openocd_config"] + openocd_path = sys_args["openocd"] + gdb_path = sys_args["gdb"] + timeout = sys_args["timeout"] + tty = sys_args["tty"] + debug = sys_args["debug"] + + gdb_port_number = get_gdb_port(openocd_config) + + # fork process to get_output + receive_t = threading.Thread(target=get_output, args=(timeout, + tty, + None, + "a", + "115200", + debug)) + #GET_OUTPUT_PID = p.tid + receive_t.start() + + # turn on openocd + openocd_cmd = "{OPENOCD} -f {OPENOCD_CONFIG}".format( + OPENOCD = openocd_path, + OPENOCD_CONFIG=openocd_config) + if debug == True: + openocd = subprocess.Popen(openocd_cmd.split(" "), + shell=False, + stdin=open(os.devnull)) + else: + openocd = subprocess.Popen(openocd_cmd.split(" "), + shell=False, + stdin=open(os.devnull), + stdout=open(os.devnull, 'w'), + stderr=subprocess.STDOUT) + + # wait a second for openocd warm up. + OPENOCD_PID = openocd.pid + time.sleep(1) + openocd.poll() + if openocd.returncode != None: + # it will be None when running + print("openocd is occupied, please check openocd process") + print("exit !") + os._exit(-1) + + # turn on gdb + gdb_cmd = "{GDB} {EXECUTABLE}".format( + GDB=gdb_path, + EXECUTABLE=binary_path) + gdb = pexpect.spawn(gdb_cmd, encoding='utf-8') + GDB_PID = gdb.pid + # connect gdb to openocd + gdb.expect("(gdb)") + gdb.sendline("set remotetimeout 240") + gdb.expect("(gdb)") + gdb.sendline("target extended-remote localhost:%s"%gdb_port_number) + # load + gdb.expect("(gdb)") + gdb.sendline("monitor reset halt") + gdb.expect("(gdb)") + gdb.sendline("monitor flash protect 0 64 last off") + gdb.expect("(gdb)") + if debug == True: + print("monitor flash protect 0 64 last off OK") + gdb.sendline("load") + gdb.expect("(gdb)") + if debug == True: + print("load OK !") + breakpoint_list = ["exit", "metal_shutdown", "early_trap_vector"] + for a_bp in breakpoint_list: + gdb.sendline("hb *%s"%a_bp) + gdb.expect("Hardware assisted breakpoint.*at") + if debug == True: + print("setting %s as bp OK!"%a_bp) + + gdb.sendline("continue") + if debug == True: + print("start to run") + + # get ret code + def get_val(reg_name, digit='d'): + ''' + digit: + d: decimal + x: hexadecimal + ''' + if digit == 'x': + gdb.sendline("p/x %s" % reg_name) + else: + gdb.sendline("p %s" % reg_name) + gdb.expect("\$\\d* = .*\r") + val = parse_val(gdb.after, digit) + return val + + gdb.expect(["Breakpoint .* in \S* \(", "Breakpoint .* at"], timeout=timeout) + hit_str = gdb.after + if debug == True: + print("hit_str: %s"%(hit_str)) + hit_func = hit_str.split(" ")[4] + if debug == True: + print("hit_func: %s"%(hit_func)) + + if "early_trap_vector" in hit_func: + print("Hit early_trap_vector, some thing wrong.") + mcause = get_val("$mcause") + mepc = get_val("$mepc") + mtval = get_val("$mtval") + print ("$mcause = %d" % mcause) + print ("$mepc = 0x%x" % mepc) + print ("$mtval = 0x%x" % mtval) + rv = -1 + HIT_EXIT_FUNC = True + elif "metal_shutdown" in hit_func: + print("metal_shutdown!") + rv = -1 + HIT_EXIT_FUNC = True + else: + rv = get_val("$a0") + HIT_EXIT_FUNC = True + + RET_CODE = rv + print("return code: %d"%rv) + mvendorid = get_val("$mvendorid") + marchid = get_val("$marchid", digit='x') + mimpid = get_val("$mimpid") + print ("$mvendorid = 0x%x" % mvendorid) + print ("$marchid = %d" % marchid) + print ("$mimpid = 0x%x" % mimpid) + + # wait for output + receive_t.join(timeout=timeout) + if receive_t.is_alive() == True: + print("exceed timeout (%s). Try to clean. "%timeout) + + # kill gdb & openocd + kill_qemu_and_openocd_sig_handler() + +def main(sys_args): + global HIT_EXCEPTION + if sys_args["debug"] == True: + print("system arguments:") + print(sys_args) + signal.signal(signal.SIGINT, handle_ctrlc) + # run binary + try: + run_a_binary(sys_args) + except Exception as e: + HIT_EXCEPTION = True + print("catch exception: %s"%str(e)) + print("try to clean ......") + kill_qemu_and_openocd_sig_handler() + # get output + +def handle_arguments(): + + parser = argparse.ArgumentParser() + parser.add_argument('--timeout', type=float, help="timeout", default=60.0) + parser.add_argument('--tty', type=str, required=True, + help='tty string, ex: /dev/ttyUSB1',) + parser.add_argument('--executable', type=str, help='executable file', + required=True) + parser.add_argument('--gdb', type=str, help='path to gdb', + required=True) + parser.add_argument('--openocd', type=str, help='path to openocd', + required=True) + parser.add_argument('--openocd-config', type=str, help='config of openocd', + required=True) + parser.add_argument('--debug', action='store_true', default=False, + help='debug mode for arty-run') + opts = vars(parser.parse_args()) + return opts + +def parse_val(line, digit='d'): + ''' + digit: + d: decimal + x: hexadecimal + ''' + raw_rv = line.strip() + val = raw_rv.split("=")[1].strip() + if digit == 'x': + rv = int(val, 16) + else: + rv = int(val) + return rv + +if __name__ == '__main__': + sys_args = handle_arguments() + main(sys_args) diff --git a/prebuilt/metal-run/burn_and_run.sh b/prebuilt/metal-run/burn_and_run.sh new file mode 100755 index 0000000..5c118fb --- /dev/null +++ b/prebuilt/metal-run/burn_and_run.sh @@ -0,0 +1,65 @@ +#!/bin/bash + +FLASH_TOOL="/root/arty_tools/xc3sprog/xc3sprog_ole2mail/build/xc3sprog" +ARTY_RUN_PATH="/root/arty_tools/metal-run/arty-run" +BITSTREAM_PATH="/root/arty_tools/bitstream" +VERSION="1908" +BINARY_PATH="/root/arty_tools/hello" +COREIP_LIST="s76 e20 e31" +FIND_USB="/root/arty_tools/find.sh" + +GDB_PATH="/root/arty_tools/riscv-toolchain/bin/riscv64-unknown-elf-gdb" +OPENOCD_PATH="/usr/local/bin/openocd" +OPENOCD_CONFIG="/root/arty_tools/openocd.cfg" + +bitstream=$1 +executable=$2 + +timeout=$3 + + +if [ "$#" != "3" ];then + echo -e "\n$0 [bitstream] [executable] [timeout]\n" + echo -e " bitstream : .bit file for arty" + echo -e " executable: ELF file generated by freedom-e-sdk" + echo -e " timeout: timeout for executing executable in second" + exit -1 +fi + +# prepare ttyUSB +OUTPUT_TTY=`bash $FIND_USB 2>&1 |grep "\/dev\/ttyUSB.*Digilent.*[0-9A-Z]$" |cut -d- -f1 |sed "s/ //g"` +if [ ! -e $OUTPUT_TTY ];then + echo "Output TTY: ${OUTPUT_TTY} doesn't exist" + exit -1 +fi + + + +if [ ! -e $executable ];then + echo "$executable not exist !" + exit -1 +fi +executable=`readlink -f $executable` + +if [ ! -e $bitstream ];then + echo "$bitstream not exist !" + exit -1 +fi +bitstream=`readlink -f $bitstream` + +echo -e "\n==== found $OUTPUT_TTY as I/O serial port ! ==== " + +#burn +echo -e "\n==== start to flash bitstream `basename $bitstream` on arty ==== " +$FLASH_TOOL -c nexys4 -v $bitstream +if [ "$?" != "0" ];then + echo "flash error for $bitstream" + exit -1 +fi + +echo -e "\n==== flash success ! try to run program `basename $executable` ==== " +#run +$ARTY_RUN_PATH --gdb $GDB_PATH --openocd $OPENOCD_PATH --openocd-config $OPENOCD_CONFIG --tty $OUTPUT_TTY --executable $executable --timeout $timeout + +exit $? + diff --git a/prebuilt/metal-run/docs/README.arty_run.md b/prebuilt/metal-run/docs/README.arty_run.md new file mode 100644 index 0000000..1ef87ee --- /dev/null +++ b/prebuilt/metal-run/docs/README.arty_run.md @@ -0,0 +1,63 @@ +# arty-run: wrapper for running program from freedom-mental on arty. + +## Please note that + +1. arty-run will NOT flahs FPGA to specific core ip. + + You should specify correct core ip when building from freedom-e-sdk with TARGET, + + and speicfy correct openocd config in bsp. + + Maybe support flashing in the future with arty-run or other utility. + + +2. Things to do if you connect multiple arty at the same Linux PC: + a. add ftdi_location in openocd.cfg + b. specify tty number in arty-run + + These are something that can't be handled automatically, sorry. + + Please see the [reference](https://sifive.atlassian.net/wiki/spaces/~561831029/pages/425427398/Play+Arty) + + +## Step by step demo on hsinchu lab server + +Assume that you flashed e31 on arty. + +### Program built with benchmark repo + +``` +$ git clone git@github.com:sifive/benchmarks.git --recursive + +$ cd benchmarks && source ./sourceme + +$ python ./scripts/evaluate_benchmark.py --benchmark-list coremark_esdk_p10100 --freedom-target e31-arty --coremark-float 1 --toolchain /scratch/sifive-tw-lab/tool/riscv64-unknown-elf-gcc-8.2.0-2019.02.0-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gcc --qemu-path ~/scratch/tools/qemu-system-riscv/bin/qemu-system-riscv32 + +``` + + +### And you want to run with arty. + +``` +/home/evanli/scratch/work/metal-run/arty-run --openocd /scratch/sifive-tw-lab/tool/riscv-openocd-0.10.0-2019.02.0-x86_64-linux-ubuntu14/bin/openocd --gdb /scratch/sifive-tw-lab/tool/riscv64-unknown-elf-gcc-8.2.0-2019.02.0-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gdb --openocd-config /scratch/sifive-tw-lab/freedom-e-sdk/bsp/coreip-e31-arty/openocd1.cfg --timeout 50 --executable benchmarks/binary/tasks/$task_id/coremark_esdk_p10100.-Os.plain --tty /dev/ttyUSB2 + +# need to wait for 30s for coremark running +``` + +## Usage: +``` +usage: arty-run [-h] [--timeout TIMEOUT] --tty TTY --executable EXECUTABLE + --gdb GDB --openocd OPENOCD --openocd-config OPENOCD_CONFIG + +optional arguments: + -h, --help show this help message and exit + --timeout TIMEOUT timeout + --tty TTY tty string, ex: /dev/ttyUSB1 + --executable EXECUTABLE + executable file + --gdb GDB path to gdb + --openocd OPENOCD path to openocd + --openocd-config OPENOCD_CONFIG + config of openocd + +``` diff --git a/prebuilt/metal-run/docs/README.metal_run.md b/prebuilt/metal-run/docs/README.metal_run.md new file mode 100644 index 0000000..d1effd6 --- /dev/null +++ b/prebuilt/metal-run/docs/README.metal_run.md @@ -0,0 +1,38 @@ +# metal-run: wrapper for running program from freedom-mental on qemu + +## Step by step demo + +### Program built with freedom-mental + +``` +$ make TARGET=sifive-hifive1 PROGRAM=hello software +``` + +### And you want to run with qemu. + +``` +./mental-run software/hello/debug/hello.elf +Hello, World! +``` + +Exit with out `ctrl+a x` or `kill`! and get correct return code from main/exit/abort! + +## Usage: +``` +$ ./metal-run -h +usage: metal-run [-h] [--qemu QEMU] [--machine MACHINE] [--gdb GDB] + [--port PORT] + prog + +positional arguments: + prog executable file + +optional arguments: + -h, --help show this help message and exit + --qemu QEMU path for qemu + --machine MACHINE, -m MACHINE + machine type used in qemu, default is sifive_e + --gdb GDB path for gdb + --port PORT port for communicate between gdb and qemu (auto detect + if not given) +``` diff --git a/prebuilt/metal-run/gem5-run b/prebuilt/metal-run/gem5-run new file mode 100755 index 0000000..57245b7 --- /dev/null +++ b/prebuilt/metal-run/gem5-run @@ -0,0 +1,8 @@ +#! /usr/bin/env python3 + +import sys +from justRun import Main +from simulator import gem5 + +if __name__ == '__main__': + Main.main(sys.argv, simulators=gem5.gem5()) diff --git a/prebuilt/metal-run/just-run b/prebuilt/metal-run/just-run new file mode 100755 index 0000000..d88e78c --- /dev/null +++ b/prebuilt/metal-run/just-run @@ -0,0 +1,7 @@ +#! /usr/bin/env python3 + +import sys +from justRun import Main + +if __name__ == '__main__': + Main.main(sys.argv) diff --git a/prebuilt/metal-run/justRun/File.py b/prebuilt/metal-run/justRun/File.py new file mode 100644 index 0000000..440288d --- /dev/null +++ b/prebuilt/metal-run/justRun/File.py @@ -0,0 +1,65 @@ +import os +import utils +import re + +utils.check_package('elftools', 'pyelftools') + +import elftools.elf.elffile + +class HexFile: + def __init__(self, path, hexclass): + self.path = path + self.fileClass = hexclass + +def createHexFile(path): + if not os.path.exists(path): + raise Exception("%s not found" % path) + rv = 0 + hexclass = None + + ''' + A better way to do this is to invoke grep via subprocess. + However, the behavior of subprocesss is unexpected with + type = (callable function) in argparse. + I suppose it should continue to the next line after invoking subprocess, + but it doesn't + ''' + with open(path) as hex_file: + for a_line in hex_file.readlines(): + if re.match("[g-z]", a_line): + rv = 1 + break + if hexclass == None: + if len(a_line) == 8: + hexclass = 32 + elif len(a_line) == 16: + hexclass = 64 + if rv != 0: + return None + return HexFile(path, hexclass) + +class ElfFile: + def __init__(self, path, elffile): + self.path = path + self.machine = elffile.header['e_machine'].lstrip('EM_') + self.fileClass = elffile.elfclass + self.elffile = elffile + + +def createElfFile(path): + if not os.path.exists(path): + raise Exception("%s not found" % path) + + try: + p = elftools.elf.elffile.ELFFile(open(path, 'rb')) + except elftools.common.exceptions.ELFError: + raise Exception("%s is not ELF file!" % path) + + return ElfFile(path, p) + +def fileHandler(path): + try: + input_file = createElfFile(path) + except: + input_file = createHexFile(path) + return input_file diff --git a/prebuilt/metal-run/justRun/Gdb.py b/prebuilt/metal-run/justRun/Gdb.py new file mode 100644 index 0000000..e39fc62 --- /dev/null +++ b/prebuilt/metal-run/justRun/Gdb.py @@ -0,0 +1,128 @@ +import os +import sys +import subprocess +import tempfile +import pty + +import utils +utils.check_package('pexpect') + +import pexpect + +class Gdb: + break_funcs = ['exit', 'metal_shutdown', 'early_trap_vector'] + + def __init__(self, port, debug, cmds_fmt, options, machine): + self.port = port + self.debug = debug + self.cmds_fmt = cmds_fmt + self.options = options + self.machine = machine + + def cmd_generate(self): + cmds = [] + for opt_name in self.cmds_fmt: + opt = self.options.get(opt_name) + if opt: + cmds += opt + + return cmds + + def create_init_script(self, style=False): + f = tempfile.NamedTemporaryFile(mode="w") + # disable gdb style + # this is done for the convenience of the parser + f.write("set style enabled %s\n" % ("on" if style else "off")) + # set gdb port + f.write("target remote :%d\n" % self.port) + # set breakpoints + for break_func in self.break_funcs: + f.write("b *%s\n" % break_func) + f.flush() + return f + + def run(self, timeout=None, verbose=False, bypass_stdin=False): + self.machine.run(verbose=verbose, wait=False, bypass_stdin=False) + + # generate init gdb script & add into options + gdb_script = self.create_init_script(style=True if self.debug else False) + self.options['GDB_SCRIPT'] = ['-x', gdb_script.name] + + cmds = self.cmd_generate() + + if verbose: + print (' '.join(cmds)) + + # start to run with gdb + try: + if self.debug: + rv = self.debug_with_gdb(cmds) + else: + rv = self.run_with_gdb(cmds, timeout, verbose) + except Exception as e: + print(e) + rv = -1 + finally: + # clear all processes whatever happens + self.machine.shutdown() + + return rv + + def run_with_gdb(self, cmds, timeout, verbose): + gdb = pexpect.spawn(' '.join(cmds), encoding='utf-8') + + if verbose: + gdb.logfile = sys.stdout + + # continue + gdb.expect("(gdb)") + gdb.sendline("c") + + # start to run program + gdb.expect("Breakpoint \\d*, .*\)", timeout=timeout) + + # get register value + def get_val(reg_name): + gdb.sendline("p %s" % reg_name) + gdb.expect("\$\\d* = .*\r") + val = parse_val(gdb.after) + return val + + # get result + break_line = gdb.after.split(" ") + assert len(break_line) == 6, "Parser error on breakpoint line" + hit_func = break_line[4] + assert hit_func in self.break_funcs, \ + "break function %s is not in the breakpoint list" % hit_func + + # TODO: breakpoint handler will implemented by architecture class + if "early_trap_vector" in hit_func: + print("Hit early_trap_vector, something went wrong.") + mcause = get_val("$mcause") + mepc = get_val("$mepc") + mtval = get_val("$mtval") + print ("$mcause = %d" % mcause) + print ("$mepc = 0x%x" % mepc) + print ("$mtval = 0x%x" % mtval) + rv = -1 + elif "metal_shutdown" in hit_func: + print("metal_shutdown!") + rv = -1 + else: + rv = get_val("$a0") + + gdb.sendline("quit") + + return rv + + def debug_with_gdb(self, cmds): + gdb = pty.spawn(cmds) + + # return status from pty process + return gdb + +def parse_val(line): + raw_rv = line.strip() + val = raw_rv.split("=")[1].strip() + rv = int(val) + return rv diff --git a/prebuilt/metal-run/justRun/Machine.py b/prebuilt/metal-run/justRun/Machine.py new file mode 100644 index 0000000..f45a542 --- /dev/null +++ b/prebuilt/metal-run/justRun/Machine.py @@ -0,0 +1,99 @@ +import os +import subprocess +import signal +import sys +from collections.abc import Sequence + +class Machine: + def __init__(self, name, cmds_fmt, options): + if isinstance(cmds_fmt[0], Sequence) and not isinstance(cmds_fmt[0], (str, bytes, bytearray)): + self.cmd_count = len(cmds_fmt) + self.cmds_fmt = cmds_fmt + self.options = options + else: + self.cmd_count = 1 + self.cmds_fmt = [cmds_fmt] + self.options = [options] + self.name = name + self.machine = None + + def cmd_generate(self, idx): + cmds = [] + for opt_name in self.cmds_fmt[idx]: + opt = self.options[idx].get(opt_name) + if opt: + cmds += opt + + return cmds + + def expand_arg(self, arg): + if isinstance(arg, Sequence): + if len(arg) != self.cmd_count: + print('Number of arguments and commands do not match') + exit(-1) + return arg + else: + return [arg] * self.cmd_count + + + def run(self, timeout=None, verbose=False, wait=True, bypass_stdin=True): + # Args have to be primitive type or a iterable collection which has len == self.cmd_count + # Expand arg into [arg, arg, ...] if it is a primitive type + timeout = self.expand_arg(timeout) + verbose = self.expand_arg(verbose) + wait = self.expand_arg(wait) + bypass_stdin = self.expand_arg(bypass_stdin) + for i in range(self.cmd_count): + if callable(self.cmds_fmt[i]): + # Maybe we could pass the last rv to the next function + rv = self.cmds_fmt[i]() + else: + cmds = ' '.join(self.cmd_generate(i)) + + if verbose[i]: + print(cmds) + + if bypass_stdin[i]: + self.machine = subprocess.Popen(cmds, shell=True, + # create a new session + # group processes + stderr=subprocess.STDOUT, + preexec_fn=os.setpgrp) + else: + self.machine = subprocess.Popen(cmds, shell=True, + stdin=subprocess.DEVNULL, + # create a new session + # group processes + stderr=subprocess.STDOUT, + preexec_fn=os.setpgrp) + + try: + if wait[i]: + self.machine.wait(timeout=timeout[i]) + except subprocess.TimeoutExpired as e: + print ("%s: program timeout" % e.__class__.__name__) + self.shutdown() + rv = -1 + # Shall we break and return if any of the commands failed? + else: + rv = self.machine.returncode + if rv < 0: + signal_num = -rv + if signal_num <= signal.NSIG: + # Try to convert to signal name. + try: + if sys.version_info >= (3,8): + sys.stderr.write("%s\n" % signal.strsignal(signal_num)) + elif sys.version_info >= (3,5): + sys.stderr.write("Terminated by signal %s\n" % signal.Signals(signal_num).name) + else: + SIGNALS_TO_NAMES_DICT = dict((getattr(signal, n), n) \ + for n in dir(signal) if n.startswith('SIG') and '_' not in n ) + sys.stderr.write("Terminated by signal %s\n" % SIGNALS_TO_NAMES_DICT[signal_num]) + except: + pass + + return rv + + def shutdown(self): + self.machine.kill() diff --git a/prebuilt/metal-run/justRun/Main.py b/prebuilt/metal-run/justRun/Main.py new file mode 100644 index 0000000..cf1b072 --- /dev/null +++ b/prebuilt/metal-run/justRun/Main.py @@ -0,0 +1,171 @@ +import sys +import argparse +import atexit +import signal + +import utils + +utils.check_package('psutil') +utils.check_package('elftools', 'pyelftools') + +import psutil +import elftools.elf.elffile +import elftools.elf.sections + +from . import File +from . import Simulator +from . import RISCVISAString + +SUPPORTED_SIFIVE_CORE = { + "sifive-e20": "rv32imc", + "sifive-e21": "rv32imac", + "sifive-e24": "rv32imafc", + "sifive-e31": "rv32imac", + "sifive-e34": "rv32imafc", + "sifive-e66": "rv32imafc_zba_zbb", + "sifive-e76": "rv32imafc", + "sifive-e76m": "rv32imafc_zba_zbb", + "sifive-e76n": "rv32imafc_zba_zbb", + + "sifive-s21": "rv64imac", + "sifive-s51": "rv64imac", + "sifive-s54": "rv64imafdc", + "sifive-s66": "rv64imafdc_zba_zbb", + "sifive-s76": "rv64imafdc", + "sifive-s76m": "rv64imafdc_zba_zbb", + "sifive-s76n": "rv64imafdc_zba_zbb", + + "sifive-u54": "rv64imafdc", + "sifive-u64": "rv64imafdc_zba_zbb", + "sifive-u74": "rv64imafdc", + "sifive-u74m": "rv64imafdc_zba_zbb", + "sifive-u74n": "rv64imafdc_zba_zbb", + + "sifive-p270": "rv64imafdcv_zfh_zba_zbb_zvfh_zvl256b", + "sifive-p270n": "rv64imafdcv_zfh_zba_zbb_zvfh_zvl256b", + "sifive-x280": "rv64imafdcv_zfh_zba_zbb_zvfh_zvl512b_xsfvfhbfmin_xsfvqmaccqoq", + "sifive-x280n": "rv64imafdcv_zfh_zba_zbb_zvfh_zvl512b_xsfvfhbfmin_xsfvqmaccqoq_xsfvfnrclipxfqf_xsfvfwmaccqqq", + "sifive-p550": "rv64imafdc_zba_zbb", + "sifive-p650": "rv64imafdc_zba_zbb_zbs", +} + +def exit_cleanup(): + parent = psutil.Process() + children = parent.children(recursive=True) + for p in children: + p.terminate() + # give children 5 secs to complete terminate process + gone, alive = psutil.wait_procs(children, timeout=5) + # otherwise kill them all + for p in alive: + p.kill() + +def signal_handler(): + def handler(signum, frame): + # redirect all death signal to normal exit + sys.exit(-signum) + + death_sig = (signal.SIGINT, signal.SIGQUIT, signal.SIGTERM) + for sig in death_sig: + signal.signal(sig, handler) + +def add_simulator_into_parser(sim, parser): + parser.set_defaults(sim=sim) + + sim.add_args(parser) + + parser.add_argument('prog', type=File.fileHandler, + help='executable file or hex file') + if sim.allow_inferior_args(): + parser.add_argument('args', type=str, nargs='*', + help='inferior arguments') + +def create_parser(simulators): + parser = argparse.ArgumentParser( + formatter_class=argparse.RawTextHelpFormatter) + # just-run options + parser.add_argument('--timeout', type=int, metavar='second(s)', + default=None, + help='timeout for program execution ' + '(no timeout in default)') + parser.add_argument('--verbose', '-v', action='store_true', default=False, + help='verbose mode') + parser.add_argument('--arch', default=None, + help='RISC-V Arch string, parse from ELF attribute if possible ' + + 'by default, if not present, enable all ext. by default.\n' + + '--arch=all is a speical value for enable all ext.\n' + + '--arch= also support SiFive cpu core name as arch.\n' + + 'Supported core: %s' % ", ".join(SUPPORTED_SIFIVE_CORE.keys()) + + 'Note: NOT all simulator target are support this feature.') + + if isinstance(simulators, Simulator.Simulator): + add_simulator_into_parser(simulators, parser) + else: + # sub-command for each simulators + subparsers = parser.add_subparsers(title='simulator', dest='sim', + help='supported simulator') + subparsers.required = True + for sim in simulators: + subparser = subparsers.add_parser( + sim.name, + formatter_class=argparse.RawTextHelpFormatter) + add_simulator_into_parser(sim, subparser) + + return parser + +def prob_arch(opts): + arch = opts.arch + if arch is None: + archs = "all" + if isinstance(opts.prog, File.ElfFile): + attr_sec = opts.prog.elffile.get_section_by_name(".riscv.attributes") + if attr_sec: + xattr_section = \ + elftools.elf.sections.ARMAttributesSection ( + attr_sec.header, + attr_sec.name, + opts.prog.elffile) + for subsec in xattr_section.subsections: + for subsubsec in subsec.subsubsections: + # Tag_RISCV_arch = 5 == TAG_CPU_RAW_NAME in ARM + for attr in subsubsec.iter_attributes(tag="TAG_CPU_RAW_NAME"): + # Skip rv[32|64] and there is N byte before string for + # recode length. + archs = attr.value[2:] + return RISCVISAString.parse(archs) + elif arch != 'all': + if arch.startswith('sifive-'): + if (arch not in SUPPORTED_SIFIVE_CORE): + raise Exception ("Unknow sifive core name : %s" % arch) + arch = SUPPORTED_SIFIVE_CORE[arch] + arch = RISCVISAString.parse(arch) + if arch is None: + raise Exception ("Arch string parse error : %s" % arch) + return arch + return "all" + + +def is_valid_args(opts): + # Parse opts.arch to a list or 'all' + opts.arch = prob_arch(opts) + # Check simulator options + return opts.sim.check_args(opts) + +def run(opts): + machine = opts.sim.create_machine(opts) + rv = machine.run(timeout=opts.timeout, + verbose=opts.verbose, + bypass_stdin=opts.sim.can_bypass_stdin()) + opts.sim.after_sim(opts) + return rv + +def main(args, simulators=Simulator.simulators): + atexit.register(exit_cleanup) + signal_handler() + + argparser = create_parser(simulators) + opts = argparser.parse_args(args[1:]) + if not is_valid_args(opts): + sys.exit(1) + rv = run(opts) + sys.exit(rv) diff --git a/prebuilt/metal-run/justRun/PrebuiltUtils.py b/prebuilt/metal-run/justRun/PrebuiltUtils.py new file mode 100644 index 0000000..45f1334 --- /dev/null +++ b/prebuilt/metal-run/justRun/PrebuiltUtils.py @@ -0,0 +1,59 @@ +import os +import subprocess + +PROJECT_ROOT = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..') + +QEMU = 0 +GDB = 1 +SPIKE = 2 + +PREBUILT_PATH = { + QEMU : os.path.join(PROJECT_ROOT, 'prebuilt', 'prebuilt-qemu'), + GDB : os.path.join(PROJECT_ROOT, 'prebuilt', 'prebuilt-gdb'), + SPIKE : os.path.join(PROJECT_ROOT, 'prebuilt', 'prebuilt-spike'), +} + +def cmdrun(cmd, cwd=None): + rv = subprocess.run([cmd], shell=True, cwd=cwd) + return rv.returncode + +def get_qemu_hist_plugin(): + return os.path.join(PREBUILT_PATH[QEMU], 'plugins', 'insn_hist.so') + +def get_qemu_prog_name(rv32_p, full_system_mode): + prog_name = "qemu-" + if full_system_mode: + prog_name += "system-" + if rv32_p: + prog_name += "riscv32" + else: + prog_name += "riscv64" + return prog_name + +def qemu_default_root_dir(): + return os.path.join(PREBUILT_PATH[QEMU], 'bin') + +def spike_default_root_dir(): + return os.path.join(PREBUILT_PATH[SPIKE], 'bin') + +def get_gdb(): + return os.path.join(PREBUILT_PATH[GDB], 'riscv64-unknown-elf-gdb') + +def get_spike(): + return os.path.join(PREBUILT_PATH[SPIKE], 'bin', 'spike') + +def get_pk(xlen): + return os.path.join(PREBUILT_PATH[SPIKE], 'bin', 'riscv%s-unknown-elf'%xlen, 'pk') + +def init(comp): + path = PREBUILT_PATH[comp] + dir_name = os.path.dirname(path) + + if not os.path.exists(os.path.join(path, '.git')): + cmdrun("flock .lock git submodule update --init %s" % dir_name, + cwd=os.path.join(PROJECT_ROOT, 'prebuilt')) + # Don't update if it's already there. + # Checking every time will hurt the performance under a highly parallel case. + #else: + # cmdrun("flock .lock git submodule update %s" % dir_name, + # cwd=os.path.join(PROJECT_ROOT, 'prebuilt')) diff --git a/prebuilt/metal-run/justRun/RISCVISAString.py b/prebuilt/metal-run/justRun/RISCVISAString.py new file mode 100644 index 0000000..a2cadce --- /dev/null +++ b/prebuilt/metal-run/justRun/RISCVISAString.py @@ -0,0 +1,76 @@ +SUPPORTTED_EXTS = "iemafdcbvp" +MC_EXT_PREFIX = "zsx" + +def parse_mc_ext(ext_str, idx): + end_idx = ext_str[idx+1:].find('_') + if end_idx == -1: + end_idx = len(ext_str) + else: + end_idx = end_idx + idx + 1 + major = 0 + minor = 0 + version_begin_idx = end_idx + if ext_str[end_idx-1].isdigit(): + # This ext came with the version. + v_idx = end_idx - 1 + while (ext_str[v_idx].isdigit()) and v_idx > idx: + v_idx -= 1 + major = int(ext_str[v_idx+1:end_idx]) + version_begin_idx = v_idx+1 + if (ext_str[v_idx] == 'p'): + minor = major + major_v_idx = v_idx - 1 + while (ext_str[major_v_idx].isdigit()) and major_v_idx > idx: + major_v_idx -= 1 + major = int(ext_str[major_v_idx+1:v_idx]) + version_begin_idx = major_v_idx+1 + + return end_idx, ext_str[idx:version_begin_idx], major, minor + +def parse_version(ext_str, idx): + major = 2 + minor = 0 + strlen = len(ext_str) + end_idx = idx + 1 + if idx+1 < strlen and ext_str[idx+1].isdigit(): + v_idx = idx + 1 + while v_idx < strlen and (ext_str[v_idx].isdigit()): + v_idx += 1 + major = int(ext_str[idx+1:v_idx]) + end_idx = v_idx + if (ext_str[v_idx] == 'p'): + minor_v_idx = v_idx + 1 + while minor_v_idx < strlen and (ext_str[minor_v_idx].isdigit()): + minor_v_idx += 1 + minor = int(ext_str[v_idx+1:minor_v_idx]) + end_idx = minor_v_idx + + return end_idx, ext_str[idx], major, minor + +def parse(isa_str): + isa_str = isa_str.replace("rv64g", "rv64imafd").replace("rv32g", "rv32imafd") + if not (isa_str.startswith("rv32") or isa_str.startswith("rv64")): + return None + ext_str = isa_str[4:] + # XXX: We don't validate arch string too much. + # TODO: Handle ext. implication. + idx = 0 + extstrlens = len(ext_str) + exts = dict() + while idx < extstrlens: + if ext_str[idx] in SUPPORTTED_EXTS: + idx, ext_name, major, minor = parse_version(ext_str, idx) + elif ext_str[idx] in MC_EXT_PREFIX: + idx, ext_name, major, minor = parse_mc_ext(ext_str, idx) + elif ext_str[idx] == '_': + idx = idx + 1 + continue + else: + raise Exception("Unrecognized ext : `%s`, %s" % + (ext_str[idx], ext_str)) + exts[ext_name] = (major, minor) + return exts + +# Testcase: +if __name__ == '__main__': + print(parse("rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_v1p0_zicsr2p0_zfh0p1_zba1p0_zbb1p0_zve32f1p0_zve32x1p0_zve64d1p0_zve64f1p0_zve64x1p0_zvfh0p1_zvl128b1p0_zvl256b1p0_zvl32b1p0_zvl512b1p0_zvl64b1p0_xsfvfhbfmin0p1_xsfvqmaccqoq0p1")) diff --git a/prebuilt/metal-run/justRun/Simulator.py b/prebuilt/metal-run/justRun/Simulator.py new file mode 100644 index 0000000..048b0df --- /dev/null +++ b/prebuilt/metal-run/justRun/Simulator.py @@ -0,0 +1,91 @@ +import abc +import os +import importlib + +simulators = [] +sim_config_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), + '../simulator') + +class Simulator(metaclass=abc.ABCMeta): + @property + @abc.abstractmethod + def name(self): + raise NotImplementedError + + @property + def name_of_32_version(self): + raise NotImplementedError + + @property + def name_of_64_version(self): + raise NotImplementedError + + @property + def default_root_dir(self): + raise NotImplementedError + + def add_args(self, parser): + parser.add_argument('--sim-path', type=str, + help='simulator path') + parser.add_argument('--cpu', type=str, + default=self.default_cpu(), + help='cpu core name (default: %(default)s) \n' + 'recommend: \n\t' + + '\n\t'.join(self.cpu_support())) + + @abc.abstractmethod + def allow_inferior_args(self): + raise NotImplementedError + + @abc.abstractmethod + def cpu_support(self): + raise NotImplementedError + + @abc.abstractmethod + def default_cpu(self): + raise NotImplementedError + + def deploy_sim(self, build_32=False): + return 1 + + def check_args(self, opts): + # Check simulator path + if opts.sim_path is None: # Did not specified any simulator + is_32 = (opts.prog.fileClass == 32) + if is_32: + default_sim_name = self.name_of_32_version + else: + default_sim_name = self.name_of_64_version + opts.sim_path = os.path.join(self.default_root_dir, + default_sim_name) + if not os.path.isfile(opts.sim_path): + print ("Default simulator %s did not exist." % opts.sim_path) + rv = self.deploy_sim(is_32) + if rv: + return False + else: # Check for specific simulator + if not os.path.isfile(opts.sim_path): + print ("Specified simulator %s not found." % opts.sim_path) + return False + + return True + + @abc.abstractmethod + def create_machine(self, opts): + raise NotImplementedError + + def after_sim(self, opts): + pass + + def can_bypass_stdin(self): + return True + +for sim in os.listdir(sim_config_dir): + if os.path.isfile(os.path.join(sim_config_dir, sim)): + if sim.startswith('.'): # Skip hidden files + continue + sim = os.path.splitext(sim)[0] + simulators.append( + getattr(importlib.import_module('.'.join(['simulator', sim])), + sim)() + ) diff --git a/prebuilt/metal-run/justRun/__init__.py b/prebuilt/metal-run/justRun/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/prebuilt/metal-run/markpoint-run b/prebuilt/metal-run/markpoint-run new file mode 100755 index 0000000..4a811d7 --- /dev/null +++ b/prebuilt/metal-run/markpoint-run @@ -0,0 +1,8 @@ +#! /usr/bin/env python3 + +import sys +from justRun import Main +from simulator import markpoint + +if __name__ == '__main__': + Main.main(sys.argv, simulators=markpoint.markpoint()) diff --git a/prebuilt/metal-run/merge-qhist b/prebuilt/metal-run/merge-qhist new file mode 100755 index 0000000..61488f1 --- /dev/null +++ b/prebuilt/metal-run/merge-qhist @@ -0,0 +1,42 @@ +#! /usr/bin/env python3 + +import argparse +import sys +from collections import defaultdict + +def main(args): + parser = argparse.ArgumentParser() + parser.add_argument("-o", help="Output file", required=True) + parser.add_argument("inputs", nargs='+', help="*.qhist files.") + + opt = parser.parse_args(args) + + hist = defaultdict(int) + + total_count = 0 + + for filename in opt.inputs: + with open(filename, "r") as f: + first_line = True + for line in f: + line = line.strip() + if first_line: + # Check first line is "pc,dyn_insn_count" + if not line.startswith("pc,dyn_insn_count"): + raise Exception("Unexpected format in %s" % filename) + first_line = False + continue + if line.startswith("pc,dyn_insn_count"): + continue + pc, inst_count = line.split(",") + pc = int(pc, 16) + inst_count = int(inst_count) + hist[pc] += inst_count + total_count += inst_count + + with open(opt.o, "w") as f: + f.write("pc,dyn_insn_count,%s\n"%total_count) + for pc, inst_count in hist.items(): + f.write("0x%x,%d\n" % (pc, inst_count)) + +main(sys.argv[1:]) diff --git a/prebuilt/metal-run/metal-run b/prebuilt/metal-run/metal-run new file mode 100755 index 0000000..8a84d96 --- /dev/null +++ b/prebuilt/metal-run/metal-run @@ -0,0 +1,8 @@ +#! /usr/bin/env python3 + +import sys +from justRun import Main +from simulator import qemu_sys + +if __name__ == '__main__': + Main.main(sys.argv, simulators=qemu_sys.qemu_sys()) diff --git a/prebuilt/metal-run/prebuilt/prebuilt-gdb/README.md b/prebuilt/metal-run/prebuilt/prebuilt-gdb/README.md new file mode 100644 index 0000000..698e250 --- /dev/null +++ b/prebuilt/metal-run/prebuilt/prebuilt-gdb/README.md @@ -0,0 +1,2 @@ +# Prebuilt GDB +This repo only contain prebuilt GDB, one branch one prebuilt binrary. diff --git a/prebuilt/metal-run/prebuilt/prebuilt-gdb/riscv64-unknown-elf-gdb b/prebuilt/metal-run/prebuilt/prebuilt-gdb/riscv64-unknown-elf-gdb new file mode 100755 index 0000000..dea9bda Binary files /dev/null and b/prebuilt/metal-run/prebuilt/prebuilt-gdb/riscv64-unknown-elf-gdb differ diff --git a/prebuilt/metal-run/prebuilt/prebuilt-qemu/Makefile b/prebuilt/metal-run/prebuilt/prebuilt-qemu/Makefile new file mode 100644 index 0000000..b7e6a78 --- /dev/null +++ b/prebuilt/metal-run/prebuilt/prebuilt-qemu/Makefile @@ -0,0 +1,49 @@ +QEMU_SRC_PATH:= +INSTALL_PROG:=qemu-riscv32 qemu-system-riscv64 qemu-riscv64 qemu-system-riscv32 + +QEMU_BRANCH=$(shell git -C $(QEMU_SRC_PATH) branch --show-current) +QEMU_SHA1=$(shell git -C $(QEMU_SRC_PATH) rev-parse HEAD) +QEMU_REMOTE_URL=$(shell git -C $(QEMU_SRC_PATH) config --get remote.origin.url) +NEW_BRANCH_NAME=$(QEMU_BRANCH)-$(shell git -C $(QEMU_SRC_PATH) rev-parse --short HEAD) + +all: stamps/add-git-qemu + +stamps/configure-qemu: + mkdir -p $(dir $@) + mkdir -p build + cd build && \ + $(QEMU_SRC_PATH)/configure \ + --target-list=riscv32-linux-user,riscv64-linux-user,riscv32-softmmu,riscv64-softmmu \ + --enable-plugins \ + --disable-bzip2 \ + --prefix=`pwd`/../install \ + --disable-docs --disable-guest-agent --disable-gio \ + --disable-spice --disable-spice-protocol --disable-vnc \ + --disable-sdl --disable-gtk --disable-alsa + touch $@ + +stamps/build-qemu: stamps/configure-qemu + mkdir -p $(dir $@) + cd build && $(MAKE) + cd build && $(MAKE) install + touch $@ + +stamps/build-qemu-hist-plugin: stamps/build-qemu + mkdir -p plugins + $(CXX) plugin-src/insn.cxx -O3 -shared -o plugins/insn_hist.so `pkg-config glib-2.0 --cflags` -I install/include/ -fPIC -static-libgcc -static-libstdc++ + touch $@ + +stamps/add-git-qemu: stamps/build-qemu stamps/build-qemu-hist-plugin + mkdir -p $(dir $@) + mkdir -p bin + cp $(addprefix install/bin/, $(INSTALL_PROG)) bin/ + strip bin/* + git add $(addprefix bin/, $(INSTALL_PROG)) + git add plugins/* + git branch $(NEW_BRANCH_NAME) + git checkout $(NEW_BRANCH_NAME) + git commit \ + -m "Prebuilt binary for '$(QEMU_BRANCH)' branch" \ + -m "sha1: $(QEMU_SHA1)" \ + -m "repo: $(QEMU_REMOTE_URL)" + git push origin $(NEW_BRANCH_NAME) diff --git a/prebuilt/metal-run/prebuilt/prebuilt-qemu/README.md b/prebuilt/metal-run/prebuilt/prebuilt-qemu/README.md new file mode 100644 index 0000000..e07d3e6 --- /dev/null +++ b/prebuilt/metal-run/prebuilt/prebuilt-qemu/README.md @@ -0,0 +1,8 @@ +# Prebuilt Qemu + +This repo only contain prebuilt qemu, one branch one prebuilt binrary. + +# How to update that. +``` +$ make QEMU_SRC_PATH=$(PATH_TO_QEMU) +``` diff --git a/prebuilt/metal-run/prebuilt/prebuilt-qemu/bin/qemu-riscv32 b/prebuilt/metal-run/prebuilt/prebuilt-qemu/bin/qemu-riscv32 new file mode 100755 index 0000000..050e213 Binary files /dev/null and b/prebuilt/metal-run/prebuilt/prebuilt-qemu/bin/qemu-riscv32 differ diff --git a/prebuilt/metal-run/prebuilt/prebuilt-qemu/bin/qemu-riscv64 b/prebuilt/metal-run/prebuilt/prebuilt-qemu/bin/qemu-riscv64 new file mode 100755 index 0000000..ef658e2 Binary files /dev/null and b/prebuilt/metal-run/prebuilt/prebuilt-qemu/bin/qemu-riscv64 differ diff --git a/prebuilt/metal-run/prebuilt/prebuilt-qemu/bin/qemu-system-riscv32 b/prebuilt/metal-run/prebuilt/prebuilt-qemu/bin/qemu-system-riscv32 new file mode 100755 index 0000000..dfc965e Binary files /dev/null and b/prebuilt/metal-run/prebuilt/prebuilt-qemu/bin/qemu-system-riscv32 differ diff --git a/prebuilt/metal-run/prebuilt/prebuilt-qemu/bin/qemu-system-riscv64 b/prebuilt/metal-run/prebuilt/prebuilt-qemu/bin/qemu-system-riscv64 new file mode 100755 index 0000000..3afb5c6 Binary files /dev/null and b/prebuilt/metal-run/prebuilt/prebuilt-qemu/bin/qemu-system-riscv64 differ diff --git a/prebuilt/metal-run/prebuilt/prebuilt-qemu/plugin-src/insn.cxx b/prebuilt/metal-run/prebuilt/prebuilt-qemu/plugin-src/insn.cxx new file mode 100644 index 0000000..9aaa83b --- /dev/null +++ b/prebuilt/metal-run/prebuilt/prebuilt-qemu/plugin-src/insn.cxx @@ -0,0 +1,141 @@ +/* + * Copyright (C) 2018, Emilio G. Cota + * + * License: GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +extern "C" { +#include + +QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION; + +QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, + const qemu_info_t *info, + int argc, char **argv); +} + +// RISC-V PC at least 2 byte align. +static uint64_t chunk_offset(uint64_t pc){ + return (pc >> 1) & 0xfffull; +} + +static uint64_t chunk_index(uint64_t pc){ + return ((pc >> 1) & ~0xfffull) >> 12; +} + +struct Chunk { + uint64_t index; + uint64_t hist[4096]; +}; + +static uint64_t insn_count; +static bool do_inline; +static std::unordered_map inst_histogram; +static Chunk *cache = nullptr; + +static void vcpu_insn_exec_before(unsigned int cpu_index, void *udata) +{ + static uint64_t last_pc; + uint64_t this_pc = GPOINTER_TO_UINT(udata); + uint64_t offset = chunk_offset(this_pc); + uint64_t index = chunk_index(this_pc); + + if (cache && cache->index == index) { + cache->hist[offset]++; + return; + } + + cache = &inst_histogram[index]; + cache->index = index; + cache->hist[offset]++; +} + +static uint64_t *get_hist_ptr(uint64_t this_pc) +{ + uint64_t offset = chunk_offset(this_pc); + uint64_t index = chunk_index(this_pc); + + if (cache && cache->index == index) { + return &cache->hist[offset]; + } + + cache = &inst_histogram[index]; + cache->index = index; + return &cache->hist[offset]; +} + +static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +{ + size_t n = qemu_plugin_tb_n_insns(tb); + size_t i; +#if 0 + for (i = 0; i < n; i++) { + struct qemu_plugin_insn *insn = qemu_plugin_tb_get_insn(tb, i); + + uint64_t vaddr = qemu_plugin_insn_vaddr(insn); + qemu_plugin_register_vcpu_insn_exec_cb( + insn, vcpu_insn_exec_before, QEMU_PLUGIN_CB_NO_REGS, + GUINT_TO_POINTER(vaddr)); + } +#else + for (i = 0; i < n; i++) { + struct qemu_plugin_insn *insn = qemu_plugin_tb_get_insn(tb, i); + + uint64_t vaddr = qemu_plugin_insn_vaddr(insn); + uint64_t *qhist_ptr = get_hist_ptr(vaddr); + qemu_plugin_register_vcpu_insn_exec_inline( + insn, QEMU_PLUGIN_INLINE_ADD_U64, qhist_ptr, 1); + } +#endif +} + +static void plugin_exit(qemu_plugin_id_t id, void *p) +{ + // Sum up total inst count + uint64_t total_count = 0; + for (auto inst_info_chunk : inst_histogram) { + auto chunk = inst_info_chunk.second; + for (size_t i = 0; i < 4096 ; ++i) { + total_count += chunk.hist[i]; + } + } + + g_autofree gchar *out = + g_strdup_printf("pc,dyn_insn_count,%" PRIu64 "\n", + total_count); + qemu_plugin_outs(out); + for (auto inst_info_chunk : inst_histogram) { + auto chunk = inst_info_chunk.second; + uint64_t base_pc = chunk.index << 13; + for (size_t i = 0; i < 4096 ; ++i) { + uint64_t pc = base_pc + (i << 1); + if (chunk.hist[i] == 0) + continue; + out = g_strdup_printf("0x%" PRIx64 ",%" PRIu64 "\n", + pc, chunk.hist[i]); + qemu_plugin_outs(out); + } + } +} + +QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, + const qemu_info_t *info, + int argc, char **argv) +{ + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); + return 0; +} diff --git a/prebuilt/metal-run/prebuilt/prebuilt-qemu/plugins/insn_hist.so b/prebuilt/metal-run/prebuilt/prebuilt-qemu/plugins/insn_hist.so new file mode 100755 index 0000000..7f8487e Binary files /dev/null and b/prebuilt/metal-run/prebuilt/prebuilt-qemu/plugins/insn_hist.so differ diff --git a/prebuilt/metal-run/prebuilt/prebuilt-spike/Makefile b/prebuilt/metal-run/prebuilt/prebuilt-spike/Makefile new file mode 100644 index 0000000..9969b14 --- /dev/null +++ b/prebuilt/metal-run/prebuilt/prebuilt-spike/Makefile @@ -0,0 +1,70 @@ +RISCV_TOOLCHAIN:= +HOST=riscv64-unknown-elf +HOST32=riscv32-unknown-elf +SPIKE_SRC_PATH:= +INSTALL_LIB:=libsoftfloat.so +INSTALL_PROG:=spike +INSTALL_RISCV_PROG:=pk + +SPIKE_BRANCH=$(shell git -C $(SPIKE_SRC_PATH) branch --show-current) +SPIKE_SHA1=$(shell git -C $(SPIKE_SRC_PATH) rev-parse HEAD) +SPIKE_REMOTE_URL=$(shell git -C $(SPIKE_SRC_PATH) config --get remote.origin.url) + +PK_BRANCH=$(shell git -C $(PK_SRC_PATH) branch --show-current) +PK_SHA1=$(shell git -C $(PK_SRC_PATH) rev-parse HEAD) +PK_REMOTE_URL=$(shell git -C $(PK_SRC_PATH) config --get remote.origin.url) + +NEW_BRANCH_NAME=$(SPIKE_BRANCH)-$(shell git -C $(SPIKE_SRC_PATH) rev-parse --short HEAD)-$(PK_BRANCH)-$(shell git -C $(PK_SRC_PATH) rev-parse --short HEAD) + +pk_flag_rv32=--with-arch=rv32i + +all: stamps/add-git + +stamps/configure-spike: + mkdir -p $(dir $@) + mkdir -p build + cd build && \ + $(SPIKE_SRC_PATH)/configure --prefix=`pwd`/../install + touch $@ + +stamps/build-spike: stamps/configure-spike + mkdir -p $(dir $@) + cd build && $(MAKE) + cd build && $(MAKE) install + touch $@ + +stamps/configure-pk-%: + mkdir -p $(dir $@) + $(eval folder=$(@:stamps/configure%=build/build%)) + $(eval platform=$(@:stamps/configure-pk-%=%)) + mkdir -p ${folder} + cd ${folder} && \ + PATH=$(RISCV_TOOLCHAIN):${PATH} $(PK_SRC_PATH)/configure --host=$(HOST) --prefix=`pwd`/../../install ${pk_flag_rv${platform}} + touch $@ + +stamps/build-pk-%: stamps/configure-pk-% + $(eval folder=$(@:stamps%=build%)) + cd $(folder) && \ + PATH=$(RISCV_TOOLCHAIN):${PATH} $(MAKE) + cd $(folder) && $(MAKE) install + touch $@ + +stamps/add-git: stamps/build-spike stamps/build-pk-32 stamps/build-pk-64 + mkdir -p $(dir $@) + mkdir -p bin/${HOST} bin/${HOST32} lib + cp $(addprefix install/bin/, $(INSTALL_PROG)) bin/ + cp $(addprefix install/${HOST}/bin/, $(INSTALL_RISCV_PROG)) bin/${HOST} + cp $(addprefix install/${HOST32}/bin/, $(INSTALL_RISCV_PROG)) bin/${HOST32} + cp $(addprefix install/lib/, $(INSTALL_LIB)) lib/ + git branch $(NEW_BRANCH_NAME) + git checkout $(NEW_BRANCH_NAME) + strip bin/spike + git add bin lib + git commit \ + -m "Prebuilt binary for '$(SPIKE_BRANCH)' branch" \ + -m "sha1: $(SPIKE_SHA1)" \ + -m "repo: $(SPIKE_REMOTE_URL)" \ + -m "Prebuilt binary for '$(PK_BRANCH)' branch" \ + -m "sha1: $(PK_SHA1)" \ + -m "repo: $(PK_REMOTE_URL)" + git push origin $(NEW_BRANCH_NAME) diff --git a/prebuilt/metal-run/prebuilt/prebuilt-spike/README.md b/prebuilt/metal-run/prebuilt/prebuilt-spike/README.md new file mode 100644 index 0000000..ab82239 --- /dev/null +++ b/prebuilt/metal-run/prebuilt/prebuilt-spike/README.md @@ -0,0 +1,10 @@ +# Prebuilt SPIKE and PK + +This repo only contain prebuilt spike and pk, one branch one prebuilt binrary for each. + +# How to update that. +``` +$ make SPIKE_SRC_PATH=$(PATH_TO_SPIKE) PK_SRC_PATH=$(PATH_TO_PK) RISCV_TOOLCHAIN=$(PATH_TO_riscv64-unknown-elf_TOOLCHAIN) +``` + + diff --git a/prebuilt/metal-run/prebuilt/prebuilt-spike/bin/riscv32-unknown-elf/pk b/prebuilt/metal-run/prebuilt/prebuilt-spike/bin/riscv32-unknown-elf/pk new file mode 100755 index 0000000..e461c40 Binary files /dev/null and b/prebuilt/metal-run/prebuilt/prebuilt-spike/bin/riscv32-unknown-elf/pk differ diff --git a/prebuilt/metal-run/prebuilt/prebuilt-spike/bin/riscv64-unknown-elf/pk b/prebuilt/metal-run/prebuilt/prebuilt-spike/bin/riscv64-unknown-elf/pk new file mode 100755 index 0000000..83bb475 Binary files /dev/null and b/prebuilt/metal-run/prebuilt/prebuilt-spike/bin/riscv64-unknown-elf/pk differ diff --git a/prebuilt/metal-run/prebuilt/prebuilt-spike/bin/spike b/prebuilt/metal-run/prebuilt/prebuilt-spike/bin/spike new file mode 100755 index 0000000..9d45779 Binary files /dev/null and b/prebuilt/metal-run/prebuilt/prebuilt-spike/bin/spike differ diff --git a/prebuilt/metal-run/prebuilt/prebuilt-spike/lib/libsoftfloat.so b/prebuilt/metal-run/prebuilt/prebuilt-spike/lib/libsoftfloat.so new file mode 100644 index 0000000..b512a14 Binary files /dev/null and b/prebuilt/metal-run/prebuilt/prebuilt-spike/lib/libsoftfloat.so differ diff --git a/prebuilt/metal-run/qemu-run b/prebuilt/metal-run/qemu-run new file mode 100755 index 0000000..f0a005e --- /dev/null +++ b/prebuilt/metal-run/qemu-run @@ -0,0 +1,8 @@ +#! /usr/bin/env python3 + +import sys +from justRun import Main +from simulator import qemu + +if __name__ == '__main__': + Main.main(sys.argv, simulators=qemu.qemu()) diff --git a/prebuilt/metal-run/requirements.txt b/prebuilt/metal-run/requirements.txt new file mode 100644 index 0000000..3fee2fd --- /dev/null +++ b/prebuilt/metal-run/requirements.txt @@ -0,0 +1,3 @@ +pytest==7.1.2 +pytest-datadir==1.3.1 +sh==1.14.3 \ No newline at end of file diff --git a/prebuilt/metal-run/sanity_check.sh b/prebuilt/metal-run/sanity_check.sh new file mode 100755 index 0000000..7c633f8 --- /dev/null +++ b/prebuilt/metal-run/sanity_check.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# Load python +if ! command -v python3; then + module load python/python +fi +# Load SiFive in-house toolchain +if ! command -v riscv64-unknown-linux-gnu-clang; then + module load sifive/freedom-tools/toolsuite-linux/2022.08.1 +fi +# Install python packages +pip3 install --user --no-cache -r requirements.txt +# Make sure submodules are ready +git submodule update --recursive +# Run test +pytest -sv ./testsuite diff --git a/prebuilt/metal-run/simulator/gem5.py b/prebuilt/metal-run/simulator/gem5.py new file mode 100644 index 0000000..2730a52 --- /dev/null +++ b/prebuilt/metal-run/simulator/gem5.py @@ -0,0 +1,98 @@ +import os +import subprocess + +from justRun import Simulator +from justRun import Machine + +PROJECT_ROOT = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..') +GEM5_CONFIGS_PATH = 'configs/sifive' + +class gem5(Simulator.Simulator): + device_conf = {'mallard': {'arch': 'RISCV', + 'cpu': 'mallard_o3'}, + 'e27': {'arch': 'RISCV', + 'cpu': 'e27_minor'}} + + @property + def name(self): + return 'gem5' + + @property + def name_of_32_version(self): + return 'build/SF_RISCV_32/gem5.opt' + + @property + def name_of_64_version(self): + return 'build/SF_RISCV_64/gem5.opt' + + @property + def default_root_dir(self): + return os.path.join(PROJECT_ROOT, 'sifive-gem5') + + def add_args(self, parser): + # Add general simulator options + super().add_args(parser) + + # Add gem5 options + parser.add_argument('--config-dir', type=str, + default=os.path.join(self.default_root_dir, + GEM5_CONFIGS_PATH), + help='config folder') + parser.add_argument('--dump-rtl-trace', action='store_true', + default=False, + help='dump rtl trace format') + + + def allow_inferior_args(self): + return True + + def cpu_support(self): + return list(self.device_conf) + + def default_cpu(self): + return 'mallard' + + def deploy_sim(self, build_32=False): + print ("start to build %s" % self.name) + if build_32: + default_sim_name = self.name_of_32_version + else: + default_sim_name = self.name_of_64_version + + rv = subprocess.call( + "cd %s && \ + git submodule update --init --recursive && \ + scons %s -j12" % (self.default_root_dir, default_sim_name), + shell=True) + + return rv + + def check_args(self, opts): + # Check general simulator options + if not super().check_args(opts): + return False + + # Check gem5 options + + return True + + def create_machine(self, opts): + options = {'GEM5': [opts.sim_path]} + if opts.dump_rtl_trace: + options['DEBUG_FLAGS'] = ['--debug-flags=ExecEnable,SFExec'] + + # redirect m5out directory into /tmp/ + options['GEM5_OPTIONS'] = ['--outdir=/tmp/m5out'] + if not opts.verbose: + options['GEM5_OPTIONS'].append('--quiet') + + options['SCRIPT_PY'] = [os.path.join(opts.config_dir, + "%s.py" % opts.cpu)] + + if self.device_conf[opts.cpu].get('cpu'): + options['CPU'] = ["--cpu=%s" % self.device_conf[opts.cpu]['cpu']] + + options['COMMAND'] = ["%s %s" % (opts.prog.path, ' '.join(opts.args))] + cmds_fmt = ('GEM5', 'GEM5_OPTIONS', 'DEBUG_FLAGS', 'SCRIPT_PY', 'CPU', 'COMMAND') + + return Machine.Machine(opts.cpu, cmds_fmt, options) diff --git a/prebuilt/metal-run/simulator/markpoint.py b/prebuilt/metal-run/simulator/markpoint.py new file mode 100644 index 0000000..752b394 --- /dev/null +++ b/prebuilt/metal-run/simulator/markpoint.py @@ -0,0 +1,308 @@ +from justRun import Simulator +from justRun import Machine +from pathlib import Path +from shutil import copy +from subprocess import run, check_output, DEVNULL +from functools import partial +from collections import namedtuple +from argparse import SUPPRESS +import os + +SIMPT_DEFAULT_PATH = Path('/nfs/teams/sw/share/compiler/simpoint-umbrella') +QEMU_PATH_REL = Path('./qemu-system-riscv64') +OPENSBI_BIN_PATH_REL = Path('../image/fw_payload_qemu.bin') +FW_JUMP_VERILATOR_PATH_REL = '../image/fw_jump_verilator' +BASEFS_PATH = Path('/work/Simpoint/rootfs/rootfs-spec2k6-20210806.ext2') +ATHENA = Path('/work/sparta/athena/v2.1.1/bin/athena') +GCC_BIN = Path('/work/sparta/jenkins/riscv-tools/bin/riscv64-unknown-elf-gcc') + +MRKPT_LOG_NAME = 'markpoint.stats.log.gz' +TMP_ROOTFS_NAME = 'qemu-rootfs.img' +TMP_SCRIPT_NAME = 'qemu-guest-run.sh' +CHKPTLST_NAME = '_chkptlst' +REPLAY_MEM = 'replay.mem' +BIOS_FILE_NAME = 'coldboot.mem' +MEM_FILE1_NAME = 'mem_00.hex' +MEM_FILE2_NAME = 'mem_01.hex' +VERILATOR_ELF_NAME = Path('program.elf') + +CPUConf = namedtuple('CPUConf', 'verilator_path, verilator_load_elf, mem_port_width, vlen, qemu_opts') +CPU_CONFIG = { + 'sifive-x280': CPUConf( + verilator_path=Path('/nfs/teams/sw/share/compiler/rtlsim/x280/2022-08-22.84c3c18301d/VTestDriver'), + verilator_load_elf=True, + mem_port_width=32, + vlen=512, + qemu_opts='rv64,x-b=true,x-v=true,vlen=512' + ), + 'sifive-p670': CPUConf( + verilator_path=Path('/work/sparta/rtlsim/p67/latest/VTestDriver'), + verilator_load_elf=True, + mem_port_width=32, + vlen=128, + qemu_opts='rv64,x-b=true,x-v=true,vlen=128' + ) +} +ROOTFS_OFFSET_KB = 2 * 1024 * 1024 + +log = print + +def remove_cpu_prefix(cpu): return cpu.split('-')[-1] + +class markpoint(Simulator.Simulator): + @property + def name(self): + return 'markpoint' + + def add_args(self, parser): + # Add general simulator options + super().add_args(parser) + + # Add markpoint options + parser.add_argument('-d', '--simpt_dir', help='Override the default simpoint-umbrella path') + parser.add_argument('--sim', choices=['athena', 'verilator'], default='verilator', help='Simulator to run the ROI, defaults to verilator', dest='mrkptsim') + parser.add_argument('--id', required=True, type=int, help='The ID of markpoint 1 to begin the simluation', metavar='') + parser.add_argument('-M', '--maxinst', required=True, type=int, help='Maximum instruction count', metavar='') + # Suppress unused arguments in the help message + for action in parser._actions: + if action.dest in ['arch', 'timeout', 'sim_path']: + action.help=SUPPRESS + + def allow_inferior_args(self): + return True + + def can_bypass_stdin(self): + return False + + def cpu_support(self): + return ['sifive-x280', 'sifive-p670'] + + def default_cpu(self): + return 'sifive-x280' + + def check_args(self, opts): + self.simpt_dir = SIMPT_DEFAULT_PATH + if opts.simpt_dir: + self.simpt_dir = opts.simpt_dir + # Check if path is valid + + self.bin_dir = self.simpt_dir / 'bin' + self.qemu = self.bin_dir/ QEMU_PATH_REL + self.qemu_plugin = self.qemu.parent + self.opensbi_bin = self.bin_dir / OPENSBI_BIN_PATH_REL + self.mboot_sw_path = self.bin_dir / FW_JUMP_VERILATOR_PATH_REL + self.veri_root = CPU_CONFIG[opts.cpu].verilator_path.parent + self.elf = Path(opts.prog.path) + mkptid = [opts.id] + with open(CHKPTLST_NAME, 'w') as chkptlst: + chkptlst.writelines(map(str, mkptid)) + + if any(opts.args): + self.cmdline = ' '.join(opts.args) + else: + self.cmdline = './' + self.elf.name + + return True + + def build_rootfs(self): + log(f"Generating {TMP_SCRIPT_NAME} ...") + with open(TMP_SCRIPT_NAME, "w",) as f: + f.write("#!/bin/sh\nset -x\n" + self.cmdline) + os.chmod(TMP_SCRIPT_NAME, 0o755) + + log(f"Copying {self.elf.name} and {TMP_SCRIPT_NAME} into {TMP_ROOTFS_NAME} ...") + copy(BASEFS_PATH, TMP_ROOTFS_NAME) + debugfs_script = f""" + write {self.elf} {self.elf.name} + write {TMP_SCRIPT_NAME} {TMP_SCRIPT_NAME} + quit + """ + run(f"echo \"{debugfs_script}\" | debugfs -w {TMP_ROOTFS_NAME}", shell=True, stderr=DEVNULL) + os.remove(TMP_SCRIPT_NAME) + + def build_mem(self): + run(["dd", f"if={TMP_ROOTFS_NAME}", f"of={BIOS_FILE_NAME}", f"seek={ROOTFS_OFFSET_KB}", "bs=1024", "conv=notrunc"], check=True, stderr=DEVNULL) + run(["dd", f"if={self.opensbi_bin}", f"of={BIOS_FILE_NAME}", "conv=notrunc"], check=True, stderr=DEVNULL) + + def build_mem_from_chkpt(self, chkpt_dir): + chkpts_mem = chkpt_dir / 'state_mem' + chkpts_cpu = chkpt_dir / 'state_cpu' + log('Restoring memory and register state from the checkpoint ...') + # Maybe should check the existence of chkpts_cpu/mem + + with open(self.mboot_sw_path.with_suffix('.elf'), 'rb') as f: + f.seek(24) + base = int.from_bytes(f.read(8), 'little') # e_entry + sym_lst = check_output(['nm', '-s', self.mboot_sw_path.with_suffix('.elf')]) + addr = 0 + + try: + for line in sym_lst.split(b'\n'): + if line.find(b'rv_register_file') != -1: + addr = int(line.split()[0], 16) + except ValueError: + log('ERROR: Cannot find the symbol \'rv_register_file\'') + exit(1) + + offset = addr - base + + if (chkpts_mem.with_suffix('.zst').is_file()): + run([self.bin_dir / 'zstd', '-f', '-d', chkpts_mem.with_suffix('.zst'), '-o', REPLAY_MEM], check=True) + elif (chkpts_mem.with_suffix('.gz').is_file()): + with open(REPLAY_MEM, 'wb') as f: + run(['gunzip', '-c', chkpts_mem.with_suffix('.gz')], stdout=f, check=True) + else: + copy(chkpts_mem, REPLAY_MEM) + + run(["dd", f"if={self.mboot_sw_path.with_suffix('.bin')}", f"of={REPLAY_MEM}", "conv=notrunc"], check=True, stderr=DEVNULL) + run(["dd", f"if={chkpts_cpu}", f"of={REPLAY_MEM}", f"seek={offset}", "bs=1", "conv=notrunc"], check=True, stderr=DEVNULL) + + def _verilator_preprocess(self, opts): + l = ROOTFS_OFFSET_KB * 1024 + run([self.bin_dir / 'bin2hex', '-w', str(CPU_CONFIG[opts.cpu].mem_port_width), + '-n', str(l), + REPLAY_MEM, MEM_FILE1_NAME], check=True) + run([self.bin_dir / 'bin2hex', '-w', str(CPU_CONFIG[opts.cpu].mem_port_width), + '-s', str(l), + REPLAY_MEM, MEM_FILE2_NAME], check=True) + + def _verilator_with_elf_preprocess(self, opts): + log(f'Converting {REPLAY_MEM} to {VERILATOR_ELF_NAME}') + + asm_name = VERILATOR_ELF_NAME.with_suffix('.S') + with open(asm_name, 'w') as f: + f.write(f""" + .section .text; + .global _prog_start + _prog_start: + .incbin "{REPLAY_MEM}" + """) + + run([GCC_BIN, '-static', '-nostdlib', str(asm_name), + '-T', self.veri_root / f'linker_script/{VERILATOR_ELF_NAME}.lds', + '-L', self.veri_root / 'linker_script', + '-o', str(VERILATOR_ELF_NAME)], check=True) + if opts.cpu == 'sifive-p670': + run(['cp', self.veri_root / 'cosim/tgv.json', '.'], check=True) + + def verilator_preprocess(self, opts): + self.build_mem_from_chkpt(Path('checkpoint-0')) + + if CPU_CONFIG[opts.cpu].verilator_load_elf: + self._verilator_with_elf_preprocess(opts) + else: + self._verilator_preprocess(opts) + + + def athena_preprocess(self, _): + self.build_mem_from_chkpt(Path('checkpoint-0')) + + def get_qemu_fmt_and_options(self, opts): + vlens = [int(arch[3:-1]) for arch in opts.arch if (arch.startswith('zvl') and arch[-1] == 'b')] + if any(vlens) and max(vlens) != CPU_CONFIG[opts.cpu].vlen: + log('CPU and ELF VLEN doest not match!') + exit() + options = {'QEMU': [str(self.qemu)]} + options['CPU'] = ['-cpu', CPU_CONFIG[opts.cpu].qemu_opts] + options['DEFAULTS'] = ['-nodefaults'] + options['SERIAL'] = ['-serial', 'mon:stdio'] + options['DEBUG'] = ['-D', 'qemu.log'] + options['GRAPHIC'] = ['-nographic'] + options['TARGET'] = ['-M', 'simple-checkpoint'] + options['MEMSIZE'] = ['-m', '4096M'] + options['BIOS'] = ['-bios', BIOS_FILE_NAME] + options['PLUGIN'] = ['-plugin', f'{self.qemu_plugin}/libmarkpoint-rv64.so,arg=log={MRKPT_LOG_NAME},arg=M1Checkpoints={CHKPTLST_NAME}'] + options['ICOUNT'] = ['-icount', 'shift=0,sleep=off'] + options['APPEND'] = ['-append', f'\'console=hvc0 root=/dev/mtdblock0 rw slram=test1,0x100000000,+0x80000000 init=/{TMP_SCRIPT_NAME}\''] + cmds_fmt = ('QEMU', 'CPU', 'DEFAULTS', 'SERIAL', 'DEBUG', 'GRAPHIC', + 'TARGET', 'MEMSIZE', 'BIOS', 'PLUGIN', 'ICOUNT', 'APPEND') + return cmds_fmt, options + + def _get_verilator_fmt_and_options(self, opts): + fname = Path(opts.prog.path).name + options = {'VERILATOR': [str(CPU_CONFIG[opts.cpu].verilator_path)]} + options['RNGSEED'] = ['+random_seed=1791095845'] + options['TESTFILE'] = [f'+testfile={MEM_FILE1_NAME}'] + options['TESTFILE1'] = [f'+testfile={MEM_FILE2_NAME}'] + options['AXI4SHUF'] = ['+disable_axi4_shuffling'] + options['VERBOSITY'] = ['+verbose'] + options['INSTDUMP'] = ['+inst_dump=1'] + options['PCDUMP'] = ['+pcounter_dump=1'] + options['PCINTERVAL'] = ['+pcounter_interval=13'] + options['MAXINST'] = [f'+max_inst_num={opts.maxinst}'] + options['REDIRECT'] = [f'2>{fname}.pc.trace'] + cmds_fmt = ('VERILATOR', 'RNGSEED', 'TESTFILE', 'TESTFILE1', 'AXI4SHUF', 'VERBOSITY', 'INSTDUMP', 'PCDUMP', 'PCINTERVAL', 'MAXINST', 'REDIRECT') + return cmds_fmt, options + + def _get_verilator_with_elf_fmt_and_options(self, opts): + fname = Path(opts.prog.path).name + options = {'VERILATOR': [str(CPU_CONFIG[opts.cpu].verilator_path)]} + options['RNGSEED'] = ['+random_seed=1791095845'] + options['TESTPROG'] = [f'+test_program={VERILATOR_ELF_NAME}'] + options['ELFLOADER'] = [f'+enable_elf_loader'] + options['AXI4SHUF'] = ['+disable_axi4_shuffling'] + options['RESETVEC'] = ['+global_reset_vector=2147483648'] + options['VERBOSITY'] = ['+verbose'] + options['INSTDUMP'] = ['+inst_dump=1'] + options['PCDUMP'] = ['+pcounter_dump=1'] + options['PCINTERVAL'] = ['+pcounter_interval=8'] + options['MAXINST'] = [f'+max_inst_num={opts.maxinst}'] + options['COSIM_CFG'] = [f'+cosim_cfg_file={self.veri_root/"cosim/cosim.cfg"}'] + options['REDIRECT'] = [f'2>{fname}.pc.trace'] + cmds_fmt = ('VERILATOR', 'RNGSEED', 'TESTPROG', 'ELFLOADER', 'AXI4SHUF', 'RESETVEC', 'VERBOSITY', 'INSTDUMP', 'PCDUMP', 'PCINTERVAL', 'MAXINST', 'COSIM_CFG', 'REDIRECT') + return cmds_fmt, options + + def get_verilator_fmt_and_options(self, opts): + if CPU_CONFIG[opts.cpu].verilator_load_elf: + return self._get_verilator_with_elf_fmt_and_options(opts) + else: + return self._get_verilator_fmt_and_options(opts) + + def get_athena_fmt_and_options(self, opts): + fname = Path(opts.prog.path).name + options = {'ATHENA': [str(ATHENA)]} + options['ARCH'] = ['--arch', remove_cpu_prefix(opts.cpu)] + options['PCTRACE'] = ['-l', f'\'top.core0 inst {fname}.pc.trace\''] + options['MAX_INST'] = ['-i', str(opts.maxinst)] + options['UART'] = ['-p', 'top.system.params.enable_uart true'] + options['BIN'] = ['--load-bin', f'\'{REPLAY_MEM} 0x80000000\''] + cmds_fmt = ('ATHENA', 'ARCH', 'PCTRACE', 'MAX_INST', 'UART', 'BIN') + return cmds_fmt, options + + def qemu_cleanup(self): + os.remove(BIOS_FILE_NAME) + os.remove(TMP_ROOTFS_NAME) + + def verilator_cleanup(self, opts): + os.remove(REPLAY_MEM) + os.remove(CHKPTLST_NAME) + if CPU_CONFIG[opts.cpu].verilator_load_elf: + os.remove(VERILATOR_ELF_NAME) + os.remove(VERILATOR_ELF_NAME.with_suffix('.S')) + if opts.cpu == 'sifive-p670': + os.remove('tgv.json') + else: + os.remove(MEM_FILE1_NAME) + os.remove(MEM_FILE2_NAME) + + def athena_cleanup(self, _): + os.remove(REPLAY_MEM) + os.remove(CHKPTLST_NAME) + + def create_machine(self, opts): + self.build_rootfs() + self.build_mem() + + qemu_cmds_fmt, qemu_options = self.get_qemu_fmt_and_options(opts) + sim_preprocess = partial(getattr(self, f'{opts.mrkptsim}_preprocess'), opts) + sim_cmds_fmt, sim_options = getattr(self, f'get_{opts.mrkptsim}_fmt_and_options')(opts) + cleanup = partial(getattr(self, f'{opts.mrkptsim}_cleanup'), opts) + + return Machine.Machine(opts.cpu, + [qemu_cmds_fmt, self.qemu_cleanup, sim_preprocess, sim_cmds_fmt, cleanup], + [qemu_options, None, None, sim_options, None] + ) + + + def deploy_sim(self, _): + return diff --git a/prebuilt/metal-run/simulator/qemu.py b/prebuilt/metal-run/simulator/qemu.py new file mode 100644 index 0000000..40ba0a1 --- /dev/null +++ b/prebuilt/metal-run/simulator/qemu.py @@ -0,0 +1,218 @@ +import os +import subprocess +import utils + +from justRun import Simulator +from justRun import Machine +from justRun import PrebuiltUtils + +EXT_OPTS = { + "zba": "zba=true", + "zbb": "zbb=true", + "zbc": "zbc=true", + "zbs": "zbs=true", + "v": "v=true", + "zve32f": "Zve32f=true", + "zve64f": "Zve64f=true", + "zfh": "Zfh=true", + "zvamo": "x-Zvamo=true", + "zvfh": "x-Zvfh=true", + "xsfvqmaccqoq": "x-xsfvqmaccqoq=true", + "xsfvqmaccdod": "x-xsfvqmaccdod=true", + "xsfvfhbfmin": "x-xsfvfhbfmin=true", + "xsfvfnrclipxfqf": "x-xsfvfnrclipxfqf=true", + "xsfvfwmaccqqq": "x-xsfvfwmaccqqq=true", + "xsfvcp": "x-xsfvcp=true", +} + +class qemu(Simulator.Simulator): + @property + def name(self): + return 'qemu' + + @property + def name_of_32_version(self): + return PrebuiltUtils.get_qemu_prog_name(rv32_p=True, full_system_mode=False) + + @property + def name_of_64_version(self): + return PrebuiltUtils.get_qemu_prog_name(rv32_p=False, full_system_mode=False) + + @property + def default_root_dir(self): + return PrebuiltUtils.qemu_default_root_dir() + + def add_args(self, parser): + # Add general simulator options + super().add_args(parser) + + qemu_env_message = ''' +You can use -E and -U options or the --set-env and --unset-env options to set and unset environment variables for the QEMU process. +It is possible to provide several variables by separating themby commas in getsubopt(3) style. +Additionally it is possible to provide the -E and -U options multiple times. +The following lines are equivalent: + -E var1=val2 -E var2=val2 -U LD_PRELOAD -U LD_DEBUG + -E var1=val2,var2=val2 -U LD_PRELOAD,LD_DEBUG +Note that if you provide several changes to a single variable +the last change will stay in effect +''' + + # Add qemu options + parser.add_argument('--gdb-port', type=int, + default=None, + help='Specify gdb port and wait gdb connection to that port') + parser.add_argument('--env', '-E', action='append', default=[], + help="Set environment variable for qemu." + qemu_env_message) + parser.add_argument('--unset-env', '-U', action='append', default=[] + , help="Unset environment variable for qemu" + qemu_env_message) + parser.add_argument('--sysroot', type=str, default="", + help="Path for sysroot, must set if running " + "linux user program with dynamic link") + parser.add_argument('--hist-trace', action='store_true', + help="Generate trace log") + parser.add_argument('--in-asm', action='store_true', + help="Pass -d in_asm to qemu") + parser.add_argument('--dump-reg', action='store_true', + help="Pass -d cpu to qemu") + parser.add_argument('--hist-trace-output', type=str, + help="Output file name for trace log, default is executable name + \".qhist\"") + parser.add_argument('--in-asm-output', type=str, default="", + help="Output file name for in_asm log, default is stdout") + parser.add_argument('--strace', '-strace', action='store_true', + help="Enable strace for qemu") + parser.add_argument('--fill-vector-agnostic-to-1', action='store_true', + help="Fill tha inactive and tail element to all 1 ") + + + def allow_inferior_args(self): + return True + + def cpu_support(self): + PrebuiltUtils.init(PrebuiltUtils.QEMU) + cpus = subprocess.run([os.path.join(self.default_root_dir, + self.name_of_64_version), + '-cpu', 'help'], + stdin=open(os.devnull), + stdout=subprocess.PIPE).stdout.decode() + return cpus.splitlines() + + def default_cpu(self): + return 'any' + + def check_args(self, opts): + # Check general simulator options + if not super().check_args(opts): + return False + + # Check qemu options + + return True + + def create_machine(self, opts): + options = {'QEMU': [opts.sim_path]} + if opts.cpu == 'any': + is_32 = (opts.prog.fileClass == 32) + if is_32: + opts.cpu = 'rv32' + else: + opts.cpu = 'rv64' + + if opts.arch == 'all': + # default to zvl512b for arch=all + max_vlen = 512 + ext_opts = list(set(EXT_OPTS.values())) + ['vlen=512', 'vext_spec=v1.0'] + else: + max_vlen = 0 + ext_opts = ['vext_spec=v1.0'] + for arch in opts.arch: + if arch in EXT_OPTS: + ext_opts.append(EXT_OPTS[arch]) + if (arch.startswith('zvl') and arch[-1] == 'b'): + vlen = int(arch[3:-1]) + max_vlen = max(vlen, max_vlen) + if max_vlen != 0: + ext_opts.append('vlen=%d'%max_vlen) + if max_vlen != 0: + ta_ma_fill_1 = False + if (opts.fill_vector_agnostic_to_1): + ta_ma_fill_1 = True + # TODO: Default ta_ma_fill_1 = True for those CPU really did that + # like P670. + if ta_ma_fill_1: + ext_opts += ["rvv_ta_all_1s=true", "rvv_ma_all_1s=true"] + else: + ext_opts += ["rvv_ta_all_1s=false", "rvv_ma_all_1s=false"] + + elen = 0 + for arch in opts.arch: + if (arch.startswith("zve32")): + elen = max(elen, 32) + if (arch.startswith("zve64") or arch == 'v'): + elen = max(elen, 64) + + if elen != 0: + ext_opts.append("elen=%d" % elen) + + if opts.in_asm: + dash_d = ["in_asm"] + if opts.dump_reg: + dash_d.append("cpu") + options['DIN_ASM'] = ["-d", ",".join(dash_d)] + options['DIN_ASM'] += ["-singlestep"] + + if opts.in_asm_output != '': + options['DIN_ASM'] += ["-D", opts.in_asm_output] + + + cpu_opts = ['-cpu'] + + # TODO: Disable unused EXT. + if len(ext_opts) != 0: + cpu_opts.append(opts.cpu + "," + ",".join(ext_opts)) + else: + cpu_opts.append(opts.cpu) + + options['CPU'] = cpu_opts + options['PROGRAM'] = [opts.prog.path] + + if opts.args: + options['ARGUMENT'] = [' '.join(map(utils.escape_shell_arg, opts.args))] + + if opts.sysroot: + options['SYSROOT'] = ['-L', opts.sysroot] + + if opts.hist_trace or opts.hist_trace_output is not None: + trace_output = opts.hist_trace_output + if trace_output is None: + trace_output = os.path.basename(opts.prog.path) + ".qhist" + + options['HIST'] = ['-plugin', PrebuiltUtils.get_qemu_hist_plugin(), '-D', trace_output, '-d', 'plugin'] + + if opts.strace: + options['STRACE'] = ['-strace'] + + if opts.gdb_port: + options['GDB_PORT'] = ['-g', str(opts.gdb_port)] + + if opts.env: + options['ENV'] = ['-E', ','.join(opts.env)] + + if opts.unset_env: + options['UNSET_ENV'] = ['-U', ','.join(opts.unset_env)] + + # RHEL 8 work-around... + # RHEL 8 will got following error when running rv32 program, and -B + # option can resolve that. + # qemu-riscv32: Unable to reserve 0xfffff000 bytes of virtual address + # space at 0x1000 (Success) for use as guest address space (check + # yourvirtual memory ulimit setting, min_mmap_addr or reserve less using -R option) + if os.path.exists("/etc/redhat-release"): + options['B'] = ['-B', '0x100000'] + + cmds_fmt = ('QEMU', 'GDB_PORT', 'CPU', 'DIN_ASM', 'B', 'STRACE', 'HIST', 'ENV', 'UNSET_ENV', 'SYSROOT', 'PROGRAM', 'ARGUMENT') + + return Machine.Machine(opts.cpu, cmds_fmt, options) + + def deploy_sim(self, build_32=False): + PrebuiltUtils.init(PrebuiltUtils.QEMU) + return 0 diff --git a/prebuilt/metal-run/simulator/qemu_sys.py b/prebuilt/metal-run/simulator/qemu_sys.py new file mode 100644 index 0000000..6cc9cf2 --- /dev/null +++ b/prebuilt/metal-run/simulator/qemu_sys.py @@ -0,0 +1,115 @@ +import os +import subprocess + +import utils + +from justRun import Simulator +from justRun import Machine +from justRun import Gdb +from justRun import PrebuiltUtils + +class qemu_sys(Simulator.Simulator): + @property + def name(self): + return 'qemu-sys' + + @property + def name_of_32_version(self): + return PrebuiltUtils.get_qemu_prog_name(rv32_p=True, full_system_mode=True) + + @property + def name_of_64_version(self): + return PrebuiltUtils.get_qemu_prog_name(rv32_p=False, full_system_mode=True) + + @property + def default_root_dir(self): + return PrebuiltUtils.qemu_default_root_dir() + + def add_args(self, parser): + # Add general simulator options + super().add_args(parser) + PrebuiltUtils.init(PrebuiltUtils.GDB) + + # Add qemu options + parser.add_argument('--port', type=int, + default=utils.grab_available_port(), + help='port for communicate between gdb and qemu ' + '(auto detect if not given)') + parser.add_argument('--machine', '-m', type=str, + default=self.default_machine(), + help='machine type used in qemu ' + '(default: %(default)s)\n' + 'recommend:\n\t' + + '\n\t'.join(self.machine_support())) + parser.add_argument('--gdb', type=str, default=PrebuiltUtils.get_gdb(), + help='path for gdb') + parser.add_argument('--trace', action='store_true', default=False, + help='print out detail trace from qemu') + parser.add_argument('--debug', action='store_true', default=False, + help='using gdb to debug program') + + + def allow_inferior_args(self): + return False + + def cpu_support(self): + PrebuiltUtils.init(PrebuiltUtils.QEMU) + cpus = subprocess.run([os.path.join(self.default_root_dir, + self.name_of_64_version), + '-cpu', 'help'], + stdin=open(os.devnull), + stdout=subprocess.PIPE).stdout.decode() + return cpus.splitlines() + + def default_cpu(self): + return 'any' + + def machine_support(self): + md = subprocess.run([os.path.join(self.default_root_dir, + self.name_of_64_version), + '-machine', 'help'], + stdin=open(os.devnull), + stdout=subprocess.PIPE).stdout.decode() + md_lines = md.splitlines() + + return [l.split()[0] for l in md_lines[1:]] + + def default_machine(self): + return 'sifive_e' + + def check_args(self, opts): + # Check general simulator options + if not super().check_args(opts): + return False + + # Check qemu options + + return True + + def create_machine(self, opts): + options = {'QEMU': [opts.sim_path]} + options['STARTUP'] = ['-S'] + if opts.cpu: + options['CPU'] = ['-cpu', opts.cpu] + options['GDB'] = ['-gdb', "tcp::%d" % opts.port] + options['GRAPHIC'] = ['-nographic'] + options['MACHINE'] = ['-machine', opts.machine] + options['KERNEL'] = ['-kernel', opts.prog.path] + if opts.trace: + options['TRACE'] = ['-d', 'in_asm,cpu', '-singlestep'] + cmds_fmt = ('QEMU', 'STARTUP', 'CPU', 'GDB', 'GRAPHIC', + 'MACHINE', 'KERNEL', 'TRACE') + machine = Machine.Machine(opts.cpu, cmds_fmt, options) + + gdb_options = {'GDB': [opts.gdb]} + gdb_options['OPTIONS'] = ['-q'] + gdb_options['PROG'] = [opts.prog.path] + gdb_cmds_fmt = ('GDB', 'OPTIONS', 'GDB_SCRIPT','PROG') + + return Gdb.Gdb(opts.port, opts.debug, + gdb_cmds_fmt, gdb_options, machine) + + def deploy_sim(self, build_32=False): + PrebuiltUtils.init(PrebuiltUtils.QEMU) + PrebuiltUtils.init(PrebuiltUtils.GDB) + return 0 diff --git a/prebuilt/metal-run/simulator/spike.py b/prebuilt/metal-run/simulator/spike.py new file mode 100644 index 0000000..e7f664d --- /dev/null +++ b/prebuilt/metal-run/simulator/spike.py @@ -0,0 +1,80 @@ +import os +import subprocess +import utils + +from justRun import Simulator +from justRun import Machine +from justRun import PrebuiltUtils + +class spike(Simulator.Simulator): + @property + def name(self): + return 'spike' + + @property + def name_of_32_version(self): + return "spike" + + @property + def name_of_64_version(self): + return "spike" + + @property + def default_root_dir(self): + return PrebuiltUtils.spike_default_root_dir() + + def add_args(self, parser): + # Add general simulator options + super().add_args(parser) + + parser.add_argument('--spike-isa', type=str, default="", + help="spike option") + + def allow_inferior_args(self): + return True + + def cpu_support(self): + return ['no cpu for spike'] + + def default_cpu(self): + return 'no cpu for spike' + + def check_args(self, opts): + # Check general simulator options + if not super().check_args(opts): + return False + return True + + def create_machine(self, opts): + # It seems like spike can not bypass stdin + opts.bypass_stdin=False + + options = {'SPIKE': [opts.sim_path]} + + is_32 = (opts.prog.fileClass == 32) + if is_32: + xlen = 32 + else: + xlen = 64 + + if not opts.spike_isa: + opts.spike_isa = 'rv%sgcv_zfh_xsfvqmaccdod_xsfvqmaccqoq' % xlen + + options['ISA'] = ['--isa=%s'%opts.spike_isa] + options['CONFIG'] = ['--varch=vlen:256,elen:64,slen:256'] + options['PK'] = [PrebuiltUtils.get_pk(xlen)] + options['PROGRAM'] = [opts.prog.path] + + if opts.args: + options['ARGUMENT'] = [' '.join(map(utils.escape_shell_arg, opts.args))] + + cmds_fmt = ('SPIKE', 'CONFIG', 'ISA', 'PK', 'PROGRAM', 'ARGUMENT') + + return Machine.Machine(opts.cpu, cmds_fmt, options) + + def deploy_sim(self, build_32=False): + PrebuiltUtils.init(PrebuiltUtils.SPIKE) + return 0 + + def can_bypass_stdin(self): + return False diff --git a/prebuilt/metal-run/simulator/verilator.py b/prebuilt/metal-run/simulator/verilator.py new file mode 100644 index 0000000..59b2eab --- /dev/null +++ b/prebuilt/metal-run/simulator/verilator.py @@ -0,0 +1,268 @@ +import os, re +import subprocess + +from justRun import Simulator +from justRun import Machine +from justRun import File + +''' +Only support run simulator without --sim-path on gamma machine since +we need wit and wake to build verilator. + +For machines without wit and wake, users should tell us prebuilt verilator by +--sim-path option. +''' + +PROJECT_ROOT = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..') +COREIP_ROOT = "/work/coreplex" + +# This should be updated periodly. +# 20G1 +PCS_PATH_FOR_VER = "tarballs_20G1.03.00_rc1/full" +PCS_BASIC_PATH = "%s/%s"%(COREIP_ROOT, PCS_PATH_FOR_VER) +E20_path = "sifive_E20_rtl_full_20G1.03.00.tar.gz" +E21_path = "sifive_E21_rtl_full_20G1.03.00.tar.gz" +E24_path = "sifive_E24_rtl_full_20G1.03.00.tar.gz" +E31_path = "sifive_E31_rtl_full_20G1.03.00.tar.gz" +E34_path = "sifive_E34_rtl_full_20G1.03.00.tar.gz" +E76MC_path = "sifive_E76MC_rtl_full_20G1.03.00.tar.gz" +E76_path = "sifive_E76_rtl_full_20G1.03.00.tar.gz" +S21_path = "sifive_S21_rtl_full_20G1.03.00.tar.gz" +S51_path = "sifive_S51_rtl_full_20G1.03.00.tar.gz" +S54_path = "sifive_S54_rtl_full_20G1.03.00.tar.gz" +S76MC_path = "sifive_S76MC_rtl_full_20G1.03.00.tar.gz" +S76_path = "sifive_S76_rtl_full_20G1.03.00.tar.gz" +U52_path = "sifive_U52_rtl_full_20G1.03.00.tar.gz" +U54MC_path = "sifive_U54MC_rtl_full_20G1.03.00.tar.gz" +U54_path = "sifive_U54_rtl_full_20G1.03.00.tar.gz" +U74MC_path = "sifive_U74MC_rtl_full_20G1.03.00.tar.gz" +U74_path = "sifive_U74_rtl_full_20G1.03.00.tar.gz" +''' +We already provide --sim-path, +and default verilator in /work/evanl/verilator/latest +Do we really need to rebuild the verilator for users ? +''' + +VERILATOR_VERSION="4.028" # each pcs version need corresponding verilator. +PREBUILT_VERI_BASE="/work/evanl/verilator/latest" + +class verilator(Simulator.Simulator): + + std_pcs_table = { "e20": E20_path, + "e21": E21_path, + "e24": E24_path, + "e31": E31_path, + "e34": E34_path, + "e76mc": E76MC_path, + "e76": E76_path, + "s21": S21_path, + "s51": S51_path, + "s54": S51_path, + "s76mc": S76MC_path, + "s76": S76_path, + "u52": U52_path, + "u54mc": U54MC_path, + "u54": U52_path, + "u74mc": U74MC_path, + "u74": U74_path } + + core_name = None + + @property + def name(self): + return 'verilator' + + @property + def name_of_verilator(self): + return '%s/sifive_coreip/obj_dir/VTestDriver'%self.core_name + + @property + def default_root_dir(self): + return os.path.join("%s"%PREBUILT_VERI_BASE) + + @property + def deploy_root_dir(self): + return os.path.join(PROJECT_ROOT, 'sifive-verilator') + + def get_tarball_path(self, core_name): + ''' + Get PCS tarball path here. + + Input: core_name. Currently we're consindering about standard core. + See /work/coreplex/tarballs_20G1.03.00_rc1/full for all + standard cores. + ''' + tarball_path = "%s/%s"%(PCS_BASIC_PATH, + self.std_pcs_table.get(core_name)) + return tarball_path + + def add_args(self, parser): + ''' + You choosed the cpu core when sim-path is given. + Which means the --sim-path, and --cpu are excluded in verilator. + So we will ignore --cpu when --sim-path appear. + ''' + # Add general simulator options + super().add_args(parser) + + # Add verilator options here + parser.add_argument('--max-cycles', type=str, + default=20000000, + help='max cycles be executed in verilator') + parser.add_argument('--custom-cmd', required=False, type=str, + help='cmd to verilator instead of default') + parser.add_argument('--out', required=False, type=str, + help='path to PC trace') + + + def allow_inferior_args(self): + return True + + def cpu_support(self): + return list(self.std_pcs_table.keys()) + + def default_cpu(self): + return 'e76' + + def set_core_name(self, core): + self.core_name = core + + def deploy_sim(self, core_name): + print ("start to deploy verilator for %s" % core_name) + self.set_core_name(core_name) + tarball_path = self.get_tarball_path(core_name) + folder_name = os.path.basename(tarball_path).replace(".tar.gz", "") + null_out = open(os.devnull, 'w') + + # decompress + cmd1 = "mkdir -p {0} && tar xvf {1} --xform 's/{2}/{3}/' -C {0}".format( + self.deploy_root_dir, + tarball_path, + folder_name, + core_name) + print ("decompress from: %s"%tarball_path) + subprocess.call( cmd1, + shell=True, + stdout=null_out, + stderr=subprocess.STDOUT) + + # build verilator + path_to_verilator = "%s/%s"%(self.deploy_root_dir, core_name) + ml_cmd = "module load verilator/%s"%VERILATOR_VERSION + cmd2 = "cd %s && %s && make obj_dir/VTestDriver"%( path_to_verilator, + ml_cmd) + print ("building %s verilator"%core_name) + rv = subprocess.call( cmd2, + shell=True, + stdout=null_out, + stderr=subprocess.STDOUT) + + null_out.close() + if rv == 0: + print ("build successfully") + else: + print ("build failed") + return rv + + def check_args(self, opts): + if isinstance( opts.prog, File.ElfFile): + print ("please input hex file") + return False + if opts.sim_path is None: # Does not specfic any simulator + # Check simulator path + ''' + TODO: This is workaround. + verilator need value of "--cpu" to initialize, + But this module was initilized in very first stage. + ''' + opts.sim.set_core_name(opts.cpu) + + default_sim_name = self.name_of_verilator + opts.sim_path = os.path.join(self.default_root_dir, + default_sim_name) + if not os.path.isfile(opts.sim_path): + if opts.verbose: + print ("default simulater %s does not exist" % opts.sim_path) + deployed_veri = "%s/%s/obj_dir/VTestDriver"%(\ + self.deploy_root_dir, + opts.cpu) + rv = None + if os.path.exists(deployed_veri) == False: + opts.sim_path = deployed_veri + rv = self.deploy_sim(opts.cpu) + else: + if opts.verbose: + print ("use deployed verilator: %s"%deployed_veri) + opts.sim_path = deployed_veri + if rv: + print ("deploy %s failed"%self.name) + return False + else: # Check specfic simulator + if not os.path.isfile(opts.sim_path): + print ("specfic simulater %s not found" % opts.sim_path) + return False + + return True + + def after_sim(self, opts): + output_path = "%s.out"%opts.prog.path + if opts.out: + output_path = opts.out + print ("please get PC trace in %s"%output_path) + + def create_machine(self, opts): + options = None + ''' + # get lunch cmd. + 1. if custom_cmd, then use it directly + 2. if no custom_cmd, get default cmd by make --dry-run. + ''' + if opts.custom_cmd: + # using custom_cmd instead of default way + cmd = "%s %s"%(opts.sim_path, opts.custom_cmd) + options = {'VERILATOR_AND_OPTIONS': [cmd]} + else: + # using custom_cmd by default way + + verilator_base = "%s/.."%os.path.dirname(opts.sim_path) + + # get verilator cmd + dry_run_cmd = "cd %s && "%verilator_base + \ + "make hello.verilator.out --dry-run |grep VTest" + try: + default_cmd = subprocess.check_output(dry_run_cmd, + stderr=subprocess.STDOUT, + shell=True).decode() + except subprocess.CalledProcessError as e: + guess_cmd = 'bash -o pipefail -c "./obj_dir/VTestDriver '\ + + '+random_seed=1 +tilelink_timeout=16000 '\ + + '+disable_ahb_fuzzing=1 +disable_axi4_shuffling=1 '\ + + '+max-cycles=20000000 +verbose '\ + + '+inst_dump=1 +pcounter_dump=1 +pcounter_interval=8 '\ + + '+testfile=hello.hex >hello.verilator.out 2>&1"' + default_cmd = guess_cmd + + default_cmd = re.sub( "\+max-cycles=[0-9]* ", + "+max-cycles=%s "%opts.max_cycles, + default_cmd) + default_cmd = re.sub( "\+testfile=.*\.hex", + "+testfile=%s"%opts.prog.path, + default_cmd) + default_cmd = re.sub( "./obj_dir/VTestDriver ", + "%s "%opts.sim_path, + default_cmd) + default_cmd = default_cmd.replace("tail -100 |", "") + if opts.out: + default_cmd = default_cmd.replace("hello.verilator.out", + opts.out) + else: + default_cmd = default_cmd.replace("hello.verilator.out", + "%s.out"%opts.prog.path) + if opts.verbose == False: + default_cmd = re.sub("2>\&1\s*\|\s*tee", "&>", default_cmd) + options = {'VERILATOR_AND_OPTIONS': [default_cmd]} + + # need an additional comma when only one element in a tuple + cmds_fmt = ('VERILATOR_AND_OPTIONS', ) + + return Machine.Machine(opts.cpu, cmds_fmt, options) diff --git a/prebuilt/metal-run/spike-run b/prebuilt/metal-run/spike-run new file mode 100755 index 0000000..13e7004 --- /dev/null +++ b/prebuilt/metal-run/spike-run @@ -0,0 +1,8 @@ +#! /usr/bin/env python3 + +import sys +from justRun import Main +from simulator import spike + +if __name__ == '__main__': + Main.main(sys.argv, simulators=spike.spike()) diff --git a/prebuilt/metal-run/sum-qhist b/prebuilt/metal-run/sum-qhist new file mode 100755 index 0000000..0374734 --- /dev/null +++ b/prebuilt/metal-run/sum-qhist @@ -0,0 +1,46 @@ +#! /usr/bin/env python3 + +import argparse +import sys +from collections import defaultdict + +def openfile(filename): + if filename == '-': + return sys.stdout + else: + return open(filename, "w") + +def main(args): + parser = argparse.ArgumentParser() + parser.add_argument("-o", help="Output file", required=True) + parser.add_argument("inputs", nargs='+', help="*.qhist files.") + + opt = parser.parse_args(args) + + hist = defaultdict(int) + + total_inst_count = 0 + + for filename in opt.inputs: + with open(filename) as f: + first_line = True + for line in f: + line = line.strip() + if first_line: + # Check first line is "pc,dyn_insn_count" + if not line.startswith("pc,dyn_insn_count"): + raise Exception("Unexpected format in %s" % filename) + if len(line.split(",")) == 3: + total_inst_count = int(line.split(",")[2]) + break + first_line = False + continue + pc, inst_count = line.split(",") + pc = int(pc, 16) + inst_count = int(inst_count) + total_inst_count += inst_count + + with openfile(opt.o) as f: + f.write("%d\n" % (total_inst_count)) + +main(sys.argv[1:]) diff --git a/prebuilt/metal-run/test/qemu-sys.sh b/prebuilt/metal-run/test/qemu-sys.sh new file mode 100755 index 0000000..fbe7b6c --- /dev/null +++ b/prebuilt/metal-run/test/qemu-sys.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +################################ +# suppose we are in gamma +################################ + +CURPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" +WORKSPACE=`readlink -f $CURPATH/../` +TEST_OUTPUT=`readlink -f $CURPATH/test_output/qemu-sys` +TEST_BIN="/work/evanl/metal-run-test/qemu-sys-bin/hello.elf" + +cd $WORKSPACE +rm -rf $TEST_OUTPUT +mkdir -p $TEST_OUTPUT + +./just-run qemu-sys $TEST_BIN &> $TEST_OUTPUT/e31.qemu-sys + +################################ +# check results +################################ + +postfix="qemu-sys" +keyword="Hello" +for a_test in `cd $TEST_OUTPUT && find . -name "*\.$postfix" |xargs` +do + a_test=`basename $a_test` + echo -n "for case: $a_test ... " + grep $keyword "$TEST_OUTPUT/$a_test" &> /dev/null + if [ "$?" == "0" ];then + echo "pass !" + else + echo "fail !" + fi +done diff --git a/prebuilt/metal-run/test/qemu.sh b/prebuilt/metal-run/test/qemu.sh new file mode 100755 index 0000000..5b1282b --- /dev/null +++ b/prebuilt/metal-run/test/qemu.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +################################ +# suppose we are in gamma +################################ + +CURPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" +WORKSPACE=`readlink -f $CURPATH/../` +TEST_OUTPUT=`readlink -f $CURPATH/test_output/qemu` + +# suppose we are in gamma +CC="/sifive/tools/riscv-tools/riscv64-unknown-elf-gcc-8.3.0-2020.04.0-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gcc" +CFLAGS="-march=rv32imac -mabi=ilp32 --specs=nano.specs" + +cd $WORKSPACE +rm -rf $TEST_OUTPUT +mkdir -p $TEST_OUTPUT + +################################ +# test hello with qemu user mode +################################ + +# create simple hello +echo "int main(){printf(\"hello\\n\");}" >> $TEST_OUTPUT/hello.c +$CC $CFLAGS $TEST_OUTPUT/hello.c -o $TEST_OUTPUT/hello &> /dev/null +./just-run qemu $TEST_OUTPUT/hello &> $TEST_OUTPUT/rv32imac.qemu +echo $? >> $TEST_OUTPUT/rv32imac.qemu + +################################ +# check results +################################ + +postfix="qemu" +keyword="hello" +for a_test in `cd $TEST_OUTPUT && find . -name "*.$postfix" |xargs` +do + a_test=`basename $a_test` + echo -n "for case: $a_test ... " + grep $keyword "$TEST_OUTPUT/$a_test" &> /dev/null + if [ "$?" == "0" ];then + echo "pass !" + else + echo "fail !" + fi +done diff --git a/prebuilt/metal-run/test/test_all.sh b/prebuilt/metal-run/test/test_all.sh new file mode 100755 index 0000000..2a90c75 --- /dev/null +++ b/prebuilt/metal-run/test/test_all.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +CURPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" +WORKSPACE=`readlink -f $CURPATH/../` +OUTPUT_BASE="$CURPATH/test_output" +mkdir -p $OUTPUT_BASE + +echo "#### test qemu ####" +bash $WORKSPACE/test/qemu.sh + +echo "#### test qemu-sys ####" +bash $WORKSPACE/test/qemu-sys.sh + +echo "#### test verilator ####" +bash $WORKSPACE/test/verilator.sh + diff --git a/prebuilt/metal-run/test/verilator.sh b/prebuilt/metal-run/test/verilator.sh new file mode 100755 index 0000000..cf9c004 --- /dev/null +++ b/prebuilt/metal-run/test/verilator.sh @@ -0,0 +1,67 @@ +#!/bin/bash + +################################ +# suppose we are in gamma +################################ + +CURPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" +WORKSPACE=`readlink -f $CURPATH/../` +TEST_OUTPUT=`readlink -m $CURPATH/test_output/verilator` + +cd $WORKSPACE +rm -rf $TEST_OUTPUT +mkdir -p $TEST_OUTPUT + +################################ +# test e76d for --sim-path +################################ + +TEST_HEX="/work/evanl/metal-run-test/verilator-bin/e76d_hello.hex" +E76D_VERILATOR="/work/evanl/verilator/e76d/obj_dir/VTestDriver" +echo "core: e76d" +OUT_PCTRACE="$TEST_OUTPUT/e76d_hello.hex.out" +./just-run --verbose verilator $TEST_HEX --sim-path $E76D_VERILATOR --out $OUT_PCTRACE +grep "PASS" $OUT_PCTRACE &> $TEST_OUTPUT/e76d.verilator + +################################ +# test s76 for prebuilt verilator +################################ + +TEST_HEX="/work/evanl/metal-run-test/verilator-bin/s76_hello.hex" +OUT_PCTRACE="$TEST_OUTPUT/s76_hello_prebuilt.hex.out" +echo "core: latest s76" +./just-run --verbose verilator --cpu s76 $TEST_HEX --out $OUT_PCTRACE +grep "PASS" $OUT_PCTRACE &> $TEST_OUTPUT/e76d.verilator + +################################ +# test for standard core +################################ + +# (skip e76mc, s76mc, u52, u54, u54mc, u74, and u74mc, since they take time) +for a_core in "e20" "e21" "e24" "e31" "e34" "e76" "s21" "s51" "s54" "s76" \ + "e76mc" "s76mc" "u52" "u54" "u54mc" "u74" "u74mc" ; +do + OUT_PCTRACE="$TEST_OUTPUT/${a_core}_hello.hex.out" + TEST_HEX="/work/evanl/metal-run-test/verilator-bin/${a_core}_hello.hex" + echo "core: $a_core" + ./just-run --verbose verilator --cpu $a_core $TEST_HEX --out $OUT_PCTRACE + grep "PASS" $OUT_PCTRACE &> $TEST_OUTPUT/${a_core}.verilator +done + +################################ +# check results +################################ + +postfix="verilator" +keyword="PASSED" +for a_test in `cd $TEST_OUTPUT && find . -name "*.$postfix" |xargs` +do + a_test=`basename $a_test` + echo -n "for case: $a_test ... " + grep $keyword "$TEST_OUTPUT/$a_test" &> /dev/null + if [ "$?" == "0" ];then + echo "pass !" + else + echo "fail !" + fi +done diff --git a/prebuilt/metal-run/testsuite/conftest.py b/prebuilt/metal-run/testsuite/conftest.py new file mode 100644 index 0000000..fa283d6 --- /dev/null +++ b/prebuilt/metal-run/testsuite/conftest.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 +import pytest +import os +import sh + +@pytest.fixture(autouse=True, scope="session") +def env_sifive(): + env_sifive = os.environ.copy() + return env_sifive + +@pytest.fixture(scope="session") +def qemu_run(): + return sh.Command(f"{os.getcwd()}/qemu-run") diff --git a/prebuilt/metal-run/testsuite/data/hello.c b/prebuilt/metal-run/testsuite/data/hello.c new file mode 100644 index 0000000..91038d3 --- /dev/null +++ b/prebuilt/metal-run/testsuite/data/hello.c @@ -0,0 +1,6 @@ +#include + +int main (void) { + printf("Hello, SiFive!\n"); + return 0; +} diff --git a/prebuilt/metal-run/testsuite/test_qemu.py b/prebuilt/metal-run/testsuite/test_qemu.py new file mode 100644 index 0000000..f2e9721 --- /dev/null +++ b/prebuilt/metal-run/testsuite/test_qemu.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 + +import pytest +import sh +import os + +def test_hello(env_sifive, qemu_run, shared_datadir): + # Compile the hello world program + sh.riscv64_unknown_linux_gnu_clang(shared_datadir/"hello.c", "-o", shared_datadir/"hello", _env=env_sifive) + # Get sysroot + sysroot = sh.riscv64_unknown_linux_gnu_gcc("--print-sysroot", _env=env_sifive).stdout.strip().decode("utf-8") + # Run the hello world program on qemu-run + qemu_run("--sysroot", sysroot, shared_datadir/"hello") diff --git a/prebuilt/metal-run/utils.py b/prebuilt/metal-run/utils.py new file mode 100644 index 0000000..b65e57d --- /dev/null +++ b/prebuilt/metal-run/utils.py @@ -0,0 +1,43 @@ +import subprocess +import importlib +import os +import random +import socket +import sys + +def escape_shell_arg(arg): + arg = arg.replace("\"", "\\\"") + return "\"%s\"" % arg + +def check_package(package_name, install_name=None, version=3): + if install_name is None: + install_name = package_name + try: + importlib.import_module(package_name) + except ImportError: + pip_lock = os.path.join(os.path.dirname(os.path.abspath(__file__)), ".piplock") + subprocess.call("flock %s %s -m pip install --user %s" % + (pip_lock, sys.executable, install_name), shell=True) + # Ref: https://stackoverflow.com/questions/25384922/how-to-refresh-sys-path + import site + importlib.reload(site) + +def check_port_available(port): + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + result = sock.connect_ex(('127.0.0.1',port)) != 0 + sock.close() + return result + +def grab_available_port(): + + uid = os.getuid() + base_port = uid + 10000 + port = base_port + while not check_port_available(port): + port += random.randint(1,100) + + # Too bad, rewind and try again. + if port > 65535: + port = base_port + + return port diff --git a/rif-test b/rif-test new file mode 100755 index 0000000..b209eb6 --- /dev/null +++ b/rif-test @@ -0,0 +1,137 @@ +#!/usr/bin/env python3 + +import argparse +import sys +import os +import subprocess +import random +import time + +SRCTOP = os.path.dirname(os.path.abspath(__file__)) +OP_DEF = os.path.join(SRCTOP, 'include', 'CustomOperator.def') + +sys.path = [os.path.join(SRCTOP, 'scripts')] + sys.path + +import OpDefParser + + +def gen_makefile(opts, output_file): + makefile_template = os.path.join(SRCTOP, 'Makefile.in') + with open(makefile_template, mode='r') as f: + template = f.read() + + arch_flags = "-march=%s -mabi=%s -menable-experimental-extensions " %(opts.arch, opts.abi) + final_cflags = arch_flags + " -static " + opts.cflags + + output = template.format( + SRCTOP=SRCTOP, + CC=opts.cc, + SIM=opts.sim, + CFLAGS=final_cflags, + NODE=opts.node, + LENGTH=opts.length, + ARCH=opts.arch, + SEED=opts.seed, + GEN_PATTERN=opts.gen, + GEN_PATH=opts.gen_path, + HAS_POLICY="--has-policy" if opts.has_policy else "" + ) + + with open(output_file, mode='w') as f: + f.write(output) + +def ma_filter(opts, opdef) : + if not opts.has_ma: + return "MaskAgnostic" not in opdef.op_attr + return True + +def ta_filter(opts, opdef) : + if not opts.has_ta: + return "TailAgnostic" not in opdef.op_attr + return True + +def policy_filter(opts, opdef) : + policy_attrs = ["TailUndisturbed", "MaskUndisturbed"] + valid = True + if not opts.has_policy: + for attr in opdef.op_attr: + if attr in policy_attrs: + valid = False + return valid + +def gen_rule_mk(opts, output_file): + opdef_file = os.path.join(SRCTOP, 'include', 'CustomOperator.def') + opdefs = OpDefParser.parse(opdef_file) + filters = [ta_filter, ma_filter, policy_filter] + filtered_op_types = [] + for opdef in opdefs: + valid = True + for filter in filters: + if not filter(opts, opdef): + valid = False + if not valid: + continue + filtered_op_types.append(opdef.op_type) + filtered_op_types = sorted(list(set(filtered_op_types))) + with open(output_file, mode='w') as f: + f.write("TARGETS:= \\\n") + f.write(" \\\n".join(filtered_op_types)) + +def main(argv): + parser = argparse.ArgumentParser() + parser.add_argument('--gen', + choices=['random_gen', 'fused_gen'], default='random_gen', + help='Random gen pattern') + parser.add_argument('--gen-path', + default='build/tool', + help='Prebuilt random gen path') + parser.add_argument('--sim', + help='Path to simulator') + parser.add_argument('--cc', + help='Path to compiler') + parser.add_argument('--mode', choices=['full', 'fast'], default='full', + help='Testing mode') + parser.add_argument('--node', type=int, default=10, + help='Minimal # of node') + parser.add_argument('--length', type=int, default=500, + help='Number of elements in each data') + parser.add_argument('--arch', default='rv64gcv_zfh_zvfh', + help='Target arch config, default is rv64gcv_zvfh') + # TODO: We might derived the default ABI from ARCH. + parser.add_argument('--abi', default='lp64d', + help='Target ABI config, default is lp64d') + parser.add_argument('--cflags', default='-O', + help='Default compilation flag') + parser.add_argument('--seed', type=int, default = 0xdeadbeef, + help='Fixed random seed') + parser.add_argument('--random', choices=['on', 'off'], default='off', + help='Feed random seed') + parser.add_argument('--has-policy', action='store_true', + help='Enable policy if set') + parser.add_argument('--has-ta', action='store_true', + help='Enable ta if set') + parser.add_argument('--has-ma', action='store_true', + help='Enable ma if set') + + opts = parser.parse_args(argv) + + if opts.random == 'on' : + gen_seed = (int)(time.time()) + random.seed(gen_seed) + print ('Use time() to generate seed: ', gen_seed) + opts.seed = random.randint(0, 2**30) + print ('Generated seed: ', opts.seed) + + if opts.sim is None: + print ('Using builtin metal-run by default.') + opts.sim = os.path.join(SRCTOP, 'prebuilt', 'metal-run', 'qemu-run') + if not os.path.exists(opts.sim): + print ('Init builtin metal-run') + subprocess.run("git submodule update --init --recursive prebuilt/metal-run", + cwd=SRCTOP, shell=True) + + gen_makefile(opts, "Makefile") + gen_rule_mk(opts, "rules.mk") + return 0 + +sys.exit(main(sys.argv[1:])) diff --git a/rif.adoc b/rif.adoc new file mode 100644 index 0000000..51cafc9 --- /dev/null +++ b/rif.adoc @@ -0,0 +1,766 @@ += RIF Design Writeup +Version 1.1-draft +:doctype: article +:encoding: utf-8 +:lang: en +:toc: left +:numbered: +:stem: latexmath +:le: ≤ +:ge: ≥ +:ne: ≠ +:approx: ≈ +:inf: ∞ + +== Introduction + +NOTE: This document assumes you have basic understanding with the RISC-V +Vector (RVV) Extension and the intrinsic functions associated with it. +If not, please go to +https://github.com/riscv/riscv-v-spec[riscv-v-spec] and +https://github.com/riscv-non-isa/rvv-intrinsic-doc[rvv-intrinsic-doc]. + +This document records the design write-up and intents of RIF. +RIF is short for **R**VV **I**ntrinsic **F**uzzing, as we try to generate series +random test to fuzz and check if the compiler compiles C code that +contains RVV C intrinsics correctly. Essentially, you may see the current +RIF as a graph-based compiler that transforms the randomly generated +data-flow graph into testing C code. + +Before RIF, there was already a fuzz-test generator called +https://github.com/sifive/riscv-vector-tests[riscv-vector-tests]. +It was built for fuzz-test on RVV. It served its purpose well and is an +important part of the CI. In the mean time, there is some place that may +be re-designed, and the trade-off from Python's direct byte string +translation makes the full test relatively time costly. All in all, we +decided to write another fuzz-test generator that will complement VTG's +shortcoming(s). + +=== Action Flow for RIF + +The RIF simply goes through 3 stages. The 3 stages are: + +1. Graph generation +2. Golden output generation +3. Code generation + +To summarize RIF's action flow in a simple paragraph: + +RIF randomly generates a **bipartite data-flow graph** which consists of +"Operator" nodes and "Value" nodes. Then RIF will traverses through the +nodes in **topological order**, propagating the values into computation +nodes to generate expected output from execution. Finally RIF will +generate a C program that executes the computations by the topological +order of the data-flow graph. + +You may start by looking into `tool/random_gen.cpp`. + +=== VLA-Style Compute Pattern + +RIF seeks to generate code that is portable, which means it should +execute successfully under different VLEN settings. Therefore RIF aims to +code in a VLA (Vector Length Agnostic) style. + +Take example for a reduction instruction (e.g. vredsum.vs). The number of +elements reduces per instruction depends on VLEN. In VLA style we will not +focus on how a single instruction performs, but rather the ultimate result +when we want to apply the operation to a vector of data. + +[source, cpp] +---- +// Here is a code that performs differently for different VLEN +int elementsPerInst = VLEN / SEW; +for (int i=0; i<500; i+= elementsPerInst) { + int reductionResult = 0; + for (int j=0; i+j<500 && j> and <> +respectively. Derived classes such as <>, +<> and <> will implement +them. + +[source,cpp] +---- +struct ValueBase { + /* ... */ + + virtual void generateCCode(std::ostream &os) = 0; + virtual void generateData() = 0; + + const CustomValType type; + const std::string typeID; + const std::string id; + const std::string dataTypeID; + + std::vector inputs; + std::vector outputs; + + int length; + TypeInfo *typeInfo; +}; +---- + +[[sec-derive-value]] +==== Derived Class - `OneD*Val`, `Scalar*Val` + +RVV instructions may operate on different bit width, so we need different +derived value types for each of them. A "Value" node can either be an +"One-D Value" or a "Scalar Value". + +- One-D Value: One dimensional, represents an 1-D array of data +- Scalar Value: A single value + +The owned data are held under the derived classes. You may check out the +derived classes under `Value.hpp`. The derived-value will allocate +storage space upon construction, and values will be computed later in the +Section <>. + +[source,cpp] +---- +#define CUSTOM_ONE_D_TYPE(CUSTOM_NAME, DATA_TYPE, DATA_WIDTH, DATA_CLASS, \ + MIN_VALUE, MAX_VALUE) \ + struct OneD##CUSTOM_NAME##Val : ValueBase { \ + OneD##CUSTOM_NAME##Val(...) { \ + ptr = new DATA_TYPE[length]; \ + raw = new uint64_t[length]; \ + } \ + virtual ~OneD##CUSTOM_NAME##Val() { \ + delete ptr; \ + delete raw; \ + } \ + void generateData() override; \ + DATA_TYPE *ptr; \ + uint64_t *raw; \ + }; \ + DATA_TYPE *getRawPointer(OneD##CUSTOM_NAME##Val *val); +#include "CustomValue.def" +#undef CUSTOM_ONE_D_TYPE +#undef CUSTOM_SCALAR_TYPE +---- + +There are many derived-classes and we let C MACRO generate them for us. +The MACRO `CUSTOM_ONE_D_TYPE` and `CUSTOM_SCALAR_TYPE` are used under +`include/CustomValue.def`. + +[source,cpp] +---- +// CUSTOM_ONE_D_TYPE(CUSTOM_NAME, DATA_TYPE, DATA_WIDTH, DATA_CLASS, MIN_VALUE, MAX_VALUE) +// CUSTOM_SCALAR_TYPE(CUSTOM_NAME, DATA_TYPE, DATA_WIDTH, DATA_CLASS, MIN_VALUE, MAX_VALUE) +CUSTOM_ONE_D_TYPE(Int32, int32_t, 32, SIGNED_INT, -10000000, +10000000) +CUSTOM_SCALAR_TYPE(Float32, float32_t, 32, FLOAT, 0, +20000000) +---- + +They will be fed into the MACRO definition to do under `include/Value.hpp` +and (for derived class declaration), `library/Value.cpp` (for derived +class member function implementation), `library/Basic.cpp` (for enum +definition) and `libraryOperator.cpp` (for switch-statment code +generation). + +The "Value" nodes for the `Graph` are all derived classes. Each node +represents a value computed (or initialized) and will become a variable +in the generated C code. The derived value classes implement +`generateCCode` and `generateData` method. `generateCCode` will generate +strings for definition of the variable. The definitions will be outputted +as global variables in the C code. The `generateData` will trigger the +RNG generator under `include/Utils.hpp` by its provided data type +specified from the macro definition. Please go to `library/Value.cpp` for +more details. + +=== Operator Node + +==== Base Class - `OperatorBase` + +A RIF "Operator" node represents an RVV C intrinsic computation. Since +an "Operator" node represents an intrinsic function and a intrinsic +functions will return a value, "Operator" node is derived from +`ValueBase`. The additional information attached to `OperatorBase` are +the input types, output type and the operator's attribute. Since the +data-flow graph follows the use-define chain, an "Operator" will only +generate at most one output. It can take arbitrary numbers of input. On +the other hand, the `opAttr` (operator' attribute) data member allows us +to augment properties to the operator type, such as `MaskedOperation`, +`WideningOperation`, etc... You can find the collection of attributes +under `include/Basic.hpp`. + +[source,cpp] +---- +struct OperatorBase : ValueBase { + /* ... */ + // returns 1 if fail + int addInput(int inputIdx, ValueBase *input); + // return 1 if fail + int addOutput(ValueBase *output); + + const OperatorAttrT opAttr; + const std::vector inputTypes; + const CustomValType outputType; +}; +---- + + +==== Derived Class - Overview + +The derived operators don't contain any extra data member, they simply +override `generateCCode` and `generateData`. The class definitions of +these derived class are generated through C MACRO. The MACRO +`CUSTOM_OP_TYPE` is declared under `include/CustomOperator.def`. + +These MACRO will be fed into `Basic.cpp` (for enum definition), +`include/Operator.hpp` (for derived class definition) and +`library/Operator.cpp` for derived class member function implementation. +The derived class from `OperatorBase` either specializes into +`InitializeOp` or `*Op` that represents an intrinsic. + +[[sec-derive-operator-1]] +==== Derived Class - `InitializeOp` + +`InitializeOp` is the only special case for "Operator"-s in `Graph`. It +serves as the operator to generate random initial value for the "Values" +that don't have a "define" after the random graph generation. + +`InitializeOp::generateData` will not be called, as you can see it is +asserted to be unreachable in the code below. RIF will look further to +its define value and call `*Val::generateData` instead.. Please look into +<> for more. + +[source,cpp] +---- +// Under Operator.cpp +void InitializeOp::generateData() { + // Please go to Graph::generateData() for the data generation call + assert(false && "This function shall not be triggered"); +} +---- + +[[sec-derive-operator-2]] +==== Derived Class - `*Op` + +Every `*Op` represents an RVV C intrinsic. `*Op::generateData` calls its +compute header generated in Section <>, you can +find them under `include/autogen` after you `make` anything that is +associated with `Operator.hpp`. `*Op::generateCCode` forwards into a +local function `generateOperatorCode`, which acts as an indirect layer +for code generation. Please checkout Section <>. + +[source,cpp] +---- +#define CUSTOM_OP_TYPE(OP_TYPE, OP_ID, SEW, TYPE_CLASS, OP_ATTR, OUTPUT_TYPE, \ + NUM_OF_INPUTS, ...) \ + void OP_TYPE##Op::generateData() { compute##OP_TYPE##Op(this); } \ + void OP_TYPE##Op::generateCCode(std::ostream &os) { \ + generateOperatorCode(os, this); \ + } +#include "CustomOperator.def" +#undef CUSTOM_OP_TYPE +---- + +=== Random Generation + +RIF uses pseudo RNG. The seeds can be provided from the input argument +(parsed under `library/Utils.cpp::parse_opt`). The seed will be held +under a global variable `InitialSeed` (check it out under +`include/Utils.hpp`). Otherwise there will be default values for it. +The reason to have a seed is to make things reproducable. + +User of the random function are the Section <> and +Section <>. + +[[sec-topological-order]] +=== Generating topological order + +Since RIF operatates on a DAG data-flow graph, a topological order +gurantees us that if we operate the nodes in such order, no +data-dependency will be violated. Therefore a topological order generator +is needed. Moreover we may want to reproduce such order and generate the +same test file through RIF, so the topological order generator takes a +seed from either the default or the input argument. You can find the +topological order generator under +`Graph::getOperatorsInTopologicalOrder`. + +You may find the use of the order generator under Section +<> and <>. + +=== Graph Generation Algorithm Sketch + +The input parameters that effect the random graph generation are the +following. You can find the options and how they are parsed under +`library/Utils.cpp`. + +[source, bash] +---- +-l, --length=DATA_LENGTH Data length for the initial node (root) +-n, --nodes-to-gen=NODES_TO_GEN The number of nodes to generate for the graph. +-r, --root=OPERATOR_ENUM Initial node for the graph generation, default root is 'AddVV32' +-s, --seed=RANDOM_SEED Seed for random number generator, default seed is '0xdeadbeef' +---- + +Here is a pseudo code for how RIF random generates the data-flow graph. + +[source, python] +---- +def AddUninitializedValuesAroundOp(G, op) : + for inputType in op.inputTypes : + Value value = createValue(inputType) + G.addUsedValueNode(value, op) + ValueType value = createop.outputType + G.addDefineValueNode(value, op) + +# The algorithm starts Here +def RandomGraphGeneration() : + srand(RANDOM_SEED) + + # Declare an empty graph, the one-d values inside will be of length DATA_LENGTH + Graph G(DATA_LENGTH) + + Operator op = createOperator(OPERATOR_ENUM) + G.addOperator(op) + addUninitializedValuesAroundOp(G, op) + + while size(G.ops) < NODES_TO_GEN : + int operation = random_coinflip() # 0 / 1 + if operator == 0 : # Grows on existing value + value = Random select an value from G + if value is already defined by an opertaor: + OperatorType opType = Random select a feasible operator type that uses value.ValueType + Operator op = createOperator(opType) + op = G.addOperator(op) + op.addUsedValueNode(value) + addUninitializedValuesAroundOp(G, op) + else : + OperatorType opType = Random select a feasible operator type that defines value.ValueType + Operator op = createOperator(opType) + op = G.addOperator(op) + op.addDefinedValueNode(value) + addUninitializedValuesAroundOp(G, op) + else : # Create a random operator that doesn't connect to any existing connected-component + OperatorType opType = Random select operator type except InitializeOp + Operator op = createOperator(opType) + op = G.addOperator(op) + addUninitializedValuesAroundOp(G, op) + + # Add an InitializeOp for all values without a define + for value in filter(G.values, values.define == NULL) : + Operator op = createOperator(InitializeOp) + op.addDefinedValueNode(value) +---- + +[[sec-golden-computation]] +== Golden computation + +Golden computation is an important feature RIF provides. By computing for +the exact expected output for exeuction of the generated test file, we +can verify that the compiler have compiled the C code correctly. This +section introduces how the data is initialized and how RIF computes +them. + +All nodes on the graph have a virtual function `generateData` that needs +to be implemented (including the operators, since they also are derived +from `ValueBase`). `generateData` will be called and computation will +propagate through the whole graph. + +[[sec-initial-data]] +=== Initial Data Generation + +Since we are traversing in topological order, the first operators we +encounter are the ones without any in-degree, which should be the +`InitializeOp`-s. When an `InitialzeOp` is encountered, RIF forwards the +responsibility of data generation to its defining value. The value node +holds its data type so they are able to call the pseudo random number +generator under `include/Utils.hpp`. Take the one-d values for example +(check it out under `library/Value.cpp`). + +[source, cpp] +---- +#define CUSTOM_ONE_D_TYPE(CUSTOM_NAME, DATA_TYPE, DATA_WIDTH, DATA_CLASS, \ + MIN_VALUE, MAX_VALUE) \ + void OneD##CUSTOM_NAME##Val::generateData() { \ + auto length = this->length; \ + auto data = getRawPointer(this); \ + for (int i = 0; i < length; ++i) \ + data[i] = getRandomNumber(MIN_VALUE, MAX_VALUE, &raw[i]); \ + } \ +#include "CustomValue.def" +#undef CUSTOM_ONE_D_TYPE +#undef CUSTOM_SCALAR_TYPE +---- + +[[sec-python-golden-gen-header]] +=== Python-generated Golden Header + +Operator nodes except `InitializeOp` maps to some RVV C intrinsic API. +Given that we traverse under topological order, we can assume that all +input values will have their data ready for computation when RIF visits +an operator. Every operator implements the `generateData` method. + +[source, cpp] +---- +#define CUSTOM_OP_TYPE(OP_TYPE, OP_ID, SEW, TYPE_CLASS, OP_ATTR, OUTPUT_TYPE, \ + NUM_OF_INPUTS, ...) \ + void OP_TYPE##Op::generateData() { compute##OP_TYPE##Op(this); } \ +#include "CustomOperator.def" +#undef CUSTOM_OP_TYPE +---- + +The `compute##OP_TYPE##Op` functions are under headers auto-generated by +Python code under `scripts/`. The scripts look into `CustomOperator.def` +and generate a header for every MACRO definition. The headers are +collected under `include/autogen/`, with `include/AutoGenComputeOp.h` +collecting all the headers into a header file. You may notice that there +is an inclusion within the for-loop. It is the header from Spike, please +checkout Section <>. + +[source, cpp] +---- +// include/autogen/computeAddVV32VInt32Op.h +void computeAddVV32VInt32Op(RIF::OperatorBase *op) { + auto a = static_cast(op->inputs[0]); + auto b = static_cast(op->inputs[1]); + auto c = static_cast(op->outputs[0]); + + assert(a->length == b->length && a->length == c->length); + + auto length = a->length; + + auto dataA = getRawPointer(a); + auto dataB = getRawPointer(b); + auto dataOut = getRawPointer(c); + + auto sew = op->typeInfo->sew.to_int(); + auto dataASew = a->typeInfo->sew.to_int(); // for index load / store only + P.VU.vsew = sew; + + for (int i = 0; i < length; ++i) { +#include"vadd_vv.h" + } +} +---- + +[[sec-code-reuse]] +=== Code Reused From `riscv-isa-sim` + +The header that is included inside the for-loop of the compute headers +under `include/autogen/` are the core logics of the vector function. They +are logics defined by +https://github.com/sifive/riscv-isa-sim[`riscv-isa-sim`] (also called as +"Spike"), which is a RISC-V ISA Simulator by SiFive. The logic headers +are under `riscv-isa-sim/riscv/insns.h`. Reusing the header allows +RIF to avoid reconstructing compute logic for vector instructions and +the behaviors is already guaranteed correct because Spike is a +well-tested simulator. + +[source, cpp] +---- +// riscv-isa-sim/riscv/insns/vadd_vv.h +// vadd.vv vd, vs1, vs2, vm +VI_VV_LOOP +({ + vd = vs1 + vs2; +}) +---- + +Spike encapsulates the core logic with MACRO and decodes them with the +header `riscv-isa-sim/riscv/decode.h`. Like Spike, RIF holds its own +decode header `include/Decode.hpp` that suits our computation. +Unfortunately, not all compute logic headers are well encapsulated, so +RIF would have to manually override some of them. The overrided headers +are placed under `include/rif-local/`. + +[source, cpp] +---- +// include/Decode.hpp +#define VI_VV_LOOP(BODY) \ + auto vs2 = dataA[i]; \ + auto vs1 = dataB[i]; \ + auto &vd = dataOut[i]; \ + BODY +---- + +NOTE: RIF performs floating point computation with the +https://github.com/ucb-bar/berkeley-softfloat-3[softfloat] library just +like Spike. + +[[sec-golden-gen-algo]] +=== Golden Computation Algorithm Sketch + +Since RIF is operating on a data-flow graph, by traversing through the +graph in topological order, we can guarantee that no data dependency is +violated. + +[source, cpp] +---- +// Under library/Graph.cpp +void Graph::generateData(uint32_t seed) { + auto ordering = getOperatorsInTopologicalOrder(seed); + initializeRNG(seed); + for (auto id : ordering) { + auto op = operatorLUT[id]; + if (op->type == CustomValType::Initialize) { + auto value = op->outputs[0]; + value->generateData(); + } else { + uint8_t save_roundingMode = softfloat_roundingMode; // save + op->generateData(); + softfloat_roundingMode = save_roundingMode; // restore + } + } +} +---- + +[[sec-code-generation]] +== C Code Generation + +The last stage of RIF is the code generation. The generated C code files +can be split into 3 parts: + +1. Variable Declaration +2. Operator(Intrinsic) Computation +3. Result Verification + +The generated C code will look like the half-pseudo code below. You may +checkout expected code generation samples under the tests with `CodeGen` +label under the folder `test/`. + +[source, cpp] +---- +/* +[a] [b] + \ / + (add_op) + | + [c] +*/ + + +#include <...> + +// 1. Variable Declaration +int a[500]; +int b[500]; +int c[500]; + +// 2. Operation(Intrinsic) Computation +void init_value_for_a() { + int tmp[] = { /* integer literals generated by RIF */ } + for (int i=0; i<500; ++i) + a[i] = tmp[i]; +} +void init_value_for_b() { + int tmp[] = { /* integer literals generated by RIF */ } + for (int i=0; i<500; ++i) + b[i] = tmp[i]; +} +void operator_add() { + // RIF will generate such vector code (half-pseudo code here) + int counter = 500; + int *placeholder_a = a; + int *placeholder_b = b; + int *placeholder_c = c; + + for (size_t vl; counter > 0; counter -= vl) { + vl = vsetvl(counter); + // load data + vec_a = vector_unit_strided_load(placeholder_a, vl); + vec_b = vector_unit_strided_load(placeholder_b, vl); + + // computation + vec_c = vadd_vv_i32m1(vec_a, vec_b, vl); + + // store data + vector_unit_strided_store(placeholder_c, vec_c, vl) + + // increment the placeholder + placeholder_a += vl; + placeholder_b += vl; + placeholder_c += vl; + } +} + +// 3. Result Verification +int golden_init_value_for_a() { return true; } +int golden_init_value_for_b() { return true; } +int golden_operator_add() { + int tmp[] = { /* integer literals generated by RIF */ } + for (int i=0; i<500; ++i) + if (c[i] != tmp[i]) + return false; + + return true; +} + +int main () +{ + // Calls computation in topological order + init_value_for_a(); + init_value_for_b(); + operator_add(); + + // Calls golden verification in topological order + bool success = 1; + success &= golden_init_value_for_a(); + success &= golden_init_value_for_b(); + success &= golden_operator_add(); + + return success != true; +} +---- + +=== Variable Declaration + +The variables are declared outside of the `main` function to avoid stack +overflow. There is no requirement for ordering in varaible declaration. +So a single for-loop will do the job. The code generation for these +declarations are under `generateCCode` of the derived value nodes, you +can check for details under `library/Value.cpp`. + +[source, cpp] +---- +#define CUSTOM_ONE_D_TYPE(CUSTOM_NAME, DATA_TYPE, DATA_WIDTH, DATA_CLASS, \ + MIN_VALUE, MAX_VALUE) \ + void OneD##CUSTOM_NAME##Val::generateCCode(std::ostream &os) { \ + os << this->dataTypeID << " " << this->id << "[" << this->length \ + << "];\n"; \ + } +#include "CustomValue.def" +#undef CUSTOM_ONE_D_TYPE +#undef CUSTOM_SCALAR_TYPE +---- + +[[sec-op-codegen]] +=== Operator(Intrinsic) Computation + +Although the RVV instructions varies among each other, their code +generation for computation still shares many components. The main +components can be split into clear steps like the owns shown in the code +snippet of Section <>. + +This allows RIF to create a common framework for operators - +`CodeGenForOperator`. It is a base class that extracts the common methods +to code gen the computation for an operator. You can find the definition +under `include/Operator.hpp`. + +[source, cpp] +---- +void CodeGenForOperator::generateSingleOperatorCode() { + auto output = op->outputs[0]; + getRawPointers(op->inputs, output); + std::string counter = CodeGenForOperator::getCounter(os, loopLength); + CodeGenForOperator::getLoopStart(os, counter); + { + getVL(counter); + std::vector args = getIntrinsicArguments(); + auto opResult = genOpString(os, op, args, output); + storeResult(opResult); + incrementRawPointerByVLEN(); + } + CodeGenForOperator::getLoopEnd(os); +} +---- + +=== Result Verification + +Results are verified after all of them have been computed. A verification +function is created for every operator on the graph (even the +`InitializeOp`-s, they returns 1 unconditionally). For non-initialize +operators, RIF will fill in the precomputed results into number literals +inside the function and uses a for-loop to verify it. + +Since RIF calculates floating point computation with +https://github.com/ucb-bar/berkeley-softfloat-3[softfloat], comparison of +the data needs an adapter to transform the number literals into +floating-point types. So different code generation is required for them. +The code gen function for this is templatized and realized under +`Operator.cpp::emitOneDVerificationCode`. + +[[sec-code-gen-algo]] +=== Code Generation Algorithm Sketch + +The starting point for code generation is `Graph::generateCCode`. + +[source, python] +---- +Graph G +OutputStream os + +# 1. Variable Declaration +for value in G.values : + value->generateCCode(os) + +# 2. Operator(Intrinsic) Computation +for op in G.ops : + if op is an InitializeOp : + op->define->generateCCode(os) + else + op->generateCCode(os) + +# 3. Result Verification +for op in G.ops : + op->generateVerificationCode(os) + +os << "int main() {\n"; +{ + # Calls computation in topological order + for op in topological_order(G.ops) : + os << op.getNameWithType() << "()\n"; + + os << "bool success = true;\n"; + + # Calls verification + os << "success &= " << std::string("golden_") + op.getNameWithType() << "()\n"; + + os << "return success;\n"; +} +os << "}\n"; +---- + +== Appendix: Graphviz Generation + +Generating a visualization for the graph is beneficial for debugging. +You may call `Graph::generateGraphViz` to create a `.dot` file and turn +it into a png file with: + +[source, bash] +---- +dot -Tpng output.dot > output.png +---- diff --git a/riscv-isa-sim/riscv/arith.h b/riscv-isa-sim/riscv/arith.h new file mode 100644 index 0000000..9e0c2f7 --- /dev/null +++ b/riscv-isa-sim/riscv/arith.h @@ -0,0 +1,216 @@ +// See LICENSE for license details. + +#ifndef _RISCV_ARITH_H +#define _RISCV_ARITH_H + +#include +#include +#include +#include + +inline uint64_t mulhu(uint64_t a, uint64_t b) +{ + uint64_t t; + uint32_t y1, y2, y3; + uint64_t a0 = (uint32_t)a, a1 = a >> 32; + uint64_t b0 = (uint32_t)b, b1 = b >> 32; + + t = a1*b0 + ((a0*b0) >> 32); + y1 = t; + y2 = t >> 32; + + t = a0*b1 + y1; + y1 = t; + + t = a1*b1 + y2 + (t >> 32); + y2 = t; + y3 = t >> 32; + + return ((uint64_t)y3 << 32) | y2; +} + +inline int64_t mulh(int64_t a, int64_t b) +{ + int negate = (a < 0) != (b < 0); + uint64_t res = mulhu(a < 0 ? -a : a, b < 0 ? -b : b); + return negate ? ~res + (a * b == 0) : res; +} + +inline int64_t mulhsu(int64_t a, uint64_t b) +{ + int negate = a < 0; + uint64_t res = mulhu(a < 0 ? -a : a, b); + return negate ? ~res + (a * b == 0) : res; +} + +//ref: https://locklessinc.com/articles/sat_arithmetic/ +template +static inline T sat_add(T x, T y, bool &sat) +{ + UT ux = x; + UT uy = y; + UT res = ux + uy; + sat = false; + int sh = sizeof(T) * 8 - 1; + + /* Calculate overflowed result. (Don't change the sign bit of ux) */ + ux = (ux >> sh) + (((UT)0x1 << sh) - 1); + + /* Force compiler to use cmovns instruction */ + if ((T) ((ux ^ uy) | ~(uy ^ res)) >= 0) { + res = ux; + sat = true; + } + + return res; +} + +template +static inline T sat_add(T x, T y, T z, bool &sat) +{ + bool sat1, sat2; + T a = y; + T b = z; + T res; + + /* Force compiler to use cmovs instruction */ + if (((y ^ z) & (x ^ z)) < 0) { + a = z; + b = y; + } + + res = sat_add(x, a, sat1); + res = sat_add(res, b, sat2); + sat = sat1 || sat2; + + return res; +} + +template +static inline T sat_sub(T x, T y, bool &sat) +{ + UT ux = x; + UT uy = y; + UT res = ux - uy; + sat = false; + int sh = sizeof(T) * 8 - 1; + + /* Calculate overflowed result. (Don't change the sign bit of ux) */ + ux = (ux >> sh) + (((UT)0x1 << sh) - 1); + + /* Force compiler to use cmovns instruction */ + if ((T) ((ux ^ uy) & (ux ^ res)) < 0) { + res = ux; + sat = true; + } + + return res; +} + +template +T sat_addu(T x, T y, bool &sat) +{ + T res = x + y; + sat = false; + + sat = res < x; + res |= -(res < x); + + return res; +} + +template +T sat_subu(T x, T y, bool &sat) +{ + T res = x - y; + sat = false; + + sat = !(res <= x); + res &= -(res <= x); + + return res; +} + +static inline uint64_t extract64(uint64_t val, int pos, int len) +{ + assert(pos >= 0 && len > 0 && len <= 64 - pos); + return (val >> pos) & (~UINT64_C(0) >> (64 - len)); +} + +static inline uint64_t make_mask64(int pos, int len) +{ + assert(pos >= 0 && len > 0 && pos < 64 && len <= 64); + return (UINT64_MAX >> (64 - len)) << pos; +} + +static inline int popcount(uint64_t val) +{ + val = (val & 0x5555555555555555U) + ((val >> 1) & 0x5555555555555555U); + val = (val & 0x3333333333333333U) + ((val >> 2) & 0x3333333333333333U); + val = (val & 0x0f0f0f0f0f0f0f0fU) + ((val >> 4) & 0x0f0f0f0f0f0f0f0fU); + val = (val & 0x00ff00ff00ff00ffU) + ((val >> 8) & 0x00ff00ff00ff00ffU); + val = (val & 0x0000ffff0000ffffU) + ((val >> 16) & 0x0000ffff0000ffffU); + val = (val & 0x00000000ffffffffU) + ((val >> 32) & 0x00000000ffffffffU); + return val; +} + +static inline int ctz(uint64_t val) +{ + if (!val) + return 0; + + int res = 0; + + if ((val << 32) == 0) res += 32, val >>= 32; + if ((val << 48) == 0) res += 16, val >>= 16; + if ((val << 56) == 0) res += 8, val >>= 8; + if ((val << 60) == 0) res += 4, val >>= 4; + if ((val << 62) == 0) res += 2, val >>= 2; + if ((val << 63) == 0) res += 1, val >>= 1; + + return res; +} + +static inline int clz(uint64_t val) +{ + if (!val) + return 0; + + int res = 0; + + if ((val >> 32) == 0) res += 32, val <<= 32; + if ((val >> 48) == 0) res += 16, val <<= 16; + if ((val >> 56) == 0) res += 8, val <<= 8; + if ((val >> 60) == 0) res += 4, val <<= 4; + if ((val >> 62) == 0) res += 2, val <<= 2; + if ((val >> 63) == 0) res += 1, val <<= 1; + + return res; +} + +static inline int log2(uint64_t val) +{ + if (!val) + return 0; + + return 63 - clz(val); +} + +static inline uint64_t xperm(uint64_t rs1, uint64_t rs2, size_t sz_log2, size_t len) +{ + uint64_t r = 0; + uint64_t sz = 1LL << sz_log2; + uint64_t mask = (1LL << sz) - 1; + + assert(sz_log2 <= 6 && len <= 64); + + for (size_t i = 0; i < len; i += sz) { + uint64_t pos = ((rs2 >> i) & mask) << sz_log2; + if (pos < len) + r |= ((rs1 >> pos) & mask) << i; + } + + return r; +} + +#endif diff --git a/riscv-isa-sim/riscv/insns/vaadd_vv.h b/riscv-isa-sim/riscv/insns/vaadd_vv.h new file mode 100644 index 0000000..0e7e39b --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vaadd_vv.h @@ -0,0 +1,2 @@ +// vaadd.vv vd, vs2, vs1 +VI_VV_LOOP_AVG(+); diff --git a/riscv-isa-sim/riscv/insns/vaadd_vx.h b/riscv-isa-sim/riscv/insns/vaadd_vx.h new file mode 100644 index 0000000..120e63e --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vaadd_vx.h @@ -0,0 +1,2 @@ +// vaadd.vx vd, vs2, rs1 +VI_VX_LOOP_AVG(+); diff --git a/riscv-isa-sim/riscv/insns/vaaddu_vv.h b/riscv-isa-sim/riscv/insns/vaaddu_vv.h new file mode 100644 index 0000000..7eb7a89 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vaaddu_vv.h @@ -0,0 +1,2 @@ +// vaaddu.vv vd, vs2, vs1 +VI_VV_ULOOP_AVG(+); diff --git a/riscv-isa-sim/riscv/insns/vaaddu_vx.h b/riscv-isa-sim/riscv/insns/vaaddu_vx.h new file mode 100644 index 0000000..325206f --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vaaddu_vx.h @@ -0,0 +1,2 @@ +// vaaddu.vx vd, vs2, rs1 +VI_VX_ULOOP_AVG(+); diff --git a/riscv-isa-sim/riscv/insns/vadc_vim.h b/riscv-isa-sim/riscv/insns/vadc_vim.h new file mode 100644 index 0000000..4b0356f --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vadc_vim.h @@ -0,0 +1,5 @@ +// vadc.vim vd, vs2, simm5, v0 +VI_XI_LOOP_WITH_CARRY +({ + vd = (uint128_t)((op_mask & simm5) + (op_mask & vs2) + carry); +}) diff --git a/riscv-isa-sim/riscv/insns/vadd_vi.h b/riscv-isa-sim/riscv/insns/vadd_vi.h new file mode 100644 index 0000000..45fc6b7 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vadd_vi.h @@ -0,0 +1,5 @@ +// vadd.vi vd, simm5, vs2, vm +VI_VI_LOOP +({ + vd = simm5 + vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vadd_vv.h b/riscv-isa-sim/riscv/insns/vadd_vv.h new file mode 100644 index 0000000..45c6bdc --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vadd_vv.h @@ -0,0 +1,5 @@ +// vadd.vv vd, vs1, vs2, vm +VI_VV_LOOP +({ + vd = vs1 + vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vadd_vx.h b/riscv-isa-sim/riscv/insns/vadd_vx.h new file mode 100644 index 0000000..33e72ee --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vadd_vx.h @@ -0,0 +1,5 @@ +// vadd.vx vd, rs1, vs2, vm +VI_VX_LOOP +({ + vd = rs1 + vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vamoaddei16_v.h b/riscv-isa-sim/riscv/insns/vamoaddei16_v.h new file mode 100644 index 0000000..3cb3db7 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamoaddei16_v.h @@ -0,0 +1,2 @@ +//vamoadde.v vd, (rs1), vs2, vd +VI_AMO({ return lhs + vs3; }, uint, e16); diff --git a/riscv-isa-sim/riscv/insns/vamoaddei32_v.h b/riscv-isa-sim/riscv/insns/vamoaddei32_v.h new file mode 100644 index 0000000..2bd77fc --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamoaddei32_v.h @@ -0,0 +1,2 @@ +//vamoadde.v vd, (rs1), vs2, vd +VI_AMO({ return lhs + vs3; }, uint, e32); diff --git a/riscv-isa-sim/riscv/insns/vamoaddei64_v.h b/riscv-isa-sim/riscv/insns/vamoaddei64_v.h new file mode 100644 index 0000000..79ca748 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamoaddei64_v.h @@ -0,0 +1,2 @@ +//vamoadde.v vd, (rs1), vs2, vd +VI_AMO({ return lhs + vs3; }, uint, e64); diff --git a/riscv-isa-sim/riscv/insns/vamoaddei8_v.h b/riscv-isa-sim/riscv/insns/vamoaddei8_v.h new file mode 100644 index 0000000..06b8c79 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamoaddei8_v.h @@ -0,0 +1,2 @@ +//vamoadde.v vd, (rs1), vs2, vd +VI_AMO({ return lhs + vs3; }, uint, e8); diff --git a/riscv-isa-sim/riscv/insns/vamoandei16_v.h b/riscv-isa-sim/riscv/insns/vamoandei16_v.h new file mode 100644 index 0000000..be11949 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamoandei16_v.h @@ -0,0 +1,2 @@ +//vamoande.v vd, (rs1), vs2, vd +VI_AMO({ return lhs & vs3; }, uint, e16); diff --git a/riscv-isa-sim/riscv/insns/vamoandei32_v.h b/riscv-isa-sim/riscv/insns/vamoandei32_v.h new file mode 100644 index 0000000..7150670 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamoandei32_v.h @@ -0,0 +1,2 @@ +//vamoande.v vd, (rs1), vs2, vd +VI_AMO({ return lhs & vs3; }, uint, e32); diff --git a/riscv-isa-sim/riscv/insns/vamoandei64_v.h b/riscv-isa-sim/riscv/insns/vamoandei64_v.h new file mode 100644 index 0000000..3efae3b --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamoandei64_v.h @@ -0,0 +1,2 @@ +//vamoande.v vd, (rs1), vs2, vd +VI_AMO({ return lhs & vs3; }, uint, e64); diff --git a/riscv-isa-sim/riscv/insns/vamoandei8_v.h b/riscv-isa-sim/riscv/insns/vamoandei8_v.h new file mode 100644 index 0000000..c47645d --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamoandei8_v.h @@ -0,0 +1,2 @@ +//vamoande.v vd, (rs1), vs2, vd +VI_AMO({ return lhs & vs3; }, uint, e8); diff --git a/riscv-isa-sim/riscv/insns/vamomaxei16_v.h b/riscv-isa-sim/riscv/insns/vamomaxei16_v.h new file mode 100644 index 0000000..ca67893 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamomaxei16_v.h @@ -0,0 +1,2 @@ +//vamomaxe.v vd, (rs1), vs2, vd +VI_AMO({ return lhs >= vs3 ? lhs : vs3; }, int, e16); diff --git a/riscv-isa-sim/riscv/insns/vamomaxei32_v.h b/riscv-isa-sim/riscv/insns/vamomaxei32_v.h new file mode 100644 index 0000000..b6823cd --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamomaxei32_v.h @@ -0,0 +1,2 @@ +//vamomaxe.v vd, (rs1), vs2, vd +VI_AMO({ return lhs >= vs3 ? lhs : vs3; }, int, e32); diff --git a/riscv-isa-sim/riscv/insns/vamomaxei64_v.h b/riscv-isa-sim/riscv/insns/vamomaxei64_v.h new file mode 100644 index 0000000..46e8a3b --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamomaxei64_v.h @@ -0,0 +1,2 @@ +//vamomaxe.v vd, (rs1), vs2, vd +VI_AMO({ return lhs >= vs3 ? lhs : vs3; }, int, e64); diff --git a/riscv-isa-sim/riscv/insns/vamomaxei8_v.h b/riscv-isa-sim/riscv/insns/vamomaxei8_v.h new file mode 100644 index 0000000..9697b3a --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamomaxei8_v.h @@ -0,0 +1,2 @@ +//vamomaxe.v vd, (rs1), vs2, vd +VI_AMO({ return lhs >= vs3 ? lhs : vs3; }, int, e8); diff --git a/riscv-isa-sim/riscv/insns/vamomaxuei16_v.h b/riscv-isa-sim/riscv/insns/vamomaxuei16_v.h new file mode 100644 index 0000000..e05971d --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamomaxuei16_v.h @@ -0,0 +1,2 @@ +//vamomaxue.v vd, (rs1), vs2, vd +VI_AMO({ return lhs >= vs3 ? lhs : vs3;; }, uint, e16); diff --git a/riscv-isa-sim/riscv/insns/vamomaxuei32_v.h b/riscv-isa-sim/riscv/insns/vamomaxuei32_v.h new file mode 100644 index 0000000..9b87354 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamomaxuei32_v.h @@ -0,0 +1,2 @@ +//vamomaxue.v vd, (rs1), vs2, vd +VI_AMO({ return lhs >= vs3 ? lhs : vs3;; }, uint, e32); diff --git a/riscv-isa-sim/riscv/insns/vamomaxuei64_v.h b/riscv-isa-sim/riscv/insns/vamomaxuei64_v.h new file mode 100644 index 0000000..bbfbc9f --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamomaxuei64_v.h @@ -0,0 +1,2 @@ +//vamomaxue.v vd, (rs1), vs2, vd +VI_AMO({ return lhs >= vs3 ? lhs : vs3;; }, uint, e64); diff --git a/riscv-isa-sim/riscv/insns/vamomaxuei8_v.h b/riscv-isa-sim/riscv/insns/vamomaxuei8_v.h new file mode 100644 index 0000000..357ba24 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamomaxuei8_v.h @@ -0,0 +1,2 @@ +//vamomaxue.v vd, (rs1), vs2, vd +VI_AMO({ return lhs >= vs3 ? lhs : vs3;; }, uint, e8); diff --git a/riscv-isa-sim/riscv/insns/vamominei16_v.h b/riscv-isa-sim/riscv/insns/vamominei16_v.h new file mode 100644 index 0000000..9d1ecac --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamominei16_v.h @@ -0,0 +1,2 @@ +//vamomine.v vd, (rs1), vs2, vd +VI_AMO({ return lhs < vs3 ? lhs : vs3; }, int, e16); diff --git a/riscv-isa-sim/riscv/insns/vamominei32_v.h b/riscv-isa-sim/riscv/insns/vamominei32_v.h new file mode 100644 index 0000000..6cb8475 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamominei32_v.h @@ -0,0 +1,2 @@ +//vamomine.v vd, (rs1), vs2, vd +VI_AMO({ return lhs < vs3 ? lhs : vs3; }, int, e32); diff --git a/riscv-isa-sim/riscv/insns/vamominei64_v.h b/riscv-isa-sim/riscv/insns/vamominei64_v.h new file mode 100644 index 0000000..9ef3d4e --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamominei64_v.h @@ -0,0 +1,2 @@ +//vamomine.v vd, (rs1), vs2, vd +VI_AMO({ return lhs < vs3 ? lhs : vs3; }, int, e64); diff --git a/riscv-isa-sim/riscv/insns/vamominei8_v.h b/riscv-isa-sim/riscv/insns/vamominei8_v.h new file mode 100644 index 0000000..5c035ea --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamominei8_v.h @@ -0,0 +1,2 @@ +//vamomine.v vd, (rs1), vs2, vd +VI_AMO({ return lhs < vs3 ? lhs : vs3; }, int, e8); diff --git a/riscv-isa-sim/riscv/insns/vamominuei16_v.h b/riscv-isa-sim/riscv/insns/vamominuei16_v.h new file mode 100644 index 0000000..d4a8f89 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamominuei16_v.h @@ -0,0 +1,2 @@ +//vamominue.v vd, (rs1), vs2, vd +VI_AMO({ return lhs < vs3 ? lhs : vs3;; }, uint, e16); diff --git a/riscv-isa-sim/riscv/insns/vamominuei32_v.h b/riscv-isa-sim/riscv/insns/vamominuei32_v.h new file mode 100644 index 0000000..16296c5 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamominuei32_v.h @@ -0,0 +1,2 @@ +//vamominue.v vd, (rs1), vs2, vd +VI_AMO({ return lhs < vs3 ? lhs : vs3;; }, uint, e32); diff --git a/riscv-isa-sim/riscv/insns/vamominuei64_v.h b/riscv-isa-sim/riscv/insns/vamominuei64_v.h new file mode 100644 index 0000000..fd850fd --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamominuei64_v.h @@ -0,0 +1,2 @@ +//vamominue.v vd, (rs1), vs2, vd +VI_AMO({ return lhs < vs3 ? lhs : vs3;; }, uint, e64); diff --git a/riscv-isa-sim/riscv/insns/vamominuei8_v.h b/riscv-isa-sim/riscv/insns/vamominuei8_v.h new file mode 100644 index 0000000..3749d05 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamominuei8_v.h @@ -0,0 +1,2 @@ +//vamominue.v vd, (rs1), vs2, vd +VI_AMO({ return lhs < vs3 ? lhs : vs3;; }, uint, e8); diff --git a/riscv-isa-sim/riscv/insns/vamoorei16_v.h b/riscv-isa-sim/riscv/insns/vamoorei16_v.h new file mode 100644 index 0000000..a5ba1ca --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamoorei16_v.h @@ -0,0 +1,2 @@ +//vamoore.v vd, (rs1), vs2, vd +VI_AMO({ return lhs | vs3; }, uint, e16); diff --git a/riscv-isa-sim/riscv/insns/vamoorei32_v.h b/riscv-isa-sim/riscv/insns/vamoorei32_v.h new file mode 100644 index 0000000..94e4458 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamoorei32_v.h @@ -0,0 +1,2 @@ +//vamoore.v vd, (rs1), vs2, vd +VI_AMO({ return lhs | vs3; }, uint, e32); diff --git a/riscv-isa-sim/riscv/insns/vamoorei64_v.h b/riscv-isa-sim/riscv/insns/vamoorei64_v.h new file mode 100644 index 0000000..84e0394 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamoorei64_v.h @@ -0,0 +1,2 @@ +//vamoore.v vd, (rs1), vs2, vd +VI_AMO({ return lhs | vs3; }, uint, e64); diff --git a/riscv-isa-sim/riscv/insns/vamoorei8_v.h b/riscv-isa-sim/riscv/insns/vamoorei8_v.h new file mode 100644 index 0000000..364035d --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamoorei8_v.h @@ -0,0 +1,2 @@ +//vamoore.v vd, (rs1), vs2, vd +VI_AMO({ return lhs | vs3; }, uint, e8); diff --git a/riscv-isa-sim/riscv/insns/vamoswapei16_v.h b/riscv-isa-sim/riscv/insns/vamoswapei16_v.h new file mode 100644 index 0000000..31ff021 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamoswapei16_v.h @@ -0,0 +1,2 @@ +//vamoswape.v vd, (rs1), vs2, vd +VI_AMO({ return vs3; }, uint, e16); diff --git a/riscv-isa-sim/riscv/insns/vamoswapei32_v.h b/riscv-isa-sim/riscv/insns/vamoswapei32_v.h new file mode 100644 index 0000000..a574192 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamoswapei32_v.h @@ -0,0 +1,2 @@ +//vamoswape.v vd, (rs1), vs2, vd +VI_AMO({ return vs3; }, uint, e32); diff --git a/riscv-isa-sim/riscv/insns/vamoswapei64_v.h b/riscv-isa-sim/riscv/insns/vamoswapei64_v.h new file mode 100644 index 0000000..58bd035 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamoswapei64_v.h @@ -0,0 +1,2 @@ +//vamoswape.v vd, (rs1), vs2, vd +VI_AMO({ return vs3; }, uint, e64); diff --git a/riscv-isa-sim/riscv/insns/vamoswapei8_v.h b/riscv-isa-sim/riscv/insns/vamoswapei8_v.h new file mode 100644 index 0000000..af37c8c --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamoswapei8_v.h @@ -0,0 +1,2 @@ +//vamoswape.v vd, (rs1), vs2, vd +VI_AMO({ return vs3; }, uint, e8); diff --git a/riscv-isa-sim/riscv/insns/vamoxorei16_v.h b/riscv-isa-sim/riscv/insns/vamoxorei16_v.h new file mode 100644 index 0000000..61e8c32 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamoxorei16_v.h @@ -0,0 +1,2 @@ +//vamoore.v vd, (rs1), vs2, vd +VI_AMO({ return lhs ^ vs3; }, uint, e16); diff --git a/riscv-isa-sim/riscv/insns/vamoxorei32_v.h b/riscv-isa-sim/riscv/insns/vamoxorei32_v.h new file mode 100644 index 0000000..d48d951 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamoxorei32_v.h @@ -0,0 +1,2 @@ +//vamoore.v vd, (rs1), vs2, vd +VI_AMO({ return lhs ^ vs3; }, uint, e32); diff --git a/riscv-isa-sim/riscv/insns/vamoxorei64_v.h b/riscv-isa-sim/riscv/insns/vamoxorei64_v.h new file mode 100644 index 0000000..f7a3ca4 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamoxorei64_v.h @@ -0,0 +1,2 @@ +//vamoore.v vd, (rs1), vs2, vd +VI_AMO({ return lhs ^ vs3; }, uint, e64); diff --git a/riscv-isa-sim/riscv/insns/vamoxorei8_v.h b/riscv-isa-sim/riscv/insns/vamoxorei8_v.h new file mode 100644 index 0000000..4b6c798 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vamoxorei8_v.h @@ -0,0 +1,2 @@ +//vamoore.v vd, (rs1), vs2, vd +VI_AMO({ return lhs ^ vs3; }, uint, e8); diff --git a/riscv-isa-sim/riscv/insns/vand_vi.h b/riscv-isa-sim/riscv/insns/vand_vi.h new file mode 100644 index 0000000..dd9618b --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vand_vi.h @@ -0,0 +1,5 @@ +// vand.vi vd, simm5, vs2, vm +VI_VI_LOOP +({ + vd = simm5 & vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vand_vv.h b/riscv-isa-sim/riscv/insns/vand_vv.h new file mode 100644 index 0000000..65558e4 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vand_vv.h @@ -0,0 +1,5 @@ +// vand.vv vd, vs1, vs2, vm +VI_VV_LOOP +({ + vd = vs1 & vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vand_vx.h b/riscv-isa-sim/riscv/insns/vand_vx.h new file mode 100644 index 0000000..8eea1ed --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vand_vx.h @@ -0,0 +1,5 @@ +// vand.vx vd, rs1, vs2, vm +VI_VX_LOOP +({ + vd = rs1 & vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vasub_vv.h b/riscv-isa-sim/riscv/insns/vasub_vv.h new file mode 100644 index 0000000..7dfbdfc --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vasub_vv.h @@ -0,0 +1,2 @@ +// vasub.vv vd, vs2, vs1 +VI_VV_LOOP_AVG(-); diff --git a/riscv-isa-sim/riscv/insns/vasub_vx.h b/riscv-isa-sim/riscv/insns/vasub_vx.h new file mode 100644 index 0000000..185fa9c --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vasub_vx.h @@ -0,0 +1,2 @@ +// vasub.vx vd, vs2, rs1 +VI_VX_LOOP_AVG(-); diff --git a/riscv-isa-sim/riscv/insns/vasubu_vv.h b/riscv-isa-sim/riscv/insns/vasubu_vv.h new file mode 100644 index 0000000..902fef9 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vasubu_vv.h @@ -0,0 +1,2 @@ +// vasubu.vv vd, vs2, vs1 +VI_VV_ULOOP_AVG(-); diff --git a/riscv-isa-sim/riscv/insns/vasubu_vx.h b/riscv-isa-sim/riscv/insns/vasubu_vx.h new file mode 100644 index 0000000..874dc59 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vasubu_vx.h @@ -0,0 +1,2 @@ +// vasubu.vx vd, vs2, rs1 +VI_VX_ULOOP_AVG(-); diff --git a/riscv-isa-sim/riscv/insns/vcompress_vm.h b/riscv-isa-sim/riscv/insns/vcompress_vm.h new file mode 100644 index 0000000..7195345 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vcompress_vm.h @@ -0,0 +1,33 @@ +// vcompress vd, vs2, vs1 +require(P.VU.vstart->read() == 0); +require_align(insn.rd(), P.VU.vflmul); +require_align(insn.rs2(), P.VU.vflmul); +require(insn.rd() != insn.rs2()); +require_noover(insn.rd(), P.VU.vflmul, insn.rs1(), 1); + +reg_t pos = 0; + +VI_GENERAL_LOOP_BASE + const int midx = i / 64; + const int mpos = i % 64; + + bool do_mask = (P.VU.elt(rs1_num, midx) >> mpos) & 0x1; + if (do_mask) { + switch (sew) { + case e8: + P.VU.elt(rd_num, pos, true) = P.VU.elt(rs2_num, i); + break; + case e16: + P.VU.elt(rd_num, pos, true) = P.VU.elt(rs2_num, i); + break; + case e32: + P.VU.elt(rd_num, pos, true) = P.VU.elt(rs2_num, i); + break; + default: + P.VU.elt(rd_num, pos, true) = P.VU.elt(rs2_num, i); + break; + } + + ++pos; + } +VI_LOOP_END; diff --git a/riscv-isa-sim/riscv/insns/vdiv_vv.h b/riscv-isa-sim/riscv/insns/vdiv_vv.h new file mode 100644 index 0000000..0d4bd0d --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vdiv_vv.h @@ -0,0 +1,10 @@ +// vdiv.vv vd, vs2, vs1 +VI_VV_LOOP +({ + if (vs1 == 0) + vd = -1; + else if (vs2 == (INT64_MIN >> (64 - sew)) && vs1 == -1) + vd = vs2; + else + vd = vs2 / vs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vdiv_vx.h b/riscv-isa-sim/riscv/insns/vdiv_vx.h new file mode 100644 index 0000000..4052952 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vdiv_vx.h @@ -0,0 +1,10 @@ +// vdiv.vx vd, vs2, rs1 +VI_VX_LOOP +({ + if(rs1 == 0) + vd = -1; + else if(vs2 == (INT64_MIN >> (64 - sew)) && rs1 == -1) + vd = vs2; + else + vd = vs2 / rs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vdivu_vv.h b/riscv-isa-sim/riscv/insns/vdivu_vv.h new file mode 100644 index 0000000..ef6e777 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vdivu_vv.h @@ -0,0 +1,8 @@ +// vdivu.vv vd, vs2, vs1 +VI_VV_ULOOP +({ + if(vs1 == 0) + vd = -1; + else + vd = vs2 / vs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vdivu_vx.h b/riscv-isa-sim/riscv/insns/vdivu_vx.h new file mode 100644 index 0000000..7ffe1c6 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vdivu_vx.h @@ -0,0 +1,8 @@ +// vdivu.vx vd, vs2, rs1 +VI_VX_ULOOP +({ + if(rs1 == 0) + vd = -1; + else + vd = vs2 / rs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vfadd_vf.h b/riscv-isa-sim/riscv/insns/vfadd_vf.h new file mode 100644 index 0000000..2b808e0 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfadd_vf.h @@ -0,0 +1,11 @@ +// vfadd.vf vd, vs2, rs1 +VI_VFP_VF_LOOP +({ + vd = f16_add(rs1, vs2); +}, +{ + vd = f32_add(rs1, vs2); +}, +{ + vd = f64_add(rs1, vs2); +}) diff --git a/riscv-isa-sim/riscv/insns/vfadd_vv.h b/riscv-isa-sim/riscv/insns/vfadd_vv.h new file mode 100644 index 0000000..ce94921 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfadd_vv.h @@ -0,0 +1,11 @@ +// vfadd.vv vd, vs2, vs1 +VI_VFP_VV_LOOP +({ + vd = f16_add(vs1, vs2); +}, +{ + vd = f32_add(vs1, vs2); +}, +{ + vd = f64_add(vs1, vs2); +}) diff --git a/riscv-isa-sim/riscv/insns/vfclass_v.h b/riscv-isa-sim/riscv/insns/vfclass_v.h new file mode 100644 index 0000000..a307d2d --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfclass_v.h @@ -0,0 +1,11 @@ +// vfclass.v vd, vs2, vm +VI_VFP_V_LOOP +({ + vd = f16(f16_classify(vs2)); +}, +{ + vd = f32(f32_classify(vs2)); +}, +{ + vd = f64(f64_classify(vs2)); +}) diff --git a/riscv-isa-sim/riscv/insns/vfcvt_f_x_v.h b/riscv-isa-sim/riscv/insns/vfcvt_f_x_v.h new file mode 100644 index 0000000..d094c14 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfcvt_f_x_v.h @@ -0,0 +1,7 @@ +// vfcvt.f.x.v vd, vd2, vm +VI_VFP_CVT_INT_TO_FP( + { vd = i32_to_f16(vs2); }, // BODY16 + { vd = i32_to_f32(vs2); }, // BODY32 + { vd = i64_to_f64(vs2); }, // BODY64 + int // sign +) diff --git a/riscv-isa-sim/riscv/insns/vfcvt_f_xu_v.h b/riscv-isa-sim/riscv/insns/vfcvt_f_xu_v.h new file mode 100644 index 0000000..64dbb1c --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfcvt_f_xu_v.h @@ -0,0 +1,7 @@ +// vfcvt.f.xu.v vd, vd2, vm +VI_VFP_CVT_INT_TO_FP( + { vd = ui32_to_f16(vs2); }, // BODY16 + { vd = ui32_to_f32(vs2); }, // BODY32 + { vd = ui64_to_f64(vs2); }, // BODY64 + uint // sign +) diff --git a/riscv-isa-sim/riscv/insns/vfcvt_rtz_x_f_v.h b/riscv-isa-sim/riscv/insns/vfcvt_rtz_x_f_v.h new file mode 100644 index 0000000..ecdfa22 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfcvt_rtz_x_f_v.h @@ -0,0 +1,7 @@ +// vfcvt.rtz.x.f.v vd, vd2, vm +VI_VFP_CVT_FP_TO_INT( + { vd = f16_to_i16(vs2, softfloat_round_minMag, true); }, // BODY16 + { vd = f32_to_i32(vs2, softfloat_round_minMag, true); }, // BODY32 + { vd = f64_to_i64(vs2, softfloat_round_minMag, true); }, // BODY64 + int // sign +) diff --git a/riscv-isa-sim/riscv/insns/vfcvt_rtz_xu_f_v.h b/riscv-isa-sim/riscv/insns/vfcvt_rtz_xu_f_v.h new file mode 100644 index 0000000..87585d2 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfcvt_rtz_xu_f_v.h @@ -0,0 +1,7 @@ +// vfcvt.rtz.xu.f.v vd, vd2, vm +VI_VFP_CVT_FP_TO_INT( + { vd = f16_to_ui16(vs2, softfloat_round_minMag, true); }, // BODY16 + { vd = f32_to_ui32(vs2, softfloat_round_minMag, true); }, // BODY32 + { vd = f64_to_ui64(vs2, softfloat_round_minMag, true); }, // BODY64 + uint // sign +) diff --git a/riscv-isa-sim/riscv/insns/vfcvt_x_f_v.h b/riscv-isa-sim/riscv/insns/vfcvt_x_f_v.h new file mode 100644 index 0000000..4f21b52 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfcvt_x_f_v.h @@ -0,0 +1,7 @@ +// vfcvt.x.f.v vd, vd2, vm +VI_VFP_CVT_FP_TO_INT( + { vd = f16_to_i16(vs2, softfloat_roundingMode, true); }, // BODY16 + { vd = f32_to_i32(vs2, softfloat_roundingMode, true); }, // BODY32 + { vd = f64_to_i64(vs2, softfloat_roundingMode, true); }, // BODY64 + int // sign +) diff --git a/riscv-isa-sim/riscv/insns/vfcvt_xu_f_v.h b/riscv-isa-sim/riscv/insns/vfcvt_xu_f_v.h new file mode 100644 index 0000000..ba50fff --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfcvt_xu_f_v.h @@ -0,0 +1,7 @@ +// vfcvt.xu.f.v vd, vd2, vm +VI_VFP_CVT_FP_TO_INT( + { vd = f16_to_ui16(vs2, softfloat_roundingMode, true); }, // BODY16 + { vd = f32_to_ui32(vs2, softfloat_roundingMode, true); }, // BODY32 + { vd = f64_to_ui64(vs2, softfloat_roundingMode, true); }, // BODY64 + uint // sign +) diff --git a/riscv-isa-sim/riscv/insns/vfdiv_vf.h b/riscv-isa-sim/riscv/insns/vfdiv_vf.h new file mode 100644 index 0000000..a703ef0 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfdiv_vf.h @@ -0,0 +1,11 @@ +// vfdiv.vf vd, vs2, rs1 +VI_VFP_VF_LOOP +({ + vd = f16_div(vs2, rs1); +}, +{ + vd = f32_div(vs2, rs1); +}, +{ + vd = f64_div(vs2, rs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vfdiv_vv.h b/riscv-isa-sim/riscv/insns/vfdiv_vv.h new file mode 100644 index 0000000..c66d751 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfdiv_vv.h @@ -0,0 +1,11 @@ +// vfdiv.vv vd, vs2, vs1 +VI_VFP_VV_LOOP +({ + vd = f16_div(vs2, vs1); +}, +{ + vd = f32_div(vs2, vs1); +}, +{ + vd = f64_div(vs2, vs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vfmacc_vf.h b/riscv-isa-sim/riscv/insns/vfmacc_vf.h new file mode 100644 index 0000000..61578d3 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfmacc_vf.h @@ -0,0 +1,11 @@ +// vfmacc.vf vd, rs1, vs2, vm # vd[i] = +(vs2[i] * x[rs1]) + vd[i] +VI_VFP_VF_LOOP +({ + vd = f16_mulAdd(rs1, vs2, vd); +}, +{ + vd = f32_mulAdd(rs1, vs2, vd); +}, +{ + vd = f64_mulAdd(rs1, vs2, vd); +}) diff --git a/riscv-isa-sim/riscv/insns/vfmacc_vv.h b/riscv-isa-sim/riscv/insns/vfmacc_vv.h new file mode 100644 index 0000000..499b1d4 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfmacc_vv.h @@ -0,0 +1,11 @@ +// vfmacc.vv vd, rs1, vs2, vm # vd[i] = +(vs2[i] * vs1[i]) + vd[i] +VI_VFP_VV_LOOP +({ + vd = f16_mulAdd(vs1, vs2, vd); +}, +{ + vd = f32_mulAdd(vs1, vs2, vd); +}, +{ + vd = f64_mulAdd(vs1, vs2, vd); +}) diff --git a/riscv-isa-sim/riscv/insns/vfmadd_vf.h b/riscv-isa-sim/riscv/insns/vfmadd_vf.h new file mode 100644 index 0000000..2a01429 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfmadd_vf.h @@ -0,0 +1,11 @@ +// vfmadd: vd[i] = +(vd[i] * f[rs1]) + vs2[i] +VI_VFP_VF_LOOP +({ + vd = f16_mulAdd(vd, rs1, vs2); +}, +{ + vd = f32_mulAdd(vd, rs1, vs2); +}, +{ + vd = f64_mulAdd(vd, rs1, vs2); +}) diff --git a/riscv-isa-sim/riscv/insns/vfmadd_vv.h b/riscv-isa-sim/riscv/insns/vfmadd_vv.h new file mode 100644 index 0000000..7ef734f --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfmadd_vv.h @@ -0,0 +1,11 @@ +// vfmadd: vd[i] = +(vd[i] * vs1[i]) + vs2[i] +VI_VFP_VV_LOOP +({ + vd = f16_mulAdd(vd, vs1, vs2); +}, +{ + vd = f32_mulAdd(vd, vs1, vs2); +}, +{ + vd = f64_mulAdd(vd, vs1, vs2); +}) diff --git a/riscv-isa-sim/riscv/insns/vfmax_vf.h b/riscv-isa-sim/riscv/insns/vfmax_vf.h new file mode 100644 index 0000000..c4b74cb --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfmax_vf.h @@ -0,0 +1,11 @@ +// vfmax +VI_VFP_VF_LOOP +({ + vd = f16_max(vs2, rs1); +}, +{ + vd = f32_max(vs2, rs1); +}, +{ + vd = f64_max(vs2, rs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vfmax_vv.h b/riscv-isa-sim/riscv/insns/vfmax_vv.h new file mode 100644 index 0000000..6439c89 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfmax_vv.h @@ -0,0 +1,11 @@ +// vfmax +VI_VFP_VV_LOOP +({ + vd = f16_max(vs2, vs1); +}, +{ + vd = f32_max(vs2, vs1); +}, +{ + vd = f64_max(vs2, vs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vfmerge_vfm.h b/riscv-isa-sim/riscv/insns/vfmerge_vfm.h new file mode 100644 index 0000000..d82dfef --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfmerge_vfm.h @@ -0,0 +1,4 @@ +// vfmerge_vf vd, vs2, vs1, vm +VI_VF_MERGE_LOOP({ + vd = use_first ? rs1 : vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vfmin_vf.h b/riscv-isa-sim/riscv/insns/vfmin_vf.h new file mode 100644 index 0000000..1560cdf --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfmin_vf.h @@ -0,0 +1,11 @@ +// vfmin vd, vs2, rs1 +VI_VFP_VF_LOOP +({ + vd = f16_min(vs2, rs1); +}, +{ + vd = f32_min(vs2, rs1); +}, +{ + vd = f64_min(vs2, rs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vfmin_vv.h b/riscv-isa-sim/riscv/insns/vfmin_vv.h new file mode 100644 index 0000000..882a774 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfmin_vv.h @@ -0,0 +1,11 @@ +// vfmin vd, vs2, vs1 +VI_VFP_VV_LOOP +({ + vd = f16_min(vs2, vs1); +}, +{ + vd = f32_min(vs2, vs1); +}, +{ + vd = f64_min(vs2, vs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vfmsac_vf.h b/riscv-isa-sim/riscv/insns/vfmsac_vf.h new file mode 100644 index 0000000..8af397b --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfmsac_vf.h @@ -0,0 +1,11 @@ +// vfmsac: vd[i] = +(f[rs1] * vs2[i]) - vd[i] +VI_VFP_VF_LOOP +({ + vd = f16_mulAdd(rs1, vs2, f16(vd.v ^ F16_SIGN)); +}, +{ + vd = f32_mulAdd(rs1, vs2, f32(vd.v ^ F32_SIGN)); +}, +{ + vd = f64_mulAdd(rs1, vs2, f64(vd.v ^ F64_SIGN)); +}) diff --git a/riscv-isa-sim/riscv/insns/vfmsac_vv.h b/riscv-isa-sim/riscv/insns/vfmsac_vv.h new file mode 100644 index 0000000..3bb50e5 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfmsac_vv.h @@ -0,0 +1,11 @@ +// vfmsac: vd[i] = +(vs1[i] * vs2[i]) - vd[i] +VI_VFP_VV_LOOP +({ + vd = f16_mulAdd(vs1, vs2, f16(vd.v ^ F16_SIGN)); +}, +{ + vd = f32_mulAdd(vs1, vs2, f32(vd.v ^ F32_SIGN)); +}, +{ + vd = f64_mulAdd(vs1, vs2, f64(vd.v ^ F64_SIGN)); +}) diff --git a/riscv-isa-sim/riscv/insns/vfmsub_vf.h b/riscv-isa-sim/riscv/insns/vfmsub_vf.h new file mode 100644 index 0000000..ab77b4c --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfmsub_vf.h @@ -0,0 +1,11 @@ +// vfmsub: vd[i] = +(vd[i] * f[rs1]) - vs2[i] +VI_VFP_VF_LOOP +({ + vd = f16_mulAdd(vd, rs1, f16(vs2.v ^ F16_SIGN)); +}, +{ + vd = f32_mulAdd(vd, rs1, f32(vs2.v ^ F32_SIGN)); +}, +{ + vd = f64_mulAdd(vd, rs1, f64(vs2.v ^ F64_SIGN)); +}) diff --git a/riscv-isa-sim/riscv/insns/vfmsub_vv.h b/riscv-isa-sim/riscv/insns/vfmsub_vv.h new file mode 100644 index 0000000..3cac937 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfmsub_vv.h @@ -0,0 +1,11 @@ +// vfmsub: vd[i] = +(vd[i] * vs1[i]) - vs2[i] +VI_VFP_VV_LOOP +({ + vd = f16_mulAdd(vd, vs1, f16(vs2.v ^ F16_SIGN)); +}, +{ + vd = f32_mulAdd(vd, vs1, f32(vs2.v ^ F32_SIGN)); +}, +{ + vd = f64_mulAdd(vd, vs1, f64(vs2.v ^ F64_SIGN)); +}) diff --git a/riscv-isa-sim/riscv/insns/vfmul_vf.h b/riscv-isa-sim/riscv/insns/vfmul_vf.h new file mode 100644 index 0000000..f5f63e4 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfmul_vf.h @@ -0,0 +1,11 @@ +// vfmul.vf vd, vs2, rs1, vm +VI_VFP_VF_LOOP +({ + vd = f16_mul(vs2, rs1); +}, +{ + vd = f32_mul(vs2, rs1); +}, +{ + vd = f64_mul(vs2, rs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vfmul_vv.h b/riscv-isa-sim/riscv/insns/vfmul_vv.h new file mode 100644 index 0000000..7930fd0 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfmul_vv.h @@ -0,0 +1,11 @@ +// vfmul.vv vd, vs1, vs2, vm +VI_VFP_VV_LOOP +({ + vd = f16_mul(vs1, vs2); +}, +{ + vd = f32_mul(vs1, vs2); +}, +{ + vd = f64_mul(vs1, vs2); +}) diff --git a/riscv-isa-sim/riscv/insns/vfmv_f_s.h b/riscv-isa-sim/riscv/insns/vfmv_f_s.h new file mode 100644 index 0000000..81605ea --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfmv_f_s.h @@ -0,0 +1,38 @@ +// vfmv_f_s: rd = vs2[0] (rs1=0) +require_vector(true); +require_fp; +require((P.VU.vsew == e16 && p->extension_enabled(EXT_ZFH)) || + (P.VU.vsew == e32 && p->extension_enabled('F')) || + (P.VU.vsew == e64 && p->extension_enabled('D'))); +require(STATE.frm->read() < 0x5); + +reg_t rs2_num = insn.rs2(); +uint64_t vs2_0 = 0; +const reg_t sew = P.VU.vsew; +switch(sew) { + case e16: + vs2_0 = P.VU.elt(rs2_num, 0); + break; + case e32: + vs2_0 = P.VU.elt(rs2_num, 0); + break; + case e64: + vs2_0 = P.VU.elt(rs2_num, 0); + break; + default: + require(0); + break; +} + +// nan_extened +if (FLEN > sew) { + vs2_0 = vs2_0 | (UINT64_MAX << sew); +} + +if (FLEN == 64) { + WRITE_FRD(f64(vs2_0)); +} else { + WRITE_FRD(f32(vs2_0)); +} + +P.VU.vstart->write(0); diff --git a/riscv-isa-sim/riscv/insns/vfmv_s_f.h b/riscv-isa-sim/riscv/insns/vfmv_s_f.h new file mode 100644 index 0000000..edc376e --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfmv_s_f.h @@ -0,0 +1,29 @@ +// vfmv_s_f: vd[0] = rs1 (vs2=0) +require_vector(true); +require_fp; +require((P.VU.vsew == e16 && p->extension_enabled(EXT_ZFH)) || + (P.VU.vsew == e32 && p->extension_enabled('F')) || + (P.VU.vsew == e64 && p->extension_enabled('D'))); +require(STATE.frm->read() < 0x5); + +reg_t vl = P.VU.vl->read(); + +if (vl > 0 && P.VU.vstart->read() < vl) { + reg_t rd_num = insn.rd(); + + switch(P.VU.vsew) { + case e16: + P.VU.elt(rd_num, 0, true) = f16(FRS1).v; + break; + case e32: + P.VU.elt(rd_num, 0, true) = f32(FRS1).v; + break; + case e64: + if (FLEN == 64) + P.VU.elt(rd_num, 0, true) = f64(FRS1).v; + else + P.VU.elt(rd_num, 0, true) = f32(FRS1).v; + break; + } +} +P.VU.vstart->write(0); diff --git a/riscv-isa-sim/riscv/insns/vfmv_v_f.h b/riscv-isa-sim/riscv/insns/vfmv_v_f.h new file mode 100644 index 0000000..50b7513 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfmv_v_f.h @@ -0,0 +1,4 @@ +// vfmv_vf vd, vs1 +VI_VF_MERGE_LOOP({ + vd = rs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vfncvt_f_f_w.h b/riscv-isa-sim/riscv/insns/vfncvt_f_f_w.h new file mode 100644 index 0000000..f4996f5 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfncvt_f_f_w.h @@ -0,0 +1,9 @@ +// vfncvt.f.f.v vd, vs2, vm +VI_VFP_NCVT_FP_TO_FP( + {;}, // BODY16 + { vd = f32_to_f16(vs2); }, // BODY32 + { vd = f64_to_f32(vs2); }, // BODY64 + {;}, // CHECK16 + { require_extension(EXT_ZFH); }, // CHECK32 + { require_extension('D'); } // CHECK64 +) diff --git a/riscv-isa-sim/riscv/insns/vfncvt_f_x_w.h b/riscv-isa-sim/riscv/insns/vfncvt_f_x_w.h new file mode 100644 index 0000000..d587be2 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfncvt_f_x_w.h @@ -0,0 +1,10 @@ +// vfncvt.f.x.v vd, vs2, vm +VI_VFP_NCVT_INT_TO_FP( + {;}, // BODY16 + { vd = i32_to_f16(vs2); }, // BODY32 + { vd = i64_to_f32(vs2); }, // BODY64 + {;}, // CHECK16 + { require_extension(EXT_ZFH); }, // CHECK32 + { require_extension('F'); }, // CHECK64 + int // sign +) diff --git a/riscv-isa-sim/riscv/insns/vfncvt_f_xu_w.h b/riscv-isa-sim/riscv/insns/vfncvt_f_xu_w.h new file mode 100644 index 0000000..5e0e34f --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfncvt_f_xu_w.h @@ -0,0 +1,10 @@ +// vfncvt.f.xu.v vd, vs2, vm +VI_VFP_NCVT_INT_TO_FP( + {;}, // BODY16 + { vd = ui32_to_f16(vs2); }, // BODY32 + { vd = ui64_to_f32(vs2); }, // BODY64 + {;}, // CHECK16 + { require_extension(EXT_ZFH); }, // CHECK32 + { require_extension('F'); }, // CHECK64 + uint // sign +) diff --git a/riscv-isa-sim/riscv/insns/vfncvt_rod_f_f_w.h b/riscv-isa-sim/riscv/insns/vfncvt_rod_f_f_w.h new file mode 100644 index 0000000..89bdc05 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfncvt_rod_f_f_w.h @@ -0,0 +1,15 @@ +// vfncvt.rod.f.f.v vd, vs2, vm +VI_VFP_NCVT_FP_TO_FP( + {;}, // BODY16 + { // BODY32 + softfloat_roundingMode = softfloat_round_odd; + vd = f32_to_f16(vs2); + }, + { // BODY64 + softfloat_roundingMode = softfloat_round_odd; + vd = f64_to_f32(vs2); + }, + {;}, // CHECK16 + { require_extension(EXT_ZFH); }, // CHECK32 + { require_extension('F'); } // CHECK64 +) diff --git a/riscv-isa-sim/riscv/insns/vfncvt_rtz_x_f_w.h b/riscv-isa-sim/riscv/insns/vfncvt_rtz_x_f_w.h new file mode 100644 index 0000000..23b4d5e --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfncvt_rtz_x_f_w.h @@ -0,0 +1,10 @@ +// vfncvt.rtz.x.f.w vd, vs2, vm +VI_VFP_NCVT_FP_TO_INT( + { vd = f16_to_i8(vs2, softfloat_round_minMag, true); }, // BODY16 + { vd = f32_to_i16(vs2, softfloat_round_minMag, true); }, // BODY32 + { vd = f64_to_i32(vs2, softfloat_round_minMag, true); }, // BODY64 + { require_extension(EXT_ZFH); }, // CHECK16 + { require(p->extension_enabled('F')); }, // CHECK32 + { require(p->extension_enabled('D')); }, // CHECK64 + int // sign +) diff --git a/riscv-isa-sim/riscv/insns/vfncvt_rtz_xu_f_w.h b/riscv-isa-sim/riscv/insns/vfncvt_rtz_xu_f_w.h new file mode 100644 index 0000000..f55c680 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfncvt_rtz_xu_f_w.h @@ -0,0 +1,10 @@ +// vfncvt.rtz.xu.f.w vd, vs2, vm +VI_VFP_NCVT_FP_TO_INT( + { vd = f16_to_ui8(vs2, softfloat_round_minMag, true); }, // BODY16 + { vd = f32_to_ui16(vs2, softfloat_round_minMag, true); }, // BODY32 + { vd = f64_to_ui32(vs2, softfloat_round_minMag, true); }, // BODY64 + { require_extension(EXT_ZFH); }, // CHECK16 + { require(p->extension_enabled('F')); }, // CHECK32 + { require(p->extension_enabled('D')); }, // CHECK64 + uint // sign +) diff --git a/riscv-isa-sim/riscv/insns/vfncvt_x_f_w.h b/riscv-isa-sim/riscv/insns/vfncvt_x_f_w.h new file mode 100644 index 0000000..a7f3c33 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfncvt_x_f_w.h @@ -0,0 +1,10 @@ +// vfncvt.x.f.w vd, vs2, vm +VI_VFP_NCVT_FP_TO_INT( + { vd = f16_to_i8(vs2, softfloat_roundingMode, true); }, // BODY16 + { vd = f32_to_i16(vs2, softfloat_roundingMode, true); }, // BODY32 + { vd = f64_to_i32(vs2, softfloat_roundingMode, true); }, // BODY64 + { require_extension(EXT_ZFH); }, // CHECK16 + { require(p->extension_enabled('F')); }, // CHECK32 + { require(p->extension_enabled('D')); }, // CHECK64 + int // sign +) diff --git a/riscv-isa-sim/riscv/insns/vfncvt_xu_f_w.h b/riscv-isa-sim/riscv/insns/vfncvt_xu_f_w.h new file mode 100644 index 0000000..02046e8 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfncvt_xu_f_w.h @@ -0,0 +1,10 @@ +// vfncvt.xu.f.w vd, vs2, vm +VI_VFP_NCVT_FP_TO_INT( + { vd = f16_to_ui8(vs2, softfloat_roundingMode, true); }, // BODY16 + { vd = f32_to_ui16(vs2, softfloat_roundingMode, true); }, // BODY32 + { vd = f64_to_ui32(vs2, softfloat_roundingMode, true); }, // BODY64 + { require_extension(EXT_ZFH); }, // CHECK16 + { require(p->extension_enabled('F')); }, // CHECK32 + { require(p->extension_enabled('D')); }, // CHECK64 + uint // sign +) diff --git a/riscv-isa-sim/riscv/insns/vfnmacc_vf.h b/riscv-isa-sim/riscv/insns/vfnmacc_vf.h new file mode 100644 index 0000000..1b99302 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfnmacc_vf.h @@ -0,0 +1,11 @@ +// vfnmacc: vd[i] = -(f[rs1] * vs2[i]) - vd[i] +VI_VFP_VF_LOOP +({ + vd = f16_mulAdd(rs1, f16(vs2.v ^ F16_SIGN), f16(vd.v ^ F16_SIGN)); +}, +{ + vd = f32_mulAdd(rs1, f32(vs2.v ^ F32_SIGN), f32(vd.v ^ F32_SIGN)); +}, +{ + vd = f64_mulAdd(rs1, f64(vs2.v ^ F64_SIGN), f64(vd.v ^ F64_SIGN)); +}) diff --git a/riscv-isa-sim/riscv/insns/vfnmacc_vv.h b/riscv-isa-sim/riscv/insns/vfnmacc_vv.h new file mode 100644 index 0000000..7200e06 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfnmacc_vv.h @@ -0,0 +1,11 @@ +// vfnmacc: vd[i] = -(vs1[i] * vs2[i]) - vd[i] +VI_VFP_VV_LOOP +({ + vd = f16_mulAdd(f16(vs2.v ^ F16_SIGN), vs1, f16(vd.v ^ F16_SIGN)); +}, +{ + vd = f32_mulAdd(f32(vs2.v ^ F32_SIGN), vs1, f32(vd.v ^ F32_SIGN)); +}, +{ + vd = f64_mulAdd(f64(vs2.v ^ F64_SIGN), vs1, f64(vd.v ^ F64_SIGN)); +}) diff --git a/riscv-isa-sim/riscv/insns/vfnmadd_vf.h b/riscv-isa-sim/riscv/insns/vfnmadd_vf.h new file mode 100644 index 0000000..cb9c217 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfnmadd_vf.h @@ -0,0 +1,11 @@ +// vfnmadd: vd[i] = -(vd[i] * f[rs1]) - vs2[i] +VI_VFP_VF_LOOP +({ + vd = f16_mulAdd(f16(vd.v ^ F16_SIGN), rs1, f16(vs2.v ^ F16_SIGN)); +}, +{ + vd = f32_mulAdd(f32(vd.v ^ F32_SIGN), rs1, f32(vs2.v ^ F32_SIGN)); +}, +{ + vd = f64_mulAdd(f64(vd.v ^ F64_SIGN), rs1, f64(vs2.v ^ F64_SIGN)); +}) diff --git a/riscv-isa-sim/riscv/insns/vfnmadd_vv.h b/riscv-isa-sim/riscv/insns/vfnmadd_vv.h new file mode 100644 index 0000000..7160ed7 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfnmadd_vv.h @@ -0,0 +1,11 @@ +// vfnmadd: vd[i] = -(vd[i] * vs1[i]) - vs2[i] +VI_VFP_VV_LOOP +({ + vd = f16_mulAdd(f16(vd.v ^ F16_SIGN), vs1, f16(vs2.v ^ F16_SIGN)); +}, +{ + vd = f32_mulAdd(f32(vd.v ^ F32_SIGN), vs1, f32(vs2.v ^ F32_SIGN)); +}, +{ + vd = f64_mulAdd(f64(vd.v ^ F64_SIGN), vs1, f64(vs2.v ^ F64_SIGN)); +}) diff --git a/riscv-isa-sim/riscv/insns/vfnmsac_vf.h b/riscv-isa-sim/riscv/insns/vfnmsac_vf.h new file mode 100644 index 0000000..aa6baa3 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfnmsac_vf.h @@ -0,0 +1,11 @@ +// vfnmsac: vd[i] = -(f[rs1] * vs2[i]) + vd[i] +VI_VFP_VF_LOOP +({ + vd = f16_mulAdd(rs1, f16(vs2.v ^ F16_SIGN), vd); +}, +{ + vd = f32_mulAdd(rs1, f32(vs2.v ^ F32_SIGN), vd); +}, +{ + vd = f64_mulAdd(rs1, f64(vs2.v ^ F64_SIGN), vd); +}) diff --git a/riscv-isa-sim/riscv/insns/vfnmsac_vv.h b/riscv-isa-sim/riscv/insns/vfnmsac_vv.h new file mode 100644 index 0000000..47db61d --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfnmsac_vv.h @@ -0,0 +1,11 @@ +// vfnmsac.vv vd, vs1, vs2, vm # vd[i] = -(vs2[i] * vs1[i]) + vd[i] +VI_VFP_VV_LOOP +({ + vd = f16_mulAdd(f16(vs1.v ^ F16_SIGN), vs2, vd); +}, +{ + vd = f32_mulAdd(f32(vs1.v ^ F32_SIGN), vs2, vd); +}, +{ + vd = f64_mulAdd(f64(vs1.v ^ F64_SIGN), vs2, vd); +}) diff --git a/riscv-isa-sim/riscv/insns/vfnmsub_vf.h b/riscv-isa-sim/riscv/insns/vfnmsub_vf.h new file mode 100644 index 0000000..43aa9e2 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfnmsub_vf.h @@ -0,0 +1,11 @@ +// vfnmsub: vd[i] = -(vd[i] * f[rs1]) + vs2[i] +VI_VFP_VF_LOOP +({ + vd = f16_mulAdd(f16(vd.v ^ F16_SIGN), rs1, vs2); +}, +{ + vd = f32_mulAdd(f32(vd.v ^ F32_SIGN), rs1, vs2); +}, +{ + vd = f64_mulAdd(f64(vd.v ^ F64_SIGN), rs1, vs2); +}) diff --git a/riscv-isa-sim/riscv/insns/vfnmsub_vv.h b/riscv-isa-sim/riscv/insns/vfnmsub_vv.h new file mode 100644 index 0000000..2a45c8f --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfnmsub_vv.h @@ -0,0 +1,11 @@ +// vfnmsub: vd[i] = -(vd[i] * vs1[i]) + vs2[i] +VI_VFP_VV_LOOP +({ + vd = f16_mulAdd(f16(vd.v ^ F16_SIGN), vs1, vs2); +}, +{ + vd = f32_mulAdd(f32(vd.v ^ F32_SIGN), vs1, vs2); +}, +{ + vd = f64_mulAdd(f64(vd.v ^ F64_SIGN), vs1, vs2); +}) diff --git a/riscv-isa-sim/riscv/insns/vfrdiv_vf.h b/riscv-isa-sim/riscv/insns/vfrdiv_vf.h new file mode 100644 index 0000000..b283343 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfrdiv_vf.h @@ -0,0 +1,11 @@ +// vfrdiv.vf vd, vs2, rs1, vm # scalar-vector, vd[i] = f[rs1]/vs2[i] +VI_VFP_VF_LOOP +({ + vd = f16_div(rs1, vs2); +}, +{ + vd = f32_div(rs1, vs2); +}, +{ + vd = f64_div(rs1, vs2); +}) diff --git a/riscv-isa-sim/riscv/insns/vfrec7_v.h b/riscv-isa-sim/riscv/insns/vfrec7_v.h new file mode 100644 index 0000000..69c026b --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfrec7_v.h @@ -0,0 +1,11 @@ +// vfclass.v vd, vs2, vm +VI_VFP_V_LOOP +({ + vd = f16_recip7(vs2); +}, +{ + vd = f32_recip7(vs2); +}, +{ + vd = f64_recip7(vs2); +}) diff --git a/riscv-isa-sim/riscv/insns/vfredmax_vs.h b/riscv-isa-sim/riscv/insns/vfredmax_vs.h new file mode 100644 index 0000000..f19ec59 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfredmax_vs.h @@ -0,0 +1,12 @@ +// vfredmax vd, vs2, vs1 +bool is_propagate = false; +VI_VFP_VV_LOOP_REDUCTION +({ + vd_0 = f16_max(vd_0, vs2); +}, +{ + vd_0 = f32_max(vd_0, vs2); +}, +{ + vd_0 = f64_max(vd_0, vs2); +}) diff --git a/riscv-isa-sim/riscv/insns/vfredmin_vs.h b/riscv-isa-sim/riscv/insns/vfredmin_vs.h new file mode 100644 index 0000000..e3cf151 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfredmin_vs.h @@ -0,0 +1,12 @@ +// vfredmin vd, vs2, vs1 +bool is_propagate = false; +VI_VFP_VV_LOOP_REDUCTION +({ + vd_0 = f16_min(vd_0, vs2); +}, +{ + vd_0 = f32_min(vd_0, vs2); +}, +{ + vd_0 = f64_min(vd_0, vs2); +}) diff --git a/riscv-isa-sim/riscv/insns/vfredosum_vs.h b/riscv-isa-sim/riscv/insns/vfredosum_vs.h new file mode 100644 index 0000000..2438a7b --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfredosum_vs.h @@ -0,0 +1,12 @@ +// vfredosum: vd[0] = sum( vs2[*] , vs1[0] ) +bool is_propagate = false; +VI_VFP_VV_LOOP_REDUCTION +({ + vd_0 = f16_add(vd_0, vs2); +}, +{ + vd_0 = f32_add(vd_0, vs2); +}, +{ + vd_0 = f64_add(vd_0, vs2); +}) diff --git a/riscv-isa-sim/riscv/insns/vfredusum_vs.h b/riscv-isa-sim/riscv/insns/vfredusum_vs.h new file mode 100644 index 0000000..bad7308 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfredusum_vs.h @@ -0,0 +1,12 @@ +// vfredsum: vd[0] = sum( vs2[*] , vs1[0] ) +bool is_propagate = true; +VI_VFP_VV_LOOP_REDUCTION +({ + vd_0 = f16_add(vd_0, vs2); +}, +{ + vd_0 = f32_add(vd_0, vs2); +}, +{ + vd_0 = f64_add(vd_0, vs2); +}) diff --git a/riscv-isa-sim/riscv/insns/vfrsqrt7_v.h b/riscv-isa-sim/riscv/insns/vfrsqrt7_v.h new file mode 100644 index 0000000..a073764 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfrsqrt7_v.h @@ -0,0 +1,11 @@ +// vfclass.v vd, vs2, vm +VI_VFP_V_LOOP +({ + vd = f16_rsqrte7(vs2); +}, +{ + vd = f32_rsqrte7(vs2); +}, +{ + vd = f64_rsqrte7(vs2); +}) diff --git a/riscv-isa-sim/riscv/insns/vfrsub_vf.h b/riscv-isa-sim/riscv/insns/vfrsub_vf.h new file mode 100644 index 0000000..7fb26a5 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfrsub_vf.h @@ -0,0 +1,11 @@ +// vfsub.vf vd, vs2, rs1 +VI_VFP_VF_LOOP +({ + vd = f16_sub(rs1, vs2); +}, +{ + vd = f32_sub(rs1, vs2); +}, +{ + vd = f64_sub(rs1, vs2); +}) diff --git a/riscv-isa-sim/riscv/insns/vfsgnj_vf.h b/riscv-isa-sim/riscv/insns/vfsgnj_vf.h new file mode 100644 index 0000000..ce06185 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfsgnj_vf.h @@ -0,0 +1,11 @@ +// vfsgnj vd, vs2, vs1 +VI_VFP_VF_LOOP +({ + vd = fsgnj16(vs2.v, rs1.v, false, false); +}, +{ + vd = fsgnj32(vs2.v, rs1.v, false, false); +}, +{ + vd = fsgnj64(vs2.v, rs1.v, false, false); +}) diff --git a/riscv-isa-sim/riscv/insns/vfsgnj_vv.h b/riscv-isa-sim/riscv/insns/vfsgnj_vv.h new file mode 100644 index 0000000..722cb29 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfsgnj_vv.h @@ -0,0 +1,11 @@ +// vfsgnj +VI_VFP_VV_LOOP +({ + vd = fsgnj16(vs2.v, vs1.v, false, false); +}, +{ + vd = fsgnj32(vs2.v, vs1.v, false, false); +}, +{ + vd = fsgnj64(vs2.v, vs1.v, false, false); +}) diff --git a/riscv-isa-sim/riscv/insns/vfsgnjn_vf.h b/riscv-isa-sim/riscv/insns/vfsgnjn_vf.h new file mode 100644 index 0000000..e489412 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfsgnjn_vf.h @@ -0,0 +1,11 @@ +// vfsgnn +VI_VFP_VF_LOOP +({ + vd = fsgnj16(vs2.v, rs1.v, true, false); +}, +{ + vd = fsgnj32(vs2.v, rs1.v, true, false); +}, +{ + vd = fsgnj64(vs2.v, rs1.v, true, false); +}) diff --git a/riscv-isa-sim/riscv/insns/vfsgnjn_vv.h b/riscv-isa-sim/riscv/insns/vfsgnjn_vv.h new file mode 100644 index 0000000..1d91f69 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfsgnjn_vv.h @@ -0,0 +1,11 @@ +// vfsgnn +VI_VFP_VV_LOOP +({ + vd = fsgnj16(vs2.v, vs1.v, true, false); +}, +{ + vd = fsgnj32(vs2.v, vs1.v, true, false); +}, +{ + vd = fsgnj64(vs2.v, vs1.v, true, false); +}) diff --git a/riscv-isa-sim/riscv/insns/vfsgnjx_vf.h b/riscv-isa-sim/riscv/insns/vfsgnjx_vf.h new file mode 100644 index 0000000..7be164c --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfsgnjx_vf.h @@ -0,0 +1,11 @@ +// vfsgnx +VI_VFP_VF_LOOP +({ + vd = fsgnj16(vs2.v, rs1.v, false, true); +}, +{ + vd = fsgnj32(vs2.v, rs1.v, false, true); +}, +{ + vd = fsgnj64(vs2.v, rs1.v, false, true); +}) diff --git a/riscv-isa-sim/riscv/insns/vfsgnjx_vv.h b/riscv-isa-sim/riscv/insns/vfsgnjx_vv.h new file mode 100644 index 0000000..b04b845 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfsgnjx_vv.h @@ -0,0 +1,11 @@ +// vfsgnx +VI_VFP_VV_LOOP +({ + vd = fsgnj16(vs2.v, vs1.v, false, true); +}, +{ + vd = fsgnj32(vs2.v, vs1.v, false, true); +}, +{ + vd = fsgnj64(vs2.v, vs1.v, false, true); +}) diff --git a/riscv-isa-sim/riscv/insns/vfslide1down_vf.h b/riscv-isa-sim/riscv/insns/vfslide1down_vf.h new file mode 100644 index 0000000..66eeacc --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfslide1down_vf.h @@ -0,0 +1,36 @@ +//vfslide1down.vf vd, vs2, rs1 +VI_CHECK_SLIDE(false); + +VI_VFP_LOOP_BASE +if (i != vl - 1) { + switch (P.VU.vsew) { + case e16: { + VI_XI_SLIDEDOWN_PARAMS(e16, 1); + vd = vs2; + } + break; + case e32: { + VI_XI_SLIDEDOWN_PARAMS(e32, 1); + vd = vs2; + } + break; + case e64: { + VI_XI_SLIDEDOWN_PARAMS(e64, 1); + vd = vs2; + } + break; + } +} else { + switch (P.VU.vsew) { + case e16: + P.VU.elt(rd_num, vl - 1, true) = f16(FRS1); + break; + case e32: + P.VU.elt(rd_num, vl - 1, true) = f32(FRS1); + break; + case e64: + P.VU.elt(rd_num, vl - 1, true) = f64(FRS1); + break; + } +} +VI_VFP_LOOP_END diff --git a/riscv-isa-sim/riscv/insns/vfslide1up_vf.h b/riscv-isa-sim/riscv/insns/vfslide1up_vf.h new file mode 100644 index 0000000..b9c2817 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfslide1up_vf.h @@ -0,0 +1,36 @@ +//vfslide1up.vf vd, vs2, rs1 +VI_CHECK_SLIDE(true); + +VI_VFP_LOOP_BASE +if (i != 0) { + switch (P.VU.vsew) { + case e16: { + VI_XI_SLIDEUP_PARAMS(e16, 1); + vd = vs2; + } + break; + case e32: { + VI_XI_SLIDEUP_PARAMS(e32, 1); + vd = vs2; + } + break; + case e64: { + VI_XI_SLIDEUP_PARAMS(e64, 1); + vd = vs2; + } + break; + } +} else { + switch (P.VU.vsew) { + case e16: + P.VU.elt(rd_num, 0, true) = f16(FRS1); + break; + case e32: + P.VU.elt(rd_num, 0, true) = f32(FRS1); + break; + case e64: + P.VU.elt(rd_num, 0, true) = f64(FRS1); + break; + } +} +VI_VFP_LOOP_END diff --git a/riscv-isa-sim/riscv/insns/vfsqrt_v.h b/riscv-isa-sim/riscv/insns/vfsqrt_v.h new file mode 100644 index 0000000..86f0148 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfsqrt_v.h @@ -0,0 +1,11 @@ +// vsqrt.v vd, vd2, vm +VI_VFP_V_LOOP +({ + vd = f16_sqrt(vs2); +}, +{ + vd = f32_sqrt(vs2); +}, +{ + vd = f64_sqrt(vs2); +}) diff --git a/riscv-isa-sim/riscv/insns/vfsub_vf.h b/riscv-isa-sim/riscv/insns/vfsub_vf.h new file mode 100644 index 0000000..fc6877c --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfsub_vf.h @@ -0,0 +1,11 @@ +// vfsub.vf vd, vs2, rs1 +VI_VFP_VF_LOOP +({ + vd = f16_sub(vs2, rs1); +}, +{ + vd = f32_sub(vs2, rs1); +}, +{ + vd = f64_sub(vs2, rs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vfsub_vv.h b/riscv-isa-sim/riscv/insns/vfsub_vv.h new file mode 100644 index 0000000..b0403f1 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfsub_vv.h @@ -0,0 +1,11 @@ +// vfsub.vv vd, vs2, vs1 +VI_VFP_VV_LOOP +({ + vd = f16_sub(vs2, vs1); +}, +{ + vd = f32_sub(vs2, vs1); +}, +{ + vd = f64_sub(vs2, vs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vfwadd_vf.h b/riscv-isa-sim/riscv/insns/vfwadd_vf.h new file mode 100644 index 0000000..b824900 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwadd_vf.h @@ -0,0 +1,8 @@ +// vfwadd.vf vd, vs2, rs1 +VI_VFP_VF_LOOP_WIDE +({ + vd = f32_add(vs2, rs1); +}, +{ + vd = f64_add(vs2, rs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vfwadd_vv.h b/riscv-isa-sim/riscv/insns/vfwadd_vv.h new file mode 100644 index 0000000..7255a50 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwadd_vv.h @@ -0,0 +1,8 @@ +// vfwadd.vv vd, vs2, vs1 +VI_VFP_VV_LOOP_WIDE +({ + vd = f32_add(vs2, vs1); +}, +{ + vd = f64_add(vs2, vs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vfwadd_wf.h b/riscv-isa-sim/riscv/insns/vfwadd_wf.h new file mode 100644 index 0000000..021b17f --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwadd_wf.h @@ -0,0 +1,8 @@ +// vfwadd.wf vd, vs2, vs1 +VI_VFP_WF_LOOP_WIDE +({ + vd = f32_add(vs2, rs1); +}, +{ + vd = f64_add(vs2, rs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vfwadd_wv.h b/riscv-isa-sim/riscv/insns/vfwadd_wv.h new file mode 100644 index 0000000..c1ed038 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwadd_wv.h @@ -0,0 +1,8 @@ +// vfwadd.wv vd, vs2, vs1 +VI_VFP_WV_LOOP_WIDE +({ + vd = f32_add(vs2, vs1); +}, +{ + vd = f64_add(vs2, vs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vfwcvt_f_f_v.h b/riscv-isa-sim/riscv/insns/vfwcvt_f_f_v.h new file mode 100644 index 0000000..0700070 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwcvt_f_f_v.h @@ -0,0 +1,9 @@ +// vfwcvt.f.f.v vd, vs2, vm +VI_VFP_WCVT_FP_TO_FP( + {;}, // BODY8 + { vd = f16_to_f32(vs2); }, // BODY16 + { vd = f32_to_f64(vs2); }, // BODY32 + {;}, // CHECK8 + { require_extension(EXT_ZFH); }, // CHECK16 + { require_extension('D'); } // CHECK32 +) diff --git a/riscv-isa-sim/riscv/insns/vfwcvt_f_x_v.h b/riscv-isa-sim/riscv/insns/vfwcvt_f_x_v.h new file mode 100644 index 0000000..f51e8e3 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwcvt_f_x_v.h @@ -0,0 +1,10 @@ +// vfwcvt.f.x.v vd, vs2, vm +VI_VFP_WCVT_INT_TO_FP( + { vd = i32_to_f16(vs2); }, // BODY8 + { vd = i32_to_f32(vs2); }, // BODY16 + { vd = i32_to_f64(vs2); }, // BODY32 + { require(p->extension_enabled(EXT_ZFH)); }, // CHECK8 + { require_extension('F'); }, // CHECK16 + { require_extension('D'); }, // CHECK32 + int // sign +) diff --git a/riscv-isa-sim/riscv/insns/vfwcvt_f_xu_v.h b/riscv-isa-sim/riscv/insns/vfwcvt_f_xu_v.h new file mode 100644 index 0000000..7dd4972 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwcvt_f_xu_v.h @@ -0,0 +1,10 @@ +// vfwcvt.f.xu.v vd, vs2, vm +VI_VFP_WCVT_INT_TO_FP( + { vd = ui32_to_f16(vs2); }, // BODY8 + { vd = ui32_to_f32(vs2); }, // BODY16 + { vd = ui32_to_f64(vs2); }, // BODY32 + { require(p->extension_enabled(EXT_ZFH)); }, // CHECK8 + { require_extension('F'); }, // CHECK16 + { require_extension('D'); }, // CHECK32 + uint // sign +) diff --git a/riscv-isa-sim/riscv/insns/vfwcvt_rtz_x_f_v.h b/riscv-isa-sim/riscv/insns/vfwcvt_rtz_x_f_v.h new file mode 100644 index 0000000..74e5b9a --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwcvt_rtz_x_f_v.h @@ -0,0 +1,10 @@ +// vfwcvt.rtz.x.f.v vd, vs2, vm +VI_VFP_WCVT_FP_TO_INT( + {;}, // BODY8 + { vd = f16_to_i32(vs2, softfloat_round_minMag, true); }, // BODY16 + { vd = f32_to_i64(vs2, softfloat_round_minMag, true); }, // BODY32 + {;}, // CHECK8 + { require_extension(EXT_ZFH); }, // CHECK16 + { require_extension('F'); }, // CHECK32 + int // sign +) diff --git a/riscv-isa-sim/riscv/insns/vfwcvt_rtz_xu_f_v.h b/riscv-isa-sim/riscv/insns/vfwcvt_rtz_xu_f_v.h new file mode 100644 index 0000000..72b8c6e --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwcvt_rtz_xu_f_v.h @@ -0,0 +1,10 @@ +// vfwcvt.rtz,xu.f.v vd, vs2, vm +VI_VFP_WCVT_FP_TO_INT( + {;}, // BODY8 + { vd = f16_to_ui32(vs2, softfloat_round_minMag, true); }, // BODY16 + { vd = f32_to_ui64(vs2, softfloat_round_minMag, true); }, // BODY32 + {;}, // CHECK8 + { require_extension(EXT_ZFH); }, // CHECK16 + { require_extension('F'); }, // CHECK32 + uint // sign +) diff --git a/riscv-isa-sim/riscv/insns/vfwcvt_x_f_v.h b/riscv-isa-sim/riscv/insns/vfwcvt_x_f_v.h new file mode 100644 index 0000000..74497f4 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwcvt_x_f_v.h @@ -0,0 +1,10 @@ +// vfwcvt.x.f.v vd, vs2, vm +VI_VFP_WCVT_FP_TO_INT( + {;}, // BODY8 + { vd = f16_to_i32(vs2, softfloat_roundingMode, true); }, // BODY16 + { vd = f32_to_i64(vs2, softfloat_roundingMode, true); }, // BODY32 + {;}, // CHECK8 + { require_extension(EXT_ZFH); }, // CHECK16 + { require_extension('F'); }, // CHECK32 + int // sign +) diff --git a/riscv-isa-sim/riscv/insns/vfwcvt_xu_f_v.h b/riscv-isa-sim/riscv/insns/vfwcvt_xu_f_v.h new file mode 100644 index 0000000..ad96c9c --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwcvt_xu_f_v.h @@ -0,0 +1,10 @@ +// vfwcvt.xu.f.v vd, vs2, vm +VI_VFP_WCVT_FP_TO_INT( + {;}, // BODY8 + { vd = f16_to_ui32(vs2, softfloat_roundingMode, true); }, // BODY16 + { vd = f32_to_ui64(vs2, softfloat_roundingMode, true); }, // BODY32 + {;}, // CHECK8 + { require_extension(EXT_ZFH); }, // CHECK16 + { require_extension('F'); }, // CHECK32 + uint // sign +) diff --git a/riscv-isa-sim/riscv/insns/vfwmacc_vf.h b/riscv-isa-sim/riscv/insns/vfwmacc_vf.h new file mode 100644 index 0000000..441fa0a --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwmacc_vf.h @@ -0,0 +1,8 @@ +// vfwmacc.vf vd, vs2, rs1 +VI_VFP_VF_LOOP_WIDE +({ + vd = f32_mulAdd(rs1, vs2, vd); +}, +{ + vd = f64_mulAdd(rs1, vs2, vd); +}) diff --git a/riscv-isa-sim/riscv/insns/vfwmacc_vv.h b/riscv-isa-sim/riscv/insns/vfwmacc_vv.h new file mode 100644 index 0000000..a654198 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwmacc_vv.h @@ -0,0 +1,8 @@ +// vfwmacc.vv vd, vs2, vs1 +VI_VFP_VV_LOOP_WIDE +({ + vd = f32_mulAdd(vs1, vs2, vd); +}, +{ + vd = f64_mulAdd(vs1, vs2, vd); +}) diff --git a/riscv-isa-sim/riscv/insns/vfwmsac_vf.h b/riscv-isa-sim/riscv/insns/vfwmsac_vf.h new file mode 100644 index 0000000..18010ff --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwmsac_vf.h @@ -0,0 +1,8 @@ +// vfwmsac.vf vd, vs2, rs1 +VI_VFP_VF_LOOP_WIDE +({ + vd = f32_mulAdd(rs1, vs2, f32(vd.v ^ F32_SIGN)); +}, +{ + vd = f64_mulAdd(rs1, vs2, f64(vd.v ^ F64_SIGN)); +}) diff --git a/riscv-isa-sim/riscv/insns/vfwmsac_vv.h b/riscv-isa-sim/riscv/insns/vfwmsac_vv.h new file mode 100644 index 0000000..9dc4073 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwmsac_vv.h @@ -0,0 +1,8 @@ +// vfwmsac.vv vd, vs2, vs1 +VI_VFP_VV_LOOP_WIDE +({ + vd = f32_mulAdd(vs1, vs2, f32(vd.v ^ F32_SIGN)); +}, +{ + vd = f64_mulAdd(vs1, vs2, f64(vd.v ^ F64_SIGN)); +}) diff --git a/riscv-isa-sim/riscv/insns/vfwmul_vf.h b/riscv-isa-sim/riscv/insns/vfwmul_vf.h new file mode 100644 index 0000000..2bb543f --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwmul_vf.h @@ -0,0 +1,8 @@ +// vfwmul.vf vd, vs2, rs1 +VI_VFP_VF_LOOP_WIDE +({ + vd = f32_mul(vs2, rs1); +}, +{ + vd = f64_mul(vs2, rs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vfwmul_vv.h b/riscv-isa-sim/riscv/insns/vfwmul_vv.h new file mode 100644 index 0000000..2ce38e6 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwmul_vv.h @@ -0,0 +1,8 @@ +// vfwmul.vv vd, vs2, vs1 +VI_VFP_VV_LOOP_WIDE +({ + vd = f32_mul(vs2, vs1); +}, +{ + vd = f64_mul(vs2, vs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vfwnmacc_vf.h b/riscv-isa-sim/riscv/insns/vfwnmacc_vf.h new file mode 100644 index 0000000..038bda0 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwnmacc_vf.h @@ -0,0 +1,8 @@ +// vfwnmacc.vf vd, vs2, rs1 +VI_VFP_VF_LOOP_WIDE +({ + vd = f32_mulAdd(f32(rs1.v ^ F32_SIGN), vs2, f32(vd.v ^ F32_SIGN)); +}, +{ + vd = f64_mulAdd(f64(rs1.v ^ F64_SIGN), vs2, f64(vd.v ^ F64_SIGN)); +}) diff --git a/riscv-isa-sim/riscv/insns/vfwnmacc_vv.h b/riscv-isa-sim/riscv/insns/vfwnmacc_vv.h new file mode 100644 index 0000000..bf863e0 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwnmacc_vv.h @@ -0,0 +1,8 @@ +// vfwnmacc.vv vd, vs2, vs1 +VI_VFP_VV_LOOP_WIDE +({ + vd = f32_mulAdd(f32(vs1.v ^ F32_SIGN), vs2, f32(vd.v ^ F32_SIGN)); +}, +{ + vd = f64_mulAdd(f64(vs1.v ^ F64_SIGN), vs2, f64(vd.v ^ F64_SIGN)); +}) diff --git a/riscv-isa-sim/riscv/insns/vfwnmsac_vf.h b/riscv-isa-sim/riscv/insns/vfwnmsac_vf.h new file mode 100644 index 0000000..1e288e1 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwnmsac_vf.h @@ -0,0 +1,8 @@ +// vfwnmacc.vf vd, vs2, rs1 +VI_VFP_VF_LOOP_WIDE +({ + vd = f32_mulAdd(f32(rs1.v ^ F32_SIGN), vs2, vd); +}, +{ + vd = f64_mulAdd(f64(rs1.v ^ F64_SIGN), vs2, vd); +}) diff --git a/riscv-isa-sim/riscv/insns/vfwnmsac_vv.h b/riscv-isa-sim/riscv/insns/vfwnmsac_vv.h new file mode 100644 index 0000000..ce97749 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwnmsac_vv.h @@ -0,0 +1,8 @@ +// vfwnmsac.vv vd, vs2, vs1 +VI_VFP_VV_LOOP_WIDE +({ + vd = f32_mulAdd(f32(vs1.v ^ F32_SIGN), vs2, vd); +}, +{ + vd = f64_mulAdd(f64(vs1.v ^ F64_SIGN), vs2, vd); +}) diff --git a/riscv-isa-sim/riscv/insns/vfwredosum_vs.h b/riscv-isa-sim/riscv/insns/vfwredosum_vs.h new file mode 100644 index 0000000..1f42d8f --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwredosum_vs.h @@ -0,0 +1,9 @@ +// vfwredosum.vs vd, vs2, vs1 +bool is_propagate = false; +VI_VFP_VV_LOOP_WIDE_REDUCTION +({ + vd_0 = f32_add(vd_0, vs2); +}, +{ + vd_0 = f64_add(vd_0, vs2); +}) diff --git a/riscv-isa-sim/riscv/insns/vfwredusum_vs.h b/riscv-isa-sim/riscv/insns/vfwredusum_vs.h new file mode 100644 index 0000000..4ef2896 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwredusum_vs.h @@ -0,0 +1,9 @@ +// vfwredsum.vs vd, vs2, vs1 +bool is_propagate = true; +VI_VFP_VV_LOOP_WIDE_REDUCTION +({ + vd_0 = f32_add(vd_0, vs2); +}, +{ + vd_0 = f64_add(vd_0, vs2); +}) diff --git a/riscv-isa-sim/riscv/insns/vfwsub_vf.h b/riscv-isa-sim/riscv/insns/vfwsub_vf.h new file mode 100644 index 0000000..8c37688 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwsub_vf.h @@ -0,0 +1,8 @@ +// vfwsub.vf vd, vs2, rs1 +VI_VFP_VF_LOOP_WIDE +({ + vd = f32_sub(vs2, rs1); +}, +{ + vd = f64_sub(vs2, rs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vfwsub_vv.h b/riscv-isa-sim/riscv/insns/vfwsub_vv.h new file mode 100644 index 0000000..ce08e36 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwsub_vv.h @@ -0,0 +1,8 @@ +// vfwsub.vv vd, vs2, vs1 +VI_VFP_VV_LOOP_WIDE +({ + vd = f32_sub(vs2, vs1); +}, +{ + vd = f64_sub(vs2, vs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vfwsub_wf.h b/riscv-isa-sim/riscv/insns/vfwsub_wf.h new file mode 100644 index 0000000..f6f47ca --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwsub_wf.h @@ -0,0 +1,8 @@ +// vfwsub.wf vd, vs2, rs1 +VI_VFP_WF_LOOP_WIDE +({ + vd = f32_sub(vs2, rs1); +}, +{ + vd = f64_sub(vs2, rs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vfwsub_wv.h b/riscv-isa-sim/riscv/insns/vfwsub_wv.h new file mode 100644 index 0000000..eef904d --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vfwsub_wv.h @@ -0,0 +1,8 @@ +// vfwsub.wv vd, vs2, vs1 +VI_VFP_WV_LOOP_WIDE +({ + vd = f32_sub(vs2, vs1); +}, +{ + vd = f64_sub(vs2, vs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vl1re16_v.h b/riscv-isa-sim/riscv/insns/vl1re16_v.h new file mode 100644 index 0000000..220e83e --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vl1re16_v.h @@ -0,0 +1,2 @@ +// vl1re16.v vd, (rs1) +VI_LD_WHOLE(uint16); diff --git a/riscv-isa-sim/riscv/insns/vl1re32_v.h b/riscv-isa-sim/riscv/insns/vl1re32_v.h new file mode 100644 index 0000000..e72ca02 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vl1re32_v.h @@ -0,0 +1,2 @@ +// vl1re32.v vd, (rs1) +VI_LD_WHOLE(uint32); diff --git a/riscv-isa-sim/riscv/insns/vl1re64_v.h b/riscv-isa-sim/riscv/insns/vl1re64_v.h new file mode 100644 index 0000000..265701a --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vl1re64_v.h @@ -0,0 +1,2 @@ +// vl1re64.v vd, (rs1) +VI_LD_WHOLE(uint64); diff --git a/riscv-isa-sim/riscv/insns/vl1re8_v.h b/riscv-isa-sim/riscv/insns/vl1re8_v.h new file mode 100644 index 0000000..b4ce661 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vl1re8_v.h @@ -0,0 +1,2 @@ +// vl1re8.v vd, (rs1) +VI_LD_WHOLE(uint8); diff --git a/riscv-isa-sim/riscv/insns/vl2re16_v.h b/riscv-isa-sim/riscv/insns/vl2re16_v.h new file mode 100644 index 0000000..2846edd --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vl2re16_v.h @@ -0,0 +1,2 @@ +// vl2e16.v vd, (rs1) +VI_LD_WHOLE(uint16); diff --git a/riscv-isa-sim/riscv/insns/vl2re32_v.h b/riscv-isa-sim/riscv/insns/vl2re32_v.h new file mode 100644 index 0000000..5cea835 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vl2re32_v.h @@ -0,0 +1,2 @@ +// vl2re32.v vd, (rs1) +VI_LD_WHOLE(uint32); diff --git a/riscv-isa-sim/riscv/insns/vl2re64_v.h b/riscv-isa-sim/riscv/insns/vl2re64_v.h new file mode 100644 index 0000000..efdf2ce --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vl2re64_v.h @@ -0,0 +1,2 @@ +// vl2re64.v vd, (rs1) +VI_LD_WHOLE(uint64); diff --git a/riscv-isa-sim/riscv/insns/vl2re8_v.h b/riscv-isa-sim/riscv/insns/vl2re8_v.h new file mode 100644 index 0000000..fcc3c4c --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vl2re8_v.h @@ -0,0 +1,2 @@ +// vl2re8.v vd, (rs1) +VI_LD_WHOLE(uint8); diff --git a/riscv-isa-sim/riscv/insns/vl4re16_v.h b/riscv-isa-sim/riscv/insns/vl4re16_v.h new file mode 100644 index 0000000..0363418 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vl4re16_v.h @@ -0,0 +1,2 @@ +// vl4re16.v vd, (rs1) +VI_LD_WHOLE(uint16); diff --git a/riscv-isa-sim/riscv/insns/vl4re32_v.h b/riscv-isa-sim/riscv/insns/vl4re32_v.h new file mode 100644 index 0000000..e37cc1a --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vl4re32_v.h @@ -0,0 +1,2 @@ +// vl4re32.v vd, (rs1) +VI_LD_WHOLE(uint32); diff --git a/riscv-isa-sim/riscv/insns/vl4re64_v.h b/riscv-isa-sim/riscv/insns/vl4re64_v.h new file mode 100644 index 0000000..11486f5 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vl4re64_v.h @@ -0,0 +1,2 @@ +// vl4re64.v vd, (rs1) +VI_LD_WHOLE(uint64); diff --git a/riscv-isa-sim/riscv/insns/vl4re8_v.h b/riscv-isa-sim/riscv/insns/vl4re8_v.h new file mode 100644 index 0000000..f9ce3ff --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vl4re8_v.h @@ -0,0 +1,2 @@ +// vl4re8.v vd, (rs1) +VI_LD_WHOLE(uint8); diff --git a/riscv-isa-sim/riscv/insns/vl8re16_v.h b/riscv-isa-sim/riscv/insns/vl8re16_v.h new file mode 100644 index 0000000..0b3f141 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vl8re16_v.h @@ -0,0 +1,2 @@ +// vl8re16.v vd, (rs1) +VI_LD_WHOLE(uint16); diff --git a/riscv-isa-sim/riscv/insns/vl8re32_v.h b/riscv-isa-sim/riscv/insns/vl8re32_v.h new file mode 100644 index 0000000..3372b89 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vl8re32_v.h @@ -0,0 +1,2 @@ +// vl8re32.v vd, (rs1) +VI_LD_WHOLE(uint32); diff --git a/riscv-isa-sim/riscv/insns/vl8re64_v.h b/riscv-isa-sim/riscv/insns/vl8re64_v.h new file mode 100644 index 0000000..f9a9ca9 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vl8re64_v.h @@ -0,0 +1,2 @@ +// vl8re64.v vd, (rs1) +VI_LD_WHOLE(uint64); diff --git a/riscv-isa-sim/riscv/insns/vl8re8_v.h b/riscv-isa-sim/riscv/insns/vl8re8_v.h new file mode 100644 index 0000000..ee05e81 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vl8re8_v.h @@ -0,0 +1,2 @@ +// vl8re8.v vd, (rs1) +VI_LD_WHOLE(uint8); diff --git a/riscv-isa-sim/riscv/insns/vle16ff_v.h b/riscv-isa-sim/riscv/insns/vle16ff_v.h new file mode 100644 index 0000000..53c8889 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vle16ff_v.h @@ -0,0 +1,2 @@ +// vle16ff.v and vlseg[2-8]e16ff.v +VI_LDST_FF(int16); diff --git a/riscv-isa-sim/riscv/insns/vle32ff_v.h b/riscv-isa-sim/riscv/insns/vle32ff_v.h new file mode 100644 index 0000000..7d03d7d --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vle32ff_v.h @@ -0,0 +1,2 @@ +// vle32ff.v and vlseg[2-8]e32ff.v +VI_LDST_FF(int32); diff --git a/riscv-isa-sim/riscv/insns/vle64ff_v.h b/riscv-isa-sim/riscv/insns/vle64ff_v.h new file mode 100644 index 0000000..39996da --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vle64ff_v.h @@ -0,0 +1,2 @@ +// vle64ff.v and vlseg[2-8]e64ff.v +VI_LDST_FF(int64); diff --git a/riscv-isa-sim/riscv/insns/vle8ff_v.h b/riscv-isa-sim/riscv/insns/vle8ff_v.h new file mode 100644 index 0000000..b56d1d3 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vle8ff_v.h @@ -0,0 +1,2 @@ +// vle8ff.v and vlseg[2-8]e8ff.v +VI_LDST_FF(int8); diff --git a/riscv-isa-sim/riscv/insns/vlm_v.h b/riscv-isa-sim/riscv/insns/vlm_v.h new file mode 100644 index 0000000..6d3f83a --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vlm_v.h @@ -0,0 +1,2 @@ +// vle1.v and vlseg[2-8]e8.v +VI_LD(0, (i * nf + fn), int8, true); diff --git a/riscv-isa-sim/riscv/insns/vmadc_vi.h b/riscv-isa-sim/riscv/insns/vmadc_vi.h new file mode 100644 index 0000000..37da8ad --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmadc_vi.h @@ -0,0 +1,2 @@ +// vmadc.vi vd, vs2, simm5 +#include "vmadc_vim.h" diff --git a/riscv-isa-sim/riscv/insns/vmadc_vim.h b/riscv-isa-sim/riscv/insns/vmadc_vim.h new file mode 100644 index 0000000..a1f78ff --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmadc_vim.h @@ -0,0 +1,5 @@ +// vmadc.vim vd, vs2, simm5, v0 +VI_XI_LOOP_CARRY +({ + res = (((op_mask & simm5) + (op_mask & vs2) + carry) >> sew) & 0x1u; +}) diff --git a/riscv-isa-sim/riscv/insns/vmand_mm.h b/riscv-isa-sim/riscv/insns/vmand_mm.h new file mode 100644 index 0000000..04615c6 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmand_mm.h @@ -0,0 +1,2 @@ +// vmand.mm vd, vs2, vs1 +VI_LOOP_MASK(vs2 & vs1); diff --git a/riscv-isa-sim/riscv/insns/vmandn_mm.h b/riscv-isa-sim/riscv/insns/vmandn_mm.h new file mode 100644 index 0000000..e9a87cf --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmandn_mm.h @@ -0,0 +1,2 @@ +// vmandn.mm vd, vs2, vs1 +VI_LOOP_MASK(vs2 & ~vs1); diff --git a/riscv-isa-sim/riscv/insns/vmax_vv.h b/riscv-isa-sim/riscv/insns/vmax_vv.h new file mode 100644 index 0000000..b9f15c5 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmax_vv.h @@ -0,0 +1,10 @@ +// vmax.vv vd, vs2, vs1, vm # Vector-vector +VI_VV_LOOP +({ + if (vs1 >= vs2) { + vd = vs1; + } else { + vd = vs2; + } + +}) diff --git a/riscv-isa-sim/riscv/insns/vmax_vx.h b/riscv-isa-sim/riscv/insns/vmax_vx.h new file mode 100644 index 0000000..06f3f43 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmax_vx.h @@ -0,0 +1,10 @@ +// vmax.vx vd, vs2, rs1, vm # vector-scalar +VI_VX_LOOP +({ + if (rs1 >= vs2) { + vd = rs1; + } else { + vd = vs2; + } + +}) diff --git a/riscv-isa-sim/riscv/insns/vmaxu_vv.h b/riscv-isa-sim/riscv/insns/vmaxu_vv.h new file mode 100644 index 0000000..4e6868d --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmaxu_vv.h @@ -0,0 +1,9 @@ +// vmaxu.vv vd, vs2, vs1, vm # Vector-vector +VI_VV_ULOOP +({ + if (vs1 >= vs2) { + vd = vs1; + } else { + vd = vs2; + } +}) diff --git a/riscv-isa-sim/riscv/insns/vmaxu_vx.h b/riscv-isa-sim/riscv/insns/vmaxu_vx.h new file mode 100644 index 0000000..cab8918 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmaxu_vx.h @@ -0,0 +1,9 @@ +// vmaxu.vx vd, vs2, rs1, vm # vector-scalar +VI_VX_ULOOP +({ + if (rs1 >= vs2) { + vd = rs1; + } else { + vd = vs2; + } +}) diff --git a/riscv-isa-sim/riscv/insns/vmerge_vim.h b/riscv-isa-sim/riscv/insns/vmerge_vim.h new file mode 100644 index 0000000..0b2fac9 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmerge_vim.h @@ -0,0 +1,5 @@ +// vmerge.vim vd, vs2, simm5 +VI_VI_MERGE_LOOP +({ + vd = use_first ? simm5 : vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vmfeq_vf.h b/riscv-isa-sim/riscv/insns/vmfeq_vf.h new file mode 100644 index 0000000..a4d7c50 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmfeq_vf.h @@ -0,0 +1,11 @@ +// vmfeq.vf vd, vs2, fs1 +VI_VFP_VF_LOOP_CMP +({ + res = f16_eq(vs2, rs1); +}, +{ + res = f32_eq(vs2, rs1); +}, +{ + res = f64_eq(vs2, rs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vmfeq_vv.h b/riscv-isa-sim/riscv/insns/vmfeq_vv.h new file mode 100644 index 0000000..b08ce98 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmfeq_vv.h @@ -0,0 +1,11 @@ +// vmfeq.vv vd, vs2, vs1 +VI_VFP_VV_LOOP_CMP +({ + res = f16_eq(vs2, vs1); +}, +{ + res = f32_eq(vs2, vs1); +}, +{ + res = f64_eq(vs2, vs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vmfge_vf.h b/riscv-isa-sim/riscv/insns/vmfge_vf.h new file mode 100644 index 0000000..ab4df5c --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmfge_vf.h @@ -0,0 +1,11 @@ +// vmfge.vf vd, vs2, rs1 +VI_VFP_VF_LOOP_CMP +({ + res = f16_le(rs1, vs2); +}, +{ + res = f32_le(rs1, vs2); +}, +{ + res = f64_le(rs1, vs2); +}) diff --git a/riscv-isa-sim/riscv/insns/vmfgt_vf.h b/riscv-isa-sim/riscv/insns/vmfgt_vf.h new file mode 100644 index 0000000..dcc3ea3 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmfgt_vf.h @@ -0,0 +1,11 @@ +// vmfgt.vf vd, vs2, rs1 +VI_VFP_VF_LOOP_CMP +({ + res = f16_lt(rs1, vs2); +}, +{ + res = f32_lt(rs1, vs2); +}, +{ + res = f64_lt(rs1, vs2); +}) diff --git a/riscv-isa-sim/riscv/insns/vmfle_vf.h b/riscv-isa-sim/riscv/insns/vmfle_vf.h new file mode 100644 index 0000000..a942705 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmfle_vf.h @@ -0,0 +1,11 @@ +// vmfle.vf vd, vs2, rs1 +VI_VFP_VF_LOOP_CMP +({ + res = f16_le(vs2, rs1); +}, +{ + res = f32_le(vs2, rs1); +}, +{ + res = f64_le(vs2, rs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vmfle_vv.h b/riscv-isa-sim/riscv/insns/vmfle_vv.h new file mode 100644 index 0000000..dd6f81d --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmfle_vv.h @@ -0,0 +1,11 @@ +// vmfle.vv vd, vs2, rs1 +VI_VFP_VV_LOOP_CMP +({ + res = f16_le(vs2, vs1); +}, +{ + res = f32_le(vs2, vs1); +}, +{ + res = f64_le(vs2, vs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vmflt_vf.h b/riscv-isa-sim/riscv/insns/vmflt_vf.h new file mode 100644 index 0000000..110dbd1 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmflt_vf.h @@ -0,0 +1,11 @@ +// vmflt.vf vd, vs2, rs1 +VI_VFP_VF_LOOP_CMP +({ + res = f16_lt(vs2, rs1); +}, +{ + res = f32_lt(vs2, rs1); +}, +{ + res = f64_lt(vs2, rs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vmflt_vv.h b/riscv-isa-sim/riscv/insns/vmflt_vv.h new file mode 100644 index 0000000..35f8d70 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmflt_vv.h @@ -0,0 +1,11 @@ +// vmflt.vv vd, vs2, vs1 +VI_VFP_VV_LOOP_CMP +({ + res = f16_lt(vs2, vs1); +}, +{ + res = f32_lt(vs2, vs1); +}, +{ + res = f64_lt(vs2, vs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vmfne_vf.h b/riscv-isa-sim/riscv/insns/vmfne_vf.h new file mode 100644 index 0000000..1b61d57 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmfne_vf.h @@ -0,0 +1,11 @@ +// vmfne.vf vd, vs2, rs1 +VI_VFP_VF_LOOP_CMP +({ + res = !f16_eq(vs2, rs1); +}, +{ + res = !f32_eq(vs2, rs1); +}, +{ + res = !f64_eq(vs2, rs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vmfne_vv.h b/riscv-isa-sim/riscv/insns/vmfne_vv.h new file mode 100644 index 0000000..4447c3c --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmfne_vv.h @@ -0,0 +1,11 @@ +// vmfne.vv vd, vs2, rs1 +VI_VFP_VV_LOOP_CMP +({ + res = !f16_eq(vs2, vs1); +}, +{ + res = !f32_eq(vs2, vs1); +}, +{ + res = !f64_eq(vs2, vs1); +}) diff --git a/riscv-isa-sim/riscv/insns/vmin_vv.h b/riscv-isa-sim/riscv/insns/vmin_vv.h new file mode 100644 index 0000000..21da0b3 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmin_vv.h @@ -0,0 +1,11 @@ +// vmin.vv vd, vs2, vs1, vm # Vector-vector +VI_VV_LOOP +({ + if (vs1 <= vs2) { + vd = vs1; + } else { + vd = vs2; + } + + +}) diff --git a/riscv-isa-sim/riscv/insns/vmin_vx.h b/riscv-isa-sim/riscv/insns/vmin_vx.h new file mode 100644 index 0000000..3291776 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmin_vx.h @@ -0,0 +1,11 @@ +// vminx.vx vd, vs2, rs1, vm # vector-scalar +VI_VX_LOOP +({ + if (rs1 <= vs2) { + vd = rs1; + } else { + vd = vs2; + } + + +}) diff --git a/riscv-isa-sim/riscv/insns/vminu_vv.h b/riscv-isa-sim/riscv/insns/vminu_vv.h new file mode 100644 index 0000000..c0ab195 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vminu_vv.h @@ -0,0 +1,9 @@ +// vminu.vv vd, vs2, vs1, vm # Vector-vector +VI_VV_ULOOP +({ + if (vs1 <= vs2) { + vd = vs1; + } else { + vd = vs2; + } +}) diff --git a/riscv-isa-sim/riscv/insns/vminu_vx.h b/riscv-isa-sim/riscv/insns/vminu_vx.h new file mode 100644 index 0000000..1055895 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vminu_vx.h @@ -0,0 +1,10 @@ +// vminu.vx vd, vs2, rs1, vm # vector-scalar +VI_VX_ULOOP +({ + if (rs1 <= vs2) { + vd = rs1; + } else { + vd = vs2; + } + +}) diff --git a/riscv-isa-sim/riscv/insns/vmnand_mm.h b/riscv-isa-sim/riscv/insns/vmnand_mm.h new file mode 100644 index 0000000..5a3ab09 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmnand_mm.h @@ -0,0 +1,2 @@ +// vmnand.mm vd, vs2, vs1 +VI_LOOP_MASK(~(vs2 & vs1)); diff --git a/riscv-isa-sim/riscv/insns/vmnor_mm.h b/riscv-isa-sim/riscv/insns/vmnor_mm.h new file mode 100644 index 0000000..ab93378 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmnor_mm.h @@ -0,0 +1,2 @@ +// vmnor.mm vd, vs2, vs1 +VI_LOOP_MASK(~(vs2 | vs1)); diff --git a/riscv-isa-sim/riscv/insns/vmor_mm.h b/riscv-isa-sim/riscv/insns/vmor_mm.h new file mode 100644 index 0000000..32e71b9 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmor_mm.h @@ -0,0 +1,2 @@ +// vmor.mm vd, vs2, vs1 +VI_LOOP_MASK(vs2 | vs1); diff --git a/riscv-isa-sim/riscv/insns/vmorn_mm.h b/riscv-isa-sim/riscv/insns/vmorn_mm.h new file mode 100644 index 0000000..23026f5 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmorn_mm.h @@ -0,0 +1,2 @@ +// vmorn.mm vd, vs2, vs1 +VI_LOOP_MASK(vs2 | ~vs1); diff --git a/riscv-isa-sim/riscv/insns/vmseq_vi.h b/riscv-isa-sim/riscv/insns/vmseq_vi.h new file mode 100644 index 0000000..cfc1682 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmseq_vi.h @@ -0,0 +1,5 @@ +// vseq.vi vd, vs2, simm5 +VI_VI_LOOP_CMP +({ + res = simm5 == vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vmseq_vv.h b/riscv-isa-sim/riscv/insns/vmseq_vv.h new file mode 100644 index 0000000..91fd204 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmseq_vv.h @@ -0,0 +1,6 @@ +// vseq.vv vd, vs2, vs1 +VI_VV_LOOP_CMP +({ + res = vs2 == vs1; +}) + diff --git a/riscv-isa-sim/riscv/insns/vmseq_vx.h b/riscv-isa-sim/riscv/insns/vmseq_vx.h new file mode 100644 index 0000000..ab63323 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmseq_vx.h @@ -0,0 +1,5 @@ +// vseq.vx vd, vs2, rs1 +VI_VX_LOOP_CMP +({ + res = rs1 == vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vmsgt_vi.h b/riscv-isa-sim/riscv/insns/vmsgt_vi.h new file mode 100644 index 0000000..4f7dea8 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmsgt_vi.h @@ -0,0 +1,5 @@ +// vsgt.vi vd, vs2, simm5 +VI_VI_LOOP_CMP +({ + res = vs2 > simm5; +}) diff --git a/riscv-isa-sim/riscv/insns/vmsgt_vx.h b/riscv-isa-sim/riscv/insns/vmsgt_vx.h new file mode 100644 index 0000000..5f24db6 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmsgt_vx.h @@ -0,0 +1,5 @@ +// vsgt.vx vd, vs2, rs1 +VI_VX_LOOP_CMP +({ + res = vs2 > rs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vmsgtu_vi.h b/riscv-isa-sim/riscv/insns/vmsgtu_vi.h new file mode 100644 index 0000000..be28fee --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmsgtu_vi.h @@ -0,0 +1,5 @@ +// vmsgtu.vi vd, vd2, simm5 +VI_VI_ULOOP_CMP +({ + res = vs2 > (insn.v_simm5() & (UINT64_MAX >> (64 - P.VU.vsew))); +}) diff --git a/riscv-isa-sim/riscv/insns/vmsgtu_vx.h b/riscv-isa-sim/riscv/insns/vmsgtu_vx.h new file mode 100644 index 0000000..7f39800 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmsgtu_vx.h @@ -0,0 +1,5 @@ +// vsgtu.vx vd, vs2, rs1 +VI_VX_ULOOP_CMP +({ + res = vs2 > rs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vmsle_vi.h b/riscv-isa-sim/riscv/insns/vmsle_vi.h new file mode 100644 index 0000000..f0f67d0 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmsle_vi.h @@ -0,0 +1,5 @@ +// vsle.vi vd, vs2, simm5 +VI_VI_LOOP_CMP +({ + res = vs2 <= simm5; +}) diff --git a/riscv-isa-sim/riscv/insns/vmsle_vv.h b/riscv-isa-sim/riscv/insns/vmsle_vv.h new file mode 100644 index 0000000..30aba06 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmsle_vv.h @@ -0,0 +1,5 @@ +// vsle.vv vd, vs2, vs1 +VI_VV_LOOP_CMP +({ + res = vs2 <= vs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vmsle_vx.h b/riscv-isa-sim/riscv/insns/vmsle_vx.h new file mode 100644 index 0000000..c26d596 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmsle_vx.h @@ -0,0 +1,5 @@ +// vsle.vx vd, vs2, rs1 +VI_VX_LOOP_CMP +({ + res = vs2 <= rs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vmsleu_vi.h b/riscv-isa-sim/riscv/insns/vmsleu_vi.h new file mode 100644 index 0000000..0e66b78 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmsleu_vi.h @@ -0,0 +1,5 @@ +// vmsleu.vi vd, vs2, simm5 +VI_VI_ULOOP_CMP +({ + res = vs2 <= (insn.v_simm5() & (UINT64_MAX >> (64 - P.VU.vsew))); +}) diff --git a/riscv-isa-sim/riscv/insns/vmsleu_vv.h b/riscv-isa-sim/riscv/insns/vmsleu_vv.h new file mode 100644 index 0000000..0e46032 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmsleu_vv.h @@ -0,0 +1,5 @@ +// vsleu.vv vd, vs2, vs1 +VI_VV_ULOOP_CMP +({ + res = vs2 <= vs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vmsleu_vx.h b/riscv-isa-sim/riscv/insns/vmsleu_vx.h new file mode 100644 index 0000000..935b176 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmsleu_vx.h @@ -0,0 +1,5 @@ +// vsleu.vx vd, vs2, rs1 +VI_VX_ULOOP_CMP +({ + res = vs2 <= rs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vmslt_vv.h b/riscv-isa-sim/riscv/insns/vmslt_vv.h new file mode 100644 index 0000000..71e6f87 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmslt_vv.h @@ -0,0 +1,5 @@ +// vslt.vv vd, vd2, vs1 +VI_VV_LOOP_CMP +({ + res = vs2 < vs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vmslt_vx.h b/riscv-isa-sim/riscv/insns/vmslt_vx.h new file mode 100644 index 0000000..b32bb14 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmslt_vx.h @@ -0,0 +1,5 @@ +// vslt.vx vd, vs2, vs1 +VI_VX_LOOP_CMP +({ + res = vs2 < rs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vmsltu_vv.h b/riscv-isa-sim/riscv/insns/vmsltu_vv.h new file mode 100644 index 0000000..53a570a --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmsltu_vv.h @@ -0,0 +1,5 @@ +// vsltu.vv vd, vs2, vs1 +VI_VV_ULOOP_CMP +({ + res = vs2 < vs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vmsltu_vx.h b/riscv-isa-sim/riscv/insns/vmsltu_vx.h new file mode 100644 index 0000000..8082544 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmsltu_vx.h @@ -0,0 +1,5 @@ +// vsltu.vx vd, vs2, vs1 +VI_VX_ULOOP_CMP +({ + res = vs2 < rs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vmsne_vi.h b/riscv-isa-sim/riscv/insns/vmsne_vi.h new file mode 100644 index 0000000..5e9758e --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmsne_vi.h @@ -0,0 +1,5 @@ +// vsne.vi vd, vs2, simm5 +VI_VI_LOOP_CMP +({ + res = vs2 != simm5; +}) diff --git a/riscv-isa-sim/riscv/insns/vmsne_vv.h b/riscv-isa-sim/riscv/insns/vmsne_vv.h new file mode 100644 index 0000000..e6a7174 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmsne_vv.h @@ -0,0 +1,5 @@ +// vneq.vv vd, vs2, vs1 +VI_VV_LOOP_CMP +({ + res = vs2 != vs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vmsne_vx.h b/riscv-isa-sim/riscv/insns/vmsne_vx.h new file mode 100644 index 0000000..9e4c155 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmsne_vx.h @@ -0,0 +1,5 @@ +// vsne.vx vd, vs2, rs1 +VI_VX_LOOP_CMP +({ + res = vs2 != rs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vmul_vv.h b/riscv-isa-sim/riscv/insns/vmul_vv.h new file mode 100644 index 0000000..a327817 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmul_vv.h @@ -0,0 +1,5 @@ +// vmul vd, vs2, vs1 +VI_VV_LOOP +({ + vd = vs2 * vs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vmul_vx.h b/riscv-isa-sim/riscv/insns/vmul_vx.h new file mode 100644 index 0000000..8d68390 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmul_vx.h @@ -0,0 +1,5 @@ +// vmul vd, vs2, rs1 +VI_VX_LOOP +({ + vd = vs2 * rs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vmulh_vv.h b/riscv-isa-sim/riscv/insns/vmulh_vv.h new file mode 100644 index 0000000..e861a33 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmulh_vv.h @@ -0,0 +1,5 @@ +// vmulh vd, vs2, vs1 +VI_VV_LOOP +({ + vd = ((int128_t)vs2 * vs1) >> sew; +}) diff --git a/riscv-isa-sim/riscv/insns/vmulh_vx.h b/riscv-isa-sim/riscv/insns/vmulh_vx.h new file mode 100644 index 0000000..b6b5503 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmulh_vx.h @@ -0,0 +1,5 @@ +// vmulh vd, vs2, rs1 +VI_VX_LOOP +({ + vd = ((int128_t)vs2 * rs1) >> sew; +}) diff --git a/riscv-isa-sim/riscv/insns/vmulhsu_vv.h b/riscv-isa-sim/riscv/insns/vmulhsu_vv.h new file mode 100644 index 0000000..e1c0ba6 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmulhsu_vv.h @@ -0,0 +1,4 @@ +// vmulhsu.vv vd, vs2, vs1 +VI_VV_SU_LOOP({ + vd = ((int128_t)vs2 * (uint128_t)vs1) >> sew; +}) diff --git a/riscv-isa-sim/riscv/insns/vmulhsu_vx.h b/riscv-isa-sim/riscv/insns/vmulhsu_vx.h new file mode 100644 index 0000000..4619ea8 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmulhsu_vx.h @@ -0,0 +1,4 @@ +// vmulhsu.vx vd, vs2, rs1 +VI_VX_SU_LOOP({ + vd = ((int128_t)vs2 * (uint128_t)rs1) >> sew; +}) diff --git a/riscv-isa-sim/riscv/insns/vmulhu_vv.h b/riscv-isa-sim/riscv/insns/vmulhu_vv.h new file mode 100644 index 0000000..8e318ed --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmulhu_vv.h @@ -0,0 +1,5 @@ +// vmulhu vd ,vs2, vs1 +VI_VV_ULOOP +({ + vd = ((uint128_t)vs2 * vs1) >> sew; +}) diff --git a/riscv-isa-sim/riscv/insns/vmulhu_vx.h b/riscv-isa-sim/riscv/insns/vmulhu_vx.h new file mode 100644 index 0000000..672ad32 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmulhu_vx.h @@ -0,0 +1,5 @@ +// vmulhu vd ,vs2, rs1 +VI_VX_ULOOP +({ + vd = ((uint128_t)vs2 * rs1) >> sew; +}) diff --git a/riscv-isa-sim/riscv/insns/vmv1r_v.h b/riscv-isa-sim/riscv/insns/vmv1r_v.h new file mode 100644 index 0000000..bbdeab9 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmv1r_v.h @@ -0,0 +1,2 @@ +// vmv1r.v vd, vs2 +#include "vmvnfr_v.h" diff --git a/riscv-isa-sim/riscv/insns/vmv2r_v.h b/riscv-isa-sim/riscv/insns/vmv2r_v.h new file mode 100644 index 0000000..1ac8e09 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmv2r_v.h @@ -0,0 +1,2 @@ +// vmv2r.v vd, vs2 +#include "vmvnfr_v.h" diff --git a/riscv-isa-sim/riscv/insns/vmv4r_v.h b/riscv-isa-sim/riscv/insns/vmv4r_v.h new file mode 100644 index 0000000..2068731 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmv4r_v.h @@ -0,0 +1,2 @@ +// vmv4r.v vd, vs2 +#include "vmvnfr_v.h" diff --git a/riscv-isa-sim/riscv/insns/vmv8r_v.h b/riscv-isa-sim/riscv/insns/vmv8r_v.h new file mode 100644 index 0000000..2b205fc --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmv8r_v.h @@ -0,0 +1,2 @@ +// vmv8r.v vd, vs2 +#include "vmvnfr_v.h" diff --git a/riscv-isa-sim/riscv/insns/vmv_s_x.h b/riscv-isa-sim/riscv/insns/vmv_s_x.h new file mode 100644 index 0000000..b66855b --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmv_s_x.h @@ -0,0 +1,29 @@ +// vmv_s_x: vd[0] = rs1 +require_vector(true); +require(insn.v_vm() == 1); +require(P.VU.vsew >= e8 && P.VU.vsew <= e64); +reg_t vl = P.VU.vl->read(); + +if (vl > 0 && P.VU.vstart->read() < vl) { + reg_t rd_num = insn.rd(); + reg_t sew = P.VU.vsew; + + switch(sew) { + case e8: + P.VU.elt(rd_num, 0, true) = RS1; + break; + case e16: + P.VU.elt(rd_num, 0, true) = RS1; + break; + case e32: + P.VU.elt(rd_num, 0, true) = RS1; + break; + default: + P.VU.elt(rd_num, 0, true) = RS1; + break; + } + + vl = 0; +} + +P.VU.vstart->write(0); diff --git a/riscv-isa-sim/riscv/insns/vmv_v_i.h b/riscv-isa-sim/riscv/insns/vmv_v_i.h new file mode 100644 index 0000000..3d5737e --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmv_v_i.h @@ -0,0 +1,5 @@ +// vmv.v.i vd, simm5 +VI_VI_MERGE_LOOP +({ + vd = simm5; +}) diff --git a/riscv-isa-sim/riscv/insns/vmv_x_s.h b/riscv-isa-sim/riscv/insns/vmv_x_s.h new file mode 100644 index 0000000..39752f9 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmv_x_s.h @@ -0,0 +1,31 @@ +// vmv_x_s: rd = vs2[rs1] +require_vector(true); +require(insn.v_vm() == 1); +uint64_t xmask = UINT64_MAX >> (64 - P.get_max_xlen()); +reg_t rs1 = RS1; +reg_t sew = P.VU.vsew; +reg_t rs2_num = insn.rs2(); + +if (!(rs1 >= 0 && rs1 < (P.VU.get_vlen() / sew))) { + WRITE_RD(0); +} else { + switch(sew) { + case e8: + WRITE_RD(P.VU.elt(rs2_num, rs1)); + break; + case e16: + WRITE_RD(P.VU.elt(rs2_num, rs1)); + break; + case e32: + WRITE_RD(P.VU.elt(rs2_num, rs1)); + break; + case e64: + if (P.get_max_xlen() <= sew) + WRITE_RD(P.VU.elt(rs2_num, rs1) & xmask); + else + WRITE_RD(P.VU.elt(rs2_num, rs1)); + break; + } +} + +P.VU.vstart->write(0); diff --git a/riscv-isa-sim/riscv/insns/vmvnfr_v.h b/riscv-isa-sim/riscv/insns/vmvnfr_v.h new file mode 100644 index 0000000..3604935 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmvnfr_v.h @@ -0,0 +1,27 @@ +// vmv1r.v vd, vs2 +require_vector_novtype(true, true); +const reg_t baseAddr = RS1; +const reg_t vd = insn.rd(); +const reg_t vs2 = insn.rs2(); +const reg_t len = insn.rs1() + 1; +require_align(vd, len); +require_align(vs2, len); +const reg_t size = len * P.VU.vlenb; + +//register needs one-by-one copy to keep commitlog correct +if (vd != vs2 && P.VU.vstart->read() < size) { + reg_t i = P.VU.vstart->read() / P.VU.vlenb; + reg_t off = P.VU.vstart->read() % P.VU.vlenb; + if (off) { + memcpy(&P.VU.elt(vd + i, off, true), + &P.VU.elt(vs2 + i, off), P.VU.vlenb - off); + i++; + } + + for (; i < len; ++i) { + memcpy(&P.VU.elt(vd + i, 0, true), + &P.VU.elt(vs2 + i, 0), P.VU.vlenb); + } +} + +P.VU.vstart->write(0); diff --git a/riscv-isa-sim/riscv/insns/vmxnor_mm.h b/riscv-isa-sim/riscv/insns/vmxnor_mm.h new file mode 100644 index 0000000..0736d5b --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmxnor_mm.h @@ -0,0 +1,2 @@ +// vmnxor.mm vd, vs2, vs1 +VI_LOOP_MASK(~(vs2 ^ vs1)); diff --git a/riscv-isa-sim/riscv/insns/vmxor_mm.h b/riscv-isa-sim/riscv/insns/vmxor_mm.h new file mode 100644 index 0000000..7f0c576 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vmxor_mm.h @@ -0,0 +1,2 @@ +// vmxor.mm vd, vs2, vs1 +VI_LOOP_MASK(vs2 ^ vs1); diff --git a/riscv-isa-sim/riscv/insns/vnclip_wi.h b/riscv-isa-sim/riscv/insns/vnclip_wi.h new file mode 100644 index 0000000..ea6898c --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vnclip_wi.h @@ -0,0 +1,25 @@ +// vnclip: vd[i] = clip(round(vs2[i] + rnd) >> simm) +VRM xrm = P.VU.get_vround_mode(); +int64_t int_max = INT64_MAX >> (64 - P.VU.vsew); +int64_t int_min = INT64_MIN >> (64 - P.VU.vsew); +VI_VI_LOOP_NARROW +({ + int128_t result = vs2; + unsigned shift = zimm5 & ((sew * 2) - 1); + + // rounding + INT_ROUNDING(result, xrm, shift); + + result = result >> shift; + + // saturation + if (result < int_min) { + result = int_min; + P_SET_OV(1); + } else if (result > int_max) { + result = int_max; + P_SET_OV(1); + } + + vd = result; +}) diff --git a/riscv-isa-sim/riscv/insns/vnclip_wv.h b/riscv-isa-sim/riscv/insns/vnclip_wv.h new file mode 100644 index 0000000..63b84c6 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vnclip_wv.h @@ -0,0 +1,25 @@ +// vnclip: vd[i] = clip(round(vs2[i] + rnd) >> vs1[i]) +VRM xrm = P.VU.get_vround_mode(); +int64_t int_max = INT64_MAX >> (64 - P.VU.vsew); +int64_t int_min = INT64_MIN >> (64 - P.VU.vsew); +VI_VV_LOOP_NARROW +({ + int128_t result = vs2; + unsigned shift = vs1 & ((sew * 2) - 1); + + // rounding + INT_ROUNDING(result, xrm, shift); + + result = result >> shift; + + // saturation + if (result < int_min) { + result = int_min; + P_SET_OV(1); + } else if (result > int_max) { + result = int_max; + P_SET_OV(1); + } + + vd = result; +}) diff --git a/riscv-isa-sim/riscv/insns/vnclip_wx.h b/riscv-isa-sim/riscv/insns/vnclip_wx.h new file mode 100644 index 0000000..482eace --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vnclip_wx.h @@ -0,0 +1,25 @@ +// vnclip: vd[i] = clip(round(vs2[i] + rnd) >> rs1[i]) +VRM xrm = P.VU.get_vround_mode(); +int64_t int_max = INT64_MAX >> (64 - P.VU.vsew); +int64_t int_min = INT64_MIN >> (64 - P.VU.vsew); +VI_VX_LOOP_NARROW +({ + int128_t result = vs2; + unsigned shift = rs1 & ((sew * 2) - 1); + + // rounding + INT_ROUNDING(result, xrm, shift); + + result = result >> shift; + + // saturation + if (result < int_min) { + result = int_min; + P_SET_OV(1); + } else if (result > int_max) { + result = int_max; + P_SET_OV(1); + } + + vd = result; +}) diff --git a/riscv-isa-sim/riscv/insns/vnclipu_wi.h b/riscv-isa-sim/riscv/insns/vnclipu_wi.h new file mode 100644 index 0000000..441a3a7 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vnclipu_wi.h @@ -0,0 +1,23 @@ +// vnclipu: vd[i] = clip(round(vs2[i] + rnd) >> simm) +VRM xrm = P.VU.get_vround_mode(); +uint64_t uint_max = UINT64_MAX >> (64 - P.VU.vsew); +uint64_t sign_mask = UINT64_MAX << P.VU.vsew; +VI_VI_LOOP_NARROW +({ + uint128_t result = vs2_u; + unsigned shift = zimm5 & ((sew * 2) - 1); + + // rounding + INT_ROUNDING(result, xrm, shift); + + // unsigned shifting to rs1 + result = result >> shift; + + // saturation + if (result & sign_mask) { + result = uint_max; + P_SET_OV(1); + } + + vd = result; +}) diff --git a/riscv-isa-sim/riscv/insns/vnclipu_wv.h b/riscv-isa-sim/riscv/insns/vnclipu_wv.h new file mode 100644 index 0000000..8072489 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vnclipu_wv.h @@ -0,0 +1,22 @@ +// vnclipu: vd[i] = clip(round(vs2[i] + rnd) >> vs1[i]) +VRM xrm = P.VU.get_vround_mode(); +uint64_t uint_max = UINT64_MAX >> (64 - P.VU.vsew); +uint64_t sign_mask = UINT64_MAX << P.VU.vsew; +VI_VV_LOOP_NARROW +({ + uint128_t result = vs2_u; + unsigned shift = vs1 & ((sew * 2) - 1); + + // rounding + INT_ROUNDING(result, xrm, shift); + + result = result >> shift; + + // saturation + if (result & sign_mask) { + result = uint_max; + P_SET_OV(1); + } + + vd = result; +}) diff --git a/riscv-isa-sim/riscv/insns/vnclipu_wx.h b/riscv-isa-sim/riscv/insns/vnclipu_wx.h new file mode 100644 index 0000000..b2d91c3 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vnclipu_wx.h @@ -0,0 +1,22 @@ +// vnclipu: vd[i] = clip(round(vs2[i] + rnd) >> rs1[i]) +VRM xrm = P.VU.get_vround_mode(); +uint64_t uint_max = UINT64_MAX >> (64 - P.VU.vsew); +uint64_t sign_mask = UINT64_MAX << P.VU.vsew; +VI_VX_LOOP_NARROW +({ + uint128_t result = vs2_u; + unsigned shift = rs1 & ((sew * 2) - 1); + + // rounding + INT_ROUNDING(result, xrm, shift); + + result = result >> shift; + + // saturation + if (result & sign_mask) { + result = uint_max; + P_SET_OV(1); + } + + vd = result; +}) diff --git a/riscv-isa-sim/riscv/insns/vnsra_wi.h b/riscv-isa-sim/riscv/insns/vnsra_wi.h new file mode 100644 index 0000000..0502ff1 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vnsra_wi.h @@ -0,0 +1,5 @@ +// vnsra.vi vd, vs2, zimm5 +VI_VI_LOOP_NSHIFT +({ + vd = vs2 >> (zimm5 & (sew * 2 - 1) & 0x1f); +}) diff --git a/riscv-isa-sim/riscv/insns/vnsra_wv.h b/riscv-isa-sim/riscv/insns/vnsra_wv.h new file mode 100644 index 0000000..555ce3f --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vnsra_wv.h @@ -0,0 +1,5 @@ +// vnsra.vv vd, vs2, vs1 +VI_VV_LOOP_NSHIFT +({ + vd = vs2 >> (vs1 & (sew * 2 - 1)); +}) diff --git a/riscv-isa-sim/riscv/insns/vnsra_wx.h b/riscv-isa-sim/riscv/insns/vnsra_wx.h new file mode 100644 index 0000000..05a55e3 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vnsra_wx.h @@ -0,0 +1,5 @@ +// vnsra.vx vd, vs2, rs1 +VI_VX_LOOP_NSHIFT +({ + vd = vs2 >> (rs1 & (sew * 2 - 1)); +}) diff --git a/riscv-isa-sim/riscv/insns/vnsrl_wi.h b/riscv-isa-sim/riscv/insns/vnsrl_wi.h new file mode 100644 index 0000000..d4dfcf0 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vnsrl_wi.h @@ -0,0 +1,5 @@ +// vnsrl.vi vd, vs2, zimm5 +VI_VI_LOOP_NSHIFT +({ + vd = vs2_u >> (zimm5 & (sew * 2 - 1)); +}) diff --git a/riscv-isa-sim/riscv/insns/vnsrl_wv.h b/riscv-isa-sim/riscv/insns/vnsrl_wv.h new file mode 100644 index 0000000..ab72b84 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vnsrl_wv.h @@ -0,0 +1,5 @@ +// vnsrl.vv vd, vs2, vs1 +VI_VV_LOOP_NSHIFT +({ + vd = vs2_u >> (vs1 & (sew * 2 - 1)); +}) diff --git a/riscv-isa-sim/riscv/insns/vnsrl_wx.h b/riscv-isa-sim/riscv/insns/vnsrl_wx.h new file mode 100644 index 0000000..e149b38 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vnsrl_wx.h @@ -0,0 +1,5 @@ +// vnsrl.vx vd, vs2, rs1 +VI_VX_LOOP_NSHIFT +({ + vd = vs2_u >> (rs1 & (sew * 2 - 1)); +}) diff --git a/riscv-isa-sim/riscv/insns/vor_vi.h b/riscv-isa-sim/riscv/insns/vor_vi.h new file mode 100644 index 0000000..f759607 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vor_vi.h @@ -0,0 +1,5 @@ +// vor +VI_VI_LOOP +({ + vd = simm5 | vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vor_vv.h b/riscv-isa-sim/riscv/insns/vor_vv.h new file mode 100644 index 0000000..0c46066 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vor_vv.h @@ -0,0 +1,5 @@ +// vor +VI_VV_LOOP +({ + vd = vs1 | vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vor_vx.h b/riscv-isa-sim/riscv/insns/vor_vx.h new file mode 100644 index 0000000..01c003a --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vor_vx.h @@ -0,0 +1,5 @@ +// vor +VI_VX_LOOP +({ + vd = rs1 | vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vredand_vs.h b/riscv-isa-sim/riscv/insns/vredand_vs.h new file mode 100644 index 0000000..6c2d908 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vredand_vs.h @@ -0,0 +1,5 @@ +// vredand.vs vd, vs2 ,vs1 +VI_VV_LOOP_REDUCTION +({ + vd_0_res &= vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vredmax_vs.h b/riscv-isa-sim/riscv/insns/vredmax_vs.h new file mode 100644 index 0000000..be2e76a --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vredmax_vs.h @@ -0,0 +1,5 @@ +// vredmax.vs vd, vs2 ,vs1 +VI_VV_LOOP_REDUCTION +({ + vd_0_res = (vd_0_res >= vs2) ? vd_0_res : vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vredmaxu_vs.h b/riscv-isa-sim/riscv/insns/vredmaxu_vs.h new file mode 100644 index 0000000..960f486 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vredmaxu_vs.h @@ -0,0 +1,5 @@ +// vredmaxu.vs vd, vs2 ,vs1 +VI_VV_ULOOP_REDUCTION +({ + vd_0_res = (vd_0_res >= vs2) ? vd_0_res : vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vredmin_vs.h b/riscv-isa-sim/riscv/insns/vredmin_vs.h new file mode 100644 index 0000000..50359b7 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vredmin_vs.h @@ -0,0 +1,5 @@ +// vredmin.vs vd, vs2 ,vs1 +VI_VV_LOOP_REDUCTION +({ + vd_0_res = (vd_0_res <= vs2) ? vd_0_res : vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vredminu_vs.h b/riscv-isa-sim/riscv/insns/vredminu_vs.h new file mode 100644 index 0000000..7082475 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vredminu_vs.h @@ -0,0 +1,5 @@ +// vredminu.vs vd, vs2 ,vs1 +VI_VV_ULOOP_REDUCTION +({ + vd_0_res = (vd_0_res <= vs2) ? vd_0_res : vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vredor_vs.h b/riscv-isa-sim/riscv/insns/vredor_vs.h new file mode 100644 index 0000000..f7acd9a --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vredor_vs.h @@ -0,0 +1,5 @@ +// vredor.vs vd, vs2 ,vs1 +VI_VV_LOOP_REDUCTION +({ + vd_0_res |= vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vredsum_vs.h b/riscv-isa-sim/riscv/insns/vredsum_vs.h new file mode 100644 index 0000000..c4fefe5 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vredsum_vs.h @@ -0,0 +1,5 @@ +// vredsum.vs vd, vs2 ,vs1 +VI_VV_LOOP_REDUCTION +({ + vd_0_res += vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vredxor_vs.h b/riscv-isa-sim/riscv/insns/vredxor_vs.h new file mode 100644 index 0000000..bb81ad9 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vredxor_vs.h @@ -0,0 +1,5 @@ +// vredxor.vs vd, vs2 ,vs1 +VI_VV_LOOP_REDUCTION +({ + vd_0_res ^= vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vrem_vv.h b/riscv-isa-sim/riscv/insns/vrem_vv.h new file mode 100644 index 0000000..260716a --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vrem_vv.h @@ -0,0 +1,11 @@ +// vrem.vv vd, vs2, vs1 +VI_VV_LOOP +({ + if (vs1 == 0) + vd = vs2; + else if(vs2 == -(((intmax_t)1) << (sew - 1)) && vs1 == -1) + vd = 0; + else { + vd = vs2 % vs1; + } +}) diff --git a/riscv-isa-sim/riscv/insns/vrem_vx.h b/riscv-isa-sim/riscv/insns/vrem_vx.h new file mode 100644 index 0000000..3702f02 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vrem_vx.h @@ -0,0 +1,10 @@ +// vrem.vx vd, vs2, rs1 +VI_VX_LOOP +({ + if (rs1 == 0) + vd = vs2; + else if (vs2 == -(((intmax_t)1) << (sew - 1)) && rs1 == -1) + vd = 0; + else + vd = vs2 % rs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vremu_vv.h b/riscv-isa-sim/riscv/insns/vremu_vv.h new file mode 100644 index 0000000..7e15072 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vremu_vv.h @@ -0,0 +1,8 @@ +// vremu.vv vd, vs2, vs1 +VI_VV_ULOOP +({ + if (vs1 == 0) + vd = vs2; + else + vd = vs2 % vs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vremu_vx.h b/riscv-isa-sim/riscv/insns/vremu_vx.h new file mode 100644 index 0000000..a87a820 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vremu_vx.h @@ -0,0 +1,8 @@ +// vremu.vx vd, vs2, rs1 +VI_VX_ULOOP +({ + if (rs1 == 0) + vd = vs2; + else + vd = vs2 % rs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vrgather_vi.h b/riscv-isa-sim/riscv/insns/vrgather_vi.h new file mode 100644 index 0000000..56e11e1 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vrgather_vi.h @@ -0,0 +1,30 @@ +// vrgather.vi vd, vs2, zimm5 vm # vd[i] = (zimm5 >= VLMAX) ? 0 : vs2[zimm5]; +require_align(insn.rd(), P.VU.vflmul); +require_align(insn.rs2(), P.VU.vflmul); +require(insn.rd() != insn.rs2()); +require_vm; + +reg_t zimm5 = insn.v_zimm5(); + +VI_LOOP_BASE + +for (reg_t i = P.VU.vstart->read(); i < vl; ++i) { + VI_LOOP_ELEMENT_SKIP(); + + switch (sew) { + case e8: + P.VU.elt(rd_num, i, true) = zimm5 >= P.VU.vlmax ? 0 : P.VU.elt(rs2_num, zimm5); + break; + case e16: + P.VU.elt(rd_num, i, true) = zimm5 >= P.VU.vlmax ? 0 : P.VU.elt(rs2_num, zimm5); + break; + case e32: + P.VU.elt(rd_num, i, true) = zimm5 >= P.VU.vlmax ? 0 : P.VU.elt(rs2_num, zimm5); + break; + default: + P.VU.elt(rd_num, i, true) = zimm5 >= P.VU.vlmax ? 0 : P.VU.elt(rs2_num, zimm5); + break; + } +} + +VI_LOOP_END; diff --git a/riscv-isa-sim/riscv/insns/vrgather_vv.h b/riscv-isa-sim/riscv/insns/vrgather_vv.h new file mode 100644 index 0000000..a3a32f5 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vrgather_vv.h @@ -0,0 +1,32 @@ +// vrgather.vv vd, vs2, vs1, vm # vd[i] = (vs1[i] >= VLMAX) ? 0 : vs2[vs1[i]]; +require_align(insn.rd(), P.VU.vflmul); +require_align(insn.rs2(), P.VU.vflmul); +require_align(insn.rs1(), P.VU.vflmul); +require(insn.rd() != insn.rs2() && insn.rd() != insn.rs1()); +require_vm; + +VI_LOOP_BASE + switch (sew) { + case e8: { + auto vs1 = P.VU.elt(rs1_num, i); + //if (i > 255) continue; + P.VU.elt(rd_num, i, true) = vs1 >= P.VU.vlmax ? 0 : P.VU.elt(rs2_num, vs1); + break; + } + case e16: { + auto vs1 = P.VU.elt(rs1_num, i); + P.VU.elt(rd_num, i, true) = vs1 >= P.VU.vlmax ? 0 : P.VU.elt(rs2_num, vs1); + break; + } + case e32: { + auto vs1 = P.VU.elt(rs1_num, i); + P.VU.elt(rd_num, i, true) = vs1 >= P.VU.vlmax ? 0 : P.VU.elt(rs2_num, vs1); + break; + } + default: { + auto vs1 = P.VU.elt(rs1_num, i); + P.VU.elt(rd_num, i, true) = vs1 >= P.VU.vlmax ? 0 : P.VU.elt(rs2_num, vs1); + break; + } + } +VI_LOOP_END; diff --git a/riscv-isa-sim/riscv/insns/vrgather_vx.h b/riscv-isa-sim/riscv/insns/vrgather_vx.h new file mode 100644 index 0000000..058ffae --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vrgather_vx.h @@ -0,0 +1,24 @@ +// vrgather.vx vd, vs2, rs1, vm # vd[i] = (rs1 >= VLMAX) ? 0 : vs2[rs1]; +require_align(insn.rd(), P.VU.vflmul); +require_align(insn.rs2(), P.VU.vflmul); +require(insn.rd() != insn.rs2()); +require_vm; + +reg_t rs1 = RS1; + +VI_LOOP_BASE + switch (sew) { + case e8: + P.VU.elt(rd_num, i, true) = rs1 >= P.VU.vlmax ? 0 : P.VU.elt(rs2_num, rs1); + break; + case e16: + P.VU.elt(rd_num, i, true) = rs1 >= P.VU.vlmax ? 0 : P.VU.elt(rs2_num, rs1); + break; + case e32: + P.VU.elt(rd_num, i, true) = rs1 >= P.VU.vlmax ? 0 : P.VU.elt(rs2_num, rs1); + break; + default: + P.VU.elt(rd_num, i, true) = rs1 >= P.VU.vlmax ? 0 : P.VU.elt(rs2_num, rs1); + break; + } +VI_LOOP_END; diff --git a/riscv-isa-sim/riscv/insns/vrgatherei16_vv.h b/riscv-isa-sim/riscv/insns/vrgatherei16_vv.h new file mode 100644 index 0000000..3bb166a --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vrgatherei16_vv.h @@ -0,0 +1,34 @@ +// vrgatherei16.vv vd, vs2, vs1, vm # vd[i] = (vs1[i] >= VLMAX) ? 0 : vs2[vs1[i]]; +float vemul = (16.0 / P.VU.vsew * P.VU.vflmul); +require(vemul >= 0.125 && vemul <= 8); +require_align(insn.rd(), P.VU.vflmul); +require_align(insn.rs2(), P.VU.vflmul); +require_align(insn.rs1(), vemul); +require_noover(insn.rd(), P.VU.vflmul, insn.rs1(), vemul); +require(insn.rd() != insn.rs2()); +require_vm; + +VI_LOOP_BASE + switch (sew) { + case e8: { + auto vs1 = P.VU.elt(rs1_num, i); + P.VU.elt(rd_num, i, true) = vs1 >= P.VU.vlmax ? 0 : P.VU.elt(rs2_num, vs1); + break; + } + case e16: { + auto vs1 = P.VU.elt(rs1_num, i); + P.VU.elt(rd_num, i, true) = vs1 >= P.VU.vlmax ? 0 : P.VU.elt(rs2_num, vs1); + break; + } + case e32: { + auto vs1 = P.VU.elt(rs1_num, i); + P.VU.elt(rd_num, i, true) = vs1 >= P.VU.vlmax ? 0 : P.VU.elt(rs2_num, vs1); + break; + } + default: { + auto vs1 = P.VU.elt(rs1_num, i); + P.VU.elt(rd_num, i, true) = vs1 >= P.VU.vlmax ? 0 : P.VU.elt(rs2_num, vs1); + break; + } + } +VI_LOOP_END; diff --git a/riscv-isa-sim/riscv/insns/vrsub_vi.h b/riscv-isa-sim/riscv/insns/vrsub_vi.h new file mode 100644 index 0000000..198c33f --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vrsub_vi.h @@ -0,0 +1,5 @@ +// vrsub.vi vd, vs2, imm, vm # vd[i] = imm - vs2[i] +VI_VI_LOOP +({ + vd = simm5 - vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vrsub_vx.h b/riscv-isa-sim/riscv/insns/vrsub_vx.h new file mode 100644 index 0000000..bfd6259 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vrsub_vx.h @@ -0,0 +1,5 @@ +// vrsub.vx vd, vs2, rs1, vm # vd[i] = rs1 - vs2[i] +VI_VX_LOOP +({ + vd = rs1 - vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vs1r_v.h b/riscv-isa-sim/riscv/insns/vs1r_v.h new file mode 100644 index 0000000..1932ec0 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vs1r_v.h @@ -0,0 +1,2 @@ +// vs1r.v vs3, (rs1) +VI_ST_WHOLE diff --git a/riscv-isa-sim/riscv/insns/vs2r_v.h b/riscv-isa-sim/riscv/insns/vs2r_v.h new file mode 100644 index 0000000..2e515b4 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vs2r_v.h @@ -0,0 +1,2 @@ +// vs2r.v vs3, (rs1) +VI_ST_WHOLE diff --git a/riscv-isa-sim/riscv/insns/vs4r_v.h b/riscv-isa-sim/riscv/insns/vs4r_v.h new file mode 100644 index 0000000..161bf89 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vs4r_v.h @@ -0,0 +1,2 @@ +// vs4r.v vs3, (rs1) +VI_ST_WHOLE diff --git a/riscv-isa-sim/riscv/insns/vs8r_v.h b/riscv-isa-sim/riscv/insns/vs8r_v.h new file mode 100644 index 0000000..1ad2575 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vs8r_v.h @@ -0,0 +1,2 @@ +// vs8r.v vs3, (rs1) +VI_ST_WHOLE diff --git a/riscv-isa-sim/riscv/insns/vsadd_vi.h b/riscv-isa-sim/riscv/insns/vsadd_vi.h new file mode 100644 index 0000000..7e3b652 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsadd_vi.h @@ -0,0 +1,28 @@ +// vsadd.vi vd, vs2 simm5 +VI_CHECK_SSS(false); +VI_LOOP_BASE +bool sat = false; +switch(sew) { +case e8: { + VI_PARAMS(e8); + vd = sat_add(vs2, vsext(simm5, sew), sat); + break; +} +case e16: { + VI_PARAMS(e16); + vd = sat_add(vs2, vsext(simm5, sew), sat); + break; +} +case e32: { + VI_PARAMS(e32); + vd = sat_add(vs2, vsext(simm5, sew), sat); + break; +} +default: { + VI_PARAMS(e64); + vd = sat_add(vs2, vsext(simm5, sew), sat); + break; +} +} +P_SET_OV(sat); +VI_LOOP_END diff --git a/riscv-isa-sim/riscv/insns/vsadd_vv.h b/riscv-isa-sim/riscv/insns/vsadd_vv.h new file mode 100644 index 0000000..60ad5f3 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsadd_vv.h @@ -0,0 +1,28 @@ +// vsadd.vv vd, vs2, vs1 +VI_CHECK_SSS(true); +VI_LOOP_BASE +bool sat = false; +switch(sew) { +case e8: { + VV_PARAMS(e8); + vd = sat_add(vs2, vs1, sat); + break; +} +case e16: { + VV_PARAMS(e16); + vd = sat_add(vs2, vs1, sat); + break; +} +case e32: { + VV_PARAMS(e32); + vd = sat_add(vs2, vs1, sat); + break; +} +default: { + VV_PARAMS(e64); + vd = sat_add(vs2, vs1, sat); + break; +} +} +P_SET_OV(sat); +VI_LOOP_END diff --git a/riscv-isa-sim/riscv/insns/vsadd_vx.h b/riscv-isa-sim/riscv/insns/vsadd_vx.h new file mode 100644 index 0000000..bf68f15 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsadd_vx.h @@ -0,0 +1,28 @@ +// vsadd.vx vd, vs2, rs1 +VI_CHECK_SSS(false); +VI_LOOP_BASE +bool sat = false; +switch(sew) { +case e8: { + VX_PARAMS(e8); + vd = sat_add(vs2, rs1, sat); + break; +} +case e16: { + VX_PARAMS(e16); + vd = sat_add(vs2, rs1, sat); + break; +} +case e32: { + VX_PARAMS(e32); + vd = sat_add(vs2, rs1, sat); + break; +} +default: { + VX_PARAMS(e64); + vd = sat_add(vs2, rs1, sat); + break; +} +} +P_SET_OV(sat); +VI_LOOP_END diff --git a/riscv-isa-sim/riscv/insns/vsaddu_vi.h b/riscv-isa-sim/riscv/insns/vsaddu_vi.h new file mode 100644 index 0000000..3860714 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsaddu_vi.h @@ -0,0 +1,11 @@ +// vsaddu vd, vs2, zimm5 +VI_VI_ULOOP +({ + bool sat = false; + vd = vs2 + (insn.v_simm5() & (UINT64_MAX >> (64 - P.VU.vsew))); + + sat = vd < vs2; + vd |= -(vd < vs2); + + P_SET_OV(sat); +}) diff --git a/riscv-isa-sim/riscv/insns/vsaddu_vv.h b/riscv-isa-sim/riscv/insns/vsaddu_vv.h new file mode 100644 index 0000000..a0cba81 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsaddu_vv.h @@ -0,0 +1,11 @@ +// vsaddu vd, vs2, vs1 +VI_VV_ULOOP +({ + bool sat = false; + vd = vs2 + vs1; + + sat = vd < vs2; + vd |= -(vd < vs2); + + P_SET_OV(sat); +}) diff --git a/riscv-isa-sim/riscv/insns/vsaddu_vx.h b/riscv-isa-sim/riscv/insns/vsaddu_vx.h new file mode 100644 index 0000000..c0a7d87 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsaddu_vx.h @@ -0,0 +1,12 @@ +// vsaddu vd, vs2, rs1 +VI_VX_ULOOP +({ + bool sat = false; + vd = vs2 + rs1; + + sat = vd < vs2; + vd |= -(vd < vs2); + + P_SET_OV(sat); + +}) diff --git a/riscv-isa-sim/riscv/insns/vsetivli.h b/riscv-isa-sim/riscv/insns/vsetivli.h new file mode 100644 index 0000000..04900a2 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsetivli.h @@ -0,0 +1,2 @@ +require_vector_novtype(false, false); +WRITE_RD(P.VU.set_vl(insn.rd(), -1, insn.rs1(), insn.v_zimm10())); diff --git a/riscv-isa-sim/riscv/insns/vsetvl.h b/riscv-isa-sim/riscv/insns/vsetvl.h new file mode 100644 index 0000000..2969edc --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsetvl.h @@ -0,0 +1,2 @@ +require_vector_novtype(false, false); +WRITE_RD(P.VU.set_vl(insn.rd(), insn.rs1(), RS1, RS2)); diff --git a/riscv-isa-sim/riscv/insns/vsetvli.h b/riscv-isa-sim/riscv/insns/vsetvli.h new file mode 100644 index 0000000..7b1f1d7 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsetvli.h @@ -0,0 +1,2 @@ +require_vector_novtype(false, false); +WRITE_RD(P.VU.set_vl(insn.rd(), insn.rs1(), RS1, insn.v_zimm11())); diff --git a/riscv-isa-sim/riscv/insns/vsext_vf2.h b/riscv-isa-sim/riscv/insns/vsext_vf2.h new file mode 100644 index 0000000..16ccfac --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsext_vf2.h @@ -0,0 +1 @@ +VI_VV_EXT(2, int); diff --git a/riscv-isa-sim/riscv/insns/vsext_vf4.h b/riscv-isa-sim/riscv/insns/vsext_vf4.h new file mode 100644 index 0000000..d4476a3 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsext_vf4.h @@ -0,0 +1 @@ +VI_VV_EXT(4, int); diff --git a/riscv-isa-sim/riscv/insns/vsext_vf8.h b/riscv-isa-sim/riscv/insns/vsext_vf8.h new file mode 100644 index 0000000..09fdc2c --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsext_vf8.h @@ -0,0 +1 @@ +VI_VV_EXT(8, int); diff --git a/riscv-isa-sim/riscv/insns/vslide1down_vx.h b/riscv-isa-sim/riscv/insns/vslide1down_vx.h new file mode 100644 index 0000000..e867722 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vslide1down_vx.h @@ -0,0 +1,44 @@ +//vslide1down.vx vd, vs2, rs1 +VI_CHECK_SLIDE(false); + +VI_LOOP_BASE +if (i != vl - 1) { + switch (sew) { + case e8: { + VI_XI_SLIDEDOWN_PARAMS(e8, 1); + vd = vs2; + } + break; + case e16: { + VI_XI_SLIDEDOWN_PARAMS(e16, 1); + vd = vs2; + } + break; + case e32: { + VI_XI_SLIDEDOWN_PARAMS(e32, 1); + vd = vs2; + } + break; + default: { + VI_XI_SLIDEDOWN_PARAMS(e64, 1); + vd = vs2; + } + break; + } +} else { + switch (sew) { + case e8: + P.VU.elt(rd_num, vl - 1, true) = RS1; + break; + case e16: + P.VU.elt(rd_num, vl - 1, true) = RS1; + break; + case e32: + P.VU.elt(rd_num, vl - 1, true) = RS1; + break; + default: + P.VU.elt(rd_num, vl - 1, true) = RS1; + break; + } +} +VI_LOOP_END diff --git a/riscv-isa-sim/riscv/insns/vslide1up_vx.h b/riscv-isa-sim/riscv/insns/vslide1up_vx.h new file mode 100644 index 0000000..33cb9ed --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vslide1up_vx.h @@ -0,0 +1,30 @@ +//vslide1up.vx vd, vs2, rs1 +VI_CHECK_SLIDE(true); + +VI_LOOP_BASE +if (i != 0) { + if (sew == e8) { + VI_XI_SLIDEUP_PARAMS(e8, 1); + vd = vs2; + } else if(sew == e16) { + VI_XI_SLIDEUP_PARAMS(e16, 1); + vd = vs2; + } else if(sew == e32) { + VI_XI_SLIDEUP_PARAMS(e32, 1); + vd = vs2; + } else if(sew == e64) { + VI_XI_SLIDEUP_PARAMS(e64, 1); + vd = vs2; + } +} else { + if (sew == e8) { + P.VU.elt(rd_num, 0, true) = RS1; + } else if(sew == e16) { + P.VU.elt(rd_num, 0, true) = RS1; + } else if(sew == e32) { + P.VU.elt(rd_num, 0, true) = RS1; + } else if(sew == e64) { + P.VU.elt(rd_num, 0, true) = RS1; + } +} +VI_LOOP_END diff --git a/riscv-isa-sim/riscv/insns/vslidedown_vi.h b/riscv-isa-sim/riscv/insns/vslidedown_vi.h new file mode 100644 index 0000000..bc440cf --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vslidedown_vi.h @@ -0,0 +1,36 @@ +// vslidedown.vi vd, vs2, rs1 +VI_CHECK_SLIDE(false); + +const reg_t sh = insn.v_zimm5(); +VI_LOOP_BASE + +reg_t offset = 0; +bool is_valid = (i + sh) < P.VU.vlmax; + +if (is_valid) { + offset = sh; +} + +switch (sew) { +case e8: { + VI_XI_SLIDEDOWN_PARAMS(e8, offset); + vd = is_valid ? vs2 : 0; +} +break; +case e16: { + VI_XI_SLIDEDOWN_PARAMS(e16, offset); + vd = is_valid ? vs2 : 0; +} +break; +case e32: { + VI_XI_SLIDEDOWN_PARAMS(e32, offset); + vd = is_valid ? vs2 : 0; +} +break; +default: { + VI_XI_SLIDEDOWN_PARAMS(e64, offset); + vd = is_valid ? vs2 : 0; +} +break; +} +VI_LOOP_END diff --git a/riscv-isa-sim/riscv/insns/vslidedown_vx.h b/riscv-isa-sim/riscv/insns/vslidedown_vx.h new file mode 100644 index 0000000..074aa50 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vslidedown_vx.h @@ -0,0 +1,36 @@ +//vslidedown.vx vd, vs2, rs1 +VI_CHECK_SLIDE(false); + +const uint128_t sh = RS1; +VI_LOOP_BASE + +reg_t offset = 0; +bool is_valid = (i + sh) < P.VU.vlmax; + +if (is_valid) { + offset = sh; +} + +switch (sew) { +case e8: { + VI_XI_SLIDEDOWN_PARAMS(e8, offset); + vd = is_valid ? vs2 : 0; +} +break; +case e16: { + VI_XI_SLIDEDOWN_PARAMS(e16, offset); + vd = is_valid ? vs2 : 0; +} +break; +case e32: { + VI_XI_SLIDEDOWN_PARAMS(e32, offset); + vd = is_valid ? vs2 : 0; +} +break; +default: { + VI_XI_SLIDEDOWN_PARAMS(e64, offset); + vd = is_valid ? vs2 : 0; +} +break; +} +VI_LOOP_END diff --git a/riscv-isa-sim/riscv/insns/vslideup_vi.h b/riscv-isa-sim/riscv/insns/vslideup_vi.h new file mode 100644 index 0000000..3d53794 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vslideup_vi.h @@ -0,0 +1,31 @@ +// vslideup.vi vd, vs2, rs1 +VI_CHECK_SLIDE(true); + +const reg_t offset = insn.v_zimm5(); +VI_LOOP_BASE +if (P.VU.vstart->read() < offset && i < offset) + continue; + +switch (sew) { +case e8: { + VI_XI_SLIDEUP_PARAMS(e8, offset); + vd = vs2; +} +break; +case e16: { + VI_XI_SLIDEUP_PARAMS(e16, offset); + vd = vs2; +} +break; +case e32: { + VI_XI_SLIDEUP_PARAMS(e32, offset); + vd = vs2; +} +break; +default: { + VI_XI_SLIDEUP_PARAMS(e64, offset); + vd = vs2; +} +break; +} +VI_LOOP_END diff --git a/riscv-isa-sim/riscv/insns/vslideup_vx.h b/riscv-isa-sim/riscv/insns/vslideup_vx.h new file mode 100644 index 0000000..43d41fb --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vslideup_vx.h @@ -0,0 +1,31 @@ +//vslideup.vx vd, vs2, rs1 +VI_CHECK_SLIDE(true); + +const reg_t offset = RS1; +VI_LOOP_BASE +if (P.VU.vstart->read() < offset && i < offset) + continue; + +switch (sew) { +case e8: { + VI_XI_SLIDEUP_PARAMS(e8, offset); + vd = vs2; +} +break; +case e16: { + VI_XI_SLIDEUP_PARAMS(e16, offset); + vd = vs2; +} +break; +case e32: { + VI_XI_SLIDEUP_PARAMS(e32, offset); + vd = vs2; +} +break; +default: { + VI_XI_SLIDEUP_PARAMS(e64, offset); + vd = vs2; +} +break; +} +VI_LOOP_END diff --git a/riscv-isa-sim/riscv/insns/vsll_vi.h b/riscv-isa-sim/riscv/insns/vsll_vi.h new file mode 100644 index 0000000..be46506 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsll_vi.h @@ -0,0 +1,5 @@ +// vsll.vi vd, vs2, zimm5 +VI_VI_LOOP +({ + vd = vs2 << (simm5 & (sew - 1) & 0x1f); +}) diff --git a/riscv-isa-sim/riscv/insns/vsll_vv.h b/riscv-isa-sim/riscv/insns/vsll_vv.h new file mode 100644 index 0000000..ce82022 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsll_vv.h @@ -0,0 +1,5 @@ +// vsll +VI_VV_LOOP +({ + vd = vs2 << (vs1 & (sew - 1)); +}) diff --git a/riscv-isa-sim/riscv/insns/vsll_vx.h b/riscv-isa-sim/riscv/insns/vsll_vx.h new file mode 100644 index 0000000..823510b --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsll_vx.h @@ -0,0 +1,5 @@ +// vsll +VI_VX_LOOP +({ + vd = vs2 << (rs1 & (sew - 1)); +}) diff --git a/riscv-isa-sim/riscv/insns/vsm_v.h b/riscv-isa-sim/riscv/insns/vsm_v.h new file mode 100644 index 0000000..e1d468b --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsm_v.h @@ -0,0 +1,2 @@ +// vse1.v +VI_ST(0, (i * nf + fn), uint8, true); diff --git a/riscv-isa-sim/riscv/insns/vsmul_vv.h b/riscv-isa-sim/riscv/insns/vsmul_vv.h new file mode 100644 index 0000000..413981c --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsmul_vv.h @@ -0,0 +1,32 @@ +// vsmul.vv vd, vs2, vs1 +VRM xrm = P.VU.get_vround_mode(); +int64_t int_max = INT64_MAX >> (64 - P.VU.vsew); +int64_t int_min = INT64_MIN >> (64 - P.VU.vsew); +int64_t sign_mask = uint64_t(1) << (P.VU.vsew - 1); + +VI_VV_LOOP +({ + int64_t vs1_sign; + int64_t vs2_sign; + int64_t result_sign; + + vs1_sign = vs1 & sign_mask; + vs2_sign = vs2 & sign_mask; + bool overflow = vs1 == vs2 && vs1 == int_min; + + int128_t result = (int128_t)vs1 * (int128_t)vs2; + result_sign = (vs1_sign ^ vs2_sign) & sign_mask; + + // rounding + INT_ROUNDING(result, xrm, sew - 1); + // remove guard bits + result = result >> (sew - 1); + + // saturation + if (overflow) { + result = int_max; + P_SET_OV(1); + } + + vd = result; +}) diff --git a/riscv-isa-sim/riscv/insns/vsmul_vx.h b/riscv-isa-sim/riscv/insns/vsmul_vx.h new file mode 100644 index 0000000..2e25670 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsmul_vx.h @@ -0,0 +1,33 @@ +// vsmul.vx vd, vs2, rs1 +VRM xrm = P.VU.get_vround_mode(); +int64_t int_max = INT64_MAX >> (64 - P.VU.vsew); +int64_t int_min = INT64_MIN >> (64 - P.VU.vsew); +int64_t sign_mask = uint64_t(1) << (P.VU.vsew - 1); + +VI_VX_LOOP +({ + int64_t rs1_sign; + int64_t vs2_sign; + int64_t result_sign; + + rs1_sign = rs1 & sign_mask; + vs2_sign = vs2 & sign_mask; + bool overflow = rs1 == vs2 && rs1 == int_min; + + int128_t result = (int128_t)rs1 * (int128_t)vs2; + result_sign = (rs1_sign ^ vs2_sign) & sign_mask; + + // rounding + INT_ROUNDING(result, xrm, sew - 1); + + // remove guard bits + result = result >> (sew - 1); + + // max saturation + if (overflow) { + result = int_max; + P_SET_OV(1); + } + + vd = result; +}) diff --git a/riscv-isa-sim/riscv/insns/vsra_vi.h b/riscv-isa-sim/riscv/insns/vsra_vi.h new file mode 100644 index 0000000..5c58927 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsra_vi.h @@ -0,0 +1,5 @@ +// vsra.vi vd, vs2, zimm5 +VI_VI_LOOP +({ + vd = vs2 >> (simm5 & (sew - 1) & 0x1f); +}) diff --git a/riscv-isa-sim/riscv/insns/vsra_vv.h b/riscv-isa-sim/riscv/insns/vsra_vv.h new file mode 100644 index 0000000..8889af9 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsra_vv.h @@ -0,0 +1,5 @@ +// vsra.vv vd, vs2, vs1 +VI_VV_LOOP +({ + vd = vs2 >> (vs1 & (sew - 1)); +}) diff --git a/riscv-isa-sim/riscv/insns/vsra_vx.h b/riscv-isa-sim/riscv/insns/vsra_vx.h new file mode 100644 index 0000000..c1b0c10 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsra_vx.h @@ -0,0 +1,5 @@ +// vsra.vx vd, vs2, rs1 +VI_VX_LOOP +({ + vd = vs2 >> (rs1 & (sew - 1)); +}) diff --git a/riscv-isa-sim/riscv/insns/vsrl_vi.h b/riscv-isa-sim/riscv/insns/vsrl_vi.h new file mode 100644 index 0000000..fe5d272 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsrl_vi.h @@ -0,0 +1,5 @@ +// vsrl.vi vd, vs2, zimm5 +VI_VI_ULOOP +({ + vd = vs2 >> (zimm5 & (sew - 1) & 0x1f); +}) diff --git a/riscv-isa-sim/riscv/insns/vsrl_vv.h b/riscv-isa-sim/riscv/insns/vsrl_vv.h new file mode 100644 index 0000000..6376af3 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsrl_vv.h @@ -0,0 +1,5 @@ +// vsrl.vv vd, vs2, vs1 +VI_VV_ULOOP +({ + vd = vs2 >> (vs1 & (sew - 1)); +}) diff --git a/riscv-isa-sim/riscv/insns/vsrl_vx.h b/riscv-isa-sim/riscv/insns/vsrl_vx.h new file mode 100644 index 0000000..a4f899c --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsrl_vx.h @@ -0,0 +1,5 @@ +// vsrl.vx vd, vs2, rs1 +VI_VX_ULOOP +({ + vd = vs2 >> (rs1 & (sew - 1)); +}) diff --git a/riscv-isa-sim/riscv/insns/vssra_vi.h b/riscv-isa-sim/riscv/insns/vssra_vi.h new file mode 100644 index 0000000..ff2e1c5 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vssra_vi.h @@ -0,0 +1,10 @@ +// vssra.vi vd, vs2, simm5 +VRM xrm = P.VU.get_vround_mode(); +VI_VI_LOOP +({ + int sh = simm5 & (sew - 1) & 0x1f; + int128_t val = vs2; + + INT_ROUNDING(val, xrm, sh); + vd = val >> sh; +}) diff --git a/riscv-isa-sim/riscv/insns/vssra_vv.h b/riscv-isa-sim/riscv/insns/vssra_vv.h new file mode 100644 index 0000000..7bbc766 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vssra_vv.h @@ -0,0 +1,10 @@ +// vssra.vv vd, vs2, vs1 +VRM xrm = P.VU.get_vround_mode(); +VI_VV_LOOP +({ + int sh = vs1 & (sew - 1); + int128_t val = vs2; + + INT_ROUNDING(val, xrm, sh); + vd = val >> sh; +}) diff --git a/riscv-isa-sim/riscv/insns/vssra_vx.h b/riscv-isa-sim/riscv/insns/vssra_vx.h new file mode 100644 index 0000000..068a22b --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vssra_vx.h @@ -0,0 +1,10 @@ +// vssra.vx vd, vs2, rs1 +VRM xrm = P.VU.get_vround_mode(); +VI_VX_LOOP +({ + int sh = rs1 & (sew - 1); + int128_t val = vs2; + + INT_ROUNDING(val, xrm, sh); + vd = val >> sh; +}) diff --git a/riscv-isa-sim/riscv/insns/vssrl_vi.h b/riscv-isa-sim/riscv/insns/vssrl_vi.h new file mode 100644 index 0000000..d125164 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vssrl_vi.h @@ -0,0 +1,10 @@ +// vssra.vi vd, vs2, simm5 +VRM xrm = P.VU.get_vround_mode(); +VI_VI_ULOOP +({ + int sh = zimm5 & (sew - 1) & 0x1f; + uint128_t val = vs2; + + INT_ROUNDING(val, xrm, sh); + vd = val >> sh; +}) diff --git a/riscv-isa-sim/riscv/insns/vssrl_vv.h b/riscv-isa-sim/riscv/insns/vssrl_vv.h new file mode 100644 index 0000000..a8e5d16 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vssrl_vv.h @@ -0,0 +1,10 @@ +// vssrl.vv vd, vs2, vs1 +VRM xrm = P.VU.get_vround_mode(); +VI_VV_ULOOP +({ + int sh = vs1 & (sew - 1); + uint128_t val = vs2; + + INT_ROUNDING(val, xrm, sh); + vd = val >> sh; +}) diff --git a/riscv-isa-sim/riscv/insns/vssrl_vx.h b/riscv-isa-sim/riscv/insns/vssrl_vx.h new file mode 100644 index 0000000..ee3cb34 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vssrl_vx.h @@ -0,0 +1,10 @@ +// vssrl.vx vd, vs2, rs1 +VRM xrm = P.VU.get_vround_mode(); +VI_VX_ULOOP +({ + int sh = rs1 & (sew - 1); + uint128_t val = vs2; + + INT_ROUNDING(val, xrm, sh); + vd = val >> sh; +}) diff --git a/riscv-isa-sim/riscv/insns/vssub_vv.h b/riscv-isa-sim/riscv/insns/vssub_vv.h new file mode 100644 index 0000000..d55df23 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vssub_vv.h @@ -0,0 +1,29 @@ +// vssub.vv vd, vs2, vs1 +VI_CHECK_SSS(true); +VI_LOOP_BASE +bool sat = false; + +switch (sew) { +case e8: { + VV_PARAMS(e8); + vd = sat_sub(vs2, vs1, sat); + break; +} +case e16: { + VV_PARAMS(e16); + vd = sat_sub(vs2, vs1, sat); + break; +} +case e32: { + VV_PARAMS(e32); + vd = sat_sub(vs2, vs1, sat); + break; +} +default: { + VV_PARAMS(e64); + vd = sat_sub(vs2, vs1, sat); + break; +} +} +P_SET_OV(sat); +VI_LOOP_END diff --git a/riscv-isa-sim/riscv/insns/vssub_vx.h b/riscv-isa-sim/riscv/insns/vssub_vx.h new file mode 100644 index 0000000..cbfa288 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vssub_vx.h @@ -0,0 +1,29 @@ +// vssub.vx vd, vs2, rs1 +VI_CHECK_SSS(false); +VI_LOOP_BASE +bool sat = false; + +switch (sew) { +case e8: { + VX_PARAMS(e8); + vd = sat_sub(vs2, rs1, sat); + break; +} +case e16: { + VX_PARAMS(e16); + vd = sat_sub(vs2, rs1, sat); + break; +} +case e32: { + VX_PARAMS(e32); + vd = sat_sub(vs2, rs1, sat); + break; +} +default: { + VX_PARAMS(e64); + vd = sat_sub(vs2, rs1, sat); + break; +} +} +P_SET_OV(sat); +VI_LOOP_END diff --git a/riscv-isa-sim/riscv/insns/vssubu_vv.h b/riscv-isa-sim/riscv/insns/vssubu_vv.h new file mode 100644 index 0000000..667a2c5 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vssubu_vv.h @@ -0,0 +1,30 @@ +// vssubu.vv vd, vs2, vs1 +VI_CHECK_SSS(true); +VI_LOOP_BASE +bool sat = false; + +switch (sew) { +case e8: { + VV_U_PARAMS(e8); + vd = sat_subu(vs2, vs1, sat); + break; +} +case e16: { + VV_U_PARAMS(e16); + vd = sat_subu(vs2, vs1, sat); + break; +} +case e32: { + VV_U_PARAMS(e32); + vd = sat_subu(vs2, vs1, sat); + break; +} +default: { + VV_U_PARAMS(e64); + vd = sat_subu(vs2, vs1, sat); + break; +} +} +P_SET_OV(sat); + +VI_LOOP_END diff --git a/riscv-isa-sim/riscv/insns/vssubu_vx.h b/riscv-isa-sim/riscv/insns/vssubu_vx.h new file mode 100644 index 0000000..603f35e --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vssubu_vx.h @@ -0,0 +1,29 @@ +// vssubu.vx vd, vs2, rs1 +VI_CHECK_SSS(false); +VI_LOOP_BASE +bool sat = false; + +switch (sew) { +case e8: { + VX_U_PARAMS(e8); + vd = sat_subu(vs2, rs1, sat); + break; +} +case e16: { + VX_U_PARAMS(e16); + vd = sat_subu(vs2, rs1, sat); + break; +} +case e32: { + VX_U_PARAMS(e32); + vd = sat_subu(vs2, rs1, sat); + break; +} +default: { + VX_U_PARAMS(e64); + vd = sat_subu(vs2, rs1, sat); + break; +} +} +P_SET_OV(sat); +VI_LOOP_END diff --git a/riscv-isa-sim/riscv/insns/vsub_vv.h b/riscv-isa-sim/riscv/insns/vsub_vv.h new file mode 100644 index 0000000..7d119d5 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsub_vv.h @@ -0,0 +1,5 @@ +// vsub +VI_VV_LOOP +({ + vd = vs2 - vs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vsub_vx.h b/riscv-isa-sim/riscv/insns/vsub_vx.h new file mode 100644 index 0000000..e075b42 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vsub_vx.h @@ -0,0 +1,5 @@ +// vsub: vd[i] = (vd[i] * x[rs1]) - vs2[i] +VI_VX_LOOP +({ + vd = vs2 - rs1; +}) diff --git a/riscv-isa-sim/riscv/insns/vwadd_vv.h b/riscv-isa-sim/riscv/insns/vwadd_vv.h new file mode 100644 index 0000000..df4a135 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwadd_vv.h @@ -0,0 +1,6 @@ +// vwadd.vv vd, vs2, vs1 +VI_CHECK_DSS(true); +VI_VV_LOOP_WIDEN +({ + VI_WIDE_OP_AND_ASSIGN(vs2, vs1, 0, +, +, int); +}) diff --git a/riscv-isa-sim/riscv/insns/vwadd_vx.h b/riscv-isa-sim/riscv/insns/vwadd_vx.h new file mode 100644 index 0000000..c226389 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwadd_vx.h @@ -0,0 +1,6 @@ +// vwadd.vx vd, vs2, rs1 +VI_CHECK_DSS(false); +VI_VX_LOOP_WIDEN +({ + VI_WIDE_OP_AND_ASSIGN(vs2, rs1, 0, +, +, int); +}) diff --git a/riscv-isa-sim/riscv/insns/vwadd_wv.h b/riscv-isa-sim/riscv/insns/vwadd_wv.h new file mode 100644 index 0000000..54d2ba4 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwadd_wv.h @@ -0,0 +1,6 @@ +// vwadd.wv vd, vs2, vs1 +VI_CHECK_DDS(true); +VI_VV_LOOP_WIDEN +({ + VI_WIDE_WVX_OP(vs1, +, int); +}) diff --git a/riscv-isa-sim/riscv/insns/vwadd_wx.h b/riscv-isa-sim/riscv/insns/vwadd_wx.h new file mode 100644 index 0000000..bb4cee5 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwadd_wx.h @@ -0,0 +1,6 @@ +// vwaddu.wx vd, vs2, rs1 +VI_CHECK_DDS(false); +VI_VX_LOOP_WIDEN +({ + VI_WIDE_WVX_OP(rs1, +, int); +}) diff --git a/riscv-isa-sim/riscv/insns/vwaddu_vv.h b/riscv-isa-sim/riscv/insns/vwaddu_vv.h new file mode 100644 index 0000000..286ebc8 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwaddu_vv.h @@ -0,0 +1,6 @@ +// vwaddu.vv vd, vs2, vs1 +VI_CHECK_DSS(true); +VI_VV_LOOP_WIDEN +({ + VI_WIDE_OP_AND_ASSIGN(vs2, vs1, 0, +, +, uint); +}) diff --git a/riscv-isa-sim/riscv/insns/vwaddu_vx.h b/riscv-isa-sim/riscv/insns/vwaddu_vx.h new file mode 100644 index 0000000..61cddfc --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwaddu_vx.h @@ -0,0 +1,6 @@ +// vwaddu.vx vd, vs2, rs1 +VI_CHECK_DSS(false); +VI_VX_LOOP_WIDEN +({ + VI_WIDE_OP_AND_ASSIGN(vs2, rs1, 0, +, +, uint); +}) diff --git a/riscv-isa-sim/riscv/insns/vwaddu_wv.h b/riscv-isa-sim/riscv/insns/vwaddu_wv.h new file mode 100644 index 0000000..fee8136 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwaddu_wv.h @@ -0,0 +1,6 @@ +// vwaddu.wv vd, vs2, vs1 +VI_CHECK_DDS(true); +VI_VV_LOOP_WIDEN +({ + VI_WIDE_WVX_OP(vs1, +, uint); +}) diff --git a/riscv-isa-sim/riscv/insns/vwaddu_wx.h b/riscv-isa-sim/riscv/insns/vwaddu_wx.h new file mode 100644 index 0000000..0073ac3 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwaddu_wx.h @@ -0,0 +1,6 @@ +// vwaddu.wx vd, vs2, rs1 +VI_CHECK_DDS(false); +VI_VX_LOOP_WIDEN +({ + VI_WIDE_WVX_OP(rs1, +, uint); +}) diff --git a/riscv-isa-sim/riscv/insns/vwmul_vv.h b/riscv-isa-sim/riscv/insns/vwmul_vv.h new file mode 100644 index 0000000..2197edb --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwmul_vv.h @@ -0,0 +1,6 @@ +// vwmul.vv vd, vs2, vs1 +VI_CHECK_DSS(true); +VI_VV_LOOP_WIDEN +({ + VI_WIDE_OP_AND_ASSIGN(vs2, vs1, 0, *, +, int); +}) diff --git a/riscv-isa-sim/riscv/insns/vwmul_vx.h b/riscv-isa-sim/riscv/insns/vwmul_vx.h new file mode 100644 index 0000000..bc1422d --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwmul_vx.h @@ -0,0 +1,6 @@ +// vwmul.vx vd, vs2, rs1 +VI_CHECK_DSS(false); +VI_VX_LOOP_WIDEN +({ + VI_WIDE_OP_AND_ASSIGN(vs2, rs1, 0, *, +, int); +}) diff --git a/riscv-isa-sim/riscv/insns/vwmulsu_vv.h b/riscv-isa-sim/riscv/insns/vwmulsu_vv.h new file mode 100644 index 0000000..ec37377 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwmulsu_vv.h @@ -0,0 +1,6 @@ +// vwmulsu.vv vd, vs2, vs1 +VI_CHECK_DSS(true); +VI_VV_LOOP_WIDEN +({ + VI_WIDE_OP_AND_ASSIGN_MIX(vs2, vs1, 0, *, +, uint, int, uint) +}) diff --git a/riscv-isa-sim/riscv/insns/vwmulsu_vx.h b/riscv-isa-sim/riscv/insns/vwmulsu_vx.h new file mode 100644 index 0000000..d58ecce --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwmulsu_vx.h @@ -0,0 +1,6 @@ +// vwmulsu.vx vd, vs2, rs1 +VI_CHECK_DSS(false); +VI_VX_LOOP_WIDEN +({ + VI_WIDE_OP_AND_ASSIGN_MIX(vs2, rs1, 0, *, +, uint, int, uint) +}) diff --git a/riscv-isa-sim/riscv/insns/vwmulu_vv.h b/riscv-isa-sim/riscv/insns/vwmulu_vv.h new file mode 100644 index 0000000..8ddbb4b --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwmulu_vv.h @@ -0,0 +1,6 @@ +// vwmulu.vv vd, vs2, vs1 +VI_CHECK_DSS(true); +VI_VV_LOOP_WIDEN +({ + VI_WIDE_OP_AND_ASSIGN(vs2, vs1, 0, *, +, uint); +}) diff --git a/riscv-isa-sim/riscv/insns/vwmulu_vx.h b/riscv-isa-sim/riscv/insns/vwmulu_vx.h new file mode 100644 index 0000000..1ce77ee --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwmulu_vx.h @@ -0,0 +1,6 @@ +// vwmul.vx vd, vs2, rs1 +VI_CHECK_DSS(false); +VI_VX_LOOP_WIDEN +({ + VI_WIDE_OP_AND_ASSIGN(vs2, rs1, 0, *, +, uint); +}) diff --git a/riscv-isa-sim/riscv/insns/vwredsum_vs.h b/riscv-isa-sim/riscv/insns/vwredsum_vs.h new file mode 100644 index 0000000..c7a87db --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwredsum_vs.h @@ -0,0 +1,5 @@ +// vwredsum.vs vd, vs2, vs1 +VI_VV_LOOP_WIDE_REDUCTION +({ + vd_0_res += vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vwredsumu_vs.h b/riscv-isa-sim/riscv/insns/vwredsumu_vs.h new file mode 100644 index 0000000..889a77d --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwredsumu_vs.h @@ -0,0 +1,5 @@ +// vwredsum.vs vd, vs2, vs1 +VI_VV_ULOOP_WIDE_REDUCTION +({ + vd_0_res += vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vwsub_vv.h b/riscv-isa-sim/riscv/insns/vwsub_vv.h new file mode 100644 index 0000000..99f9348 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwsub_vv.h @@ -0,0 +1,6 @@ +// vwsub.vv vd, vs2, vs1 +VI_CHECK_DSS(true); +VI_VV_LOOP_WIDEN +({ + VI_WIDE_OP_AND_ASSIGN(vs2, vs1, 0, -, +, int); +}) diff --git a/riscv-isa-sim/riscv/insns/vwsub_vx.h b/riscv-isa-sim/riscv/insns/vwsub_vx.h new file mode 100644 index 0000000..affdf62 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwsub_vx.h @@ -0,0 +1,6 @@ +// vwsub.vx vd, vs2, rs1 +VI_CHECK_DSS(false); +VI_VX_LOOP_WIDEN +({ + VI_WIDE_OP_AND_ASSIGN(vs2, rs1, 0, -, +, int); +}) diff --git a/riscv-isa-sim/riscv/insns/vwsub_wv.h b/riscv-isa-sim/riscv/insns/vwsub_wv.h new file mode 100644 index 0000000..10db730 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwsub_wv.h @@ -0,0 +1,6 @@ +// vwsub.wv vd, vs2, vs1 +VI_CHECK_DDS(true); +VI_VV_LOOP_WIDEN +({ + VI_WIDE_WVX_OP(vs1, -, int); +}) diff --git a/riscv-isa-sim/riscv/insns/vwsub_wx.h b/riscv-isa-sim/riscv/insns/vwsub_wx.h new file mode 100644 index 0000000..f72341b --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwsub_wx.h @@ -0,0 +1,6 @@ +// vwsub.wx vd, vs2, rs1 +VI_CHECK_DDS(false); +VI_VX_LOOP_WIDEN +({ + VI_WIDE_WVX_OP(rs1, -, int); +}) diff --git a/riscv-isa-sim/riscv/insns/vwsubu_vv.h b/riscv-isa-sim/riscv/insns/vwsubu_vv.h new file mode 100644 index 0000000..cf68adb --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwsubu_vv.h @@ -0,0 +1,6 @@ +// vwsubu.vv vd, vs2, vs1 +VI_CHECK_DSS(true); +VI_VV_LOOP_WIDEN +({ + VI_WIDE_OP_AND_ASSIGN(vs2, vs1, 0, -, +, uint); +}) diff --git a/riscv-isa-sim/riscv/insns/vwsubu_vx.h b/riscv-isa-sim/riscv/insns/vwsubu_vx.h new file mode 100644 index 0000000..3e972dd --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwsubu_vx.h @@ -0,0 +1,6 @@ +// vwsubu.vx vd, vs2, rs1 +VI_CHECK_DSS(false); +VI_VX_LOOP_WIDEN +({ + VI_WIDE_OP_AND_ASSIGN(vs2, rs1, 0, -, +, uint); +}) diff --git a/riscv-isa-sim/riscv/insns/vwsubu_wv.h b/riscv-isa-sim/riscv/insns/vwsubu_wv.h new file mode 100644 index 0000000..3687c3d --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwsubu_wv.h @@ -0,0 +1,6 @@ +// vwsubu.wv vd, vs2, vs1 +VI_CHECK_DDS(true); +VI_VV_LOOP_WIDEN +({ + VI_WIDE_WVX_OP(vs1, -, uint); +}) diff --git a/riscv-isa-sim/riscv/insns/vwsubu_wx.h b/riscv-isa-sim/riscv/insns/vwsubu_wx.h new file mode 100644 index 0000000..c7f20ed --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vwsubu_wx.h @@ -0,0 +1,6 @@ +// vwsubu.wx vd, vs2, rs1 +VI_CHECK_DDS(false); +VI_VX_LOOP_WIDEN +({ + VI_WIDE_WVX_OP(rs1, -, uint); +}) diff --git a/riscv-isa-sim/riscv/insns/vxor_vi.h b/riscv-isa-sim/riscv/insns/vxor_vi.h new file mode 100644 index 0000000..b2dcf94 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vxor_vi.h @@ -0,0 +1,5 @@ +// vxor +VI_VI_LOOP +({ + vd = simm5 ^ vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vxor_vv.h b/riscv-isa-sim/riscv/insns/vxor_vv.h new file mode 100644 index 0000000..c37b6ab --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vxor_vv.h @@ -0,0 +1,5 @@ +// vxor +VI_VV_LOOP +({ + vd = vs1 ^ vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vxor_vx.h b/riscv-isa-sim/riscv/insns/vxor_vx.h new file mode 100644 index 0000000..8021e0e --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vxor_vx.h @@ -0,0 +1,5 @@ +// vxor +VI_VX_LOOP +({ + vd = rs1 ^ vs2; +}) diff --git a/riscv-isa-sim/riscv/insns/vzext_vf2.h b/riscv-isa-sim/riscv/insns/vzext_vf2.h new file mode 100644 index 0000000..100f2e3 --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vzext_vf2.h @@ -0,0 +1 @@ +VI_VV_EXT(2, uint); diff --git a/riscv-isa-sim/riscv/insns/vzext_vf4.h b/riscv-isa-sim/riscv/insns/vzext_vf4.h new file mode 100644 index 0000000..6ff920e --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vzext_vf4.h @@ -0,0 +1 @@ +VI_VV_EXT(4, uint); diff --git a/riscv-isa-sim/riscv/insns/vzext_vf8.h b/riscv-isa-sim/riscv/insns/vzext_vf8.h new file mode 100644 index 0000000..b1762fb --- /dev/null +++ b/riscv-isa-sim/riscv/insns/vzext_vf8.h @@ -0,0 +1 @@ +VI_VV_EXT(8, uint); diff --git a/scripts/GenerateOperatorComputeHeaders.py b/scripts/GenerateOperatorComputeHeaders.py new file mode 100644 index 0000000..4affbc6 --- /dev/null +++ b/scripts/GenerateOperatorComputeHeaders.py @@ -0,0 +1,132 @@ +import os +from pathlib import Path +from XLiteral import * +from VLiteral import * +from VVLiteral import * +from VXLiteral import * +from VSLiteral import * +from VVMLiteral import * +from VXMLiteral import * +from MiscMaskLiteral import * +from HeaderLiteral import * + +import sys + +sys.path = [os.path.abspath(os.path.join(os.path.dirname(__file__)))] + sys.path + +import OpDefParser + +# python3 GenerateOperatorComputeHeaders.py ${SOURCE_CODE_ROOT_DIR} +assert(len(sys.argv) == 2) + +source_dir = sys.argv[1] + +autogen_dir = source_dir + "/include/autogen" +include_dir = source_dir + "/include" +print("Create " + autogen_dir) +Path(autogen_dir).mkdir(parents=True, exist_ok=True) + +# This list will collect files created include/AutoGenComputeOp.h +# The header will include all files created under include/autogen/ +created_files = [] + +# CUSTOM_OP_TYPE(OP_TYPE, OP_ID, SEW, TYPE_CLASS, OP_ATTR, OUTPUT_TYPE, +# NUM_OF_INPUTS, INPUT_TYPE(S)...) +def parseCustomOperatorDefinitions(filename) : + opdef_infos = OpDefParser.parse(filename) + for opdef_info in opdef_infos: + op_id = opdef_info.op_id + op_type = opdef_info.op_type + op_attr = opdef_info.op_attr + + if op_id[-2:] == "vx" or op_id[-2:] == "wx" or op_id[-2:] == "vf" or op_id[-2:] == "wf": + if "MulAddOperation" in op_attr : + code_gen_func = create_destructive_vx_op + elif "MaskAgnostic" in op_attr and "TailAgnostic" not in op_attr and "TailUndisturbed" not in op_attr: + code_gen_func = create_masked_no_maskedoff_vx_op + else : + code_gen_func = create_vx_op + elif op_id[-2:] == "vv" or op_id[-2:] == "wv" or op_id[-2:] == "mm": + if "MulAddOperation" in op_attr : + code_gen_func = create_destructive_vv_op + elif "MaskAgnostic" in op_attr and "TailAgnostic" not in op_attr and "TailUndisturbed" not in op_attr: + code_gen_func = create_masked_no_maskedoff_vv_op + else : + code_gen_func = create_vv_op + elif op_id[-2:] == "vs" : + code_gen_func = create_vs_op + elif op_id[-2:] == "_v" or op_id[-3:] == "vf2" or op_id[-3:] == "vf4" \ + or op_id[-3:] == "vf8" or op_id[-5:] == "x_x_v" or op_id[-5:] == "x_x_w" \ + or op_id[-2:] == "_w" or op_id[-2:] == "_m" : + if "NoInputOperation" in op_attr : + code_gen_func = create_no_input_v_op + elif op_id == "id_v" : + code_gen_func = create_id_op + elif op_id == "cpop_m" : + code_gen_func = create_cpop_op + elif op_id == "first_m" : + code_gen_func = create_vfirst_op + elif op_id == "msbf_m" or op_id == "msif_m" or op_id == "msof_m": + code_gen_func = create_msbf_msif_msof_op + elif op_id == "iota_m" : + code_gen_func = create_iota_op + elif op_id[:5] == "loxei" or op_id[:5] == "luxei" : + code_gen_func = create_vv_op + elif op_id == "lse8_v" or op_id == "lse16_v" or op_id == "lse32_v" or op_id == "lse64_v" : + code_gen_func = create_strided_load_op + elif op_id == "sse8_v" or op_id == "sse16_v" or op_id == "sse32_v" or op_id == "sse64_v" : + code_gen_func = create_strided_store_op + elif "StoreOperation" in op_attr : + if op_type[-2:] == "_m" : + if op_id[:5] == "soxei" or op_id[:5] == "suxei" : + code_gen_func = create_masked_no_maskedoff_vv_op + else : + code_gen_func = create_masked_no_maskedoff_v_op + else: + if op_id[:5] == "soxei" or op_id[:5] == "suxei" : + code_gen_func = create_vv_op + else : + code_gen_func = create_v_op + else : + code_gen_func = create_v_op + elif op_id[-2:] == "_x" or op_id[-3:] == "v_f": + if op_type[-2:] == "_m" : + print("code emit for mask operator of _x is not implemented...XD") + else : + code_gen_func = create_x_op + elif op_id[-3:] == "vvm" : + code_gen_func = create_vvm_op + elif op_id[-3:] == "vxm" or op_id[-3:] == "vfm" : + code_gen_func = create_vxm_op + else : + raise Exception("unrecognized id %s of type %s" % (op_id, op_type)) + + code = code_gen_func(opdef_info.op_type, opdef_info.op_id, opdef_info.op_attr, + opdef_info.output_type, + opdef_info.input_num, opdef_info.input_types) + + if len(code) == 0 : + continue + + write_filename = "compute" + op_type + "Op.h" + print("Create " + autogen_dir + "/" + write_filename + "...") + file = open(autogen_dir + "/" + write_filename, "w") + + file.write('''// This is a header file auto-generated by preprocess/GenerateOperatorCompute.py +// Parameters: +''') + file.write("// CUSTOM_OP_TYPE: " + str(opdef_info) + "\n") + file.write(header_literal) + + file.write(code) + created_files.append(write_filename) + +parseCustomOperatorDefinitions(include_dir + "/CustomOperator.def") + +# Create include/AutoGenComputeOp.h +# The header will include all files created under include/autogen/ +file = open(include_dir + "/" + "AutoGenComputeOp.h", "w") +file.write( + "// This is a header file auto-generated by preprocess/GenerateOperatorCompute.py\n\n") +for filename in created_files: + file.write("#include \"autogen/" + filename + "\"\n") diff --git a/scripts/HeaderLiteral.py b/scripts/HeaderLiteral.py new file mode 100644 index 0000000..83e112d --- /dev/null +++ b/scripts/HeaderLiteral.py @@ -0,0 +1,13 @@ +header_literal = ''' +#include "Operator.hpp" +#include "Basic.hpp" +#include "Value.hpp" +#include "Decode.hpp" +#include "Processor.hpp" +#include "RawDatumOperand.hpp" + +#include "arith.h" + +#include +#include +''' diff --git a/scripts/MiscMaskLiteral.py b/scripts/MiscMaskLiteral.py new file mode 100644 index 0000000..8f4dd15 --- /dev/null +++ b/scripts/MiscMaskLiteral.py @@ -0,0 +1,568 @@ +# Literals covered in this file includes vcpop, vfirst, vmsbf, vmsif, vmsof, viota +cpop_literal_start0 = "void compute" +cpop_literal_start1 = "Op(RIF::OperatorBase *op) {\n" +cpop_literal_nonmask_body = ''' + auto length = a->length; + + auto dataA = getRawPointer(a); + auto dataOut = getRawPointer(b); + + auto sew = op->typeInfo->sew; + + unsigned long pop_count = 0; + + for (int i = 0; i < length; ++i) { +''' + +cpop_literal_nonmask_end = ''' + } + *dataOut = pop_count; +} +''' + +cpop_literal_mask_body = ''' + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataA = getRawPointer(b); + auto dataOut = getRawPointer(c); + + auto sew = op->typeInfo->sew; + + unsigned long pop_count = 0; + + for (int i = 0; i < length; ++i) { + if (dataM[i]) { +''' + +cpop_literal_mask_end = ''' + } + } + *dataOut = pop_count; +} +''' + +def include_literal(filename): + return "#include\"" + filename + "\"" + +def create_cpop_op(op_type, op_id, op_attr, output_type, input_num, input_types) : + ret = "" + ret += cpop_literal_start0 + op_type + cpop_literal_start1 + for i in range(input_num) : + var = chr(ord('a') + i) + ret += " auto " + var + " = static_cast(op->inputs[" + str(i) + "]);\n" + var = chr(ord('a') + input_num) + ret += " auto " + var + " = static_cast(op->outputs[0]);\n" + if "MaskedOperation" in op_attr : + ret += cpop_literal_mask_body + include_literal("v" + op_id + ".h") + cpop_literal_mask_end + else : + ret += cpop_literal_nonmask_body + include_literal("v" + op_id + ".h") + cpop_literal_nonmask_end + return ret + +vfirst_literal_start0 = "void compute" +vfirst_literal_start1 = "Op(RIF::OperatorBase *op) {\n" +vfirst_literal_nonmask_body = ''' + auto length = a->length; + + auto dataA = getRawPointer(a); + auto dataOut = getRawPointer(b); + + auto sew = op->typeInfo->sew; + + int first = -1; + int i = 0; + while (i < length && first == -1) { +''' + +vfirst_literal_nonmask_end = ''' + ++i; + } + *dataOut = first; +} +''' + +vfirst_literal_mask_body = ''' + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataA = getRawPointer(b); + auto dataOut = getRawPointer(c); + + auto sew = op->typeInfo->sew; + + int first = -1; + int i = 0; + while (i < length && first == -1) { + if (dataM[i]) { +''' + +vfirst_literal_mask_end = ''' + } + ++i; + } + *dataOut = first; +} +''' + +def create_vfirst_op(op_type, op_id, op_attr, output_type, input_num, input_types) : + ret = "" + ret += vfirst_literal_start0 + op_type + vfirst_literal_start1 + for i in range(input_num) : + var = chr(ord('a') + i) + ret += " auto " + var + " = static_cast(op->inputs[" + str(i) + "]);\n" + var = chr(ord('a') + input_num) + ret += " auto " + var + " = static_cast(op->outputs[0]);\n" + if "MaskedOperation" in op_attr : + ret += vfirst_literal_mask_body + include_literal("v" + op_id + ".h") + vfirst_literal_mask_end + else : + ret += vfirst_literal_nonmask_body + include_literal("v" + op_id + ".h") + vfirst_literal_nonmask_end + return ret + +msbf_msif_msof_literal_start0 = "void compute" +msbf_msif_msof_literal_start1 = "Op(RIF::OperatorBase *op) {\n" +msbf_msif_msof_literal_nonmask_body = ''' + auto length = a->length; + + auto dataA = getRawPointer(a); + auto dataOut = getRawPointer(b); + + auto sew = op->typeInfo->sew; + + int i = 0; + while (i < length) { +''' + +msbf_msif_msof_literal_nonmask_end = ''' + ++i; + } + while (i < length) { + dataOut[i] = 0; + ++i; + } +} +''' + +msbf_msif_msof_literal_mask_body = ''' + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataMO = getRawPointer(b); + auto dataA = getRawPointer(c); + auto dataOut = getRawPointer(d); + + auto sew = op->typeInfo->sew; + + int i = 0; + while (i < length) { + if (dataM[i]) { +''' + +msbf_msif_msof_ma_literal_mask_body = ''' + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataA = getRawPointer(b); + auto dataOut = getRawPointer(c); + + auto sew = op->typeInfo->sew; + + int i = 0; + while (i < length) { + if (dataM[i]) { +''' + +msbf_msif_msof_literal_mask_end = ''' + } else { + dataOut[i] = dataMO[i]; + } + ++i; + } + while (i < length) { + if (dataM[i]) { + dataOut[i] = 0; + } else { + dataOut[i] = dataMO[i]; + } + ++i; + } +} +''' + +msbf_msif_msof_ma_literal_mask_end = ''' + } else { // maskedoff is 1 for vector mask agnostic + dataOut[i] = 1; + } + ++i; + } + while (i < length) { + if (dataM[i]) { + dataOut[i] = 0; + } else { + dataOut[i] = 1; + } + ++i; + } +} +''' + +def create_msbf_msif_msof_op(op_type, op_id, op_attr, output_type, input_num, input_types) : + ret = "" + ret += msbf_msif_msof_literal_start0 + op_type + msbf_msif_msof_literal_start1 + for i in range(input_num) : + var = chr(ord('a') + i) + ret += " auto " + var + " = static_cast(op->inputs[" + str(i) + "]);\n" + var = chr(ord('a') + input_num) + ret += " auto " + var + " = static_cast(op->outputs[0]);\n" + if "MaskedOperation" in op_attr : + if "MaskAgnostic" in op_attr : + ret += msbf_msif_msof_ma_literal_mask_body + include_literal("v" + op_id + ".h") + msbf_msif_msof_ma_literal_mask_end + else : + ret += msbf_msif_msof_literal_mask_body + include_literal("v" + op_id + ".h") + msbf_msif_msof_literal_mask_end + else : + ret += msbf_msif_msof_literal_nonmask_body + include_literal("v" + op_id + ".h") + msbf_msif_msof_literal_nonmask_end + return ret + +iota_literal_start0 = "void compute" +iota_literal_start1 = "Op(RIF::OperatorBase *op) {\n" +iota_literal_nonmask_body = ''' + auto length = a->length; + + auto dataA = getRawPointer(a); + auto dataOut = getRawPointer(b); + + auto sew = op->typeInfo->sew; + + unsigned acculateMask = 0; + for (int i = 0; i < length; ++i) { +''' + +iota_ta_literal_nonmask_body = ''' + auto length = a->length; + + auto dataA = getRawPointer(a); + auto dataOut = getRawPointer(b); + + auto sew = op->typeInfo->sew; + + unsigned acculateMask = 0; + for (int i = 0; i < length; i += 2) { +''' + +iota_tu_literal_nonmask_body = ''' + auto length = a->length; + + auto dataPassthru = getRawPointer(a); + auto dataA = getRawPointer(b); + auto dataOut = getRawPointer(c); + + auto sew = op->typeInfo->sew; + + unsigned acculateMask = 0; + for (int i = 0; i < length; i += 2) { +''' + +iota_literal_nonmask_end = ''' + } +} +''' + +iota_tu_literal_nonmask_end = ''' + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is undisturbed + dataOut[i] = dataPassthru[i]; + } +} +''' + +iota_ta_literal_nonmask_end = ''' + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +iota_literal_mask_body = ''' + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataMO = getRawPointer(b); + auto dataA = getRawPointer(c); + auto dataOut = getRawPointer(d); + + auto sew = op->typeInfo->sew; + + unsigned acculateMask = 0; + for (int i = 0; i < length; ++i) { + if (dataM[i]) { +''' + +iota_tail_policy_literal_mask_body = ''' + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataMO = getRawPointer(b); + auto dataA = getRawPointer(c); + auto dataOut = getRawPointer(d); + + auto sew = op->typeInfo->sew; + + unsigned acculateMask = 0; + for (int i = 0; i < length; i += 2) { + if (dataM[i]) { +''' + +iota_tama_literal_mask_body = ''' + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataA = getRawPointer(b); + auto dataOut = getRawPointer(c); + + auto sew = op->typeInfo->sew; + + unsigned acculateMask = 0; + for (int i = 0; i < length; i += 2) { + if (dataM[i]) { +''' + +iota_literal_mask_end = ''' + } else { + dataOut[i] = dataMO[i]; + } + } +} +''' + +iota_tama_literal_mask_end = ''' + } else { + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +iota_tamu_literal_mask_end = ''' + } else { + dataOut[i] = dataMO[i]; + } + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +iota_tuma_literal_mask_end = ''' + } else { + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is undisturbed + dataOut[i] = dataMO[i]; + } +} +''' + +iota_tumu_literal_mask_end = ''' + } else { + dataOut[i] = dataMO[i]; + } + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is undisturbed + dataOut[i] = dataMO[i]; + } +} +''' + +def create_iota_op(op_type, op_id, op_attr, output_type, input_num, input_types) : + ret = "" + ret += iota_literal_start0 + op_type + iota_literal_start1 + for i in range(input_num) : + var = chr(ord('a') + i) + ret += " auto " + var + " = static_cast(op->inputs[" + str(i) + "]);\n" + var = chr(ord('a') + input_num) + ret += " auto " + var + " = static_cast(op->outputs[0]);\n" + if "MaskedOperation" in op_attr : + if "TailAgnostic" in op_attr and "MaskAgnostic" in op_attr : # tama + ret += iota_tama_literal_mask_body + include_literal("v" + op_id + ".h") + iota_tama_literal_mask_end + elif "TailAgnostic" in op_attr and "MaskUndisturbed" in op_attr : # tamu + ret += iota_tail_policy_literal_mask_body + include_literal("v" + op_id + ".h") + iota_tamu_literal_mask_end + elif "TailUndisturbed" in op_attr and "MaskAgnostic" in op_attr : # tuma + ret += iota_tail_policy_literal_mask_body + include_literal("v" + op_id + ".h") + iota_tuma_literal_mask_end + elif "TailUndisturbed" in op_attr and "MaskUndisturbed" in op_attr : # tumu + ret += iota_tail_policy_literal_mask_body + include_literal("v" + op_id + ".h") + iota_tumu_literal_mask_end + else : # No explicit policy specified + ret += iota_literal_mask_body + include_literal("v" + op_id + ".h") + iota_literal_mask_end + else : + if "TailUndisturbed" in op_attr : + ret += iota_tu_literal_nonmask_body + include_literal("v" + op_id + ".h") + iota_tu_literal_nonmask_end + elif "TailAgnostic" in op_attr : + ret += iota_ta_literal_nonmask_body + include_literal("v" + op_id + ".h") + iota_ta_literal_nonmask_end + else : + ret += iota_literal_nonmask_body + include_literal("v" + op_id + ".h") + iota_literal_nonmask_end + return ret + +id_literal_start0 = "void compute" +id_literal_start1 = "Op(RIF::OperatorBase *op) {\n" +id_literal_nonmask_body = ''' + auto length = a->length; + + auto dataOut = getRawPointer(a); + + auto sew = op->typeInfo->sew; + + for (int i = 0; i < length; ++i) { +''' + +id_tu_literal_nonmask_body = ''' + auto length = a->length; + + auto dataPassthru = getRawPointer(a); + auto dataOut = getRawPointer(b); + + auto sew = op->typeInfo->sew; + + for (int i = 0; i < length; ++i) { +''' + +id_literal_nonmask_end = ''' + } +} +''' + +id_ta_literal_nonmask_end = ''' + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +id_tu_literal_nonmask_end = ''' + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is undisturbed + dataOut[i] = dataPassthru[i]; + } +} +''' + +id_literal_mask_body = ''' + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataMO = getRawPointer(b); + auto dataOut = getRawPointer(c); + + auto sew = op->typeInfo->sew; + + for (int i = 0; i < length; ++i) { + if (dataM[i]) { +''' + +id_tama_literal_mask_body = ''' + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataOut = getRawPointer(b); + + auto sew = op->typeInfo->sew; + + for (int i = 0; i < length; ++i) { + if (dataM[i]) { +''' + +id_literal_mask_end = ''' + } else { + dataOut[i] = dataMO[i]; + } + } +} +''' + +id_tama_literal_mask_end = ''' + } else { // maskedoff element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +id_tamu_literal_mask_end = ''' + } else { // maskedoff element is undisturbed + dataOut[i] = dataMO[i]; + } + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +id_tuma_literal_mask_end = ''' + } else { // maskedoff element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is undisturbed + dataOut[i] = dataMO[i]; + } +} +''' + +id_tumu_literal_mask_end = ''' + } else { // maskedoff element is undisturbed + dataOut[i] = dataMO[i]; + } + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is undisturbed + dataOut[i] = dataMO[i]; + } +} +''' + +def create_id_op(op_type, op_id, op_attr, output_type, input_num, input_types) : + ret = "" + ret += id_literal_start0 + op_type + id_literal_start1 + for i in range(input_num) : + var = chr(ord('a') + i) + ret += " auto " + var + " = static_cast(op->inputs[" + str(i) + "]);\n" + var = chr(ord('a') + input_num) + ret += " auto " + var + " = static_cast(op->outputs[0]);\n" + if "MaskedOperation" in op_attr : + if "TailAgnostic" in op_attr and "MaskAgnostic" in op_attr : # tama + ret += id_tama_literal_mask_body + include_literal("v" + op_id + ".h") + id_tama_literal_mask_end + elif "TailAgnostic" in op_attr and "MaskUndisturbed" in op_attr : # tamu + ret += id_literal_mask_body + include_literal("v" + op_id + ".h") + id_tamu_literal_mask_end + elif "TailUndisturbed" in op_attr and "MaskAgnostic" in op_attr : # tuma + ret += id_literal_mask_body + include_literal("v" + op_id + ".h") + id_tuma_literal_mask_end + elif "TailUndisturbed" in op_attr and "MaskUndisturbed" in op_attr : # tumu + ret += id_literal_mask_body + include_literal("v" + op_id + ".h") + id_tumu_literal_mask_end + else : # No explicit policy specified + ret += id_literal_mask_body + include_literal("v" + op_id + ".h") + id_literal_mask_end + else : + if "TailUndisturbed" in op_attr : + ret += id_tu_literal_nonmask_body + include_literal("v" + op_id + ".h") + id_tu_literal_nonmask_end + elif "TailAgnostic" in op_attr : + ret += id_literal_nonmask_body + include_literal("v" + op_id + ".h") + id_ta_literal_nonmask_end + else : + ret += id_literal_nonmask_body + include_literal("v" + op_id + ".h") + id_literal_nonmask_end + return ret diff --git a/scripts/OpDefParser.py b/scripts/OpDefParser.py new file mode 100644 index 0000000..e805f87 --- /dev/null +++ b/scripts/OpDefParser.py @@ -0,0 +1,41 @@ +from typing import Dict + + +class OpDefInfo: + op_type = None + op_id = None + sew = None + type_class = None + op_attr = {} + output_type = None + input_num = None + input_types = [] + + def __str__(self): + return "CUSTOM_OP_TYPE({op_type}, {op_id}, {type_class}, {op_attr}, {output_type}, {input_num}, {input_types})".format_map(self.__dict__) + +# format: +# CUSTOM_OP_TYPE(OP_TYPE, OP_ID, SEW, TYPE_CLASS, OP_ATTR, OUTPUT_TYPE, +# NUM_OF_INPUTS, INPUT_TYPE(S)...) +def parse(path): + op_def_infos = [] + with open(path, "r") as f: + for line in f.readlines() : + if line.startswith("CUSTOM_OP_TYPE(") == False : + continue + args = line[15:-2].split(",") + args = list(map(lambda x: x.strip(), args)) + op_def_info = OpDefInfo() + + op_def_info.op_type = args[0] + op_def_info.op_id = args[1] + op_def_info.sew = args[2] + op_def_info.type_class = args[3] + op_def_info.op_attr = set(map(lambda x: x.strip(), args[4].split('|'))) + op_def_info.output_type = args[5] + op_def_info.input_num = int(args[6]) + op_def_info.input_types = args[7:] + + op_def_infos.append(op_def_info) + + return op_def_infos diff --git a/scripts/TestCodeGen.py b/scripts/TestCodeGen.py new file mode 100644 index 0000000..3568f60 --- /dev/null +++ b/scripts/TestCodeGen.py @@ -0,0 +1,44 @@ +from TestCodeGenUtils import * + +def runDiffTest(options, path1, path2, filepath) : + op_types = getOpTypesToGen(options, filepath) + run_list = [] + for op_type in op_types: + test_case = op_type + ".c" + task = threading.Thread(target = runSubProcess, args = (["diff", path1 + "/" + test_case, path2 + "/" + test_case], True,)) + task.start() + run_list.append(task) + + for task in run_list: + task.join() + + if runSubProcess.timeout or runSubProcess.failed : + return 1 + else : + return 0 + +def main() : + args = config() + if not args.random_gen : + print('Please specify the random-gen argument', file = sys.stderr) + sys.exit(1) + if not args.filepath : + print('Please specify the filepath argument', file = sys.stderr) + sys.exit(1) + if not args.output_dir : + print('Please specify the output-dir argument', file = sys.stderr) + sys.exit(1) + if not args.codegen_golden : + print('Please specify the codegen-golden argument', file = sys.stderr) + sys.exit(1) + + initSubProcessVars() + generateAllCCode(args, args.random_gen, args.filepath, args.output_dir) + initSubProcessVars() + ret = runDiffTest(args, args.codegen_golden, args.output_dir, args.filepath) + printSubprocessVerbose() + + return ret + +if __name__ == "__main__": + sys.exit(main()) diff --git a/scripts/TestCodeGenUtils.py b/scripts/TestCodeGenUtils.py new file mode 100644 index 0000000..99053e6 --- /dev/null +++ b/scripts/TestCodeGenUtils.py @@ -0,0 +1,190 @@ +import OpDefParser + +import argparse +import os +import subprocess +import threading +import sys +import pathlib + + +class Color : + HEADER = '\033[95m' + OKBLUE = '\033[94m' + OKCYAN = '\033[96m' + OKGREEN = '\033[92m' + WARNING = '\033[93m' + FAIL = '\033[91m' + ENDC = '\033[0m' + BOLD = '\033[1m' + UNDERLINE = '\033[4m' + +def config() : + parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawTextHelpFormatter) + parser.add_argument('--random-gen', help='Path to random-gen binary') + parser.add_argument('--filepath', help='Path to CustomOperator.def') + parser.add_argument('--output-dir', help='Path to output directory') + parser.add_argument('--codegen-golden', help='Path to codegen golden directory') + parser.add_argument('--has-policy', help='Enable policy if set', action='store_true') + args = parser.parse_args() + + return args + +def parseCustomOperatorDefinitions(filepath) : + return OpDefParser.parse(filepath) + + +def policyFilter(options, op_def) : + policy_attrs = ["TailAgnostic", "TailUndisturbed", "MaskAgnostic", "MaskUndisturbed"] + valid = True + if not options.has_policy: + for attr in op_def.op_attr: + if attr in policy_attrs: + valid = False + return valid + +# The getOpTypesToGen function extracts the effective op_types following +# the rules below: +# 1. For load and store operations(Simply those that in exceptions list), +# it collects the op_type contains either '32V32' or '32' depending on +# whether it's indexed load/store or not. +# 2. Otherwise, it collects the operations with uniqie op_id with non-masked +# version, masked version as well as policies(ta, tu, tama, tamu, tuma, tumu) +exceptions = ["Vle", "Vse", "Vloxei", "Vluxei", "Vsoxei", "Vsuxei", "Vlse", "Vsse"] +def getOpTypesToGen(options, filepath, exceptions = exceptions) : + filters = [policyFilter] + op_types = [] + count = dict() + op_defs = parseCustomOperatorDefinitions(filepath) + for op_def in op_defs : + valid = True + for filter in filters: + if not filter(options, op_def): + valid = False + if not valid: + continue + + op_type = op_def.op_type + op_id = op_def.op_id + for e in exceptions : + if op_type.startswith(e) : + if op_type.startswith(e + "32V32"): + op_types.append(op_type) + elif op_type.startswith(e + "32") and not (op_type.startswith("Vloxei") or + op_type.startswith("Vluxei") or + op_type.startswith("Vsoxei") or + op_type.startswith("Vsuxei")) : + op_types.append(op_type) + count[op_id] = 1 + + if op_type.endswith("_m") : + op_id = op_id + "m" + + if op_type.endswith("TA") : + op_id = op_id + "ta" + elif op_type.endswith("TU") : + op_id = op_id + "tu" + elif op_type.endswith("TAMA") : + op_id = op_id + "tama" + elif op_type.endswith("TAMU") : + op_id = op_id + "tamu" + elif op_type.endswith("TUMA") : + op_id = op_id + "tuma" + elif op_type.endswith("TUMU") : + op_id = op_id + "tumu" + elif op_type.endswith("MA") : + op_id = op_id + "ma" + elif op_type.endswith("MU") : + op_id = op_id + "mu" + elif op_type.endswith("TAM") : + op_id = op_id + "tam" + elif op_type.endswith("TUM") : + op_id = op_id + "tum" + + if op_id in count : + continue + + op_types.append(op_type) + count[op_id] = 1 + + return op_types + + +def runSubProcess(args, testing = False) : + output = "" + ret = -1 + if testing : + output = "Running " + args[2] + ": " + runSubProcess.total += 1 + try: + ret = subprocess.check_call(args, stdout = subprocess.DEVNULL, stderr = subprocess.DEVNULL, timeout = 100) + if not ret : + runSubProcess.passed += 1 + else : + runSubProcess.failed += 1 + failedCases.append(args[2]) + except subprocess.TimeoutExpired: + runSubProcess.timeout += 1 + runSubProcess.timeoutCases.append(args[2]) + except: + runSubProcess.failed += 1 + runSubProcess.failedCases.append(args[2]) + if testing : + if not ret : + print(output, f"{Color.OKGREEN}PASS{Color.ENDC}") + else : + print(output, f"{Color.FAIL}FAIL{Color.ENDC}") + +def initSubProcessVars() : + runSubProcess.total = 0 + runSubProcess.timeout = 0 + runSubProcess.timeoutCases = [] + runSubProcess.passed = 0 + runSubProcess.failed = 0 + runSubProcess.failedCases = [] + +def generateAllCCode(options, bin_path, filepath, output_dir, data_len = "7") : + print("Generating C Code", flush = True) + if not os.path.exists(output_dir) : + try : + os.makedirs(output_dir) + except : + print("Failed on makedirs", file=sys.stderr) + sys.exit(1) + op_types = getOpTypesToGen(options, filepath) + + run_list = [] + for op_type in op_types: + args = [bin_path, "-r", op_type, "-n", "1", "-l", data_len, "--has-ta", "--has-ma", "-c", output_dir + "/" + op_type + ".c"] + if options.has_policy: + args.append("--has-policy") + task = threading.Thread(target=runSubProcess, args=(args,)) + task.start() + run_list.append(task) + + for task in run_list: + task.join() + + if runSubProcess.timeout or runSubProcess.failed : + return 1 + else : + return 0 + +def printSubprocessVerbose(runSubProcess = runSubProcess) : + total_tasks = runSubProcess.total + passed_tasks = runSubProcess.passed + timeout_tasks = runSubProcess.timeout + failed_tasks = runSubProcess.failed + timeout_list = runSubProcess.timeoutCases + failed_list = runSubProcess.failedCases + + print(f"{Color.OKGREEN}Total Cases{Color.ENDC}: ", total_tasks) + print(f"{Color.OKGREEN}Pass{Color.ENDC}: ", passed_tasks) + if timeout_tasks : + print(f"{Color.FAIL}Timeout{Color.ENDC}: ", timeout_tasks) + if failed_tasks : + print(f"{Color.FAIL}Fail{Color.ENDC}: ", failed_tasks) + if timeout_list != [] : + print(f"{Color.FAIL}Timeout Cases{Color.ENDC}: ", timeout_list) + if failed_list != [] : + print(f"{Color.FAIL}Failed Cases{Color.ENDC}: ", failed_list) diff --git a/scripts/UpdateCodeGenTests.py b/scripts/UpdateCodeGenTests.py new file mode 100644 index 0000000..9bf1a79 --- /dev/null +++ b/scripts/UpdateCodeGenTests.py @@ -0,0 +1,25 @@ +from TestCodeGenUtils import * +import sys + +def main() : + args = config() + if not args.random_gen : + print('Please specify the random-gen argument', file = sys.stderr) + sys.exit(1) + if not args.filepath : + print('Please specify the filepath argument', file = sys.stderr) + sys.exit(1) + if not args.output_dir : + print('Please specify the output-dir argument', file = sys.stderr) + sys.exit(1) + + output_dir = args.output_dir + + initSubProcessVars() + ret = generateAllCCode(args, bin_path = args.random_gen, filepath = args.filepath, output_dir = args.output_dir) + printSubprocessVerbose() + + return ret + +if __name__ == "__main__": + sys.exit(main()) diff --git a/scripts/VLiteral.py b/scripts/VLiteral.py new file mode 100644 index 0000000..e339f41 --- /dev/null +++ b/scripts/VLiteral.py @@ -0,0 +1,392 @@ +v_literal_start0 = "void compute" +v_literal_start1 = "Op(RIF::OperatorBase *op) {\n" +v_literal_nonmask_body = ''' + assert(a->length == b->length); + + auto length = a->length; + + auto dataA = getRawPointer(a); + auto dataOut = getRawPointer(b); + + auto sew = op->typeInfo->sew.to_int(); + + for (int i = 0; i < length; ++i) { +''' + +v_tu_literal_nonmask_body = ''' + assert(a->length == b->length && a->length == c->length); + + auto length = a->length; + + auto dataPassthru = getRawPointer(a); + auto dataA = getRawPointer(b); + auto dataOut = getRawPointer(c); + + auto sew = op->typeInfo->sew.to_int(); + + for (int i = 0; i < length; ++i) { +''' + +v_literal_nonmask_no_input_body = ''' + + auto length = a->length; + + auto dataOut = getRawPointer(a); + + auto sew = op->typeInfo->sew.to_int(); + + for (int i = 0; i < length; ++i) { +''' + +v_literal_mask_body = ''' + assert(a->length == b->length && a->length == c->length && + a->length == d->length); + + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataMO = getRawPointer(b); + auto dataA = getRawPointer(c); + auto dataOut = getRawPointer(d); + + auto sew = op->typeInfo->sew.to_int(); + + for (int i = 0; i < length; ++i) { + if (dataM[i]) { +''' + +def include_literal(filename): + return "#include\"" + filename + "\"" + +v_literal_nonmask_end = ''' + } +} +''' + +v_ta_literal_nonmask_end = ''' + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +v_tu_literal_nonmask_end = ''' + if (i & 1) // tail element is undisturbed + dataOut[i] = dataPassthru[i]; + } +} +''' + + +v_literal_mask_end = ''' + } else + dataOut[i] = dataMO[i]; + } +} +''' + +v_tama_literal_mask_end = ''' + } else { // maskedoff element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +v_tamu_literal_mask_end = ''' + } else { // maskedoff element is undisturbed + dataOut[i] = dataMO[i]; + } + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +v_tuma_literal_mask_end = ''' + } else { // maskedoff element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } + if (i & 1) // tail element is undisturbed + dataOut[i] = dataMO[i]; + } +} +''' + +v_tumu_literal_mask_end = ''' + } else { // maskedoff element is undisturbed + dataOut[i] = dataMO[i]; + } + if (i & 1) // tail element is undisturbed + dataOut[i] = dataMO[i]; + } +} +''' + + +v_literal_masked_no_maskedoff_body = ''' + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataA = getRawPointer(b); + auto dataOut = getRawPointer(c); + + auto sew = op->typeInfo->sew.to_int(); + + for (int i = 0; i < length; ++i) { + if (dataM[i]) { +''' + +v_literal_masked_no_maskedoff_end = ''' + } else { + + } + } +} +''' + +v_literal_strided_load_nonmask_body = ''' + auto length = a->length; + + auto dataA = getRawPointer(a); + auto dataStride = getRawPointer(b); + auto dataOut = getRawPointer(c); + + auto stride = *dataStride; + stride = stride % 4 + 1; // lets deal with stride = [1, 4] or [-1, -4] + + auto sew = op->typeInfo->sew.to_int(); + + memset(dataOut, 0, length * sew / 8); + + if (stride < 0) + dataA += length - 1; + + for (int i = 0; i < length && abs(i * stride) < length; ++i) { +''' + +v_literal_strided_load_nonmask_end = ''' + } +} +''' + +v_tu_literal_strided_load_nonmask_body = ''' + auto length = a->length; + + auto dataPassthru = getRawPointer(a); + auto dataA = getRawPointer(b); + auto dataStride = getRawPointer(c); + auto dataOut = getRawPointer(d); + + auto stride = *dataStride; + stride = stride % 4 + 1; // lets deal with stride = [1, 4] or [-1, -4] + + auto sew = op->typeInfo->sew.to_int(); + + memset(dataOut, 0, length * sew / 8); + + if (stride < 0) + dataA += length - 1; + + for (int i = 0; i < length && abs(i * stride) < length; ++i) { +''' + +v_literal_strided_load_mask_body = ''' + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataMO = getRawPointer(b); + auto dataA = getRawPointer(c); + auto dataStride = getRawPointer(d); + auto dataOut = getRawPointer(e); + + auto stride = *dataStride; + stride = stride % 4 + 1; // lets deal with stride = [1, 4] or [-1, -4] + + auto sew = op->typeInfo->sew.to_int(); + + memset(dataOut, 0, length * sew / 8); + + if (stride < 0) + dataA += length - 1; + + for (int i = 0; i < length && abs(i * stride) < length; ++i) { + if (dataM[i]) { +''' + +v_literal_strided_load_mask_end = ''' + } else { + dataOut[i] = dataMO[i]; + } + } +} +''' + +v_literal_strided_load_masked_no_maskedoff_body = ''' + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataA = getRawPointer(b); + auto dataStride = getRawPointer(c); + auto dataOut = getRawPointer(d); + + auto stride = *dataStride; + stride = stride % 4 + 1; // lets deal with stride = [1, 4] or [-1, -4] + + auto sew = op->typeInfo->sew.to_int(); + + memset(dataOut, 0, length * sew / 8); + + if (stride < 0) + dataA += length - 1; + + for (int i = 0; i < length && abs(i * stride) < length; ++i) { + if (dataM[i]) { +''' + +v_literal_strided_store_nonmask_body = ''' + auto length = a->length; + + auto dataA = getRawPointer(a); + auto dataStride = getRawPointer(b); + auto dataOut = getRawPointer(c); + + auto stride = *dataStride; + stride = stride % 4 + 1; // lets deal with stride = [1, 4] or [-1, -4] + + auto sew = op->typeInfo->sew.to_int(); + + memset(dataOut, 0, length * sew / 8); + + if (stride < 0) + dataOut += length - 1; + + for (int i = 0; i < length && abs(i * stride) < length; ++i) { +''' + +v_literal_strided_store_nonmask_end = ''' + } +} +''' + +v_literal_strided_store_mask_body = ''' + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataA = getRawPointer(b); + auto dataStride = getRawPointer(c); + auto dataOut = getRawPointer(d); + + auto stride = *dataStride; + stride = stride % 4 + 1; // lets deal with stride = [1, 4] or [-1, -4] + + auto sew = op->typeInfo->sew.to_int(); + + memset(dataOut, 0, length * sew / 8); + + if (stride < 0) + dataOut += length - 1; + + for (int i = 0; i < length && abs(i * stride) < length; ++i) { + if (dataM[i]) { +''' + +v_literal_strided_store_mask_end = ''' + } + } +} +''' + +def create_v_op(op_type, op_id, op_attr, output_type, input_num, input_types) : + ret = "" + ret += v_literal_start0 + op_type + v_literal_start1 + for i in range(input_num) : + var = chr(ord('a') + i) + ret += " auto " + var + " = static_cast(op->inputs[" + str(i) + "]);\n" + var = chr(ord('a') + input_num) + ret += " auto " + var + " = static_cast(op->outputs[0]);\n" + if "MaskedOperation" in op_attr : + if "TailAgnostic" in op_attr and "MaskAgnostic" in op_attr : # tama + ret += v_literal_masked_no_maskedoff_body + include_literal("v" + op_id + ".h") + v_tama_literal_mask_end + elif "TailAgnostic" in op_attr and "MaskUndisturbed" in op_attr : # tamu + ret += v_literal_mask_body + include_literal("v" + op_id + ".h") + v_tamu_literal_mask_end + elif "TailUndisturbed" in op_attr and "MaskAgnostic" in op_attr : # tuma + ret += v_literal_mask_body + include_literal("v" + op_id + ".h") + v_tuma_literal_mask_end + elif "TailUndisturbed" in op_attr and "MaskUndisturbed" in op_attr : # tumu + ret += v_literal_mask_body + include_literal("v" + op_id + ".h") + v_tumu_literal_mask_end + else : # No explicit policy specified + ret += v_literal_mask_body + include_literal("v" + op_id + ".h") + v_literal_mask_end + else : + if "TailUndisturbed" in op_attr : + ret += v_tu_literal_nonmask_body + include_literal("v" + op_id + ".h") + v_tu_literal_nonmask_end + elif "TailAgnostic" in op_attr : + ret += v_literal_nonmask_body + include_literal("v" + op_id + ".h") + v_ta_literal_nonmask_end + else : + ret += v_literal_nonmask_body + include_literal("v" + op_id + ".h") + v_literal_nonmask_end + return ret + +def create_no_input_v_op(op_type, op_id, op_attr, output_type, input_num, input_types) : + ret = "" + ret += v_literal_start0 + op_type + v_literal_start1 + for i in range(input_num) : + var = chr(ord('a') + i) + ret += " auto " + var + " = static_cast(op->inputs[" + str(i) + "]);\n" + var = chr(ord('a') + input_num) + ret += " auto " + var + " = static_cast(op->outputs[0]);\n" + ret += v_literal_nonmask_no_input_body + include_literal("v" + op_id + ".h") + v_literal_nonmask_end + return ret + +def create_masked_no_maskedoff_v_op(op_type, op_id, op_attr, output_type, input_num, input_types) : + ret = "" + ret += v_literal_start0 + op_type + v_literal_start1 + for i in range(input_num) : + var = chr(ord('a') + i) + ret += " auto " + var + " = static_cast(op->inputs[" + str(i) + "]);\n" + var = chr(ord('a') + input_num) + ret += " auto " + var + " = static_cast(op->outputs[0]);\n" + ret += v_literal_masked_no_maskedoff_body + include_literal("v" + op_id + ".h") + v_literal_masked_no_maskedoff_end + return ret + +def create_strided_load_op(op_type, op_id, op_attr, output_type, input_num, input_types) : + ret = "" + ret += v_literal_start0 + op_type + v_literal_start1 + for i in range(input_num) : + var = chr(ord('a') + i) + ret += " auto " + var + " = static_cast(op->inputs[" + str(i) + "]);\n" + var = chr(ord('a') + input_num) + ret += " auto " + var + " = static_cast(op->outputs[0]);\n" + if "MaskedOperation" in op_attr : + if "TailAgnostic" in op_attr and "MaskAgnostic" in op_attr : # tama + ret += v_literal_strided_load_masked_no_maskedoff_body + include_literal("v" + op_id + ".h") + v_tama_literal_mask_end + elif "TailAgnostic" in op_attr and "MaskUndisturbed" in op_attr : # tamu + ret += v_literal_strided_load_mask_body + include_literal("v" + op_id + ".h") + v_tamu_literal_mask_end + elif "TailUndisturbed" in op_attr and "MaskAgnostic" in op_attr : # tuma + ret += v_literal_strided_load_mask_body + include_literal("v" + op_id + ".h") + v_tuma_literal_mask_end + elif "TailUndisturbed" in op_attr and "MaskUndisturbed" in op_attr : # tumu + ret += v_literal_strided_load_mask_body + include_literal("v" + op_id + ".h") + v_tumu_literal_mask_end + else : # No explicit policy specified + ret += v_literal_strided_load_mask_body + include_literal("v" + op_id + ".h") + v_literal_mask_end + else : + if "TailUndisturbed" in op_attr : + ret += v_tu_literal_strided_load_nonmask_body + include_literal("v" + op_id + ".h") + v_tu_literal_nonmask_end + elif "TailAgnostic" in op_attr : + ret += v_literal_strided_load_nonmask_body + include_literal("v" + op_id + ".h") + v_ta_literal_nonmask_end + else : + ret += v_literal_strided_load_nonmask_body + include_literal("v" + op_id + ".h") + v_literal_nonmask_end + return ret + +def create_strided_store_op(op_type, op_id, op_attr, output_type, input_num, input_types) : + ret = "" + ret += v_literal_start0 + op_type + v_literal_start1 + for i in range(input_num) : + var = chr(ord('a') + i) + ret += " auto " + var + " = static_cast(op->inputs[" + str(i) + "]);\n" + var = chr(ord('a') + input_num) + ret += " auto " + var + " = static_cast(op->outputs[0]);\n" + if "MaskedOperation" in op_attr : + ret += v_literal_strided_store_mask_body + include_literal("v" + op_id + ".h") + v_literal_strided_store_mask_end + else : + ret += v_literal_strided_store_nonmask_body + include_literal("v" + op_id + ".h") + v_literal_strided_store_nonmask_end + return ret diff --git a/scripts/VSLiteral.py b/scripts/VSLiteral.py new file mode 100644 index 0000000..ec5d62c --- /dev/null +++ b/scripts/VSLiteral.py @@ -0,0 +1,162 @@ +vs_literal_start0 = "void compute" +vs_literal_start1 = "Op(RIF::OperatorBase *op) {\n" +vs_literal_nonmask_body = ''' + assert(b->length == 1); + + auto length = a->length; + + auto dataA = getRawPointer(a); + auto dataOut = getRawPointer(b); + + auto sew = op->typeInfo->sew.to_int(); + + for (int i = 0; i < length; ++i) { +''' + +vs_ta_literal_nonmask_body = ''' + assert(a->length == b->length); + + auto length = a->length; + + auto dataA = getRawPointer(a); + auto dataOut = getRawPointer(b); + + auto sew = op->typeInfo->sew.to_int(); + + for (int i = 0; i < length; ++i) { +''' + +vs_tu_literal_nonmask_body = ''' + assert(a->length == b->length); + + auto length = a->length; + + auto dataPassthru = getRawPointer(a); + auto dataA = getRawPointer(b); + auto dataOut = getRawPointer(c); + + auto sew = op->typeInfo->sew.to_int(); + + for (int i = 0; i < length; ++i) { +''' + +def include_literal(filename): + return "#include\"" + filename + "\"" + +vs_literal_nonmask_end = ''' + } +} +''' + +vs_ta_literal_nonmask_end = ''' + } + for (int i = 1; i < length; ++i) { + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +vs_tu_literal_nonmask_end = ''' + } + for (int i = 1; i < length; ++i) { + dataOut[i] = dataPassthru[i]; + } +} +''' + +vs_literal_mask_body = ''' + assert(a->length == b->length && c->length == 1); + + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataA = getRawPointer(b); + auto dataOut = getRawPointer(c); + + auto sew = op->typeInfo->sew.to_int(); + + for (int i = 0; i < length; ++i) { + if (dataM[i]) { +''' + +vs_tam_literal_mask_body = ''' + assert(a->length == b->length && a->length == c->length); + + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataA = getRawPointer(b); + auto dataOut = getRawPointer(c); + + auto sew = op->typeInfo->sew.to_int(); + + for (int i = 0; i < length; ++i) { + if (dataM[i]) { +''' + +vs_tum_literal_mask_body = ''' + assert(a->length == b->length && a->length == c->length && a->length == d->length); + + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataPassthru = getRawPointer(b); + auto dataA = getRawPointer(c); + auto dataOut = getRawPointer(d); + + auto sew = op->typeInfo->sew.to_int(); + + for (int i = 0; i < length; ++i) { + if (dataM[i]) { +''' + +def include_literal(filename): + return "#include\"" + filename + "\"" + +vs_literal_mask_end = ''' + } + } +} +''' + +vs_tam_literal_mask_end = ''' + } + } + for (int i = 1; i < length; ++i) { + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +vs_tum_literal_mask_end = ''' + } + } + for (int i = 1; i < length; ++i) { + dataOut[i] = dataPassthru[i]; + } +} +''' + +def create_vs_op(op_type, op_id, op_attr, output_type, input_num, input_types) : + ret = "" + ret += vs_literal_start0 + op_type + vs_literal_start1 + for i in range(input_num) : + var = chr(ord('a') + i) + ret += " auto " + var + " = static_cast(op->inputs[" + str(i) + "]);\n" + var = chr(ord('a') + input_num) + ret += " auto " + var + " = static_cast(op->outputs[0]);\n" + if "MaskedOperation" in op_attr : + if "TailAgnostic" in op_attr : # tam + ret += vs_tam_literal_mask_body + include_literal("v" + op_id + ".h") + vs_tam_literal_mask_end + elif "TailUndisturbed" in op_attr : # tum + ret += vs_tum_literal_mask_body + include_literal("v" + op_id + ".h") + vs_tum_literal_mask_end + else : + ret += vs_literal_mask_body + include_literal("v" + op_id + ".h") + vs_literal_mask_end + else : + if "TailUndisturbed" in op_attr : + ret += vs_tu_literal_nonmask_body + include_literal("v" + op_id + ".h") + vs_tu_literal_nonmask_end + elif "TailAgnostic" in op_attr : + ret += vs_ta_literal_nonmask_body + include_literal("v" + op_id + ".h") + vs_ta_literal_nonmask_end + else : + ret += vs_literal_nonmask_body + include_literal("v" + op_id + ".h") + vs_literal_nonmask_end + return ret diff --git a/scripts/VVLiteral.py b/scripts/VVLiteral.py new file mode 100644 index 0000000..2c2a163 --- /dev/null +++ b/scripts/VVLiteral.py @@ -0,0 +1,513 @@ +vv_literal_start0 = "void compute" +vv_literal_start1 = "Op(RIF::OperatorBase *op) {\n" +vv_literal_nonmask_body = ''' + assert(a->length == b->length && a->length == c->length); + + auto length = a->length; + + auto dataA = getRawPointer(a); + auto dataB = getRawPointer(b); + auto dataOut = getRawPointer(c); + + auto sew = op->typeInfo->sew.to_int(); + auto dataASew = a->typeInfo->sew.to_int(); // for index load / store only + P.VU.vsew = sew; + + for (int i = 0; i < length; ++i) { +''' + +vv_tu_literal_nonmask_body = ''' + assert(a->length == b->length && a->length == c->length && a->length == d->length); + + auto length = a->length; + + auto dataPassthru = getRawPointer(a); + auto dataA = getRawPointer(b); + auto dataB = getRawPointer(c); + auto dataOut = getRawPointer(d); + + auto sew = op->typeInfo->sew.to_int(); + auto dataASew = a->typeInfo->sew.to_int(); // for index load / store only + P.VU.vsew = sew; + + for (int i = 0; i < length; ++i) { +''' + + +vv_literal_nonmask_destructive_body = ''' + assert(a->length == b->length && a->length == c->length && a->length == d->length); + + auto length = a->length; + + auto dataA = getRawPointer(a); + auto dataB = getRawPointer(b); + auto dataC = getRawPointer(c); + auto dataOut = getRawPointer(d); + + auto sew = op->typeInfo->sew.to_int(); + + #pragma push_macro("VI_VFP_VV_LOOP") + #undef VI_VFP_VV_LOOP + #define VI_VFP_VV_LOOP(BODY16, BODY32, BODY64) \\ + RIF::RawDatumOperand vd(dataA[i]); \\ + RIF::RawDatumOperand vs1(dataB[i]); \\ + RIF::RawDatumOperand vs2(dataC[i]); \\ + switch (sew) { \\ + case e16: \\ + BODY16; \\ + break; \\ + case e32: \\ + BODY32; \\ + break; \\ + case e64: \\ + BODY64; \\ + break; \\ + default: \\ + assert(0); \\ + break; \\ + } \\ + dataOut[i] = vd; + + #pragma push_macro("VI_VFP_VV_LOOP_WIDE") + #undef VI_VFP_VV_LOOP_WIDE + #define VI_VFP_VV_LOOP_WIDE(BODY16, BODY32) \\ + RIF::RawDatumOperand vd(dataA[i]); \\ + RIF::RawDatumOperand vs1(dataB[i]); \\ + RIF::RawDatumOperand vs2(dataC[i]); \\ + switch (sew) { \\ + case e16: \\ + vs2 = f16_to_f32(vs2); \\ + vs1 = f16_to_f32(vs1); \\ + BODY16; \\ + break; \\ + case e32: \\ + vs2 = f32_to_f64(vs2); \\ + vs1 = f32_to_f64(vs1); \\ + BODY32; \\ + break; \\ + default: \\ + assert(0); \\ + break; \\ + } \\ + dataOut[i] = vd; + + for (int i = 0; i < length; ++i) { +''' + +def include_literal(filename): + return "#include\"" + filename + "\"" + +vv_literal_nonmask_end = ''' + } +} +''' + +vv_ta_literal_nonmask_end = ''' + } + for (int i = 0; i < length; ++i) { + if (i & 1) + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +vv_tu_literal_nonmask_end = ''' + } + for (int i = 0; i < length; ++i) { + if (i & 1) + dataOut[i] = dataPassthru[i]; + } +} +''' + +vv_literal_nonmask_destructive_end = ''' + } + #pragma pop_macro("VI_VFP_VV_LOOP") + #pragma pop_macro("VI_VFP_VV_LOOP_WIDE") +} +''' + +vv_tu_literal_nonmask_destructive_end = ''' + } + #pragma pop_macro("VI_VFP_VV_LOOP") + #pragma pop_macro("VI_VFP_VV_LOOP_WIDE") + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is undisturbed + dataOut[i] = dataA[i]; + } +} +''' + +vv_ta_literal_nonmask_destructive_end = ''' + } + #pragma pop_macro("VI_VFP_VV_LOOP") + #pragma pop_macro("VI_VFP_VV_LOOP_WIDE") + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +vv_literal_mask_body = ''' + assert(a->length == b->length && a->length == c->length && + a->length == e->length && a->length == d->length); + + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataMO = getRawPointer(b); + auto dataA = getRawPointer(c); + auto dataB = getRawPointer(d); + auto dataOut = getRawPointer(e); + + auto sew = op->typeInfo->sew.to_int(); + auto dataASew = c->typeInfo->sew.to_int(); // for index load / store only + P.VU.vsew = sew; + + for (int i = 0; i < length; ++i) { + if (dataM[i]) { +''' + +vv_literal_mask_body_destructive = ''' + assert(a->length == b->length && a->length == c->length && + a->length == e->length && a->length == d->length); + + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataMO = getRawPointer(b); + auto dataA = getRawPointer(b); + auto dataB = getRawPointer(c); + auto dataC = getRawPointer(d); + auto dataOut = getRawPointer(e); + + auto sew = op->typeInfo->sew.to_int(); + + #pragma push_macro("VI_VFP_VV_LOOP") + #undef VI_VFP_VV_LOOP + #define VI_VFP_VV_LOOP(BODY16, BODY32, BODY64) \\ + RIF::RawDatumOperand vd(dataA[i]); \\ + RIF::RawDatumOperand vs1(dataB[i]); \\ + RIF::RawDatumOperand vs2(dataC[i]); \\ + switch (sew) { \\ + case e16: \\ + BODY16; \\ + break; \\ + case e32: \\ + BODY32; \\ + break; \\ + case e64: \\ + BODY64; \\ + break; \\ + default: \\ + assert(0); \\ + break; \\ + } \\ + dataOut[i] = vd; + + #pragma push_macro("VI_VFP_VV_LOOP_WIDE") + #undef VI_VFP_VV_LOOP_WIDE + #define VI_VFP_VV_LOOP_WIDE(BODY16, BODY32) \\ + RIF::RawDatumOperand vd(dataA[i]); \\ + RIF::RawDatumOperand vs1(dataB[i]); \\ + RIF::RawDatumOperand vs2(dataC[i]); \\ + switch (sew) { \\ + case e16: \\ + vs2 = f16_to_f32(vs2); \\ + vs1 = f16_to_f32(vs1); \\ + BODY16; \\ + break; \\ + case e32: \\ + vs2 = f32_to_f64(vs2); \\ + vs1 = f32_to_f64(vs1); \\ + BODY32; \\ + break; \\ + default: \\ + assert(0); \\ + break; \\ + } \\ + dataOut[i] = vd; + + for (int i = 0; i < length; ++i) { + if (dataM[i]) { +''' + +vv_literal_mask_end = ''' + } else + dataOut[i] = dataMO[i]; + } +} +''' + +vv_ta_literal_mask_end = ''' + } else + dataOut[i] = dataMO[i]; + } + auto half = length / 2; + for (int i = half; i < length; ++i) { + dataOut[i] = -1; + } +} +''' + +vv_tu_literal_mask_end = ''' + } else + dataOut[i] = dataMO[i]; + } + auto half = length / 2; + for (int i = half; i < length; ++i) { + dataOut[i] = dataMO[i]; + } +} +''' + +vv_literal_mask_destructive_end = ''' + } else + dataOut[i] = dataMO[i]; + } + #pragma pop_macro("VI_VFP_VV_LOOP") + #pragma pop_macro("VI_VFP_VV_LOOP_WIDE") +} +''' + +vv_tama_literal_mask_destructive_end = ''' + } else // maskedoff element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } + #pragma pop_macro("VI_VFP_VV_LOOP") + #pragma pop_macro("VI_VFP_VV_LOOP_WIDE") + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +vv_tamu_literal_mask_destructive_end = ''' + } else // maskedoff element is undisturbed + dataOut[i] = dataMO[i]; + } + #pragma pop_macro("VI_VFP_VV_LOOP") + #pragma pop_macro("VI_VFP_VV_LOOP_WIDE") + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +vv_tuma_literal_mask_destructive_end = ''' + } else // maskedoff element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } + #pragma pop_macro("VI_VFP_VV_LOOP") + #pragma pop_macro("VI_VFP_VV_LOOP_WIDE") + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is undisturbed + dataOut[i] = dataMO[i]; + } +} +''' + +vv_tumu_literal_mask_destructive_end = ''' + } else // maskedoff element is undisturbed + dataOut[i] = dataMO[i]; + } + #pragma pop_macro("VI_VFP_VV_LOOP") + #pragma pop_macro("VI_VFP_VV_LOOP_WIDE") + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is undisturbed + dataOut[i] = dataMO[i]; + } +} +''' + +vv_literal_masked_no_maskedoff_body = ''' + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataA = getRawPointer(b); + auto dataB = getRawPointer(c); + auto dataOut = getRawPointer(d); + + auto sew = op->typeInfo->sew.to_int(); + auto dataASew = b->typeInfo->sew.to_int(); // for index load / store only + P.VU.vsew = sew; + + for (int i = 0; i < length; ++i) { + if (dataM[i]) { +''' + +vv_mu_literal_masked_no_maskedoff_body = ''' + auto length = a->length; + + auto dataPassthru = getRawPointer(a); + auto dataM = getRawPointer(b); + auto dataA = getRawPointer(c); + auto dataB = getRawPointer(d); + auto dataOut = getRawPointer(e); + + auto sew = op->typeInfo->sew.to_int(); + auto dataASew = b->typeInfo->sew.to_int(); // for index load / store only + P.VU.vsew = sew; + + for (int i = 0; i < length; ++i) { + if (dataM[i]) { +''' + +vv_literal_masked_no_masked_off_end = ''' + } else { + + } + } +} +''' + +vv_mask_output_ma_literal_masked_no_masked_off_end = ''' + } else { // maskedoff element is agnostic(only set one bit) + dataOut[i] = 1; + } + } +} +''' + +vv_ma_literal_masked_no_masked_off_end = ''' + } else { // maskedoff element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } + } +} +''' + +vv_mu_literal_masked_no_masked_off_end = ''' + } else { // maskedoff element is undisturbed + dataOut[i] = dataPassthru[i]; + } + } +} +''' + +vv_tama_literal_mask_end = ''' + } else { // maskedoff element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +vv_tamu_literal_mask_end = ''' + } else { // maskedoff element is undisturbed + dataOut[i] = dataMO[i]; + } + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +vv_tuma_literal_mask_end = ''' + } else { // maskedoff element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is undisturbed + dataOut[i] = dataMO[i]; + } +} +''' + +vv_tumu_literal_mask_end = ''' + } else { // maskedoff element is undisturbed + dataOut[i] = dataMO[i]; + } + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is undisturbed + dataOut[i] = dataMO[i]; + } +} +''' + +def create_vv_op(op_type, op_id, op_attr, output_type, input_num, input_types) : + ret = "" + ret += vv_literal_start0 + op_type + vv_literal_start1 + for i in range(input_num) : + var = chr(ord('a') + i) + ret += " auto " + var + " = static_cast(op->inputs[" + str(i) + "]);\n" + var = chr(ord('a') + input_num) + ret += " auto " + var + " = static_cast(op->outputs[0]);\n" + if "MaskedOperation" in op_attr : + if "TailAgnostic" in op_attr and "MaskAgnostic" in op_attr : # tama + ret += vv_literal_masked_no_maskedoff_body + include_literal("v" + op_id + ".h") + vv_tama_literal_mask_end + elif "TailAgnostic" in op_attr and "MaskUndisturbed" in op_attr : # tamu + ret += vv_literal_mask_body + include_literal("v" + op_id + ".h") + vv_tamu_literal_mask_end + elif "TailUndisturbed" in op_attr and "MaskAgnostic" in op_attr : # tuma + ret += vv_literal_mask_body + include_literal("v" + op_id + ".h") + vv_tuma_literal_mask_end + elif "TailUndisturbed" in op_attr and "MaskUndisturbed" in op_attr : # tumu + ret += vv_literal_mask_body + include_literal("v" + op_id + ".h") + vv_tumu_literal_mask_end + else : # No explicit policy specified + ret += vv_literal_mask_body + include_literal("v" + op_id + ".h") + vv_literal_mask_end + else : + if "TailUndisturbed" in op_attr : + ret += vv_tu_literal_nonmask_body + include_literal("v" + op_id + ".h") + vv_tu_literal_nonmask_end + elif "TailAgnostic" in op_attr : + ret += vv_literal_nonmask_body + include_literal("v" + op_id + ".h") + vv_ta_literal_nonmask_end + else : + ret += vv_literal_nonmask_body + include_literal("v" + op_id + ".h") + vv_literal_nonmask_end + return ret + +def create_destructive_vv_op(op_type, op_id, op_attr, output_type, input_num, input_types) : + ret = "" + ret += vv_literal_start0 + op_type + vv_literal_start1 + for i in range(input_num) : + var = chr(ord('a') + i) + ret += " auto " + var + " = static_cast(op->inputs[" + str(i) + "]);\n" + var = chr(ord('a') + input_num) + ret += " auto " + var + " = static_cast(op->outputs[0]);\n" + if "MaskedOperation" in op_attr : + if "TailAgnostic" in op_attr and "MaskAgnostic" in op_attr : # tama + ret += vv_literal_mask_body_destructive + include_literal("v" + op_id + ".h") + vv_tama_literal_mask_destructive_end + elif "TailAgnostic" in op_attr and "MaskUndisturbed" in op_attr : # tamu + ret += vv_literal_mask_body_destructive + include_literal("v" + op_id + ".h") + vv_tamu_literal_mask_destructive_end + elif "TailUndisturbed" in op_attr and "MaskAgnostic" in op_attr : # tuma + ret += vv_literal_mask_body_destructive + include_literal("v" + op_id + ".h") + vv_tuma_literal_mask_destructive_end + elif "TailUndisturbed" in op_attr and "MaskUndisturbed" in op_attr : # tumu + ret += vv_literal_mask_body_destructive + include_literal("v" + op_id + ".h") + vv_tumu_literal_mask_destructive_end + else : # No explicit policy specified + ret += vv_literal_mask_body_destructive + include_literal("v" + op_id + ".h") + vv_literal_mask_destructive_end + else : + if "TailUndisturbed" in op_attr : + ret += vv_literal_nonmask_destructive_body + include_literal("v" + op_id + ".h") + vv_tu_literal_nonmask_destructive_end + elif "TailAgnostic" in op_attr : + ret += vv_literal_nonmask_destructive_body + include_literal("v" + op_id + ".h") + vv_ta_literal_nonmask_destructive_end + else : + ret += vv_literal_nonmask_destructive_body + include_literal("v" + op_id + ".h") + vv_literal_nonmask_destructive_end + return ret + +def create_masked_no_maskedoff_vv_op(op_type, op_id, op_attr, output_type, input_num, input_types) : + ret = "" + ret += vv_literal_start0 + op_type + vv_literal_start1 + for i in range(input_num) : + var = chr(ord('a') + i) + ret += " auto " + var + " = static_cast(op->inputs[" + str(i) + "]);\n" + var = chr(ord('a') + input_num) + ret += " auto " + var + " = static_cast(op->outputs[0]);\n" + if "MaskAgnostic" in op_attr : # ma + ret += vv_literal_masked_no_maskedoff_body + include_literal("v" + op_id + ".h") + if op_type[-3:] == "_MA" : # output is mask(only one bit for each element) + ret += vv_mask_output_ma_literal_masked_no_masked_off_end + else : + ret += vv_ma_literal_masked_no_masked_off_end + elif "MaskUndisturbed" in op_attr : # mu + ret += vv_mu_literal_masked_no_maskedoff_body + include_literal("v" + op_id + ".h") + vv_mu_literal_masked_no_masked_off_end + else : + ret += vv_literal_masked_no_maskedoff_body + include_literal("v" + op_id + ".h") + vv_literal_masked_no_masked_off_end + return ret diff --git a/scripts/VVMLiteral.py b/scripts/VVMLiteral.py new file mode 100644 index 0000000..3788099 --- /dev/null +++ b/scripts/VVMLiteral.py @@ -0,0 +1,96 @@ +vvm_literal_start0 = "void compute" +vvm_literal_start1 = "Op(RIF::OperatorBase *op) {\n" +vvm_literal_body = ''' + assert(a->length == b->length && a->length == c->length && a->length == d->length); + + auto length = a->length; + + auto dataA = getRawPointer(a); + auto dataB = getRawPointer(b); + auto dataC = getRawPointer(c); + auto dataOut = getRawPointer(d); + + auto sew = op->typeInfo->sew.to_int(); + + for (int i = 0; i < length; ++i) { +''' + +vvm_tu_literal_body = ''' + assert(a->length == b->length && a->length == c->length && a->length == d->length && a->length == e->length); + + auto length = a->length; + + auto dataPassthru = getRawPointer(a); + auto dataA = getRawPointer(b); + auto dataB = getRawPointer(c); + auto dataC = getRawPointer(d); + auto dataOut = getRawPointer(e); + + auto sew = op->typeInfo->sew.to_int(); + P.VU.vsew = sew; + + for (int i = 0; i < length; ++i) { +''' + +merge_vvm_tu_literal_body = ''' + assert(a->length == b->length && a->length == c->length && a->length == d->length && a->length == e->length); + + auto length = a->length; + + auto dataA = getRawPointer(a); + auto dataPassthru = getRawPointer(b); + auto dataB = getRawPointer(c); + auto dataC = getRawPointer(d); + auto dataOut = getRawPointer(e); + + auto sew = op->typeInfo->sew.to_int(); + P.VU.vsew = sew; + + for (int i = 0; i < length; ++i) { +''' + +def include_literal(filename): + return "#include\"" + filename + "\"" + +vvm_literal_end = ''' + } +} +''' + +vvm_tu_literal_end = ''' + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is undisturbed + dataOut[i] = dataPassthru[i]; + } +} +''' + +vvm_ta_literal_end = ''' + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + + +def create_vvm_op(op_type, op_id, op_attr, output_type, input_num, input_types) : + ret = "" + ret += vvm_literal_start0 + op_type + vvm_literal_start1 + for i in range(input_num) : + var = chr(ord('a') + i) + ret += " auto " + var + " = static_cast(op->inputs[" + str(i) + "]);\n" + var = chr(ord('a') + input_num) + ret += " auto " + var + " = static_cast(op->outputs[0]);\n" + if "TailUndisturbed" in op_attr : + if "MergeOperation" in op_attr : + ret += merge_vvm_tu_literal_body + include_literal("v" + op_id + ".h") + vvm_tu_literal_end + else : + ret += vvm_tu_literal_body + include_literal("v" + op_id + ".h") + vvm_tu_literal_end + elif "TailAgnostic" in op_attr : + ret += vvm_literal_body + include_literal("v" + op_id + ".h") + vvm_ta_literal_end + else : + ret += vvm_literal_body + include_literal("v" + op_id + ".h") + vvm_literal_end + return ret diff --git a/scripts/VXLiteral.py b/scripts/VXLiteral.py new file mode 100644 index 0000000..1f5e348 --- /dev/null +++ b/scripts/VXLiteral.py @@ -0,0 +1,510 @@ +vx_literal_start0 = "void compute" +vx_literal_start1 = "Op(RIF::OperatorBase *op) {\n" +vx_literal_nonmask_body = ''' + assert(a->length == c->length && b->length == 1); + + auto length = a->length; + + auto dataA = getRawPointer(a); + auto dataB = getRawPointer(b); + auto dataOut = getRawPointer(c); + + auto sew = op->typeInfo->sew.to_int(); + P.VU.vsew = sew; + + for (int i = 0; i < length; ++i) { +''' + +vx_tu_literal_nonmask_body = ''' + assert(a->length == b->length && c->length == 1 && a->length == d->length); + + auto length = a->length; + + auto dataPassthru = getRawPointer(a); + auto dataA = getRawPointer(b); + auto dataB = getRawPointer(c); + auto dataOut = getRawPointer(d); + + auto sew = op->typeInfo->sew.to_int(); + P.VU.vsew = sew; + + for (int i = 0; i < length; ++i) { +''' + +vx_literal_nonmask_destructive_body = ''' + assert(a->length == c->length && a->length == d->length && b->length == 1); + + auto length = a->length; + + auto dataA = getRawPointer(a); + auto dataB = getRawPointer(b); + auto dataC = getRawPointer(c); + auto dataOut = getRawPointer(d); + + auto sew = op->typeInfo->sew.to_int(); + + #pragma push_macro("VI_VFP_VF_LOOP") + #undef VI_VFP_VF_LOOP + #define VI_VFP_VF_LOOP(BODY16, BODY32, BODY64) \\ + RIF::RawDatumOperand vd(dataA[i]); \\ + RIF::RawDatumOperand rs1(*dataB); \\ + RIF::RawDatumOperand vs2(dataC[i]); \\ + switch (sew) { \\ + case e16: \\ + BODY16; \\ + break; \\ + case e32: \\ + BODY32; \\ + break; \\ + case e64: \\ + BODY64; \\ + break; \\ + default: \\ + assert(0); \\ + break; \\ + } \\ + dataOut[i] = vd; + + #pragma push_macro("VI_VFP_VF_LOOP_WIDE") + #undef VI_VFP_VF_LOOP_WIDE + #define VI_VFP_VF_LOOP_WIDE(BODY16, BODY32) \\ + RIF::RawDatumOperand vd(dataA[i]); \\ + RIF::RawDatumOperand rs1(*dataB); \\ + RIF::RawDatumOperand vs2(dataC[i]); \\ + switch (sew) { \\ + case e16: \\ + vs2 = f16_to_f32(vs2); \\ + rs1 = f16_to_f32(rs1); \\ + BODY16; \\ + break; \\ + case e32: \\ + vs2 = f32_to_f64(vs2); \\ + rs1 = f32_to_f64(rs1); \\ + BODY32; \\ + break; \\ + default: \\ + assert(0); \\ + break; \\ + } \\ + dataOut[i] = vd; + + for (int i = 0; i < length; ++i) { +''' + +vx_literal_nonmask_end = ''' + } +} +''' + +vx_ta_literal_nonmask_end = ''' + } + for (int i = 0; i < length; ++i) { + if (i & 1) + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +vx_tu_literal_nonmask_end = ''' + } + for (int i = 0; i < length; ++i) { + if (i & 1) + dataOut[i] = dataPassthru[i]; + } +} +''' + +vx_literal_nonmask_destructive_end = ''' + } + #pragma pop_macro("VI_VFP_VF_LOOP") + #pragma pop_macro("VI_VFP_VF_LOOP_WIDE") +} +''' + +vx_tu_literal_nonmask_destructive_end = ''' + } + #pragma pop_macro("VI_VFP_VF_LOOP") + #pragma pop_macro("VI_VFP_VF_LOOP_WIDE") + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is undisturbed + dataOut[i] = dataA[i]; + } +} +''' + +vx_ta_literal_nonmask_destructive_end = ''' + } + #pragma pop_macro("VI_VFP_VF_LOOP") + #pragma pop_macro("VI_VFP_VF_LOOP_WIDE") + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +vx_literal_mask_body = ''' + assert(a->length == b->length && a->length == c->length && + a->length == e->length && d->length == 1); + + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataMO = getRawPointer(b); + auto dataA = getRawPointer(c); + auto dataB = getRawPointer(d); + auto dataOut = getRawPointer(e); + + auto sew = op->typeInfo->sew.to_int(); + P.VU.vsew = sew; + + for (int i = 0; i < length; ++i) { + if (dataM[i]) { +''' + +vx_literal_mask_destructive_body = ''' + assert(a->length == b->length && a->length == d->length && + a->length == e->length && c->length == 1); + + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataMO = getRawPointer(b); + auto dataA = getRawPointer(b); + auto dataB = getRawPointer(c); + auto dataC = getRawPointer(d); + auto dataOut = getRawPointer(e); + + auto sew = op->typeInfo->sew.to_int(); + + #pragma push_macro("VI_VFP_VF_LOOP") + #undef VI_VFP_VF_LOOP + #define VI_VFP_VF_LOOP(BODY16, BODY32, BODY64) \\ + RIF::RawDatumOperand vd(dataA[i]); \\ + RIF::RawDatumOperand rs1(*dataB); \\ + RIF::RawDatumOperand vs2(dataC[i]); \\ + switch (sew) { \\ + case e16: \\ + BODY16; \\ + break; \\ + case e32: \\ + BODY32; \\ + break; \\ + case e64: \\ + BODY64; \\ + break; \\ + default: \\ + assert(0); \\ + break; \\ + } \\ + dataOut[i] = vd; + + #pragma push_macro("VI_VFP_VF_LOOP_WIDE") + #undef VI_VFP_VF_LOOP_WIDE + #define VI_VFP_VF_LOOP_WIDE(BODY16, BODY32) \\ + RIF::RawDatumOperand vd(dataA[i]); \\ + RIF::RawDatumOperand rs1(*dataB); \\ + RIF::RawDatumOperand vs2(dataC[i]); \\ + switch (sew) { \\ + case e16: \\ + vs2 = f16_to_f32(vs2); \\ + rs1 = f16_to_f32(rs1); \\ + BODY16; \\ + break; \\ + case e32: \\ + vs2 = f32_to_f64(vs2); \\ + rs1 = f32_to_f64(rs1); \\ + BODY32; \\ + break; \\ + default: \\ + assert(0); \\ + break; \\ + } \\ + dataOut[i] = vd; + + for (int i = 0; i < length; ++i) { + if (dataM[i]) { +''' + +vx_literal_mask_end = ''' + } else + dataOut[i] = dataMO[i]; + } +} +''' + +vx_ta_literal_mask_end = ''' + } else + dataOut[i] = dataMO[i]; + } + auto half = length / 2; + for (int i = half; i < length; ++i) { + dataOut[i] = -1; + } +} +''' + +vx_tu_literal_mask_end = ''' + } else + dataOut[i] = dataMO[i]; + } + auto half = length / 2; + for (int i = half; i < length; ++i) { + dataOut[i] = dataMO[i]; + } +} +''' + +vx_literal_mask_destructive_end = ''' + } else + dataOut[i] = dataMO[i]; + } + #pragma pop_macro("VI_VFP_VF_LOOP") + #pragma pop_macro("VI_VFP_VF_LOOP_WIDE") +} +''' + +vx_literal_masked_no_maskedoff_body = ''' + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataA = getRawPointer(b); + auto dataB = getRawPointer(c); + auto dataOut = getRawPointer(d); + + auto sew = op->typeInfo->sew.to_int(); + auto dataASew = b->typeInfo->sew.to_int(); // for index load / store only + P.VU.vsew = sew; + + for (int i = 0; i < length; ++i) { + if (dataM[i]) { +''' + +vx_literal_masked_no_masked_off_end = ''' + } else { + + } + } +} +''' + +vx_tama_literal_mask_end = ''' + } else { // maskedoff element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +vx_tamu_literal_mask_end = ''' + } else { // maskedoff element is undisturbed + dataOut[i] = dataMO[i]; + } + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +vx_tuma_literal_mask_end = ''' + } else { // maskedoff element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is undisturbed + dataOut[i] = dataMO[i]; + } +} +''' + +vx_tumu_literal_mask_end = ''' + } else { // maskedoff element is undisturbed + dataOut[i] = dataMO[i]; + } + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is undisturbed + dataOut[i] = dataMO[i]; + } +} +''' + +vx_tama_literal_mask_destructive_end = ''' + } else // maskedoff element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } + #pragma pop_macro("VI_VFP_VF_LOOP") + #pragma pop_macro("VI_VFP_VF_LOOP_WIDE") + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +vx_tamu_literal_mask_destructive_end = ''' + } else // maskedoff element is undisturbed + dataOut[i] = dataMO[i]; + } + #pragma pop_macro("VI_VFP_VF_LOOP") + #pragma pop_macro("VI_VFP_VF_LOOP_WIDE") + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +vx_tuma_literal_mask_destructive_end = ''' + } else // maskedoff element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } + #pragma pop_macro("VI_VFP_VF_LOOP") + #pragma pop_macro("VI_VFP_VF_LOOP_WIDE") + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is undisturbed + dataOut[i] = dataMO[i]; + } +} +''' + +vx_tumu_literal_mask_destructive_end = ''' + } else // maskedoff element is undisturbed + dataOut[i] = dataMO[i]; + } + #pragma pop_macro("VI_VFP_VF_LOOP") + #pragma pop_macro("VI_VFP_VF_LOOP_WIDE") + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is undisturbed + dataOut[i] = dataMO[i]; + } +} +''' + +vx_mu_literal_masked_no_maskedoff_body = ''' + auto length = a->length; + + auto dataPassthru = getRawPointer(a); + auto dataM = getRawPointer(b); + auto dataA = getRawPointer(c); + auto dataB = getRawPointer(d); + auto dataOut = getRawPointer(e); + + auto sew = op->typeInfo->sew.to_int(); + auto dataASew = b->typeInfo->sew.to_int(); // for index load / store only + P.VU.vsew = sew; + + for (int i = 0; i < length; ++i) { + if (dataM[i]) { +''' + +vx_ma_literal_masked_no_masked_off_end = ''' + } else { // maskedoff element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } + } +} +''' + +vx_mask_output_ma_literal_masked_no_masked_off_end = ''' + } else { // maskedoff element is agnostic(only set one bit) + dataOut[i] = 1; + } + } +} +''' + +vx_mu_literal_masked_no_masked_off_end = ''' + } else { // maskedoff element is undisturbed + dataOut[i] = dataPassthru[i]; + } + } +} +''' + + +def include_literal(filename): + return "#include\"" + filename + "\"" + +def create_vx_op(op_type, op_id, op_attr, output_type, input_num, input_types) : + ret = "" + ret += vx_literal_start0 + op_type + vx_literal_start1 + for i in range(input_num) : + var = chr(ord('a') + i) + ret += " auto " + var + " = static_cast(op->inputs[" + str(i) + "]);\n" + var = chr(ord('a') + input_num) + ret += " auto " + var + " = static_cast(op->outputs[0]);\n" + if "MaskedOperation" in op_attr : + if "TailAgnostic" in op_attr and "MaskAgnostic" in op_attr : # tama + ret += vx_literal_masked_no_maskedoff_body + include_literal("v" + op_id + ".h") + vx_tama_literal_mask_end + elif "TailAgnostic" in op_attr and "MaskUndisturbed" in op_attr : # tamu + ret += vx_literal_mask_body + include_literal("v" + op_id + ".h") + vx_tamu_literal_mask_end + elif "TailUndisturbed" in op_attr and "MaskAgnostic" in op_attr : # tuma + ret += vx_literal_mask_body + include_literal("v" + op_id + ".h") + vx_tuma_literal_mask_end + elif "TailUndisturbed" in op_attr and "MaskUndisturbed" in op_attr : # tumu + ret += vx_literal_mask_body + include_literal("v" + op_id + ".h") + vx_tumu_literal_mask_end + else : # No explicit policy specified + ret += vx_literal_mask_body + include_literal("v" + op_id + ".h") + vx_literal_mask_end + else : + if "TailUndisturbed" in op_attr : + ret += vx_tu_literal_nonmask_body + include_literal("v" + op_id + ".h") + vx_tu_literal_nonmask_end + elif "TailAgnostic" in op_attr : + ret += vx_literal_nonmask_body + include_literal("v" + op_id + ".h") + vx_ta_literal_nonmask_end + else : + ret += vx_literal_nonmask_body + include_literal("v" + op_id + ".h") + vx_literal_nonmask_end + return ret + +def create_destructive_vx_op(op_type, op_id, op_attr, output_type, input_num, input_types) : + ret = "" + ret += vx_literal_start0 + op_type + vx_literal_start1 + for i in range(input_num) : + var = chr(ord('a') + i) + ret += " auto " + var + " = static_cast(op->inputs[" + str(i) + "]);\n" + var = chr(ord('a') + input_num) + ret += " auto " + var + " = static_cast(op->outputs[0]);\n" + if "MaskedOperation" in op_attr : + if "TailAgnostic" in op_attr and "MaskAgnostic" in op_attr : # tama + ret += vx_literal_mask_destructive_body + include_literal("v" + op_id + ".h") + vx_tama_literal_mask_destructive_end + elif "TailAgnostic" in op_attr and "MaskUndisturbed" in op_attr : # tamu + ret += vx_literal_mask_destructive_body + include_literal("v" + op_id + ".h") + vx_tamu_literal_mask_destructive_end + elif "TailUndisturbed" in op_attr and "MaskAgnostic" in op_attr : # tuma + ret += vx_literal_mask_destructive_body + include_literal("v" + op_id + ".h") + vx_tuma_literal_mask_destructive_end + elif "TailUndisturbed" in op_attr and "MaskUndisturbed" in op_attr : # tumu + ret += vx_literal_mask_destructive_body + include_literal("v" + op_id + ".h") + vx_tumu_literal_mask_destructive_end + else : # No explicit policy specified + ret += vx_literal_mask_destructive_body + include_literal("v" + op_id + ".h") + vx_literal_mask_destructive_end + else : + if "TailUndisturbed" in op_attr : + ret += vx_literal_nonmask_destructive_body + include_literal("v" + op_id + ".h") + vx_tu_literal_nonmask_destructive_end + elif "TailAgnostic" in op_attr : + ret += vx_literal_nonmask_destructive_body + include_literal("v" + op_id + ".h") + vx_ta_literal_nonmask_destructive_end + else : + ret += vx_literal_nonmask_destructive_body + include_literal("v" + op_id + ".h") + vx_literal_nonmask_destructive_end + return ret + +def create_masked_no_maskedoff_vx_op(op_type, op_id, op_attr, output_type, input_num, input_types) : + ret = "" + ret += vx_literal_start0 + op_type + vx_literal_start1 + for i in range(input_num) : + var = chr(ord('a') + i) + ret += " auto " + var + " = static_cast(op->inputs[" + str(i) + "]);\n" + var = chr(ord('a') + input_num) + ret += " auto " + var + " = static_cast(op->outputs[0]);\n" + if "MaskAgnostic" in op_attr : # ma + ret += vx_literal_masked_no_maskedoff_body + include_literal("v" + op_id + ".h") + if op_type[-3:] == "_MA" : # output is mask(only one bit for each element) + ret += vx_mask_output_ma_literal_masked_no_masked_off_end + else : + ret += vx_ma_literal_masked_no_masked_off_end + elif "MaskUndisturbed" in op_attr : # mu + ret += vx_mu_literal_masked_no_maskedoff_body + include_literal("v" + op_id + ".h") + vx_mu_literal_masked_no_masked_off_end + else : + ret += vx_literal_masked_no_maskedoff_body + include_literal("v" + op_id + ".h") + vx_literal_masked_no_masked_off_end + return ret diff --git a/scripts/VXMLiteral.py b/scripts/VXMLiteral.py new file mode 100644 index 0000000..a81c55d --- /dev/null +++ b/scripts/VXMLiteral.py @@ -0,0 +1,99 @@ +vxm_literal_start0 = "void compute" +vxm_literal_start1 = "Op(RIF::OperatorBase *op) {\n" +vxm_literal_body = ''' + if (op->opAttr & RIF::MergeOperation) + assert(a->length == b->length && c->length == 1 && a->length == d->length); + else + assert(b->length == 1 && a->length == c->length && a->length == d->length); + + auto length = a->length; + + auto dataA = getRawPointer(a); + auto dataB = getRawPointer(b); + auto dataC = getRawPointer(c); + auto dataOut = getRawPointer(d); + + auto sew = op->typeInfo->sew.to_int(); + + for (int i = 0; i < length; ++i) { +''' + +vxm_tu_literal_body = ''' + assert(c->length == 1 && a->length == b->length && a->length == d->length && a->length == e->length); + + auto length = a->length; + + auto dataPassthru = getRawPointer(a); + auto dataA = getRawPointer(b); + auto dataB = getRawPointer(c); + auto dataC = getRawPointer(d); + auto dataOut = getRawPointer(e); + + auto sew = op->typeInfo->sew.to_int(); + P.VU.vsew = sew; + + for (int i = 0; i < length; ++i) { +''' + +merge_vxm_tu_literal_body = ''' + assert(a->length == b->length && a->length == c->length && d->length == 1 && a->length == e->length); + + auto length = a->length; + + auto dataA = getRawPointer(a); + auto dataPassthru = getRawPointer(b); + auto dataB = getRawPointer(c); + auto dataC = getRawPointer(d); + auto dataOut = getRawPointer(e); + + auto sew = op->typeInfo->sew.to_int(); + P.VU.vsew = sew; + + for (int i = 0; i < length; ++i) { +''' + +def include_literal(filename): + return "#include\"" + filename + "\"" + +vxm_literal_end = ''' + } +} +''' + +vxm_tu_literal_end = ''' + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is undisturbed + dataOut[i] = dataPassthru[i]; + } +} +''' + +vxm_ta_literal_end = ''' + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + + +def create_vxm_op(op_type, op_id, op_attr, output_type, input_num, input_types) : + ret = "" + ret += vxm_literal_start0 + op_type + vxm_literal_start1 + for i in range(input_num) : + var = chr(ord('a') + i) + ret += " auto " + var + " = static_cast(op->inputs[" + str(i) + "]);\n" + var = chr(ord('a') + input_num) + ret += " auto " + var + " = static_cast(op->outputs[0]);\n" + if "TailUndisturbed" in op_attr : + if "MergeOperation" in op_attr : + ret += merge_vxm_tu_literal_body + include_literal("v" + op_id + ".h") + vxm_tu_literal_end + else : + ret += vxm_tu_literal_body + include_literal("v" + op_id + ".h") + vxm_tu_literal_end + elif "TailAgnostic" in op_attr : + ret += vxm_literal_body + include_literal("v" + op_id + ".h") + vxm_ta_literal_end + else: + ret += vxm_literal_body + include_literal("v" + op_id + ".h") + vxm_literal_end + return ret diff --git a/scripts/XLiteral.py b/scripts/XLiteral.py new file mode 100644 index 0000000..a69b1db --- /dev/null +++ b/scripts/XLiteral.py @@ -0,0 +1,192 @@ +x_literal_start0 = "void compute" +x_literal_start1 = "Op(RIF::OperatorBase *op) {\n" +x_literal_nonmask_body = ''' + assert(a->length == 1); + + auto length = b->length; + + auto dataA = getRawPointer(a); + auto dataOut = getRawPointer(b); + + auto sew = op->typeInfo->sew.to_int(); + + #pragma push_macro("VI_VF_MERGE_LOOP") + #undef VI_VF_MERGE_LOOP + #define VI_VF_MERGE_LOOP(BODY) \\ + RIF::RawDatumOperand rs1(*dataA); \\ + RIF::RawDatumOperand vd; \\ + BODY \\ + dataOut[i] = vd; + + for (int i = 0; i < length; ++i) { +''' + +x_tu_literal_nonmask_body = ''' + assert(a->length == c->length && b->length == 1); + + auto length = a->length; + + auto dataPassthru = getRawPointer(a); + auto dataA = getRawPointer(b); + auto dataOut = getRawPointer(c); + + auto sew = op->typeInfo->sew.to_int(); + + #pragma push_macro("VI_VF_MERGE_LOOP") + #undef VI_VF_MERGE_LOOP + #define VI_VF_MERGE_LOOP(BODY) \\ + RIF::RawDatumOperand rs1(*dataA); \\ + RIF::RawDatumOperand vd; \\ + BODY \\ + dataOut[i] = vd; + + for (int i = 0; i < length; ++i) { +''' + +def include_literal(filename): + return "#include\"" + filename + "\"" + +x_literal_nonmask_end = ''' + } + #pragma pop_macro("VI_VF_MERGE_LOOP") +} +''' + +x_tu_literal_nonmask_end = ''' + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is undisturbed + dataOut[i] = dataPassthru[i]; + } + #pragma pop_macro("VI_VF_MERGE_LOOP") +} +''' + +x_ta_literal_nonmask_end = ''' + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } + #pragma pop_macro("VI_VF_MERGE_LOOP") +} +''' + +x_literal_mask_body = ''' + assert(a->length == b->length && c->length == 1 && + a->length == d->length); + + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataMO = getRawPointer(b); + auto dataA = getRawPointer(c); + auto dataOut = getRawPointer(d); + + auto sew = op->typeInfo->sew.to_int(); + + for (int i = 0; i < length; ++i) { + if (dataM[i]) { +''' + +x_tama_literal_mask_body = ''' + assert(a->length == b->length && c->length == 1 && + a->length == d->length); + + auto length = a->length; + + auto dataM = getRawPointer(a); + auto dataA = getRawPointer(b); + auto dataOut = getRawPointer(c); + + auto sew = op->typeInfo->sew.to_int(); + + for (int i = 0; i < length; ++i) { + if (dataM[i]) { +''' + +x_literal_mask_end = ''' + } else { + dataOut[i] = dataMO[i]; + } + } + #pragma pop_macro("VI_VF_MERGE_LOOP") +} +''' + +x_tama_literal_mask_end = ''' + } else { // maskedoff element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } + #pragma pop_macro("VI_VF_MERGE_LOOP") +} +''' + +x_tamu_literal_mask_end = ''' + } else { // maskedoff element is undisturbed + dataOut[i] = dataMO[i]; + } + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } +} +''' + +x_tuma_literal_mask_end = ''' + } else { // maskedoff element is agnostic + memset(&dataOut[i], 0xff, sizeof(dataOut[i])); + } + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is undisturbed + dataOut[i] = dataMO[i]; + } +} +''' + +x_tumu_literal_mask_end = ''' + } else { // maskedoff element is undisturbed + dataOut[i] = dataMO[i]; + } + } + for (int i = 0; i < length; ++i) { + if (i & 1) // tail element is undisturbed + dataOut[i] = dataMO[i]; + } +} +''' + +def create_x_op(op_type, op_id, op_attr, output_type, input_num, input_types) : + ret = "" + ret += x_literal_start0 + op_type + x_literal_start1 + for i in range(input_num) : + var = chr(ord('a') + i) + ret += " auto " + var + " = static_cast(op->inputs[" + str(i) + "]);\n" + var = chr(ord('a') + input_num) + ret += " auto " + var + " = static_cast(op->outputs[0]);\n" + if "MaskedOperation" in op_attr : + if "TailAgnostic" in op_attr and "MaskAgnostic" in op_attr : # tama + ret += x_tama_literal_masked_body + include_literal("v" + op_id + ".h") + x_tama_literal_mask_end + elif "TailAgnostic" in op_attr and "MaskUndisturbed" in op_attr : # tamu + ret += x_literal_mask_body + include_literal("v" + op_id + ".h") + x_tamu_literal_mask_end + elif "TailUndisturbed" in op_attr and "MaskAgnostic" in op_attr : # tuma + ret += x_literal_mask_body + include_literal("v" + op_id + ".h") + x_tuma_literal_mask_end + elif "TailUndisturbed" in op_attr and "MaskUndisturbed" in op_attr : # tumu + ret += x_literal_mask_body + include_literal("v" + op_id + ".h") + x_tumu_literal_mask_end + else : # No explicit policy specified + ret += x_literal_mask_body + include_literal("v" + op_id + ".h") + x_literal_mask_end + else : + if "TailUndisturbed" in op_attr : + ret += x_tu_literal_nonmask_body + include_literal("v" + op_id + ".h") + x_tu_literal_nonmask_end + elif "TailAgnostic" in op_attr : + ret += x_literal_nonmask_body + include_literal("v" + op_id + ".h") + x_ta_literal_nonmask_end + else : + ret += x_literal_nonmask_body + include_literal("v" + op_id + ".h") + x_literal_nonmask_end + return ret diff --git a/scripts/report b/scripts/report new file mode 100755 index 0000000..a64a7b3 --- /dev/null +++ b/scripts/report @@ -0,0 +1,58 @@ +#!/usr/bin/env python3 + +import glob +import sys +import os +import subprocess + +def report(): + logs = glob.glob("*.log") + + failed_case = 0 + passed_case = 0 + pass_list = [] + failed_lists = dict() + failed_lists["COMPILE"] = [] + failed_lists["GEN"] = [] + failed_lists["RUN"] = [] + failed_lists["COMPUTE"] = [] + failed_lists["UNKNOWN"] = [] + + for log in logs: + testname = log.split('.')[0] + + line = subprocess.check_output(['tail', '-1', log]).decode() + line = line.strip() + if line.endswith('FAIL') or line.endswith("fail"): + failed_case += 1 + if line == 'COMPILE FAIL': + failed_lists["COMPILE"].append(testname) + elif line == 'GEN FAIL': + failed_lists["GEN"].append(testname) + elif line == 'RUN FAIL': + failed_lists["RUN"].append(testname) + elif line.endswith("fail") : + failed_lists["COMPUTE"].append(testname) + else: + print ("Unknown fail type for %s ???" % log) + elif line.endswith("pass"): + passed_case += 1 + pass_list.append(testname) + else: + failed_lists["UNKNOWN"].append(testname) + print ("Unknown fail for %s ???" % log) + + print ("Pass / Total: %d / %d" % (passed_case, failed_case + passed_case)) + + if failed_case != 0: + print ("Failed list:") + for reason, failed_list in failed_lists.items(): + for failed_case in sorted(failed_list): + print (" - %s (%s fail)" %(failed_case, reason)) + + if failed_case != 0: + return 1 + else: + return 0 + +sys.exit(report()) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000..ec3c1e9 --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,280 @@ +include_directories(${INC}) +include_directories(${SOFTFLOAT}/include) + +add_executable(testNegV testNegV.cpp) +target_link_libraries(testNegV gtest_main Graph) + +add_executable(testWaddVV testWaddVV.cpp) +target_link_libraries(testWaddVV gtest_main Graph) + +add_executable(testWaddVX testWaddVX.cpp) +target_link_libraries(testWaddVX gtest_main Graph) + +add_executable(testAddVV testAddVV.cpp) +target_link_libraries(testAddVV gtest_main Graph) + +add_executable(testAddVX testAddVX.cpp) +target_link_libraries(testAddVX gtest_main Graph) + +add_executable(testSubVV testSubVV.cpp) +target_link_libraries(testSubVV gtest_main Graph) + +add_executable(testSubVX testSubVX.cpp) +target_link_libraries(testSubVX gtest_main Graph) + +add_executable(testOneDIntegralValue testOneDIntegralValue.cpp) +target_link_libraries(testOneDIntegralValue gtest_main Graph) + +add_executable(testOneDFloatingPointValue testOneDFloatingPointValue.cpp) +target_link_libraries(testOneDFloatingPointValue gtest_main Graph) + +add_executable(testScalarValue testScalarValue.cpp) +target_link_libraries(testScalarValue gtest_main Graph) + +add_executable(testAddVVMask testAddVVMask.cpp) +target_link_libraries(testAddVVMask gtest_main Graph) + +add_executable(testSubVVMask testSubVVMask.cpp) +target_link_libraries(testSubVVMask gtest_main Graph) + +add_executable(testAddVXMask testAddVXMask.cpp) +target_link_libraries(testAddVXMask gtest_main Graph) + +add_executable(testSubVXMask testSubVXMask.cpp) +target_link_libraries(testSubVXMask gtest_main Graph) + +add_executable(testSllVV testSllVV.cpp) +target_link_libraries(testSllVV gtest_main Graph) + +add_executable(testSllVVMask testSllVVMask.cpp) +target_link_libraries(testSllVVMask gtest_main Graph) + +add_executable(testSraVV testSraVV.cpp) +target_link_libraries(testSraVV gtest_main Graph) + +add_executable(testSraVVMask testSraVVMask.cpp) +target_link_libraries(testSraVVMask gtest_main Graph) + +add_executable(testAndVV testAndVV.cpp) +target_link_libraries(testAndVV gtest_main Graph) + +add_executable(testAndVVMask testAndVVMask.cpp) +target_link_libraries(testAndVVMask gtest_main Graph) + +add_executable(testOrVV testOrVV.cpp) +target_link_libraries(testOrVV gtest_main Graph) + +add_executable(testOrVVMask testOrVVMask.cpp) +target_link_libraries(testOrVVMask gtest_main Graph) + +add_executable(testXorVV testXorVV.cpp) +target_link_libraries(testXorVV gtest_main Graph) + +add_executable(testXorVVMask testXorVVMask.cpp) +target_link_libraries(testXorVVMask gtest_main Graph) + +add_executable(testRsubVX testRsubVX.cpp) +target_link_libraries(testRsubVX gtest_main Graph) + +add_executable(testRsubVXMask testRsubVXMask.cpp) +target_link_libraries(testRsubVXMask gtest_main Graph) + +add_executable(testAndVX testAndVX.cpp) +target_link_libraries(testAndVX gtest_main Graph) + +add_executable(testAndVXMask testAndVXMask.cpp) +target_link_libraries(testAndVXMask gtest_main Graph) + +add_executable(testOrVX testOrVX.cpp) +target_link_libraries(testOrVX gtest_main Graph) + +add_executable(testOrVXMask testOrVXMask.cpp) +target_link_libraries(testOrVXMask gtest_main Graph) + +add_executable(testXorVX testXorVX.cpp) +target_link_libraries(testXorVX gtest_main Graph) + +add_executable(testXorVXMask testXorVXMask.cpp) +target_link_libraries(testXorVXMask gtest_main Graph) + +add_executable(testSllVX testSllVX.cpp) +target_link_libraries(testSllVX gtest_main Graph) + +add_executable(testSllVXMask testSllVXMask.cpp) +target_link_libraries(testSllVXMask gtest_main Graph) + +add_executable(testSraVX testSraVX.cpp) +target_link_libraries(testSraVX gtest_main Graph) + +add_executable(testSraVXMask testSraVXMask.cpp) +target_link_libraries(testSraVXMask gtest_main Graph) + +add_executable(testFadd testFadd.cpp) +target_link_libraries(testFadd gtest_main Graph) + +add_executable(testFaddMask testFaddMask.cpp) +target_link_libraries(testFaddMask gtest_main Graph) + +add_executable(testCpopM testCpopM.cpp) +target_link_libraries(testCpopM gtest_main Graph) + +add_executable(testVfirstM testVfirstM.cpp) +target_link_libraries(testVfirstM gtest_main Graph) + +add_executable(testMsbfM testMsbfM.cpp) +target_link_libraries(testMsbfM gtest_main Graph) + +add_executable(testMsifM testMsifM.cpp) +target_link_libraries(testMsifM gtest_main Graph) + +add_executable(testMsofM testMsofM.cpp) +target_link_libraries(testMsofM gtest_main Graph) + +add_executable(testPoc testPoc.cpp) +target_link_libraries(testPoc gtest_main Graph) + +add_executable(testEnumerateLmul testEnumerateLmul.cpp) +target_link_libraries(testEnumerateLmul gtest_main Graph) + +add_executable(testEnumerateLmulMask testEnumerateLmulMask.cpp) +target_link_libraries(testEnumerateLmulMask gtest_main Graph) + +add_executable(testDatum testDatum.cpp) +target_link_libraries(testDatum gtest_main softfloat) + +add_executable(testPolicy testPolicy.cpp) +target_link_libraries(testPolicy gtest_main softfloat Graph) + +include(GoogleTest) +gtest_discover_tests(testOneDIntegralValue) +gtest_discover_tests(testOneDFloatingPointValue) +gtest_discover_tests(testScalarValue) +gtest_discover_tests(testNegV) +gtest_discover_tests(testWaddVV) +gtest_discover_tests(testWaddVX) +gtest_discover_tests(testAddVV) +gtest_discover_tests(testAddVX) +gtest_discover_tests(testSubVV) +gtest_discover_tests(testSubVX) +gtest_discover_tests(testAddVVMask) +gtest_discover_tests(testSubVVMask) +gtest_discover_tests(testAddVXMask) +gtest_discover_tests(testSubVXMask) +gtest_discover_tests(testSllVV) +gtest_discover_tests(testSllVVMask) +gtest_discover_tests(testSraVV) +gtest_discover_tests(testSraVVMask) +gtest_discover_tests(testAndVV) +gtest_discover_tests(testAndVVMask) +gtest_discover_tests(testOrVV) +gtest_discover_tests(testOrVVMask) +gtest_discover_tests(testXorVV) +gtest_discover_tests(testXorVVMask) +gtest_discover_tests(testRsubVX) +gtest_discover_tests(testRsubVXMask) +gtest_discover_tests(testAndVX) +gtest_discover_tests(testAndVXMask) +gtest_discover_tests(testOrVX) +gtest_discover_tests(testOrVXMask) +gtest_discover_tests(testXorVX) +gtest_discover_tests(testXorVXMask) +gtest_discover_tests(testSllVX) +gtest_discover_tests(testSllVXMask) +gtest_discover_tests(testSraVX) +gtest_discover_tests(testSraVXMask) +gtest_discover_tests(testFadd) +gtest_discover_tests(testFaddMask) +gtest_discover_tests(testCpopM) +gtest_discover_tests(testVfirstM) +gtest_discover_tests(testMsbfM) +gtest_discover_tests(testMsifM) +gtest_discover_tests(testMsofM) +gtest_discover_tests(testPoc) +gtest_discover_tests(testEnumerateLmul) +gtest_discover_tests(testEnumerateLmulMask) +gtest_discover_tests(testPolicy) + +add_test( + NAME Golden.Codegen + COMMAND python3 ${CMAKE_SOURCE_DIR}/scripts/TestCodeGen.py + --random-gen=${CMAKE_BINARY_DIR}/tool/random_gen + --filepath=${CMAKE_SOURCE_DIR}/include/CustomOperator.def + --codegen-golden=${CMAKE_SOURCE_DIR}/test/codegen-golden + --output-dir=${CMAKE_BINARY_DIR}/codegen-output + --has-policy +) + +set(GCC_TOOLCHAIN_PREFIX "/sifive/tools/riscv-tools/riscv64-unknown-linux-gnu-toolsuite-13.0.0-2021.11.5-x86_64-linux-redhat8") +set(COMPILER_TOOLCHAIN_PREFIX "/sifive/tools/riscv-tools/riscv64-unknown-linux-gnu-toolsuite-13.0.0-2021.11.5-x86_64-linux-redhat8") +set(FUZZ 1) +set(NODE 20) +set(LENGTH 500) +set(ENABLE_FUSED_GEN 1) +set(RANDOM_OR_SEED "--random on") +if(DEFINED ENV{GCC_TOOLCHAIN_PREFIX}) + set(GCC_TOOLCHAIN_PREFIX $ENV{GCC_TOOLCHAIN_PREFIX}) +elseif(DEFINED ENV{TOOLCHAIN_PATH}) + set(GCC_TOOLCHAIN_PREFIX $ENV{TOOLCHAIN_PATH}) +endif() +if(DEFINED ENV{COMPILER_TOOLCHAIN_PREFIX}) + set(COMPILER_TOOLCHAIN_PREFIX $ENV{COMPILER_TOOLCHAIN_PREFIX}) +elseif(DEFINED ENV{TOOLCHAIN_PATH}) + set(COMPILER_TOOLCHAIN_PREFIX $ENV{TOOLCHAIN_PATH}) +endif() +if(DEFINED ENV{FUZZ}) + set(FUZZ $ENV{FUZZ}) +endif() +if(DEFINED ENV{NODE}) + set(NODE $ENV{NODE}) +endif() +if(DEFINED ENV{LENGTH}) + set(LENGTH $ENV{LENGTH}) +endif() +if(DEFINED ENV{SEED}) + set(RANDOM_OR_SEED "--seed $ENV{SEED}") +endif() +if(DEFINED ENV{ENABLE_FUSED_GEN}) + set(ENABLE_FUSED_GEN "$ENV{ENABLE_FUSED_GEN}") +endif() + +message(STATUS "GCC toolchain path: " ${GCC_TOOLCHAIN_PREFIX}) +message(STATUS "LLVM toolchain path: " ${COMPILER_TOOLCHAIN_PREFIX}) + +set(GCC_TOOLCHAIN ${GCC_TOOLCHAIN_PREFIX}/bin/riscv64-unknown-linux-gnu-gcc) +execute_process(COMMAND ${GCC_TOOLCHAIN} --print-sysroot OUTPUT_VARIABLE SYSROOT OUTPUT_STRIP_TRAILING_WHITESPACE) + +set(CLANG "${COMPILER_TOOLCHAIN_PREFIX}/bin/riscv64-unknown-linux-gnu-clang") +set(CFLAGS "-target riscv64-unknown-linux-gnu --sysroot ${SYSROOT} --gcc-toolchain=${GCC_TOOLCHAIN_PREFIX}") +set(POLICY_ENABLE "") + +execute_process( + COMMAND + bash -c "${CLANG} ${CFLAGS} -march=rv64gcv_zfh_zvfh0p1 -menable-experimental-extensions -c ${CMAKE_SOURCE_DIR}/test/codegen-golden/AddVV8VInt8TA.c" + RESULT_VARIABLE OK +) + +if("${OK}" STREQUAL "0") + set(POLICY_ENABLE "--has-policy") +endif() + +foreach(count RANGE 1 ${FUZZ}) + add_test( + NAME Test.FuzzTestRandomGen${count} + COMMAND + sh -c "rm -rf fuzz_test_random_gen${count} && mkdir fuzz_test_random_gen${count} && cd fuzz_test_random_gen${count} && \ + ${CMAKE_SOURCE_DIR}/rif-test --gen-path ${CMAKE_BINARY_DIR}/tool --sim ${CMAKE_SOURCE_DIR}/prebuilt/metal-run/qemu-run --cc ${CLANG} --arch rv64gcv_zfh_zvfh0p1 --cflags \"${CFLAGS}\" ${POLICY_ENABLE} --node ${NODE} --length ${LENGTH} ${RANDOM_OR_SEED} && \ + make -j$(nproc)" + ) +endforeach() + +if("${ENABLE_FUSED_GEN}" STREQUAL "1") + foreach(count RANGE 1 ${FUZZ}) + add_test( + NAME Test.FuzzTestFusedGen${count} + COMMAND + sh -c "rm -rf fuzz_test_fused_gen${count} && mkdir fuzz_test_fused_gen${count} && cd fuzz_test_fused_gen${count} && \ + ${CMAKE_SOURCE_DIR}/rif-test --gen fused_gen --gen-path ${CMAKE_BINARY_DIR}/tool --sim ${CMAKE_SOURCE_DIR}/prebuilt/metal-run/qemu-run --cc ${CLANG} --arch rv64gcv_zfh_zvfh0p1 --cflags \"${CFLAGS}\" ${POLICY_ENABLE} --node ${NODE} --length ${LENGTH} ${RANDOM_OR_SEED} && \ + make -j$(nproc)" + ) + endforeach() +endif() diff --git a/test/TestUtils.hpp b/test/TestUtils.hpp new file mode 100644 index 0000000..11df515 --- /dev/null +++ b/test/TestUtils.hpp @@ -0,0 +1,391 @@ +#include "Basic.hpp" +#include "Graph.hpp" +#include + +#include +#include + +namespace RIF { + +Graph::Value *getInitializeValue(CustomValType type, Graph &graph, + const std::string &id, const int &length, + const LmulType lmul = LmulType::m1) { + auto init = graph.getNewOperator(CustomValType::Initialize, "init_" + id); + auto value = graph.getNewValue(type, "value_" + id, length, lmul); + init->addOutput(value); + return value; +} + +template +OneDT *NonMaskVOperatorTest(Graph &graph, std::vector &dataA) { + const int length = dataA.size(); + auto input0 = static_cast( + getInitializeValue(OneDTEnum, graph, "input0", length)); + auto output = + static_cast(graph.getNewValue(OneDTEnum, "output", length)); + + auto ptr0 = getRawPointer(input0); + auto raw0 = input0->raw; + for (int i = 0; i < length; ++i) { + ptr0[i] = raw0[i] = dataA[i]; + } + + auto op = graph.getNewOperator(OperatorEnum, "op1"); + op->addInput(0, input0); + op->addOutput(output); + op->generateData(); + + return output; +} + +#define NONMASK_VV_VALUE_INIT \ + for (int i = 0; i < length; ++i) { \ + ptrA[i] = a->raw[i] = dataA[i]; \ + ptrB[i] = b->raw[i] = dataB[i]; \ + } + +#define NONMASK_VX_VALUE_INIT \ + *ptrB = *rawB = dataB; \ + for (int i = 0; i < length; ++i) { \ + ptrA[i] = rawA[i] = dataA[i]; \ + } + +#define NONMASK_TA_VV_VALUE_INIT \ + for (int i = 0; i < length; ++i) { \ + ptrA[i] = rawA[i] = dataA[i]; \ + ptrB[i] = rawB[i] = dataB[i]; \ + ptrMO[i] = rawMO[i] = dataMO[i]; \ + } + +#define MASK_TAMA_VV_VALUE_INIT \ + for (int i = 0; i < length; ++i) { \ + ptrA[i] = rawA[i] = dataA[i]; \ + ptrB[i] = rawB[i] = dataB[i]; \ + ptrM[i] = rawM[i] = dataM[i]; \ + } + +#define MASK_VV_VALUE_INIT \ + for (int i = 0; i < length; ++i) { \ + ptrA[i] = rawA[i] = dataA[i]; \ + ptrB[i] = rawB[i] = dataB[i]; \ + ptrM[i] = rawM[i] = dataM[i]; \ + ptrMO[i] = rawMO[i] = dataMO[i]; \ + } + +#define MASK_VX_VALUE_INIT \ + *ptrB = *rawB = dataB; \ + for (int i = 0; i < length; ++i) { \ + ptrA[i] = rawA[i] = dataA[i]; \ + ptrM[i] = rawM[i] = dataM[i]; \ + ptrMO[i] = rawMO[i] = dataMO[i]; \ + } + +#define NONMASK_FP_VV_VALUE_INIT(SEW) \ + { \ + for (int i = 0; i < length; ++i) { \ + rawA[i] = dataA[i]; \ + rawB[i] = dataBOneD[i]; \ + ptrA[i] = ui64_to_f##SEW(rawA[i]); \ + ptrB[i] = ui64_to_f##SEW(rawB[i]); \ + } \ + } + +#define NONMASK_FP_VX_VALUE_INIT(SEW) \ + { \ + *rawB = dataBScalar; \ + *ptrB = ui64_to_f##SEW(*rawB); \ + for (int i = 0; i < length; ++i) { \ + rawA[i] = dataA[i]; \ + ptrA[i] = ui64_to_f##SEW(rawA[i]); \ + } \ + } + +#define MASK_FP_VV_VALUE_INIT(SEW) \ + { \ + for (int i = 0; i < length; ++i) { \ + rawM[i] = dataMask[i]; \ + rawMO[i] = dataMaskedOff[i]; \ + rawA[i] = dataA[i]; \ + rawB[i] = dataBOneD[i]; \ + ptrM[i] = rawM[i]; \ + ptrMO[i] = ui64_to_f##SEW(rawMO[i]); \ + ptrA[i] = ui64_to_f##SEW(rawA[i]); \ + ptrB[i] = ui64_to_f##SEW(rawB[i]); \ + } \ + } + +#define MASK_FP_VF_VALUE_INIT(SEW) \ + { \ + *rawB = dataBScalar; \ + *ptrB = ui64_to_f##SEW(*rawB); \ + for (int i = 0; i < length; ++i) { \ + rawM[i] = dataMask[i]; \ + rawMO[i] = dataMaskedOff[i]; \ + rawA[i] = dataA[i]; \ + ptrM[i] = rawM[i]; \ + ptrMO[i] = ui64_to_f##SEW(rawMO[i]); \ + ptrA[i] = ui64_to_f##SEW(rawA[i]); \ + } \ + } + +#define NONMASK_V_VALUE_INIT \ + for (int i = 0; i < length; ++i) { \ + ptrA[i] = rawA[i] = dataA[i]; \ + } + +#define MASK_V_NO_MASKEDOFF_VALUE_INIT \ + for (int i = 0; i < length; ++i) { \ + ptrM[i] = rawM[i] = dataM[i]; \ + ptrA[i] = rawA[i] = dataA[i]; \ + } + +#define MASK_V_VALUE_INIT \ + for (int i = 0; i < length; ++i) { \ + ptrM[i] = rawM[i] = dataM[i]; \ + ptrMO[i] = rawMO[i] = dataMO[i]; \ + ptrA[i] = rawA[i] = dataA[i]; \ + } + +#define NONMASK_VV_VX_GEN_TEST(INPUTA_ENUM, INPUTB_ENUM, OUTPUT_ENUM, \ + VALUE_INIT_BODY, OP_ENUM) \ + Graph graph; \ + const int length = dataA.size(); \ + auto a = static_cast( \ + getInitializeValue(INPUTA_ENUM, graph, "A", length)); \ + auto b = static_cast( \ + getInitializeValue(INPUTB_ENUM, graph, "B", length)); \ + auto c = static_cast( \ + graph.getNewValue(OUTPUT_ENUM, "value_C", length)); \ + auto ptrA = getRawPointer(a); \ + auto rawA = a->raw; \ + auto ptrB = getRawPointer(b); \ + auto rawB = b->raw; \ + VALUE_INIT_BODY \ + auto op = graph.getNewOperator(OP_ENUM, "op1"); \ + op->addInput(0, a); \ + op->addInput(1, b); \ + op->addOutput(c); \ + op->generateData(); \ + std::stringstream generatedCCode; \ + graph.generateCCode(generatedCCode); + +#define NONMASK_TA_VV_VX_GEN_TEST(INPUTMO_ENUM, INPUTA_ENUM, INPUTB_ENUM, \ + OUTPUT_ENUM, VALUE_INIT_BODY, OP_ENUM) \ + Graph graph; \ + const int length = dataA.size(); \ + auto inputMO = static_cast( \ + getInitializeValue(INPUTMO_ENUM, graph, "MO", length)); \ + auto inputA = static_cast( \ + getInitializeValue(INPUTA_ENUM, graph, "A", length)); \ + auto inputB = static_cast( \ + getInitializeValue(INPUTB_ENUM, graph, "B", length)); \ + auto output = static_cast( \ + graph.getNewValue(OUTPUT_ENUM, "output", length)); \ + auto ptrA = getRawPointer(inputA); \ + auto rawA = inputA->raw; \ + auto ptrB = getRawPointer(inputB); \ + auto rawB = inputB->raw; \ + auto ptrMO = getRawPointer(inputMO); \ + auto rawMO = inputMO->raw; \ + VALUE_INIT_BODY \ + auto op = graph.getNewOperator(OP_ENUM, "op"); \ + op->addInput(0, inputMO); \ + op->addInput(1, inputA); \ + op->addInput(2, inputB); \ + op->addOutput(output); \ + op->generateData(); \ + std::stringstream generatedCCode; \ + graph.generateCCode(generatedCCode); + +#define MASK_TAMA_VV_VX_GEN_TEST(INPUTM_ENUM, INPUTA_ENUM, INPUTB_ENUM, \ + OUTPUT_ENUM, VALUE_INIT_BODY, OP_ENUM) \ + Graph graph; \ + const int length = dataA.size(); \ + auto inputM = static_cast( \ + getInitializeValue(INPUTM_ENUM, graph, "M", length)); \ + auto inputA = static_cast( \ + getInitializeValue(INPUTA_ENUM, graph, "A", length)); \ + auto inputB = static_cast( \ + getInitializeValue(INPUTB_ENUM, graph, "B", length)); \ + auto output = static_cast( \ + graph.getNewValue(OUTPUT_ENUM, "output", length)); \ + auto ptrA = getRawPointer(inputA); \ + auto rawA = inputA->raw; \ + auto ptrB = getRawPointer(inputB); \ + auto rawB = inputB->raw; \ + auto ptrM = getRawPointer(inputM); \ + auto rawM = inputM->raw; \ + VALUE_INIT_BODY \ + auto op = graph.getNewOperator(OP_ENUM, "op"); \ + op->addInput(0, inputM); \ + op->addInput(1, inputA); \ + op->addInput(2, inputB); \ + op->addOutput(output); \ + op->generateData(); \ + std::stringstream generatedCCode; \ + graph.generateCCode(generatedCCode); + +#define MASK_VV_VX_GEN_TEST(INPUTM_ENUM, INPUTMO_ENUM, INPUTA_ENUM, \ + INPUTB_ENUM, OUTPUT_ENUM, VALUE_INIT_BODY, \ + OP_ENUM) \ + Graph graph; \ + const int length = dataA.size(); \ + auto inputM = static_cast( \ + getInitializeValue(INPUTM_ENUM, graph, "M", length)); \ + auto inputMO = static_cast( \ + getInitializeValue(INPUTMO_ENUM, graph, "MO", length)); \ + auto inputA = static_cast( \ + getInitializeValue(INPUTA_ENUM, graph, "A", length)); \ + auto inputB = static_cast( \ + getInitializeValue(INPUTB_ENUM, graph, "B", length)); \ + auto output = static_cast( \ + graph.getNewValue(OUTPUT_ENUM, "output", length)); \ + auto ptrA = getRawPointer(inputA); \ + auto rawA = inputA->raw; \ + auto ptrB = getRawPointer(inputB); \ + auto rawB = inputB->raw; \ + auto ptrM = getRawPointer(inputM); \ + auto rawM = inputM->raw; \ + auto ptrMO = getRawPointer(inputMO); \ + auto rawMO = inputMO->raw; \ + VALUE_INIT_BODY \ + auto op = graph.getNewOperator(OP_ENUM, "op"); \ + op->addInput(0, inputM); \ + op->addInput(1, inputMO); \ + op->addInput(2, inputA); \ + op->addInput(3, inputB); \ + op->addOutput(output); \ + op->generateData(); \ + std::stringstream generatedCCode; \ + graph.generateCCode(generatedCCode); + +#define NONMASK_V_GEN_TEST(INPUT_ENUM, OUTPUT_ENUM, VALUE_INIT_BODY, OP_ENUM) \ + Graph graph; \ + const int length = dataA.size(); \ + auto a = static_cast( \ + getInitializeValue(INPUT_ENUM, graph, "input", length)); \ + auto b = static_cast( \ + graph.getNewValue(OUTPUT_ENUM, "output", length)); \ + auto ptrA = getRawPointer(a); \ + auto rawA = a->raw; \ + VALUE_INIT_BODY \ + auto op = graph.getNewOperator(OP_ENUM, "op1"); \ + op->addInput(0, a); \ + op->addOutput(b); \ + op->generateData(); \ + std::stringstream generatedCCode; \ + graph.generateCCode(generatedCCode); + +#define MASK_V_NO_MASKEDOFF_GEN_TEST(INPUTM_ENUM, INPUTA_ENUM, OUTPUT_ENUM, \ + VALUE_INIT_BODY, OP_ENUM) \ + Graph graph; \ + const int length = dataA.size(); \ + auto a = static_cast( \ + getInitializeValue(INPUTM_ENUM, graph, "inputM", length)); \ + auto b = static_cast( \ + getInitializeValue(INPUTA_ENUM, graph, "inputA", length)); \ + auto c = static_cast( \ + graph.getNewValue(OUTPUT_ENUM, "output", length)); \ + auto ptrM = getRawPointer(a); \ + auto rawM = a->raw; \ + auto ptrA = getRawPointer(b); \ + auto rawA = b->raw; \ + VALUE_INIT_BODY \ + auto op = graph.getNewOperator(OP_ENUM, "op1"); \ + op->addInput(0, a); \ + op->addInput(1, b); \ + op->addOutput(c); \ + op->generateData(); \ + std::stringstream generatedCCode; \ + graph.generateCCode(generatedCCode); + +#define MASK_V_GEN_TEST(INPUTM_ENUM, INPUTMO_ENUM, INPUTA_ENUM, OUTPUT_ENUM, \ + VALUE_INIT_BODY, OP_ENUM) \ + Graph graph; \ + const int length = dataA.size(); \ + auto a = static_cast( \ + getInitializeValue(INPUTM_ENUM, graph, "inputM", length)); \ + auto b = static_cast( \ + getInitializeValue(INPUTMO_ENUM, graph, "inputMO", length)); \ + auto c = static_cast( \ + getInitializeValue(INPUTA_ENUM, graph, "inputA", length)); \ + auto d = static_cast( \ + graph.getNewValue(OUTPUT_ENUM, "output", length)); \ + auto ptrM = getRawPointer(a); \ + auto rawM = a->raw; \ + auto ptrMO = getRawPointer(b); \ + auto rawMO = b->raw; \ + auto ptrA = getRawPointer(c); \ + auto rawA = c->raw; \ + VALUE_INIT_BODY \ + auto op = graph.getNewOperator(OP_ENUM, "op1"); \ + op->addInput(0, a); \ + op->addInput(1, b); \ + op->addInput(2, c); \ + op->addOutput(d); \ + op->generateData(); \ + std::stringstream generatedCCode; \ + graph.generateCCode(generatedCCode); + +template +static bool verifyResult(OneDT *value, std::vector &golden) { + assert(value->length == golden.size()); + auto length = value->length; + auto rawC = getRawPointer(value); + for (int i = 0; i < length; ++i) { + EXPECT_EQ(rawC[i], golden[i]); + if (rawC[i] != golden[i]) + return false; + } + return true; +} + +template <> bool verifyResult(OneDFloat16Val *value, std::vector &golden) { + bool good = 1; + auto length = value->length; + auto ptr = getRawPointer(value); + for (int i = 0; i < length; ++i) { + float16_t x = ui64_to_f16(golden[i]); + EXPECT_EQ(ptr[i].v, x.v); + if (ptr[i].v != x.v) { + good = 0; + std::cout << "[" << i << "] (compute) " << ptr[i].v << " != (golden) " + << x.v << "\n"; + } + } + return good; +} + +template <> bool verifyResult(OneDFloat32Val *value, std::vector &golden) { + bool good = 1; + auto length = value->length; + auto ptr = getRawPointer(value); + for (int i = 0; i < length; ++i) { + float32_t x = ui64_to_f32(golden[i]); + EXPECT_EQ(ptr[i].v, x.v); + if (ptr[i].v != x.v) { + good = 0; + std::cout << "[" << i << "] (compute) " << ptr[i].v << " != (golden) " + << x.v << "\n"; + } + } + return good; +} + +template <> bool verifyResult(OneDFloat64Val *value, std::vector &golden) { + bool good = 1; + auto length = value->length; + auto ptr = getRawPointer(value); + for (int i = 0; i < length; ++i) { + float64_t x = ui64_to_f64(golden[i]); + EXPECT_EQ(ptr[i].v, x.v); + if (ptr[i].v != x.v) { + good = 0; + std::cout << "[" << i << "] (compute) " << ptr[i].v << " != (golden) " + << x.v << "\n"; + } + } + return good; +} + +} // namespace RIF diff --git a/test/codegen-golden/AaddVV8VInt8VBVIVIVI_TAMU.c b/test/codegen-golden/AaddVV8VInt8VBVIVIVI_TAMU.c new file mode 100644 index 0000000..0000ea4 --- /dev/null +++ b/test/codegen-golden/AaddVV8VInt8VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r AaddVV8VInt8VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c AaddVV8VInt8VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vaadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vaadd_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vaadd_vv_operator_0() { +int8_t tmp[] = {29,-1,12,-1,-11,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vaadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vaadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AaddVV8VInt8VBVIVIVI_TUMA.c b/test/codegen-golden/AaddVV8VInt8VBVIVIVI_TUMA.c new file mode 100644 index 0000000..e81760e --- /dev/null +++ b/test/codegen-golden/AaddVV8VInt8VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r AaddVV8VInt8VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c AaddVV8VInt8VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vaadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vaadd_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vaadd_vv_operator_0() { +int8_t tmp[] = {-1,84,12,19,-11,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vaadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vaadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AaddVV8VInt8VBVIVIVI_TUMU.c b/test/codegen-golden/AaddVV8VInt8VBVIVIVI_TUMU.c new file mode 100644 index 0000000..6930f95 --- /dev/null +++ b/test/codegen-golden/AaddVV8VInt8VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r AaddVV8VInt8VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c AaddVV8VInt8VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vaadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vaadd_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vaadd_vv_operator_0() { +int8_t tmp[] = {29,84,12,19,-11,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vaadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vaadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AaddVV8VInt8VBVIVIVI_m.c b/test/codegen-golden/AaddVV8VInt8VBVIVIVI_m.c new file mode 100644 index 0000000..90b78fd --- /dev/null +++ b/test/codegen-golden/AaddVV8VInt8VBVIVIVI_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r AaddVV8VInt8VBVIVIVI_m -n 1 -l 7 --has-ta --has-ma -c AaddVV8VInt8VBVIVIVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vaadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vaadd_vv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vaadd_vv_operator_0() { +int8_t tmp[] = {29,11,12,19,-11,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vaadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vaadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AaddVV8VInt8VBVIVI_TAMA.c b/test/codegen-golden/AaddVV8VInt8VBVIVI_TAMA.c new file mode 100644 index 0000000..bc5aba2 --- /dev/null +++ b/test/codegen-golden/AaddVV8VInt8VBVIVI_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r AaddVV8VInt8VBVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c AaddVV8VInt8VBVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vaadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vaadd_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vaadd_vv_operator_0() { +int8_t tmp[] = {-1,-1,3,-1,20,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vaadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vaadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AaddVV8VInt8VIVI.c b/test/codegen-golden/AaddVV8VInt8VIVI.c new file mode 100644 index 0000000..8ff8891 --- /dev/null +++ b/test/codegen-golden/AaddVV8VInt8VIVI.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r AaddVV8VInt8VIVI -n 1 -l 7 --has-ta --has-ma -c AaddVV8VInt8VIVI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vaadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vaadd_vv_i8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vaadd_vv_operator_0() { +int8_t tmp[] = {-39,65,20,-1,21,-69,-41,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vaadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vaadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AaddVV8VInt8VIVIVI_TU.c b/test/codegen-golden/AaddVV8VInt8VIVIVI_TU.c new file mode 100644 index 0000000..05aa20a --- /dev/null +++ b/test/codegen-golden/AaddVV8VInt8VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r AaddVV8VInt8VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c AaddVV8VInt8VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vaadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vaadd_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vaadd_vv_operator_0() { +int8_t tmp[] = {4,79,3,-14,20,-73,-16,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vaadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vaadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AaddVV8VInt8VIVI_TA.c b/test/codegen-golden/AaddVV8VInt8VIVI_TA.c new file mode 100644 index 0000000..773f2bf --- /dev/null +++ b/test/codegen-golden/AaddVV8VInt8VIVI_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r AaddVV8VInt8VIVI_TA -n 1 -l 7 --has-ta --has-ma -c AaddVV8VInt8VIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vaadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vaadd_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vaadd_vv_operator_0() { +int8_t tmp[] = {-39,-1,20,-1,21,-1,-41,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vaadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vaadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AaddVX8VInt8VBVISI_TAMA.c b/test/codegen-golden/AaddVX8VInt8VBVISI_TAMA.c new file mode 100644 index 0000000..4d236dc --- /dev/null +++ b/test/codegen-golden/AaddVX8VInt8VBVISI_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r AaddVX8VInt8VBVISI_TAMA -n 1 -l 7 --has-ta --has-ma -c AaddVX8VInt8VBVISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vaadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vaadd_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vaadd_vx_operator_0() { +int8_t tmp[] = {-1,-1,-5,-1,-43,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vaadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vaadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AaddVX8VInt8VBVIVISI_TAMU.c b/test/codegen-golden/AaddVX8VInt8VBVIVISI_TAMU.c new file mode 100644 index 0000000..3ee41a5 --- /dev/null +++ b/test/codegen-golden/AaddVX8VInt8VBVIVISI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r AaddVX8VInt8VBVIVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c AaddVX8VInt8VBVIVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vaadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vaadd_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vaadd_vx_operator_0() { +int8_t tmp[] = {50,-1,-1,-1,-48,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vaadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vaadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AaddVX8VInt8VBVIVISI_TUMA.c b/test/codegen-golden/AaddVX8VInt8VBVIVISI_TUMA.c new file mode 100644 index 0000000..b2f8298 --- /dev/null +++ b/test/codegen-golden/AaddVX8VInt8VBVIVISI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r AaddVX8VInt8VBVIVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c AaddVX8VInt8VBVIVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vaadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vaadd_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vaadd_vx_operator_0() { +int8_t tmp[] = {-1,-15,-1,16,-48,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vaadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vaadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AaddVX8VInt8VBVIVISI_TUMU.c b/test/codegen-golden/AaddVX8VInt8VBVIVISI_TUMU.c new file mode 100644 index 0000000..e117fca --- /dev/null +++ b/test/codegen-golden/AaddVX8VInt8VBVIVISI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r AaddVX8VInt8VBVIVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c AaddVX8VInt8VBVIVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vaadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vaadd_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vaadd_vx_operator_0() { +int8_t tmp[] = {50,-15,-1,16,-48,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vaadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vaadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AaddVX8VInt8VBVIVISI_m.c b/test/codegen-golden/AaddVX8VInt8VBVIVISI_m.c new file mode 100644 index 0000000..b22a72e --- /dev/null +++ b/test/codegen-golden/AaddVX8VInt8VBVIVISI_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r AaddVX8VInt8VBVIVISI_m -n 1 -l 7 --has-ta --has-ma -c AaddVX8VInt8VBVIVISI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vaadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vaadd_vx_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vaadd_vx_operator_0() { +int8_t tmp[] = {50,-1,-1,16,-48,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vaadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vaadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AaddVX8VInt8VISI.c b/test/codegen-golden/AaddVX8VInt8VISI.c new file mode 100644 index 0000000..b3a548e --- /dev/null +++ b/test/codegen-golden/AaddVX8VInt8VISI.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r AaddVX8VInt8VISI -n 1 -l 7 --has-ta --has-ma -c AaddVX8VInt8VISI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vaadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vaadd_vx_i8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vaadd_vx_operator_0() { +int8_t tmp[] = {-39,29,17,-18,2,-47,-39,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vaadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vaadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AaddVX8VInt8VISI_TA.c b/test/codegen-golden/AaddVX8VInt8VISI_TA.c new file mode 100644 index 0000000..cadd1b7 --- /dev/null +++ b/test/codegen-golden/AaddVX8VInt8VISI_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r AaddVX8VInt8VISI_TA -n 1 -l 7 --has-ta --has-ma -c AaddVX8VInt8VISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vaadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vaadd_vx_i8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vaadd_vx_operator_0() { +int8_t tmp[] = {-39,-1,17,-1,2,-1,-39,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vaadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vaadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AaddVX8VInt8VIVISI_TU.c b/test/codegen-golden/AaddVX8VInt8VIVISI_TU.c new file mode 100644 index 0000000..710182e --- /dev/null +++ b/test/codegen-golden/AaddVX8VInt8VIVISI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r AaddVX8VInt8VIVISI_TU -n 1 -l 7 --has-ta --has-ma -c AaddVX8VInt8VIVISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vaadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vaadd_vx_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vaadd_vx_operator_0() { +int8_t tmp[] = {14,79,-5,-14,-43,-73,4,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vaadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vaadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AadduVV8VUInt8VBVUVUVU_TAMU.c b/test/codegen-golden/AadduVV8VUInt8VBVUVUVU_TAMU.c new file mode 100644 index 0000000..9ef689c --- /dev/null +++ b/test/codegen-golden/AadduVV8VUInt8VBVUVUVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r AadduVV8VUInt8VBVUVUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c AadduVV8VUInt8VBVUVUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vaaddu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vaaddu_vv_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vaaddu_vv_operator_0() { +uint8_t tmp[] = {65,255,56,255,45,255,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vaaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vaaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AadduVV8VUInt8VBVUVUVU_TUMA.c b/test/codegen-golden/AadduVV8VUInt8VBVUVUVU_TUMA.c new file mode 100644 index 0000000..411344e --- /dev/null +++ b/test/codegen-golden/AadduVV8VUInt8VBVUVUVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r AadduVV8VUInt8VBVUVUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c AadduVV8VUInt8VBVUVUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vaaddu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vaaddu_vv_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vaaddu_vv_operator_0() { +uint8_t tmp[] = {255,92,56,59,45,13,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vaaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vaaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AadduVV8VUInt8VBVUVUVU_TUMU.c b/test/codegen-golden/AadduVV8VUInt8VBVUVUVU_TUMU.c new file mode 100644 index 0000000..91d7ce1 --- /dev/null +++ b/test/codegen-golden/AadduVV8VUInt8VBVUVUVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r AadduVV8VUInt8VBVUVUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c AadduVV8VUInt8VBVUVUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vaaddu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vaaddu_vv_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vaaddu_vv_operator_0() { +uint8_t tmp[] = {65,92,56,59,45,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vaaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vaaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AadduVV8VUInt8VBVUVUVU_m.c b/test/codegen-golden/AadduVV8VUInt8VBVUVUVU_m.c new file mode 100644 index 0000000..5697b93 --- /dev/null +++ b/test/codegen-golden/AadduVV8VUInt8VBVUVUVU_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r AadduVV8VUInt8VBVUVUVU_m -n 1 -l 7 --has-ta --has-ma -c AadduVV8VUInt8VBVUVUVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vaaddu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vaaddu_vv_u8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vaaddu_vv_operator_0() { +uint8_t tmp[] = {65,56,56,59,45,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vaaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vaaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AadduVV8VUInt8VBVUVU_TAMA.c b/test/codegen-golden/AadduVV8VUInt8VBVUVU_TAMA.c new file mode 100644 index 0000000..da2acdf --- /dev/null +++ b/test/codegen-golden/AadduVV8VUInt8VBVUVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r AadduVV8VUInt8VBVUVU_TAMA -n 1 -l 7 --has-ta --has-ma -c AadduVV8VUInt8VBVUVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vaaddu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vaaddu_vv_u8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vaaddu_vv_operator_0() { +uint8_t tmp[] = {255,255,51,255,60,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vaaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vaaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AadduVV8VUInt8VUVU.c b/test/codegen-golden/AadduVV8VUInt8VUVU.c new file mode 100644 index 0000000..e1a8f4c --- /dev/null +++ b/test/codegen-golden/AadduVV8VUInt8VUVU.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r AadduVV8VUInt8VUVU -n 1 -l 7 --has-ta --has-ma -c AadduVV8VUInt8VUVU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vaaddu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vaaddu_vv_u8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vaaddu_vv_operator_0() { +uint8_t tmp[] = {31,83,60,50,61,16,30,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vaaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vaaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AadduVV8VUInt8VUVUVU_TU.c b/test/codegen-golden/AadduVV8VUInt8VUVUVU_TU.c new file mode 100644 index 0000000..6db339e --- /dev/null +++ b/test/codegen-golden/AadduVV8VUInt8VUVUVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r AadduVV8VUInt8VUVUVU_TU -n 1 -l 7 --has-ta --has-ma -c AadduVV8VUInt8VUVUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vaaddu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vaaddu_vv_u8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vaaddu_vv_operator_0() { +uint8_t tmp[] = {52,90,51,43,60,14,42,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vaaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vaaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AadduVV8VUInt8VUVU_TA.c b/test/codegen-golden/AadduVV8VUInt8VUVU_TA.c new file mode 100644 index 0000000..0c000ad --- /dev/null +++ b/test/codegen-golden/AadduVV8VUInt8VUVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r AadduVV8VUInt8VUVU_TA -n 1 -l 7 --has-ta --has-ma -c AadduVV8VUInt8VUVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vaaddu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vaaddu_vv_u8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vaaddu_vv_operator_0() { +uint8_t tmp[] = {31,255,60,255,61,255,30,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vaaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vaaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AadduVX8VUInt8VBVUSU_TAMA.c b/test/codegen-golden/AadduVX8VUInt8VBVUSU_TAMA.c new file mode 100644 index 0000000..7387a44 --- /dev/null +++ b/test/codegen-golden/AadduVX8VUInt8VBVUSU_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r AadduVX8VUInt8VBVUSU_TAMA -n 1 -l 7 --has-ta --has-ma -c AadduVX8VUInt8VBVUSU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vaaddu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vaaddu_vx_u8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vaaddu_vx_operator_0() { +uint8_t tmp[] = {255,255,48,255,29,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vaaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vaaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AadduVX8VUInt8VBVUVUSU_TAMU.c b/test/codegen-golden/AadduVX8VUInt8VBVUVUSU_TAMU.c new file mode 100644 index 0000000..c3d56b7 --- /dev/null +++ b/test/codegen-golden/AadduVX8VUInt8VBVUVUSU_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r AadduVX8VUInt8VBVUVUSU_TAMU -n 1 -l 7 --has-ta --has-ma -c AadduVX8VUInt8VBVUVUSU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vaaddu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vaaddu_vx_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vaaddu_vx_operator_0() { +uint8_t tmp[] = {75,255,49,255,26,255,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vaaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vaaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AadduVX8VUInt8VBVUVUSU_TUMA.c b/test/codegen-golden/AadduVX8VUInt8VBVUVUSU_TUMA.c new file mode 100644 index 0000000..6609949 --- /dev/null +++ b/test/codegen-golden/AadduVX8VUInt8VBVUVUSU_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r AadduVX8VUInt8VBVUVUSU_TUMA -n 1 -l 7 --has-ta --has-ma -c AadduVX8VUInt8VBVUVUSU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vaaddu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vaaddu_vx_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vaaddu_vx_operator_0() { +uint8_t tmp[] = {255,42,49,58,26,37,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vaaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vaaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AadduVX8VUInt8VBVUVUSU_TUMU.c b/test/codegen-golden/AadduVX8VUInt8VBVUVUSU_TUMU.c new file mode 100644 index 0000000..de8eca4 --- /dev/null +++ b/test/codegen-golden/AadduVX8VUInt8VBVUVUSU_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r AadduVX8VUInt8VBVUVUSU_TUMU -n 1 -l 7 --has-ta --has-ma -c AadduVX8VUInt8VBVUVUSU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vaaddu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vaaddu_vx_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vaaddu_vx_operator_0() { +uint8_t tmp[] = {75,42,49,58,26,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vaaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vaaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AadduVX8VUInt8VBVUVUSU_m.c b/test/codegen-golden/AadduVX8VUInt8VBVUVUSU_m.c new file mode 100644 index 0000000..55b5a65 --- /dev/null +++ b/test/codegen-golden/AadduVX8VUInt8VBVUVUSU_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r AadduVX8VUInt8VBVUVUSU_m -n 1 -l 7 --has-ta --has-ma -c AadduVX8VUInt8VBVUVUSU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vaaddu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vaaddu_vx_u8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vaaddu_vx_operator_0() { +uint8_t tmp[] = {75,50,49,58,26,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vaaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vaaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AadduVX8VUInt8VUSU.c b/test/codegen-golden/AadduVX8VUInt8VUSU.c new file mode 100644 index 0000000..c97ddf1 --- /dev/null +++ b/test/codegen-golden/AadduVX8VUInt8VUSU.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r AadduVX8VUInt8VUSU -n 1 -l 7 --has-ta --has-ma -c AadduVX8VUInt8VUSU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vaaddu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vaaddu_vx_u8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vaaddu_vx_operator_0() { +uint8_t tmp[] = {31,65,59,41,51,27,31,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vaaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vaaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AadduVX8VUInt8VUSU_TA.c b/test/codegen-golden/AadduVX8VUInt8VUSU_TA.c new file mode 100644 index 0000000..6f5ce1c --- /dev/null +++ b/test/codegen-golden/AadduVX8VUInt8VUSU_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r AadduVX8VUInt8VUSU_TA -n 1 -l 7 --has-ta --has-ma -c AadduVX8VUInt8VUSU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vaaddu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vaaddu_vx_u8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vaaddu_vx_operator_0() { +uint8_t tmp[] = {31,255,59,255,51,255,31,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vaaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vaaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AadduVX8VUInt8VUVUSU_TU.c b/test/codegen-golden/AadduVX8VUInt8VUVUSU_TU.c new file mode 100644 index 0000000..56aedb1 --- /dev/null +++ b/test/codegen-golden/AadduVX8VUInt8VUVUSU_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r AadduVX8VUInt8VUVUSU_TU -n 1 -l 7 --has-ta --has-ma -c AadduVX8VUInt8VUVUSU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vaaddu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vaaddu_vx_u8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vaaddu_vx_operator_0() { +uint8_t tmp[] = {57,90,48,43,29,14,52,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vaaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vaaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vaaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AdcVVM8VInt8VIVIVB.c b/test/codegen-golden/AdcVVM8VInt8VIVIVB.c new file mode 100644 index 0000000..c414abc --- /dev/null +++ b/test/codegen-golden/AdcVVM8VInt8VIVIVB.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r AdcVVM8VInt8VIVIVB -n 1 -l 7 --has-ta --has-ma -c AdcVVM8VInt8VIVIVB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vadc_vvm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_0= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); + +vint8m1_t vec_value_3_0= vadc_vvm_i8m1(vec_value_0_0, vec_value_1_0, mask_value_2_0, vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vadc_vvm_operator_0() { +int8_t tmp[] = {-27,-92,75,6,50,109,-64,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vadc_vvm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vadc_vvm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vadc_vvm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AdcVVM8VInt8VIVIVB_TA.c b/test/codegen-golden/AdcVVM8VInt8VIVIVB_TA.c new file mode 100644 index 0000000..8a3b97d --- /dev/null +++ b/test/codegen-golden/AdcVVM8VInt8VIVIVB_TA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r AdcVVM8VInt8VIVIVB_TA -n 1 -l 7 --has-ta --has-ma -c AdcVVM8VInt8VIVIVB_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vadc_vvm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_0= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); + +vint8m1_t vec_value_3_0= vadc_vvm_i8m1_ta(vec_value_0_0, vec_value_1_0, mask_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vadc_vvm_operator_0() { +int8_t tmp[] = {-27,-1,75,-1,50,-1,-64,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vadc_vvm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vadc_vvm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vadc_vvm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AdcVVM8VInt8VIVIVIVB_TU.c b/test/codegen-golden/AdcVVM8VInt8VIVIVIVB_TU.c new file mode 100644 index 0000000..78e76cf --- /dev/null +++ b/test/codegen-golden/AdcVVM8VInt8VIVIVIVB_TU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r AdcVVM8VInt8VIVIVIVB_TU -n 1 -l 7 --has-ta --has-ma -c AdcVVM8VInt8VIVIVIVB_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vadc_vvm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3= vle8_v_i8m1(placeholder3, vl); +vbool8_t mask_value_3_0= vmseq_vx_i8m1_b8(vec_value_3, 1, vl); + +vint8m1_t vec_value_4_0= vadc_vvm_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, mask_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vadc_vvm_operator_0() { +int8_t tmp[] = {99,79,59,-14,-15,-73,-47,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vadc_vvm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vadc_vvm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vadc_vvm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AdcVXM8VInt8VISIVB.c b/test/codegen-golden/AdcVXM8VInt8VISIVB.c new file mode 100644 index 0000000..c113125 --- /dev/null +++ b/test/codegen-golden/AdcVXM8VInt8VISIVB.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r AdcVXM8VInt8VISIVB -n 1 -l 7 --has-ta --has-ma -c AdcVXM8VInt8VISIVB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vadc_vxm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_0= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); + +vint8m1_t vec_value_3_0= vadc_vxm_i8m1(vec_value_0_0, placeholder1, mask_value_2_0, vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vadc_vxm_operator_0() { +int8_t tmp[] = {-27,109,84,16,56,-44,-28,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vadc_vxm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vadc_vxm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vadc_vxm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AdcVXM8VInt8VISIVB_TA.c b/test/codegen-golden/AdcVXM8VInt8VISIVB_TA.c new file mode 100644 index 0000000..b48447a --- /dev/null +++ b/test/codegen-golden/AdcVXM8VInt8VISIVB_TA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r AdcVXM8VInt8VISIVB_TA -n 1 -l 7 --has-ta --has-ma -c AdcVXM8VInt8VISIVB_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vadc_vxm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_0= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); + +vint8m1_t vec_value_3_0= vadc_vxm_i8m1_ta(vec_value_0_0, placeholder1, mask_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vadc_vxm_operator_0() { +int8_t tmp[] = {-27,-1,84,-1,56,-1,-28,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vadc_vxm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vadc_vxm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vadc_vxm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AdcVXM8VInt8VIVISIVB_TU.c b/test/codegen-golden/AdcVXM8VInt8VIVISIVB_TU.c new file mode 100644 index 0000000..7499c42 --- /dev/null +++ b/test/codegen-golden/AdcVXM8VInt8VIVISIVB_TU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r AdcVXM8VInt8VIVISIVB_TU -n 1 -l 7 --has-ta --has-ma -c AdcVXM8VInt8VIVISIVB_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vadc_vxm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3= vle8_v_i8m1(placeholder3, vl); +vbool8_t mask_value_3_0= vmseq_vx_i8m1_b8(vec_value_3, 1, vl); + +vint8m1_t vec_value_4_0= vadc_vxm_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, mask_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vadc_vxm_operator_0() { +int8_t tmp[] = {99,79,90,-14,94,-73,63,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vadc_vxm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vadc_vxm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vadc_vxm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AddVV8VInt8.c b/test/codegen-golden/AddVV8VInt8.c new file mode 100644 index 0000000..f84bc63 --- /dev/null +++ b/test/codegen-golden/AddVV8VInt8.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r AddVV8VInt8 -n 1 -l 7 --has-ta --has-ma -c AddVV8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vadd_vv_i8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vadd_vv_operator_0() { +int8_t tmp[] = {-78,-127,40,-2,42,118,-83,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AddVV8VInt8TA.c b/test/codegen-golden/AddVV8VInt8TA.c new file mode 100644 index 0000000..07a2366 --- /dev/null +++ b/test/codegen-golden/AddVV8VInt8TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r AddVV8VInt8TA -n 1 -l 7 --has-ta --has-ma -c AddVV8VInt8TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vadd_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vadd_vv_operator_0() { +int8_t tmp[] = {-78,-1,40,-1,42,-1,-83,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AddVV8VInt8TAMA.c b/test/codegen-golden/AddVV8VInt8TAMA.c new file mode 100644 index 0000000..dbe88ba --- /dev/null +++ b/test/codegen-golden/AddVV8VInt8TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r AddVV8VInt8TAMA -n 1 -l 7 --has-ta --has-ma -c AddVV8VInt8TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vadd_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vadd_vv_operator_0() { +int8_t tmp[] = {-1,-1,5,-1,39,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AddVV8VInt8TAMU.c b/test/codegen-golden/AddVV8VInt8TAMU.c new file mode 100644 index 0000000..d565852 --- /dev/null +++ b/test/codegen-golden/AddVV8VInt8TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r AddVV8VInt8TAMU -n 1 -l 7 --has-ta --has-ma -c AddVV8VInt8TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vadd_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vadd_vv_operator_0() { +int8_t tmp[] = {29,-1,24,-1,-23,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AddVV8VInt8TU.c b/test/codegen-golden/AddVV8VInt8TU.c new file mode 100644 index 0000000..c1f6088 --- /dev/null +++ b/test/codegen-golden/AddVV8VInt8TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r AddVV8VInt8TU -n 1 -l 7 --has-ta --has-ma -c AddVV8VInt8TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vadd_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vadd_vv_operator_0() { +int8_t tmp[] = {7,79,5,-14,39,-73,-33,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AddVV8VInt8TUMA.c b/test/codegen-golden/AddVV8VInt8TUMA.c new file mode 100644 index 0000000..127a0ac --- /dev/null +++ b/test/codegen-golden/AddVV8VInt8TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r AddVV8VInt8TUMA -n 1 -l 7 --has-ta --has-ma -c AddVV8VInt8TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vadd_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vadd_vv_operator_0() { +int8_t tmp[] = {-1,84,24,19,-23,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AddVV8VInt8TUMU.c b/test/codegen-golden/AddVV8VInt8TUMU.c new file mode 100644 index 0000000..83d497f --- /dev/null +++ b/test/codegen-golden/AddVV8VInt8TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r AddVV8VInt8TUMU -n 1 -l 7 --has-ta --has-ma -c AddVV8VInt8TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vadd_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vadd_vv_operator_0() { +int8_t tmp[] = {29,84,24,19,-23,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AddVV8VInt8_m.c b/test/codegen-golden/AddVV8VInt8_m.c new file mode 100644 index 0000000..5de6bfe --- /dev/null +++ b/test/codegen-golden/AddVV8VInt8_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r AddVV8VInt8_m -n 1 -l 7 --has-ta --has-ma -c AddVV8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vadd_vv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vadd_vv_operator_0() { +int8_t tmp[] = {29,22,24,19,-23,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AddVX8VInt8.c b/test/codegen-golden/AddVX8VInt8.c new file mode 100644 index 0000000..ad407c1 --- /dev/null +++ b/test/codegen-golden/AddVX8VInt8.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r AddVX8VInt8 -n 1 -l 7 --has-ta --has-ma -c AddVX8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vadd_vx_i8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vadd_vx_operator_0() { +int8_t tmp[] = {-78,57,33,-36,4,-95,-79,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AddVX8VInt8TA.c b/test/codegen-golden/AddVX8VInt8TA.c new file mode 100644 index 0000000..ef02a47 --- /dev/null +++ b/test/codegen-golden/AddVX8VInt8TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r AddVX8VInt8TA -n 1 -l 7 --has-ta --has-ma -c AddVX8VInt8TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vadd_vx_i8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vadd_vx_operator_0() { +int8_t tmp[] = {-78,-1,33,-1,4,-1,-79,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AddVX8VInt8TAMA.c b/test/codegen-golden/AddVX8VInt8TAMA.c new file mode 100644 index 0000000..87e80f2 --- /dev/null +++ b/test/codegen-golden/AddVX8VInt8TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r AddVX8VInt8TAMA -n 1 -l 7 --has-ta --has-ma -c AddVX8VInt8TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vadd_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vadd_vx_operator_0() { +int8_t tmp[] = {-1,-1,-10,-1,-87,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AddVX8VInt8TAMU.c b/test/codegen-golden/AddVX8VInt8TAMU.c new file mode 100644 index 0000000..f14db86 --- /dev/null +++ b/test/codegen-golden/AddVX8VInt8TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r AddVX8VInt8TAMU -n 1 -l 7 --has-ta --has-ma -c AddVX8VInt8TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vadd_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vadd_vx_operator_0() { +int8_t tmp[] = {50,-1,-3,-1,-96,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AddVX8VInt8TU.c b/test/codegen-golden/AddVX8VInt8TU.c new file mode 100644 index 0000000..5bee5c3 --- /dev/null +++ b/test/codegen-golden/AddVX8VInt8TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r AddVX8VInt8TU -n 1 -l 7 --has-ta --has-ma -c AddVX8VInt8TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vadd_vx_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vadd_vx_operator_0() { +int8_t tmp[] = {28,79,-10,-14,-87,-73,7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AddVX8VInt8TUMA.c b/test/codegen-golden/AddVX8VInt8TUMA.c new file mode 100644 index 0000000..30c3e03 --- /dev/null +++ b/test/codegen-golden/AddVX8VInt8TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r AddVX8VInt8TUMA -n 1 -l 7 --has-ta --has-ma -c AddVX8VInt8TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vadd_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vadd_vx_operator_0() { +int8_t tmp[] = {-1,-15,-3,16,-96,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AddVX8VInt8TUMU.c b/test/codegen-golden/AddVX8VInt8TUMU.c new file mode 100644 index 0000000..a85eca3 --- /dev/null +++ b/test/codegen-golden/AddVX8VInt8TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r AddVX8VInt8TUMU -n 1 -l 7 --has-ta --has-ma -c AddVX8VInt8TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vadd_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vadd_vx_operator_0() { +int8_t tmp[] = {50,-15,-3,16,-96,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AddVX8VInt8_m.c b/test/codegen-golden/AddVX8VInt8_m.c new file mode 100644 index 0000000..a525795 --- /dev/null +++ b/test/codegen-golden/AddVX8VInt8_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r AddVX8VInt8_m -n 1 -l 7 --has-ta --has-ma -c AddVX8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vadd_vx_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vadd_vx_operator_0() { +int8_t tmp[] = {50,-2,-3,16,-96,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AndVV8VInt8.c b/test/codegen-golden/AndVV8VInt8.c new file mode 100644 index 0000000..862eedf --- /dev/null +++ b/test/codegen-golden/AndVV8VInt8.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r AndVV8VInt8 -n 1 -l 7 --has-ta --has-ma -c AndVV8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vand_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vand_vv_i8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vand_vv_operator_0() { +int8_t tmp[] = {-56,2,49,0,16,-73,-58,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vand_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vand_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vand_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AndVV8VInt8VBVIVIVI_TAMU.c b/test/codegen-golden/AndVV8VInt8VBVIVIVI_TAMU.c new file mode 100644 index 0000000..f338aab --- /dev/null +++ b/test/codegen-golden/AndVV8VInt8VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r AndVV8VInt8VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c AndVV8VInt8VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vand_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vand_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vand_vv_operator_0() { +int8_t tmp[] = {29,-1,33,-1,16,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vand_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vand_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vand_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AndVV8VInt8VBVIVIVI_TUMA.c b/test/codegen-golden/AndVV8VInt8VBVIVIVI_TUMA.c new file mode 100644 index 0000000..4265816 --- /dev/null +++ b/test/codegen-golden/AndVV8VInt8VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r AndVV8VInt8VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c AndVV8VInt8VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vand_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vand_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vand_vv_operator_0() { +int8_t tmp[] = {-1,84,33,19,16,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vand_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vand_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vand_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AndVV8VInt8VBVIVIVI_TUMU.c b/test/codegen-golden/AndVV8VInt8VBVIVIVI_TUMU.c new file mode 100644 index 0000000..3b4aa39 --- /dev/null +++ b/test/codegen-golden/AndVV8VInt8VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r AndVV8VInt8VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c AndVV8VInt8VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vand_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vand_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vand_vv_operator_0() { +int8_t tmp[] = {29,84,33,19,16,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vand_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vand_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vand_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AndVV8VInt8VBVIVI_TAMA.c b/test/codegen-golden/AndVV8VInt8VBVIVI_TAMA.c new file mode 100644 index 0000000..70e1c18 --- /dev/null +++ b/test/codegen-golden/AndVV8VInt8VBVIVI_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r AndVV8VInt8VBVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c AndVV8VInt8VBVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vand_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vand_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vand_vv_operator_0() { +int8_t tmp[] = {-1,-1,16,-1,16,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vand_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vand_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vand_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AndVV8VInt8VIVIVI_TU.c b/test/codegen-golden/AndVV8VInt8VIVIVI_TU.c new file mode 100644 index 0000000..b2a5138 --- /dev/null +++ b/test/codegen-golden/AndVV8VInt8VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r AndVV8VInt8VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c AndVV8VInt8VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vand_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vand_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vand_vv_operator_0() { +int8_t tmp[] = {8,79,16,-14,16,-73,-32,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vand_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vand_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vand_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AndVV8VInt8VIVI_TA.c b/test/codegen-golden/AndVV8VInt8VIVI_TA.c new file mode 100644 index 0000000..e0f871a --- /dev/null +++ b/test/codegen-golden/AndVV8VInt8VIVI_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r AndVV8VInt8VIVI_TA -n 1 -l 7 --has-ta --has-ma -c AndVV8VInt8VIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vand_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vand_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vand_vv_operator_0() { +int8_t tmp[] = {-56,-1,49,-1,16,-1,-58,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vand_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vand_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vand_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AndVV8VInt8_m.c b/test/codegen-golden/AndVV8VInt8_m.c new file mode 100644 index 0000000..e694867 --- /dev/null +++ b/test/codegen-golden/AndVV8VInt8_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r AndVV8VInt8_m -n 1 -l 7 --has-ta --has-ma -c AndVV8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vand_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vand_vv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vand_vv_operator_0() { +int8_t tmp[] = {29,32,33,19,16,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vand_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vand_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vand_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AndVX8VInt8.c b/test/codegen-golden/AndVX8VInt8.c new file mode 100644 index 0000000..fc0607f --- /dev/null +++ b/test/codegen-golden/AndVX8VInt8.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r AndVX8VInt8 -n 1 -l 7 --has-ta --has-ma -c AndVX8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vand_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vand_vx_i8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vand_vx_operator_0() { +int8_t tmp[] = {-56,74,34,-30,10,-94,-62,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vand_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vand_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vand_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AndVX8VInt8VBVISI_TAMA.c b/test/codegen-golden/AndVX8VInt8VBVISI_TAMA.c new file mode 100644 index 0000000..10597bb --- /dev/null +++ b/test/codegen-golden/AndVX8VInt8VBVISI_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r AndVX8VInt8VBVISI_TAMA -n 1 -l 7 --has-ta --has-ma -c AndVX8VInt8VBVISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vand_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vand_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vand_vx_operator_0() { +int8_t tmp[] = {-1,-1,8,-1,-86,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vand_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vand_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vand_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AndVX8VInt8VBVIVISI_TAMU.c b/test/codegen-golden/AndVX8VInt8VBVIVISI_TAMU.c new file mode 100644 index 0000000..94215d1 --- /dev/null +++ b/test/codegen-golden/AndVX8VInt8VBVIVISI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r AndVX8VInt8VBVIVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c AndVX8VInt8VBVIVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vand_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vand_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vand_vx_operator_0() { +int8_t tmp[] = {50,-1,2,-1,-94,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vand_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vand_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vand_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AndVX8VInt8VBVIVISI_TUMA.c b/test/codegen-golden/AndVX8VInt8VBVIVISI_TUMA.c new file mode 100644 index 0000000..52684aa --- /dev/null +++ b/test/codegen-golden/AndVX8VInt8VBVIVISI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r AndVX8VInt8VBVIVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c AndVX8VInt8VBVIVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vand_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vand_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vand_vx_operator_0() { +int8_t tmp[] = {-1,-15,2,16,-94,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vand_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vand_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vand_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AndVX8VInt8VBVIVISI_TUMU.c b/test/codegen-golden/AndVX8VInt8VBVIVISI_TUMU.c new file mode 100644 index 0000000..1f31497 --- /dev/null +++ b/test/codegen-golden/AndVX8VInt8VBVIVISI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r AndVX8VInt8VBVIVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c AndVX8VInt8VBVIVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vand_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vand_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vand_vx_operator_0() { +int8_t tmp[] = {50,-15,2,16,-94,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vand_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vand_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vand_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AndVX8VInt8VISI_TA.c b/test/codegen-golden/AndVX8VInt8VISI_TA.c new file mode 100644 index 0000000..47bac09 --- /dev/null +++ b/test/codegen-golden/AndVX8VInt8VISI_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r AndVX8VInt8VISI_TA -n 1 -l 7 --has-ta --has-ma -c AndVX8VInt8VISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vand_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vand_vx_i8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vand_vx_operator_0() { +int8_t tmp[] = {-56,-1,34,-1,10,-1,-62,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vand_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vand_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vand_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AndVX8VInt8VIVISI_TU.c b/test/codegen-golden/AndVX8VInt8VIVISI_TU.c new file mode 100644 index 0000000..082d6e9 --- /dev/null +++ b/test/codegen-golden/AndVX8VInt8VIVISI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r AndVX8VInt8VIVISI_TU -n 1 -l 7 --has-ta --has-ma -c AndVX8VInt8VIVISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vand_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vand_vx_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vand_vx_operator_0() { +int8_t tmp[] = {34,79,8,-14,-86,-73,8,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vand_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vand_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vand_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AndVX8VInt8_m.c b/test/codegen-golden/AndVX8VInt8_m.c new file mode 100644 index 0000000..0441ec7 --- /dev/null +++ b/test/codegen-golden/AndVX8VInt8_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r AndVX8VInt8_m -n 1 -l 7 --has-ta --has-ma -c AndVX8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vand_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vand_vx_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vand_vx_operator_0() { +int8_t tmp[] = {50,0,2,16,-94,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vand_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vand_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vand_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubVV8VInt8VBVIVIVI_TAMU.c b/test/codegen-golden/AsubVV8VInt8VBVIVIVI_TAMU.c new file mode 100644 index 0000000..7bd33bf --- /dev/null +++ b/test/codegen-golden/AsubVV8VInt8VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r AsubVV8VInt8VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c AsubVV8VInt8VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vasub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vasub_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vasub_vv_operator_0() { +int8_t tmp[] = {29,-1,27,-1,-27,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vasub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vasub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubVV8VInt8VBVIVIVI_TUMA.c b/test/codegen-golden/AsubVV8VInt8VBVIVIVI_TUMA.c new file mode 100644 index 0000000..0279e7e --- /dev/null +++ b/test/codegen-golden/AsubVV8VInt8VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r AsubVV8VInt8VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c AsubVV8VInt8VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vasub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vasub_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vasub_vv_operator_0() { +int8_t tmp[] = {-1,84,27,19,-27,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vasub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vasub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubVV8VInt8VBVIVIVI_TUMU.c b/test/codegen-golden/AsubVV8VInt8VBVIVIVI_TUMU.c new file mode 100644 index 0000000..2acdce5 --- /dev/null +++ b/test/codegen-golden/AsubVV8VInt8VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r AsubVV8VInt8VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c AsubVV8VInt8VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vasub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vasub_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vasub_vv_operator_0() { +int8_t tmp[] = {29,84,27,19,-27,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vasub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vasub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubVV8VInt8VBVIVIVI_m.c b/test/codegen-golden/AsubVV8VInt8VBVIVIVI_m.c new file mode 100644 index 0000000..b3b0310 --- /dev/null +++ b/test/codegen-golden/AsubVV8VInt8VBVIVIVI_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r AsubVV8VInt8VBVIVIVI_m -n 1 -l 7 --has-ta --has-ma -c AsubVV8VInt8VBVIVIVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vasub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vasub_vv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vasub_vv_operator_0() { +int8_t tmp[] = {29,-39,27,19,-27,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vasub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vasub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubVV8VInt8VBVIVI_TAMA.c b/test/codegen-golden/AsubVV8VInt8VBVIVI_TAMA.c new file mode 100644 index 0000000..25df776 --- /dev/null +++ b/test/codegen-golden/AsubVV8VInt8VBVIVI_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r AsubVV8VInt8VBVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c AsubVV8VInt8VBVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vasub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vasub_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vasub_vv_operator_0() { +int8_t tmp[] = {-1,-1,18,-1,4,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vasub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vasub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubVV8VInt8VIVI.c b/test/codegen-golden/AsubVV8VInt8VIVI.c new file mode 100644 index 0000000..bf10e40 --- /dev/null +++ b/test/codegen-golden/AsubVV8VInt8VIVI.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r AsubVV8VInt8VIVI -n 1 -l 7 --has-ta --has-ma -c AsubVV8VInt8VIVI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vasub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vasub_vv_i8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vasub_vv_operator_0() { +int8_t tmp[] = {-17,15,35,-13,5,-4,-15,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vasub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vasub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubVV8VInt8VIVIVI_TU.c b/test/codegen-golden/AsubVV8VInt8VIVIVI_TU.c new file mode 100644 index 0000000..086a24a --- /dev/null +++ b/test/codegen-golden/AsubVV8VInt8VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r AsubVV8VInt8VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c AsubVV8VInt8VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vasub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vasub_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vasub_vv_operator_0() { +int8_t tmp[] = {26,79,18,-14,4,-73,10,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vasub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vasub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubVV8VInt8VIVI_TA.c b/test/codegen-golden/AsubVV8VInt8VIVI_TA.c new file mode 100644 index 0000000..97e4c8d --- /dev/null +++ b/test/codegen-golden/AsubVV8VInt8VIVI_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r AsubVV8VInt8VIVI_TA -n 1 -l 7 --has-ta --has-ma -c AsubVV8VInt8VIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vasub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vasub_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vasub_vv_operator_0() { +int8_t tmp[] = {-17,-1,35,-1,5,-1,-15,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vasub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vasub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubVX8VInt8VBVISI_TAMA.c b/test/codegen-golden/AsubVX8VInt8VBVISI_TAMA.c new file mode 100644 index 0000000..c3daee1 --- /dev/null +++ b/test/codegen-golden/AsubVX8VInt8VBVISI_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r AsubVX8VInt8VBVISI_TAMA -n 1 -l 7 --has-ta --has-ma -c AsubVX8VInt8VBVISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vasub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vasub_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vasub_vx_operator_0() { +int8_t tmp[] = {-1,-1,17,-1,-21,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vasub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vasub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubVX8VInt8VBVIVISI_TAMU.c b/test/codegen-golden/AsubVX8VInt8VBVIVISI_TAMU.c new file mode 100644 index 0000000..ba41d6b --- /dev/null +++ b/test/codegen-golden/AsubVX8VInt8VBVIVISI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r AsubVX8VInt8VBVIVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c AsubVX8VInt8VBVIVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vasub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vasub_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vasub_vx_operator_0() { +int8_t tmp[] = {50,-1,21,-1,-26,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vasub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vasub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubVX8VInt8VBVIVISI_TUMA.c b/test/codegen-golden/AsubVX8VInt8VBVIVISI_TUMA.c new file mode 100644 index 0000000..063b46e --- /dev/null +++ b/test/codegen-golden/AsubVX8VInt8VBVIVISI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r AsubVX8VInt8VBVIVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c AsubVX8VInt8VBVIVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vasub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vasub_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vasub_vx_operator_0() { +int8_t tmp[] = {-1,-15,21,16,-26,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vasub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vasub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubVX8VInt8VBVIVISI_TUMU.c b/test/codegen-golden/AsubVX8VInt8VBVIVISI_TUMU.c new file mode 100644 index 0000000..a798976 --- /dev/null +++ b/test/codegen-golden/AsubVX8VInt8VBVIVISI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r AsubVX8VInt8VBVIVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c AsubVX8VInt8VBVIVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vasub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vasub_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vasub_vx_operator_0() { +int8_t tmp[] = {50,-15,21,16,-26,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vasub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vasub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubVX8VInt8VBVIVISI_m.c b/test/codegen-golden/AsubVX8VInt8VBVIVISI_m.c new file mode 100644 index 0000000..cdc03d6 --- /dev/null +++ b/test/codegen-golden/AsubVX8VInt8VBVIVISI_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r AsubVX8VInt8VBVIVISI_m -n 1 -l 7 --has-ta --has-ma -c AsubVX8VInt8VBVIVISI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vasub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vasub_vx_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vasub_vx_operator_0() { +int8_t tmp[] = {50,21,21,16,-26,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vasub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vasub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubVX8VInt8VISI.c b/test/codegen-golden/AsubVX8VInt8VISI.c new file mode 100644 index 0000000..dbe41e0 --- /dev/null +++ b/test/codegen-golden/AsubVX8VInt8VISI.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r AsubVX8VInt8VISI -n 1 -l 7 --has-ta --has-ma -c AsubVX8VInt8VISI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vasub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vasub_vx_i8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vasub_vx_operator_0() { +int8_t tmp[] = {-17,51,39,4,24,-25,-17,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vasub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vasub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubVX8VInt8VISI_TA.c b/test/codegen-golden/AsubVX8VInt8VISI_TA.c new file mode 100644 index 0000000..6a42380 --- /dev/null +++ b/test/codegen-golden/AsubVX8VInt8VISI_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r AsubVX8VInt8VISI_TA -n 1 -l 7 --has-ta --has-ma -c AsubVX8VInt8VISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vasub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vasub_vx_i8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vasub_vx_operator_0() { +int8_t tmp[] = {-17,-1,39,-1,24,-1,-17,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vasub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vasub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubVX8VInt8VIVISI_TU.c b/test/codegen-golden/AsubVX8VInt8VIVISI_TU.c new file mode 100644 index 0000000..71ab79b --- /dev/null +++ b/test/codegen-golden/AsubVX8VInt8VIVISI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r AsubVX8VInt8VIVISI_TU -n 1 -l 7 --has-ta --has-ma -c AsubVX8VInt8VIVISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vasub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vasub_vx_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vasub_vx_operator_0() { +int8_t tmp[] = {36,79,17,-14,-21,-73,26,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vasub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vasub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubuVV8VUInt8VBVUVUVU_TAMU.c b/test/codegen-golden/AsubuVV8VUInt8VBVUVUVU_TAMU.c new file mode 100644 index 0000000..53143cd --- /dev/null +++ b/test/codegen-golden/AsubuVV8VUInt8VBVUVUVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r AsubuVV8VUInt8VBVUVUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c AsubuVV8VUInt8VBVUVUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vasubu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vasubu_vv_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vasubu_vv_operator_0() { +uint8_t tmp[] = {65,255,14,255,243,255,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vasubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vasubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubuVV8VUInt8VBVUVUVU_TUMA.c b/test/codegen-golden/AsubuVV8VUInt8VBVUVUVU_TUMA.c new file mode 100644 index 0000000..44c2438 --- /dev/null +++ b/test/codegen-golden/AsubuVV8VUInt8VBVUVUVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r AsubuVV8VUInt8VBVUVUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c AsubuVV8VUInt8VBVUVUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vasubu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vasubu_vv_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vasubu_vv_operator_0() { +uint8_t tmp[] = {255,92,14,59,243,13,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vasubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vasubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubuVV8VUInt8VBVUVUVU_TUMU.c b/test/codegen-golden/AsubuVV8VUInt8VBVUVUVU_TUMU.c new file mode 100644 index 0000000..b2ecab3 --- /dev/null +++ b/test/codegen-golden/AsubuVV8VUInt8VBVUVUVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r AsubuVV8VUInt8VBVUVUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c AsubuVV8VUInt8VBVUVUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vasubu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vasubu_vv_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vasubu_vv_operator_0() { +uint8_t tmp[] = {65,92,14,59,243,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vasubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vasubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubuVV8VUInt8VBVUVUVU_m.c b/test/codegen-golden/AsubuVV8VUInt8VBVUVUVU_m.c new file mode 100644 index 0000000..55ba3fc --- /dev/null +++ b/test/codegen-golden/AsubuVV8VUInt8VBVUVUVU_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r AsubuVV8VUInt8VBVUVUVU_m -n 1 -l 7 --has-ta --has-ma -c AsubuVV8VUInt8VBVUVUVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vasubu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vasubu_vv_u8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vasubu_vv_operator_0() { +uint8_t tmp[] = {65,237,14,59,243,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vasubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vasubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubuVV8VUInt8VBVUVU_TAMA.c b/test/codegen-golden/AsubuVV8VUInt8VBVUVU_TAMA.c new file mode 100644 index 0000000..cb4c7d0 --- /dev/null +++ b/test/codegen-golden/AsubuVV8VUInt8VBVUVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r AsubuVV8VUInt8VBVUVU_TAMA -n 1 -l 7 --has-ta --has-ma -c AsubuVV8VUInt8VBVUVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vasubu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vasubu_vv_u8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vasubu_vv_operator_0() { +uint8_t tmp[] = {255,255,9,255,2,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vasubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vasubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubuVV8VUInt8VUVU.c b/test/codegen-golden/AsubuVV8VUInt8VUVU.c new file mode 100644 index 0000000..be69269 --- /dev/null +++ b/test/codegen-golden/AsubuVV8VUInt8VUVU.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r AsubuVV8VUInt8VUVU -n 1 -l 7 --has-ta --has-ma -c AsubuVV8VUInt8VUVU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vasubu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vasubu_vv_u8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vasubu_vv_operator_0() { +uint8_t tmp[] = {248,8,18,250,3,254,249,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vasubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vasubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubuVV8VUInt8VUVUVU_TU.c b/test/codegen-golden/AsubuVV8VUInt8VUVUVU_TU.c new file mode 100644 index 0000000..15229cc --- /dev/null +++ b/test/codegen-golden/AsubuVV8VUInt8VUVUVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r AsubuVV8VUInt8VUVUVU_TU -n 1 -l 7 --has-ta --has-ma -c AsubuVV8VUInt8VUVUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vasubu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vasubu_vv_u8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vasubu_vv_operator_0() { +uint8_t tmp[] = {13,90,9,43,2,14,5,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vasubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vasubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubuVV8VUInt8VUVU_TA.c b/test/codegen-golden/AsubuVV8VUInt8VUVU_TA.c new file mode 100644 index 0000000..d4d9cd1 --- /dev/null +++ b/test/codegen-golden/AsubuVV8VUInt8VUVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r AsubuVV8VUInt8VUVU_TA -n 1 -l 7 --has-ta --has-ma -c AsubuVV8VUInt8VUVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vasubu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vasubu_vv_u8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vasubu_vv_operator_0() { +uint8_t tmp[] = {248,255,18,255,3,255,249,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vasubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vasubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubuVX8VUInt8VBVUSU_TAMA.c b/test/codegen-golden/AsubuVX8VUInt8VBVUSU_TAMA.c new file mode 100644 index 0000000..20c0128 --- /dev/null +++ b/test/codegen-golden/AsubuVX8VUInt8VBVUSU_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r AsubuVX8VUInt8VBVUSU_TAMA -n 1 -l 7 --has-ta --has-ma -c AsubuVX8VUInt8VBVUSU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vasubu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vasubu_vx_u8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vasubu_vx_operator_0() { +uint8_t tmp[] = {255,255,9,255,246,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vasubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vasubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubuVX8VUInt8VBVUVUSU_TAMU.c b/test/codegen-golden/AsubuVX8VUInt8VBVUVUSU_TAMU.c new file mode 100644 index 0000000..f2d976a --- /dev/null +++ b/test/codegen-golden/AsubuVX8VUInt8VBVUVUSU_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r AsubuVX8VUInt8VBVUVUSU_TAMU -n 1 -l 7 --has-ta --has-ma -c AsubuVX8VUInt8VBVUVUSU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vasubu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vasubu_vx_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vasubu_vx_operator_0() { +uint8_t tmp[] = {75,255,10,255,243,255,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vasubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vasubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubuVX8VUInt8VBVUVUSU_TUMA.c b/test/codegen-golden/AsubuVX8VUInt8VBVUVUSU_TUMA.c new file mode 100644 index 0000000..e0ae8b8 --- /dev/null +++ b/test/codegen-golden/AsubuVX8VUInt8VBVUVUSU_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r AsubuVX8VUInt8VBVUVUSU_TUMA -n 1 -l 7 --has-ta --has-ma -c AsubuVX8VUInt8VBVUVUSU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vasubu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vasubu_vx_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vasubu_vx_operator_0() { +uint8_t tmp[] = {255,42,10,58,243,37,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vasubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vasubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubuVX8VUInt8VBVUVUSU_TUMU.c b/test/codegen-golden/AsubuVX8VUInt8VBVUVUSU_TUMU.c new file mode 100644 index 0000000..23271d7 --- /dev/null +++ b/test/codegen-golden/AsubuVX8VUInt8VBVUVUSU_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r AsubuVX8VUInt8VBVUVUSU_TUMU -n 1 -l 7 --has-ta --has-ma -c AsubuVX8VUInt8VBVUVUSU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vasubu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vasubu_vx_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vasubu_vx_operator_0() { +uint8_t tmp[] = {75,42,10,58,243,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vasubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vasubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubuVX8VUInt8VBVUVUSU_m.c b/test/codegen-golden/AsubuVX8VUInt8VBVUVUSU_m.c new file mode 100644 index 0000000..040eb20 --- /dev/null +++ b/test/codegen-golden/AsubuVX8VUInt8VBVUVUSU_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r AsubuVX8VUInt8VBVUVUSU_m -n 1 -l 7 --has-ta --has-ma -c AsubuVX8VUInt8VBVUVUSU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vasubu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vasubu_vx_u8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vasubu_vx_operator_0() { +uint8_t tmp[] = {75,11,10,58,243,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vasubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vasubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubuVX8VUInt8VUSU.c b/test/codegen-golden/AsubuVX8VUInt8VUSU.c new file mode 100644 index 0000000..ab970b2 --- /dev/null +++ b/test/codegen-golden/AsubuVX8VUInt8VUSU.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r AsubuVX8VUInt8VUSU -n 1 -l 7 --has-ta --has-ma -c AsubuVX8VUInt8VUSU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vasubu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vasubu_vx_u8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vasubu_vx_operator_0() { +uint8_t tmp[] = {248,26,20,2,12,244,248,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vasubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vasubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubuVX8VUInt8VUSU_TA.c b/test/codegen-golden/AsubuVX8VUInt8VUSU_TA.c new file mode 100644 index 0000000..b5efd7f --- /dev/null +++ b/test/codegen-golden/AsubuVX8VUInt8VUSU_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r AsubuVX8VUInt8VUSU_TA -n 1 -l 7 --has-ta --has-ma -c AsubuVX8VUInt8VUSU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vasubu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vasubu_vx_u8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vasubu_vx_operator_0() { +uint8_t tmp[] = {248,255,20,255,12,255,248,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vasubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vasubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/AsubuVX8VUInt8VUVUSU_TU.c b/test/codegen-golden/AsubuVX8VUInt8VUVUSU_TU.c new file mode 100644 index 0000000..000d521 --- /dev/null +++ b/test/codegen-golden/AsubuVX8VUInt8VUVUSU_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r AsubuVX8VUInt8VUVUSU_TU -n 1 -l 7 --has-ta --has-ma -c AsubuVX8VUInt8VUVUSU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vasubu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vasubu_vx_u8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vasubu_vx_operator_0() { +uint8_t tmp[] = {18,90,9,43,246,14,13,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vasubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vasubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vasubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/CpopMSUInt32VB.c b/test/codegen-golden/CpopMSUInt32VB.c new file mode 100644 index 0000000..5d770b2 --- /dev/null +++ b/test/codegen-golden/CpopMSUInt32VB.c @@ -0,0 +1,56 @@ +// COMMAND: random_gen -r CpopMSUInt32VB -n 1 -l 7 --has-ta --has-ma -c CpopMSUInt32VB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vcpop_m_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = &value_1; +int placeholder2 = 7; + +uint32_t placeholder3 = 0; +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +placeholder3 += vcpop_m_b8(mask_value_0_0, vl); +placeholder0 += vl; +} +*placeholder1 = placeholder3; +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vcpop_m_operator_0() { +uint32_t tmp = 3; +if(value_1 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vcpop_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vcpop_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vcpop_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/CpopMSUInt32VBVB_m.c b/test/codegen-golden/CpopMSUInt32VBVB_m.c new file mode 100644 index 0000000..7490b43 --- /dev/null +++ b/test/codegen-golden/CpopMSUInt32VBVB_m.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r CpopMSUInt32VBVB_m -n 1 -l 7 --has-ta --has-ma -c CpopMSUInt32VBVB_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint32_t value_2; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vcpop_m_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint32_t *placeholder2 = &value_2; +int placeholder3 = 7; + +uint32_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +placeholder4 += vcpop_m_b8_m (mask_value_0_0, mask_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +} +*placeholder2 = placeholder4; +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vcpop_m_operator_0() { +uint32_t tmp = 2; +if(value_2 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vcpop_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vcpop_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vcpop_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivVV8VInt8VBVIVIVI_TAMU.c b/test/codegen-golden/DivVV8VInt8VBVIVIVI_TAMU.c new file mode 100644 index 0000000..2fd6dbd --- /dev/null +++ b/test/codegen-golden/DivVV8VInt8VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r DivVV8VInt8VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c DivVV8VInt8VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vdiv_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vdiv_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vdiv_vv_operator_0() { +int8_t tmp[] = {29,-1,-2,-1,-2,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vdiv_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdiv_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vdiv_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivVV8VInt8VBVIVIVI_TUMA.c b/test/codegen-golden/DivVV8VInt8VBVIVIVI_TUMA.c new file mode 100644 index 0000000..ee0d0a4 --- /dev/null +++ b/test/codegen-golden/DivVV8VInt8VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r DivVV8VInt8VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c DivVV8VInt8VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vdiv_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vdiv_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vdiv_vv_operator_0() { +int8_t tmp[] = {-1,84,-2,19,-2,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vdiv_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdiv_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vdiv_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivVV8VInt8VBVIVIVI_TUMU.c b/test/codegen-golden/DivVV8VInt8VBVIVIVI_TUMU.c new file mode 100644 index 0000000..29cd76d --- /dev/null +++ b/test/codegen-golden/DivVV8VInt8VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r DivVV8VInt8VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c DivVV8VInt8VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vdiv_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vdiv_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vdiv_vv_operator_0() { +int8_t tmp[] = {29,84,-2,19,-2,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vdiv_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdiv_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vdiv_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivVV8VInt8VBVIVI_TAMA.c b/test/codegen-golden/DivVV8VInt8VBVIVI_TAMA.c new file mode 100644 index 0000000..65e39f4 --- /dev/null +++ b/test/codegen-golden/DivVV8VInt8VBVIVI_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r DivVV8VInt8VBVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c DivVV8VInt8VBVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vdiv_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vdiv_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vdiv_vv_operator_0() { +int8_t tmp[] = {-1,-1,-1,-1,1,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vdiv_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdiv_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vdiv_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivVV8VInt8VIVIVI_TU.c b/test/codegen-golden/DivVV8VInt8VIVIVI_TU.c new file mode 100644 index 0000000..c45ae9f --- /dev/null +++ b/test/codegen-golden/DivVV8VInt8VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r DivVV8VInt8VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c DivVV8VInt8VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vdiv_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vdiv_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vdiv_vv_operator_0() { +int8_t tmp[] = {-1,79,-1,-14,1,-73,0,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vdiv_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdiv_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vdiv_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivVV8VInt8VIVI_TA.c b/test/codegen-golden/DivVV8VInt8VIVI_TA.c new file mode 100644 index 0000000..3c9827c --- /dev/null +++ b/test/codegen-golden/DivVV8VInt8VIVI_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r DivVV8VInt8VIVI_TA -n 1 -l 7 --has-ta --has-ma -c DivVV8VInt8VIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vdiv_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vdiv_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vdiv_vv_operator_0() { +int8_t tmp[] = {2,-1,-3,-1,1,-1,2,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vdiv_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdiv_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vdiv_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivVX8VInt8VBVISI_TAMA.c b/test/codegen-golden/DivVX8VInt8VBVISI_TAMA.c new file mode 100644 index 0000000..fffd214 --- /dev/null +++ b/test/codegen-golden/DivVX8VInt8VBVISI_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r DivVX8VInt8VBVISI_TAMA -n 1 -l 7 --has-ta --has-ma -c DivVX8VInt8VBVISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vdiv_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vdiv_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vdiv_vx_operator_0() { +int8_t tmp[] = {-1,-1,0,-1,2,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vdiv_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdiv_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vdiv_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivVX8VInt8VBVIVISI_TAMU.c b/test/codegen-golden/DivVX8VInt8VBVIVISI_TAMU.c new file mode 100644 index 0000000..44e0070 --- /dev/null +++ b/test/codegen-golden/DivVX8VInt8VBVIVISI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r DivVX8VInt8VBVIVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c DivVX8VInt8VBVIVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vdiv_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vdiv_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vdiv_vx_operator_0() { +int8_t tmp[] = {50,-1,0,-1,3,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vdiv_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdiv_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vdiv_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivVX8VInt8VBVIVISI_TUMA.c b/test/codegen-golden/DivVX8VInt8VBVIVISI_TUMA.c new file mode 100644 index 0000000..58930ef --- /dev/null +++ b/test/codegen-golden/DivVX8VInt8VBVIVISI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r DivVX8VInt8VBVIVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c DivVX8VInt8VBVIVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vdiv_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vdiv_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vdiv_vx_operator_0() { +int8_t tmp[] = {-1,-15,0,16,3,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vdiv_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdiv_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vdiv_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivVX8VInt8VBVIVISI_TUMU.c b/test/codegen-golden/DivVX8VInt8VBVIVISI_TUMU.c new file mode 100644 index 0000000..a9fe10b --- /dev/null +++ b/test/codegen-golden/DivVX8VInt8VBVIVISI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r DivVX8VInt8VBVIVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c DivVX8VInt8VBVIVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vdiv_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vdiv_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vdiv_vx_operator_0() { +int8_t tmp[] = {50,-15,0,16,3,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vdiv_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdiv_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vdiv_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivVX8VInt8VISI_TA.c b/test/codegen-golden/DivVX8VInt8VISI_TA.c new file mode 100644 index 0000000..51efdad --- /dev/null +++ b/test/codegen-golden/DivVX8VInt8VISI_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r DivVX8VInt8VISI_TA -n 1 -l 7 --has-ta --has-ma -c DivVX8VInt8VISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vdiv_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vdiv_vx_i8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vdiv_vx_operator_0() { +int8_t tmp[] = {2,-1,-2,-1,-1,-1,2,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vdiv_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdiv_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vdiv_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivVX8VInt8VIVISI_TU.c b/test/codegen-golden/DivVX8VInt8VIVISI_TU.c new file mode 100644 index 0000000..de6bf1d --- /dev/null +++ b/test/codegen-golden/DivVX8VInt8VIVISI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r DivVX8VInt8VIVISI_TU -n 1 -l 7 --has-ta --has-ma -c DivVX8VInt8VIVISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vdiv_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vdiv_vx_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vdiv_vx_operator_0() { +int8_t tmp[] = {-2,79,0,-14,2,-73,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vdiv_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdiv_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vdiv_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivuVV8VUInt8VBVUVUVU_TAMU.c b/test/codegen-golden/DivuVV8VUInt8VBVUVUVU_TAMU.c new file mode 100644 index 0000000..ea7474a --- /dev/null +++ b/test/codegen-golden/DivuVV8VUInt8VBVUVUVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r DivuVV8VUInt8VBVUVUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c DivuVV8VUInt8VBVUVUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vdivu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vdivu_vv_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vdivu_vv_operator_0() { +uint8_t tmp[] = {65,255,1,255,0,255,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vdivu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdivu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vdivu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivuVV8VUInt8VBVUVUVU_TUMA.c b/test/codegen-golden/DivuVV8VUInt8VBVUVUVU_TUMA.c new file mode 100644 index 0000000..73de5a3 --- /dev/null +++ b/test/codegen-golden/DivuVV8VUInt8VBVUVUVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r DivuVV8VUInt8VBVUVUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c DivuVV8VUInt8VBVUVUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vdivu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vdivu_vv_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vdivu_vv_operator_0() { +uint8_t tmp[] = {255,92,1,59,0,13,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vdivu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdivu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vdivu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivuVV8VUInt8VBVUVUVU_TUMU.c b/test/codegen-golden/DivuVV8VUInt8VBVUVUVU_TUMU.c new file mode 100644 index 0000000..76513b2 --- /dev/null +++ b/test/codegen-golden/DivuVV8VUInt8VBVUVUVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r DivuVV8VUInt8VBVUVUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c DivuVV8VUInt8VBVUVUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vdivu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vdivu_vv_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vdivu_vv_operator_0() { +uint8_t tmp[] = {65,92,1,59,0,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vdivu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdivu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vdivu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivuVV8VUInt8VBVUVU_TAMA.c b/test/codegen-golden/DivuVV8VUInt8VBVUVU_TAMA.c new file mode 100644 index 0000000..8034924 --- /dev/null +++ b/test/codegen-golden/DivuVV8VUInt8VBVUVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r DivuVV8VUInt8VBVUVU_TAMA -n 1 -l 7 --has-ta --has-ma -c DivuVV8VUInt8VBVUVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vdivu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vdivu_vv_u8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vdivu_vv_operator_0() { +uint8_t tmp[] = {255,255,1,255,1,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vdivu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdivu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vdivu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivuVV8VUInt8VUVUVU_TU.c b/test/codegen-golden/DivuVV8VUInt8VUVUVU_TU.c new file mode 100644 index 0000000..9809168 --- /dev/null +++ b/test/codegen-golden/DivuVV8VUInt8VUVUVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r DivuVV8VUInt8VUVUVU_TU -n 1 -l 7 --has-ta --has-ma -c DivuVV8VUInt8VUVUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vdivu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vdivu_vv_u8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vdivu_vv_operator_0() { +uint8_t tmp[] = {1,90,1,43,1,14,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vdivu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdivu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vdivu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivuVV8VUInt8VUVU_TA.c b/test/codegen-golden/DivuVV8VUInt8VUVU_TA.c new file mode 100644 index 0000000..cc17990 --- /dev/null +++ b/test/codegen-golden/DivuVV8VUInt8VUVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r DivuVV8VUInt8VUVU_TA -n 1 -l 7 --has-ta --has-ma -c DivuVV8VUInt8VUVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vdivu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vdivu_vv_u8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vdivu_vv_operator_0() { +uint8_t tmp[] = {0,255,1,255,1,255,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vdivu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdivu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vdivu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivuVX8VUInt8VBVUSU_TAMA.c b/test/codegen-golden/DivuVX8VUInt8VBVUSU_TAMA.c new file mode 100644 index 0000000..e163c4d --- /dev/null +++ b/test/codegen-golden/DivuVX8VUInt8VBVUSU_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r DivuVX8VUInt8VBVUSU_TAMA -n 1 -l 7 --has-ta --has-ma -c DivuVX8VUInt8VBVUSU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vdivu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vdivu_vx_u8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vdivu_vx_operator_0() { +uint8_t tmp[] = {255,255,1,255,0,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vdivu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdivu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vdivu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivuVX8VUInt8VBVUVUSU_TAMU.c b/test/codegen-golden/DivuVX8VUInt8VBVUVUSU_TAMU.c new file mode 100644 index 0000000..9d158a7 --- /dev/null +++ b/test/codegen-golden/DivuVX8VUInt8VBVUVUSU_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r DivuVX8VUInt8VBVUVUSU_TAMU -n 1 -l 7 --has-ta --has-ma -c DivuVX8VUInt8VBVUVUSU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vdivu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vdivu_vx_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vdivu_vx_operator_0() { +uint8_t tmp[] = {75,255,1,255,0,255,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vdivu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdivu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vdivu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivuVX8VUInt8VBVUVUSU_TUMA.c b/test/codegen-golden/DivuVX8VUInt8VBVUVUSU_TUMA.c new file mode 100644 index 0000000..bc2d98c --- /dev/null +++ b/test/codegen-golden/DivuVX8VUInt8VBVUVUSU_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r DivuVX8VUInt8VBVUVUSU_TUMA -n 1 -l 7 --has-ta --has-ma -c DivuVX8VUInt8VBVUVUSU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vdivu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vdivu_vx_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vdivu_vx_operator_0() { +uint8_t tmp[] = {255,42,1,58,0,37,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vdivu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdivu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vdivu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivuVX8VUInt8VBVUVUSU_TUMU.c b/test/codegen-golden/DivuVX8VUInt8VBVUVUSU_TUMU.c new file mode 100644 index 0000000..bd06f2c --- /dev/null +++ b/test/codegen-golden/DivuVX8VUInt8VBVUVUSU_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r DivuVX8VUInt8VBVUVUSU_TUMU -n 1 -l 7 --has-ta --has-ma -c DivuVX8VUInt8VBVUVUSU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vdivu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vdivu_vx_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vdivu_vx_operator_0() { +uint8_t tmp[] = {75,42,1,58,0,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vdivu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdivu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vdivu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivuVX8VUInt8VUSU_TA.c b/test/codegen-golden/DivuVX8VUInt8VUSU_TA.c new file mode 100644 index 0000000..13802cb --- /dev/null +++ b/test/codegen-golden/DivuVX8VUInt8VUSU_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r DivuVX8VUInt8VUSU_TA -n 1 -l 7 --has-ta --has-ma -c DivuVX8VUInt8VUSU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vdivu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vdivu_vx_u8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vdivu_vx_operator_0() { +uint8_t tmp[] = {0,255,2,255,1,255,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vdivu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdivu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vdivu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/DivuVX8VUInt8VUVUSU_TU.c b/test/codegen-golden/DivuVX8VUInt8VUVUSU_TU.c new file mode 100644 index 0000000..b2c9a83 --- /dev/null +++ b/test/codegen-golden/DivuVX8VUInt8VUVUSU_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r DivuVX8VUInt8VUVUSU_TU -n 1 -l 7 --has-ta --has-ma -c DivuVX8VUInt8VUVUSU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vdivu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vdivu_vx_u8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vdivu_vx_operator_0() { +uint8_t tmp[] = {1,90,1,43,0,14,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vdivu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vdivu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vdivu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FabsV16VFloat16VBVFVF_TAMU.c b/test/codegen-golden/FabsV16VFloat16VBVFVF_TAMU.c new file mode 100644 index 0000000..21090e0 --- /dev/null +++ b/test/codegen-golden/FabsV16VFloat16VBVFVF_TAMU.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FabsV16VFloat16VBVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FabsV16VFloat16VBVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfabs_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfabs_v_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfabs_v_operator_0() { +uint64_t tmp[] = {29258,65535,28707,65535,29100,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfabs_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfabs_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfabs_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FabsV16VFloat16VBVFVF_TUMA.c b/test/codegen-golden/FabsV16VFloat16VBVFVF_TUMA.c new file mode 100644 index 0000000..158bbb1 --- /dev/null +++ b/test/codegen-golden/FabsV16VFloat16VBVFVF_TUMA.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FabsV16VFloat16VBVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FabsV16VFloat16VBVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfabs_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfabs_v_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfabs_v_operator_0() { +uint64_t tmp[] = {65535,29822,28707,29133,29100,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfabs_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfabs_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfabs_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FabsV16VFloat16VBVFVF_TUMU.c b/test/codegen-golden/FabsV16VFloat16VBVFVF_TUMU.c new file mode 100644 index 0000000..a052e01 --- /dev/null +++ b/test/codegen-golden/FabsV16VFloat16VBVFVF_TUMU.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FabsV16VFloat16VBVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FabsV16VFloat16VBVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfabs_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfabs_v_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfabs_v_operator_0() { +uint64_t tmp[] = {29258,29822,28707,29133,29100,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfabs_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfabs_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfabs_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FabsV16VFloat16VBVFVF_m.c b/test/codegen-golden/FabsV16VFloat16VBVFVF_m.c new file mode 100644 index 0000000..dac958c --- /dev/null +++ b/test/codegen-golden/FabsV16VFloat16VBVFVF_m.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r FabsV16VFloat16VBVFVF_m -n 1 -l 7 --has-ta --has-ma -c FabsV16VFloat16VBVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfabs_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfabs_v_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfabs_v_operator_0() { +uint64_t tmp[] = {29258,29523,28707,29133,29100,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfabs_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfabs_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfabs_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FabsV16VFloat16VBVF_TAMA.c b/test/codegen-golden/FabsV16VFloat16VBVF_TAMA.c new file mode 100644 index 0000000..d012127 --- /dev/null +++ b/test/codegen-golden/FabsV16VFloat16VBVF_TAMA.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r FabsV16VFloat16VBVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FabsV16VFloat16VBVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfabs_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfabs_v_f16m1_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfabs_v_operator_0() { +uint64_t tmp[] = {65535,65535,28707,65535,29100,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfabs_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfabs_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfabs_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FabsV16VFloat16VF.c b/test/codegen-golden/FabsV16VFloat16VF.c new file mode 100644 index 0000000..fd00ac5 --- /dev/null +++ b/test/codegen-golden/FabsV16VFloat16VF.c @@ -0,0 +1,67 @@ +// COMMAND: random_gen -r FabsV16VFloat16VF -n 1 -l 7 --has-ta --has-ma -c FabsV16VFloat16VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfabs_v_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_1_0= vfabs_v_f16m1(vec_value_0_0, vl); + +vse16_v_f16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfabs_v_operator_0() { +uint64_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfabs_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfabs_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfabs_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FabsV16VFloat16VFVF_TU.c b/test/codegen-golden/FabsV16VFloat16VFVF_TU.c new file mode 100644 index 0000000..928cd6f --- /dev/null +++ b/test/codegen-golden/FabsV16VFloat16VFVF_TU.c @@ -0,0 +1,85 @@ +// COMMAND: random_gen -r FabsV16VFloat16VFVF_TU -n 1 -l 7 --has-ta --has-ma -c FabsV16VFloat16VFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfabs_v_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfabs_v_f16m1_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfabs_v_operator_0() { +uint64_t tmp[] = {28575,29790,28707,28721,29100,26987,28475,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfabs_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfabs_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfabs_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FabsV16VFloat16VF_TA.c b/test/codegen-golden/FabsV16VFloat16VF_TA.c new file mode 100644 index 0000000..0c35db2 --- /dev/null +++ b/test/codegen-golden/FabsV16VFloat16VF_TA.c @@ -0,0 +1,68 @@ +// COMMAND: random_gen -r FabsV16VFloat16VF_TA -n 1 -l 7 --has-ta --has-ma -c FabsV16VFloat16VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfabs_v_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_1_0= vfabs_v_f16m1_ta(vec_value_0_0, tail_vl); + +vse16_v_f16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfabs_v_operator_0() { +uint64_t tmp[] = {27738,65535,29580,65535,29222,65535,27716,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfabs_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfabs_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfabs_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FaddVF16VFloat16VBVFSF_TAMA.c b/test/codegen-golden/FaddVF16VFloat16VBVFSF_TAMA.c new file mode 100644 index 0000000..9f1ebf7 --- /dev/null +++ b/test/codegen-golden/FaddVF16VFloat16VBVFSF_TAMA.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FaddVF16VFloat16VBVFSF_TAMA -n 1 -l 7 --has-ta --has-ma -c FaddVF16VFloat16VBVFSF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfadd_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfadd_vf_f16m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfadd_vf_operator_0() { +uint64_t tmp[] = {65535,65535,29859,65535,29070,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FaddVF16VFloat16VBVFVFSF_TAMU.c b/test/codegen-golden/FaddVF16VFloat16VBVFVFSF_TAMU.c new file mode 100644 index 0000000..c650b68 --- /dev/null +++ b/test/codegen-golden/FaddVF16VFloat16VBVFVFSF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FaddVF16VFloat16VBVFVFSF_TAMU -n 1 -l 7 --has-ta --has-ma -c FaddVF16VFloat16VBVFVFSF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfadd_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfadd_vf_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfadd_vf_operator_0() { +uint64_t tmp[] = {29523,65535,29902,65535,28954,65535,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FaddVF16VFloat16VBVFVFSF_TUMA.c b/test/codegen-golden/FaddVF16VFloat16VBVFVFSF_TUMA.c new file mode 100644 index 0000000..8f8f2e3 --- /dev/null +++ b/test/codegen-golden/FaddVF16VFloat16VBVFVFSF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FaddVF16VFloat16VBVFVFSF_TUMA -n 1 -l 7 --has-ta --has-ma -c FaddVF16VFloat16VBVFVFSF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfadd_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfadd_vf_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfadd_vf_operator_0() { +uint64_t tmp[] = {65535,28707,29902,29100,28954,28475,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FaddVF16VFloat16VBVFVFSF_TUMU.c b/test/codegen-golden/FaddVF16VFloat16VBVFVFSF_TUMU.c new file mode 100644 index 0000000..8620bcc --- /dev/null +++ b/test/codegen-golden/FaddVF16VFloat16VBVFVFSF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FaddVF16VFloat16VBVFVFSF_TUMU -n 1 -l 7 --has-ta --has-ma -c FaddVF16VFloat16VBVFVFSF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfadd_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfadd_vf_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfadd_vf_operator_0() { +uint64_t tmp[] = {29523,28707,29902,29100,28954,28475,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FaddVF16VFloat16VBVFVFSF_m.c b/test/codegen-golden/FaddVF16VFloat16VBVFVFSF_m.c new file mode 100644 index 0000000..cbac241 --- /dev/null +++ b/test/codegen-golden/FaddVF16VFloat16VBVFVFSF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FaddVF16VFloat16VBVFVFSF_m -n 1 -l 7 --has-ta --has-ma -c FaddVF16VFloat16VBVFVFSF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfadd_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfadd_vf_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfadd_vf_operator_0() { +uint64_t tmp[] = {29523,29907,29902,29100,28954,28475,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FaddVF16VFloat16VFSF.c b/test/codegen-golden/FaddVF16VFloat16VFSF.c new file mode 100644 index 0000000..742672f --- /dev/null +++ b/test/codegen-golden/FaddVF16VFloat16VFSF.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r FaddVF16VFloat16VFSF -n 1 -l 7 --has-ta --has-ma -c FaddVF16VFloat16VFSF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfadd_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_2_0= vfadd_vf_f16m1(vec_value_0_0, placeholder1, vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfadd_vf_operator_0() { +uint64_t tmp[] = {29180,30278,30126,29696,29947,28970,29170,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FaddVF16VFloat16VFSF_TA.c b/test/codegen-golden/FaddVF16VFloat16VFSF_TA.c new file mode 100644 index 0000000..5a4974d --- /dev/null +++ b/test/codegen-golden/FaddVF16VFloat16VFSF_TA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r FaddVF16VFloat16VFSF_TA -n 1 -l 7 --has-ta --has-ma -c FaddVF16VFloat16VFSF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfadd_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_2_0= vfadd_vf_f16m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfadd_vf_operator_0() { +uint64_t tmp[] = {29180,65535,30126,65535,29947,65535,29170,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FaddVF16VFloat16VFVFSF_TU.c b/test/codegen-golden/FaddVF16VFloat16VFVFSF_TU.c new file mode 100644 index 0000000..9ac4fa6 --- /dev/null +++ b/test/codegen-golden/FaddVF16VFloat16VFVFSF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FaddVF16VFloat16VFVFSF_TU -n 1 -l 7 --has-ta --has-ma -c FaddVF16VFloat16VFVFSF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfadd_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfadd_vf_f16m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfadd_vf_operator_0() { +uint64_t tmp[] = {30097,29790,29859,28721,29070,26987,29965,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FaddVV16VFloat16VBVFVFVF_TAMU.c b/test/codegen-golden/FaddVV16VFloat16VBVFVFVF_TAMU.c new file mode 100644 index 0000000..949efbe --- /dev/null +++ b/test/codegen-golden/FaddVV16VFloat16VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FaddVV16VFloat16VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FaddVV16VFloat16VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfadd_vv_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfadd_vv_operator_0() { +uint64_t tmp[] = {29258,65535,30069,65535,29782,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FaddVV16VFloat16VBVFVFVF_TUMA.c b/test/codegen-golden/FaddVV16VFloat16VBVFVFVF_TUMA.c new file mode 100644 index 0000000..37ff996 --- /dev/null +++ b/test/codegen-golden/FaddVV16VFloat16VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FaddVV16VFloat16VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FaddVV16VFloat16VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfadd_vv_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfadd_vv_operator_0() { +uint64_t tmp[] = {65535,29822,30069,29133,29782,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FaddVV16VFloat16VBVFVFVF_TUMU.c b/test/codegen-golden/FaddVV16VFloat16VBVFVFVF_TUMU.c new file mode 100644 index 0000000..d0237d6 --- /dev/null +++ b/test/codegen-golden/FaddVV16VFloat16VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FaddVV16VFloat16VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FaddVV16VFloat16VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfadd_vv_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfadd_vv_operator_0() { +uint64_t tmp[] = {29258,29822,30069,29133,29782,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FaddVV16VFloat16VBVFVFVF_m.c b/test/codegen-golden/FaddVV16VFloat16VBVFVFVF_m.c new file mode 100644 index 0000000..886f155 --- /dev/null +++ b/test/codegen-golden/FaddVV16VFloat16VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FaddVV16VFloat16VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FaddVV16VFloat16VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfadd_vv_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfadd_vv_operator_0() { +uint64_t tmp[] = {29258,30058,30069,29133,29782,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FaddVV16VFloat16VBVFVF_TAMA.c b/test/codegen-golden/FaddVV16VFloat16VBVFVF_TAMA.c new file mode 100644 index 0000000..55497a4 --- /dev/null +++ b/test/codegen-golden/FaddVV16VFloat16VBVFVF_TAMA.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FaddVV16VFloat16VBVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FaddVV16VFloat16VBVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfadd_vv_f16m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfadd_vv_operator_0() { +uint64_t tmp[] = {65535,65535,29949,65535,30167,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FaddVV16VFloat16VFVF.c b/test/codegen-golden/FaddVV16VFloat16VFVF.c new file mode 100644 index 0000000..948f236 --- /dev/null +++ b/test/codegen-golden/FaddVV16VFloat16VFVF.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r FaddVV16VFloat16VFVF -n 1 -l 7 --has-ta --has-ma -c FaddVV16VFloat16VFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfadd_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfadd_vv_f16m1(vec_value_0_0, vec_value_1_0, vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfadd_vv_operator_0() { +uint64_t tmp[] = {29180,30724,30168,29908,30185,28210,29120,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FaddVV16VFloat16VFVFVF_TU.c b/test/codegen-golden/FaddVV16VFloat16VFVFVF_TU.c new file mode 100644 index 0000000..071cde5 --- /dev/null +++ b/test/codegen-golden/FaddVV16VFloat16VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FaddVV16VFloat16VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FaddVV16VFloat16VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfadd_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfadd_vv_f16m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfadd_vv_operator_0() { +uint64_t tmp[] = {29965,29790,29949,28721,30167,26987,29714,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FaddVV16VFloat16VFVF_TA.c b/test/codegen-golden/FaddVV16VFloat16VFVF_TA.c new file mode 100644 index 0000000..38ce619 --- /dev/null +++ b/test/codegen-golden/FaddVV16VFloat16VFVF_TA.c @@ -0,0 +1,85 @@ +// COMMAND: random_gen -r FaddVV16VFloat16VFVF_TA -n 1 -l 7 --has-ta --has-ma -c FaddVV16VFloat16VFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfadd_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfadd_vv_f16m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfadd_vv_operator_0() { +uint64_t tmp[] = {29180,65535,30168,65535,30185,65535,29120,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FclassV16VUInt16VBVF_TAMA.c b/test/codegen-golden/FclassV16VUInt16VBVF_TAMA.c new file mode 100644 index 0000000..32ee895 --- /dev/null +++ b/test/codegen-golden/FclassV16VUInt16VBVF_TAMA.c @@ -0,0 +1,79 @@ +// COMMAND: random_gen -r FclassV16VUInt16VBVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FclassV16VUInt16VBVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfclass_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vuint16m1_t vec_value_2_0= vfclass_v_u16m1_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_u16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfclass_v_operator_0() { +uint16_t tmp[] = {65535,65535,64,65535,64,65535,65535,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfclass_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfclass_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfclass_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FclassV16VUInt16VBVUVF_TAMU.c b/test/codegen-golden/FclassV16VUInt16VBVUVF_TAMU.c new file mode 100644 index 0000000..03eee82 --- /dev/null +++ b/test/codegen-golden/FclassV16VUInt16VBVUVF_TAMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r FclassV16VUInt16VBVUVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FclassV16VUInt16VBVUVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +float16_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfclass_v_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint16m1_t vec_value_1_0= vle16_v_u16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint16m1_t vec_value_3_0= vfclass_v_u16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfclass_v_operator_0() { +uint16_t tmp[] = {6442,65535,64,65535,64,65535,4633,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfclass_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfclass_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfclass_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FclassV16VUInt16VBVUVF_TUMA.c b/test/codegen-golden/FclassV16VUInt16VBVUVF_TUMA.c new file mode 100644 index 0000000..ef96148 --- /dev/null +++ b/test/codegen-golden/FclassV16VUInt16VBVUVF_TUMA.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r FclassV16VUInt16VBVUVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FclassV16VUInt16VBVUVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +float16_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfclass_v_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint16m1_t vec_value_1_0= vle16_v_u16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint16m1_t vec_value_3_0= vfclass_v_u16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfclass_v_operator_0() { +uint16_t tmp[] = {65535,9200,64,5940,64,1323,65535,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfclass_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfclass_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfclass_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FclassV16VUInt16VBVUVF_TUMU.c b/test/codegen-golden/FclassV16VUInt16VBVUVF_TUMU.c new file mode 100644 index 0000000..66a42d3 --- /dev/null +++ b/test/codegen-golden/FclassV16VUInt16VBVUVF_TUMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r FclassV16VUInt16VBVUVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FclassV16VUInt16VBVUVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +float16_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfclass_v_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint16m1_t vec_value_1_0= vle16_v_u16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint16m1_t vec_value_3_0= vfclass_v_u16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfclass_v_operator_0() { +uint16_t tmp[] = {6442,9200,64,5940,64,1323,4633,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfclass_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfclass_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfclass_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FclassV16VUInt16VBVUVF_m.c b/test/codegen-golden/FclassV16VUInt16VBVUVF_m.c new file mode 100644 index 0000000..af121b9 --- /dev/null +++ b/test/codegen-golden/FclassV16VUInt16VBVUVF_m.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r FclassV16VUInt16VBVUVF_m -n 1 -l 7 --has-ta --has-ma -c FclassV16VUInt16VBVUVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +float16_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfclass_v_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint16m1_t vec_value_1_0= vle16_v_u16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint16m1_t vec_value_3_0= vfclass_v_u16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_u16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfclass_v_operator_0() { +uint16_t tmp[] = {6442,64,64,5940,64,1323,4633,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfclass_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfclass_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfclass_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FclassV16VUInt16VF.c b/test/codegen-golden/FclassV16VUInt16VF.c new file mode 100644 index 0000000..ba13475 --- /dev/null +++ b/test/codegen-golden/FclassV16VUInt16VF.c @@ -0,0 +1,62 @@ +// COMMAND: random_gen -r FclassV16VUInt16VF -n 1 -l 7 --has-ta --has-ma -c FclassV16VUInt16VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +uint16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfclass_v_operator_0() { +float16_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vuint16m1_t vec_value_1_0= vfclass_v_u16m1(vec_value_0_0, vl); + +vse16_v_u16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfclass_v_operator_0() { +uint16_t tmp[] = {64,64,64,64,64,64,64,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfclass_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfclass_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfclass_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FclassV16VUInt16VF_TA.c b/test/codegen-golden/FclassV16VUInt16VF_TA.c new file mode 100644 index 0000000..9e2aa0c --- /dev/null +++ b/test/codegen-golden/FclassV16VUInt16VF_TA.c @@ -0,0 +1,63 @@ +// COMMAND: random_gen -r FclassV16VUInt16VF_TA -n 1 -l 7 --has-ta --has-ma -c FclassV16VUInt16VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +uint16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfclass_v_operator_0() { +float16_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vuint16m1_t vec_value_1_0= vfclass_v_u16m1_ta(vec_value_0_0, tail_vl); + +vse16_v_u16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfclass_v_operator_0() { +uint16_t tmp[] = {64,65535,64,65535,64,65535,64,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfclass_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfclass_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfclass_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FclassV16VUInt16VUVF_TU.c b/test/codegen-golden/FclassV16VUInt16VUVF_TU.c new file mode 100644 index 0000000..025620a --- /dev/null +++ b/test/codegen-golden/FclassV16VUInt16VUVF_TU.c @@ -0,0 +1,78 @@ +// COMMAND: random_gen -r FclassV16VUInt16VUVF_TU -n 1 -l 7 --has-ta --has-ma -c FclassV16VUInt16VUVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +float16_t value_1[7]; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfclass_v_operator_0() { +uint16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m1_t vec_value_0_0= vle16_v_u16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vuint16m1_t vec_value_2_0= vfclass_v_u16m1_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_u16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfclass_v_operator_0() { +uint16_t tmp[] = {64,8946,64,4291,64,1387,64,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfclass_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfclass_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfclass_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VFloat16VBVFVI_TAMU.c b/test/codegen-golden/FcvtV16VFloat16VBVFVI_TAMU.c new file mode 100644 index 0000000..db6d48f --- /dev/null +++ b/test/codegen-golden/FcvtV16VFloat16VBVFVI_TAMU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FcvtV16VFloat16VBVFVI_TAMU -n 1 -l 7 --has-ta --has-ma -c FcvtV16VFloat16VBVFVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +int16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {-2195,5001,-1530,1184,1614,-6427,-2596,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfcvt_f_x_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vint16m1_t vec_value_2_0= vle16_v_i16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfcvt_f_x_v_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_f_x_v_operator_0() { +uint64_t tmp[] = {29258,65535,58874,65535,26190,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_f_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_f_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_f_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VFloat16VBVFVI_TUMA.c b/test/codegen-golden/FcvtV16VFloat16VBVFVI_TUMA.c new file mode 100644 index 0000000..7f38c97 --- /dev/null +++ b/test/codegen-golden/FcvtV16VFloat16VBVFVI_TUMA.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FcvtV16VFloat16VBVFVI_TUMA -n 1 -l 7 --has-ta --has-ma -c FcvtV16VFloat16VBVFVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +int16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {-2195,5001,-1530,1184,1614,-6427,-2596,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfcvt_f_x_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vint16m1_t vec_value_2_0= vle16_v_i16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfcvt_f_x_v_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_f_x_v_operator_0() { +uint64_t tmp[] = {65535,29822,58874,29133,26190,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_f_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_f_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_f_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VFloat16VBVFVI_TUMU.c b/test/codegen-golden/FcvtV16VFloat16VBVFVI_TUMU.c new file mode 100644 index 0000000..858ff91 --- /dev/null +++ b/test/codegen-golden/FcvtV16VFloat16VBVFVI_TUMU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FcvtV16VFloat16VBVFVI_TUMU -n 1 -l 7 --has-ta --has-ma -c FcvtV16VFloat16VBVFVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +int16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {-2195,5001,-1530,1184,1614,-6427,-2596,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfcvt_f_x_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vint16m1_t vec_value_2_0= vle16_v_i16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfcvt_f_x_v_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_f_x_v_operator_0() { +uint64_t tmp[] = {29258,29822,58874,29133,26190,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_f_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_f_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_f_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VFloat16VBVFVI_m.c b/test/codegen-golden/FcvtV16VFloat16VBVFVI_m.c new file mode 100644 index 0000000..5980ec9 --- /dev/null +++ b/test/codegen-golden/FcvtV16VFloat16VBVFVI_m.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FcvtV16VFloat16VBVFVI_m -n 1 -l 7 --has-ta --has-ma -c FcvtV16VFloat16VBVFVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +int16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {-2195,5001,-1530,1184,1614,-6427,-2596,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfcvt_f_x_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vint16m1_t vec_value_2_0= vle16_v_i16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfcvt_f_x_v_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_f_x_v_operator_0() { +uint64_t tmp[] = {29258,27874,58874,29133,26190,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_f_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_f_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_f_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VFloat16VBVFVU_TAMU.c b/test/codegen-golden/FcvtV16VFloat16VBVFVU_TAMU.c new file mode 100644 index 0000000..f6ebc63 --- /dev/null +++ b/test/codegen-golden/FcvtV16VFloat16VBVFVU_TAMU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FcvtV16VFloat16VBVFVU_TAMU -n 1 -l 7 --has-ta --has-ma -c FcvtV16VFloat16VBVFVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +uint16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {3903,7500,4235,5592,5807,1786,3702,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfcvt_f_xu_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vuint16m1_t vec_value_2_0= vle16_v_u16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfcvt_f_xu_v_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_f_xu_v_operator_0() { +uint64_t tmp[] = {29258,65535,27683,65535,28076,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_f_xu_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_f_xu_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_f_xu_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VFloat16VBVFVU_TUMA.c b/test/codegen-golden/FcvtV16VFloat16VBVFVU_TUMA.c new file mode 100644 index 0000000..23fa6a4 --- /dev/null +++ b/test/codegen-golden/FcvtV16VFloat16VBVFVU_TUMA.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FcvtV16VFloat16VBVFVU_TUMA -n 1 -l 7 --has-ta --has-ma -c FcvtV16VFloat16VBVFVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +uint16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {3903,7500,4235,5592,5807,1786,3702,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfcvt_f_xu_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vuint16m1_t vec_value_2_0= vle16_v_u16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfcvt_f_xu_v_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_f_xu_v_operator_0() { +uint64_t tmp[] = {65535,29822,27683,29133,28076,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_f_xu_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_f_xu_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_f_xu_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VFloat16VBVFVU_TUMU.c b/test/codegen-golden/FcvtV16VFloat16VBVFVU_TUMU.c new file mode 100644 index 0000000..933fae3 --- /dev/null +++ b/test/codegen-golden/FcvtV16VFloat16VBVFVU_TUMU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FcvtV16VFloat16VBVFVU_TUMU -n 1 -l 7 --has-ta --has-ma -c FcvtV16VFloat16VBVFVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +uint16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {3903,7500,4235,5592,5807,1786,3702,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfcvt_f_xu_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vuint16m1_t vec_value_2_0= vle16_v_u16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfcvt_f_xu_v_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_f_xu_v_operator_0() { +uint64_t tmp[] = {29258,29822,27683,29133,28076,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_f_xu_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_f_xu_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_f_xu_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VFloat16VBVFVU_m.c b/test/codegen-golden/FcvtV16VFloat16VBVFVU_m.c new file mode 100644 index 0000000..f913888 --- /dev/null +++ b/test/codegen-golden/FcvtV16VFloat16VBVFVU_m.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FcvtV16VFloat16VBVFVU_m -n 1 -l 7 --has-ta --has-ma -c FcvtV16VFloat16VBVFVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +uint16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {3903,7500,4235,5592,5807,1786,3702,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfcvt_f_xu_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vuint16m1_t vec_value_2_0= vle16_v_u16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfcvt_f_xu_v_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_f_xu_v_operator_0() { +uint64_t tmp[] = {29258,28499,27683,29133,28076,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_f_xu_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_f_xu_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_f_xu_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VFloat16VBVI_TAMA.c b/test/codegen-golden/FcvtV16VFloat16VBVI_TAMA.c new file mode 100644 index 0000000..c47f203 --- /dev/null +++ b/test/codegen-golden/FcvtV16VFloat16VBVI_TAMA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r FcvtV16VFloat16VBVI_TAMA -n 1 -l 7 --has-ta --has-ma -c FcvtV16VFloat16VBVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {-2195,5001,-1530,1184,1614,-6427,-2596,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfcvt_f_x_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfcvt_f_x_v_f16m1_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_f_x_v_operator_0() { +uint64_t tmp[] = {65535,65535,58874,65535,26190,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfcvt_f_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_f_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_f_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VFloat16VBVU_TAMA.c b/test/codegen-golden/FcvtV16VFloat16VBVU_TAMA.c new file mode 100644 index 0000000..5f906be --- /dev/null +++ b/test/codegen-golden/FcvtV16VFloat16VBVU_TAMA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r FcvtV16VFloat16VBVU_TAMA -n 1 -l 7 --has-ta --has-ma -c FcvtV16VFloat16VBVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {3903,7500,4235,5592,5807,1786,3702,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfcvt_f_xu_v_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint16m1_t vec_value_1_0= vle16_v_u16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfcvt_f_xu_v_f16m1_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_f_xu_v_operator_0() { +uint64_t tmp[] = {65535,65535,27683,65535,28076,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfcvt_f_xu_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_f_xu_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_f_xu_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VFloat16VFVI_TU.c b/test/codegen-golden/FcvtV16VFloat16VFVI_TU.c new file mode 100644 index 0000000..24f9985 --- /dev/null +++ b/test/codegen-golden/FcvtV16VFloat16VFVI_TU.c @@ -0,0 +1,83 @@ +// COMMAND: random_gen -r FcvtV16VFloat16VFVI_TU -n 1 -l 7 --has-ta --has-ma -c FcvtV16VFloat16VFVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +int16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {-2195,5001,-1530,1184,1614,-6427,-2596,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfcvt_f_x_v_operator_0() { +float16_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfcvt_f_x_v_f16m1_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_f_x_v_operator_0() { +uint64_t tmp[] = {59466,29790,58874,28721,26190,26987,59666,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfcvt_f_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_f_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_f_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VFloat16VFVU_TU.c b/test/codegen-golden/FcvtV16VFloat16VFVU_TU.c new file mode 100644 index 0000000..c9494fd --- /dev/null +++ b/test/codegen-golden/FcvtV16VFloat16VFVU_TU.c @@ -0,0 +1,83 @@ +// COMMAND: random_gen -r FcvtV16VFloat16VFVU_TU -n 1 -l 7 --has-ta --has-ma -c FcvtV16VFloat16VFVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +uint16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {3903,7500,4235,5592,5807,1786,3702,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfcvt_f_xu_v_operator_0() { +float16_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vuint16m1_t vec_value_1_0= vle16_v_u16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfcvt_f_xu_v_f16m1_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_f_xu_v_operator_0() { +uint64_t tmp[] = {27552,29790,27683,28721,28076,26987,27451,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfcvt_f_xu_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_f_xu_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_f_xu_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VFloat16VI.c b/test/codegen-golden/FcvtV16VFloat16VI.c new file mode 100644 index 0000000..987970f --- /dev/null +++ b/test/codegen-golden/FcvtV16VFloat16VI.c @@ -0,0 +1,65 @@ +// COMMAND: random_gen -r FcvtV16VFloat16VI -n 1 -l 7 --has-ta --has-ma -c FcvtV16VFloat16VI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vfcvt_f_x_v_operator_0() { +int16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vint16m1_t vec_value_0_0= vle16_v_i16m1(placeholder0, vl); + +vfloat16m1_t vec_value_1_0= vfcvt_f_x_v_f16m1(vec_value_0_0, vl); + +vse16_v_f16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfcvt_f_x_v_operator_0() { +uint64_t tmp[] = {60778,28597,27988,58761,26898,61198,60800,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfcvt_f_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_f_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfcvt_f_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VFloat16VI_TA.c b/test/codegen-golden/FcvtV16VFloat16VI_TA.c new file mode 100644 index 0000000..4a80f47 --- /dev/null +++ b/test/codegen-golden/FcvtV16VFloat16VI_TA.c @@ -0,0 +1,66 @@ +// COMMAND: random_gen -r FcvtV16VFloat16VI_TA -n 1 -l 7 --has-ta --has-ma -c FcvtV16VFloat16VI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vfcvt_f_x_v_operator_0() { +int16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m1_t vec_value_0_0= vle16_v_i16m1(placeholder0, vl); + +vfloat16m1_t vec_value_1_0= vfcvt_f_x_v_f16m1_ta(vec_value_0_0, tail_vl); + +vse16_v_f16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfcvt_f_x_v_operator_0() { +uint64_t tmp[] = {60778,65535,27988,65535,26898,65535,60800,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfcvt_f_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_f_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfcvt_f_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VFloat16VU.c b/test/codegen-golden/FcvtV16VFloat16VU.c new file mode 100644 index 0000000..f7ba3f0 --- /dev/null +++ b/test/codegen-golden/FcvtV16VFloat16VU.c @@ -0,0 +1,65 @@ +// COMMAND: random_gen -r FcvtV16VFloat16VU -n 1 -l 7 --has-ta --has-ma -c FcvtV16VFloat16VU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vfcvt_f_xu_v_operator_0() { +uint16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vuint16m1_t vec_value_0_0= vle16_v_u16m1(placeholder0, vl); + +vfloat16m1_t vec_value_1_0= vfcvt_f_xu_v_f16m1(vec_value_0_0, vl); + +vse16_v_f16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfcvt_f_xu_v_operator_0() { +uint64_t tmp[] = {26714,28766,28556,27697,28198,25963,26692,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfcvt_f_xu_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_f_xu_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfcvt_f_xu_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VFloat16VU_TA.c b/test/codegen-golden/FcvtV16VFloat16VU_TA.c new file mode 100644 index 0000000..476ce2e --- /dev/null +++ b/test/codegen-golden/FcvtV16VFloat16VU_TA.c @@ -0,0 +1,66 @@ +// COMMAND: random_gen -r FcvtV16VFloat16VU_TA -n 1 -l 7 --has-ta --has-ma -c FcvtV16VFloat16VU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vfcvt_f_xu_v_operator_0() { +uint16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m1_t vec_value_0_0= vle16_v_u16m1(placeholder0, vl); + +vfloat16m1_t vec_value_1_0= vfcvt_f_xu_v_f16m1_ta(vec_value_0_0, tail_vl); + +vse16_v_f16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfcvt_f_xu_v_operator_0() { +uint64_t tmp[] = {26714,65535,28556,65535,28198,65535,26692,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfcvt_f_xu_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_f_xu_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfcvt_f_xu_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VInt16VBVF_TAMA.c b/test/codegen-golden/FcvtV16VInt16VBVF_TAMA.c new file mode 100644 index 0000000..101df12 --- /dev/null +++ b/test/codegen-golden/FcvtV16VInt16VBVF_TAMA.c @@ -0,0 +1,79 @@ +// COMMAND: random_gen -r FcvtV16VInt16VBVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FcvtV16VInt16VBVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfcvt_x_f_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vint16m1_t vec_value_2_0= vfcvt_x_f_v_i16m1_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_i16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_x_f_v_operator_0() { +int16_t tmp[] = {-1,-1,8472,-1,11616,-1,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfcvt_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VInt16VBVIVF_TAMU.c b/test/codegen-golden/FcvtV16VInt16VBVIVF_TAMU.c new file mode 100644 index 0000000..95dcc80 --- /dev/null +++ b/test/codegen-golden/FcvtV16VInt16VBVIVF_TAMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r FcvtV16VInt16VBVIVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FcvtV16VInt16VBVIVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +float16_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfcvt_x_f_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint16m1_t vec_value_3_0= vfcvt_x_f_v_i16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_x_f_v_operator_0() { +int16_t tmp[] = {2884,-1,8472,-1,11616,-1,-734,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VInt16VBVIVF_TUMA.c b/test/codegen-golden/FcvtV16VInt16VBVIVF_TUMA.c new file mode 100644 index 0000000..1bd8b5d --- /dev/null +++ b/test/codegen-golden/FcvtV16VInt16VBVIVF_TUMA.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r FcvtV16VInt16VBVIVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FcvtV16VInt16VBVIVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +float16_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfcvt_x_f_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint16m1_t vec_value_3_0= vfcvt_x_f_v_i16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_x_f_v_operator_0() { +int16_t tmp[] = {-1,8399,8472,1879,11616,-7354,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VInt16VBVIVF_TUMU.c b/test/codegen-golden/FcvtV16VInt16VBVIVF_TUMU.c new file mode 100644 index 0000000..573dc40 --- /dev/null +++ b/test/codegen-golden/FcvtV16VInt16VBVIVF_TUMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r FcvtV16VInt16VBVIVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FcvtV16VInt16VBVIVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +float16_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfcvt_x_f_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint16m1_t vec_value_3_0= vfcvt_x_f_v_i16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_x_f_v_operator_0() { +int16_t tmp[] = {2884,8399,8472,1879,11616,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VInt16VBVIVF_m.c b/test/codegen-golden/FcvtV16VInt16VBVIVF_m.c new file mode 100644 index 0000000..80170a1 --- /dev/null +++ b/test/codegen-golden/FcvtV16VInt16VBVIVF_m.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r FcvtV16VInt16VBVIVF_m -n 1 -l 7 --has-ta --has-ma -c FcvtV16VInt16VBVIVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +float16_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfcvt_x_f_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint16m1_t vec_value_3_0= vfcvt_x_f_v_i16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_i16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_x_f_v_operator_0() { +int16_t tmp[] = {2884,15000,8472,1879,11616,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VInt16VF.c b/test/codegen-golden/FcvtV16VInt16VF.c new file mode 100644 index 0000000..3463276 --- /dev/null +++ b/test/codegen-golden/FcvtV16VInt16VF.c @@ -0,0 +1,62 @@ +// COMMAND: random_gen -r FcvtV16VInt16VF -n 1 -l 7 --has-ta --has-ma -c FcvtV16VInt16VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +int16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfcvt_x_f_v_operator_0() { +float16_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vint16m1_t vec_value_1_0= vfcvt_x_f_v_i16m1(vec_value_0_0, vl); + +vse16_v_i16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfcvt_x_f_v_operator_0() { +int16_t tmp[] = {4456,17888,15456,8584,12592,2774,4368,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfcvt_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfcvt_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VInt16VF_TA.c b/test/codegen-golden/FcvtV16VInt16VF_TA.c new file mode 100644 index 0000000..70485c1 --- /dev/null +++ b/test/codegen-golden/FcvtV16VInt16VF_TA.c @@ -0,0 +1,63 @@ +// COMMAND: random_gen -r FcvtV16VInt16VF_TA -n 1 -l 7 --has-ta --has-ma -c FcvtV16VInt16VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +int16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfcvt_x_f_v_operator_0() { +float16_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vint16m1_t vec_value_1_0= vfcvt_x_f_v_i16m1_ta(vec_value_0_0, tail_vl); + +vse16_v_i16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfcvt_x_f_v_operator_0() { +int16_t tmp[] = {4456,-1,15456,-1,12592,-1,4368,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfcvt_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfcvt_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VInt16VIVF_TU.c b/test/codegen-golden/FcvtV16VInt16VIVF_TU.c new file mode 100644 index 0000000..941e55b --- /dev/null +++ b/test/codegen-golden/FcvtV16VInt16VIVF_TU.c @@ -0,0 +1,78 @@ +// COMMAND: random_gen -r FcvtV16VInt16VIVF_TU -n 1 -l 7 --has-ta --has-ma -c FcvtV16VInt16VIVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +float16_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfcvt_x_f_v_operator_0() { +int16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m1_t vec_value_0_0= vle16_v_i16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vint16m1_t vec_value_2_0= vfcvt_x_f_v_i16m1_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_i16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_x_f_v_operator_0() { +int16_t tmp[] = {7804,7893,8472,-1417,11616,-7226,7404,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfcvt_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VUInt16VBVF_TAMA.c b/test/codegen-golden/FcvtV16VUInt16VBVF_TAMA.c new file mode 100644 index 0000000..8f716a7 --- /dev/null +++ b/test/codegen-golden/FcvtV16VUInt16VBVF_TAMA.c @@ -0,0 +1,79 @@ +// COMMAND: random_gen -r FcvtV16VUInt16VBVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FcvtV16VUInt16VBVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfcvt_xu_f_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vuint16m1_t vec_value_2_0= vfcvt_xu_f_v_u16m1_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_u16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_xu_f_v_operator_0() { +uint16_t tmp[] = {65535,65535,8472,65535,11616,65535,65535,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfcvt_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VUInt16VBVUVF_TAMU.c b/test/codegen-golden/FcvtV16VUInt16VBVUVF_TAMU.c new file mode 100644 index 0000000..ff68f49 --- /dev/null +++ b/test/codegen-golden/FcvtV16VUInt16VBVUVF_TAMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r FcvtV16VUInt16VBVUVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FcvtV16VUInt16VBVUVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +float16_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfcvt_xu_f_v_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint16m1_t vec_value_1_0= vle16_v_u16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint16m1_t vec_value_3_0= vfcvt_xu_f_v_u16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_xu_f_v_operator_0() { +uint16_t tmp[] = {6442,65535,8472,65535,11616,65535,4633,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VUInt16VBVUVF_TUMA.c b/test/codegen-golden/FcvtV16VUInt16VBVUVF_TUMA.c new file mode 100644 index 0000000..0dde686 --- /dev/null +++ b/test/codegen-golden/FcvtV16VUInt16VBVUVF_TUMA.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r FcvtV16VUInt16VBVUVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FcvtV16VUInt16VBVUVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +float16_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfcvt_xu_f_v_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint16m1_t vec_value_1_0= vle16_v_u16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint16m1_t vec_value_3_0= vfcvt_xu_f_v_u16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_xu_f_v_operator_0() { +uint16_t tmp[] = {65535,9200,8472,5940,11616,1323,65535,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VUInt16VBVUVF_TUMU.c b/test/codegen-golden/FcvtV16VUInt16VBVUVF_TUMU.c new file mode 100644 index 0000000..219ad7c --- /dev/null +++ b/test/codegen-golden/FcvtV16VUInt16VBVUVF_TUMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r FcvtV16VUInt16VBVUVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FcvtV16VUInt16VBVUVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +float16_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfcvt_xu_f_v_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint16m1_t vec_value_1_0= vle16_v_u16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint16m1_t vec_value_3_0= vfcvt_xu_f_v_u16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_xu_f_v_operator_0() { +uint16_t tmp[] = {6442,9200,8472,5940,11616,1323,4633,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VUInt16VBVUVF_m.c b/test/codegen-golden/FcvtV16VUInt16VBVUVF_m.c new file mode 100644 index 0000000..571c5b6 --- /dev/null +++ b/test/codegen-golden/FcvtV16VUInt16VBVUVF_m.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r FcvtV16VUInt16VBVUVF_m -n 1 -l 7 --has-ta --has-ma -c FcvtV16VUInt16VBVUVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +float16_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfcvt_xu_f_v_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint16m1_t vec_value_1_0= vle16_v_u16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint16m1_t vec_value_3_0= vfcvt_xu_f_v_u16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_u16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_xu_f_v_operator_0() { +uint16_t tmp[] = {6442,15000,8472,5940,11616,1323,4633,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VUInt16VF.c b/test/codegen-golden/FcvtV16VUInt16VF.c new file mode 100644 index 0000000..e065ea7 --- /dev/null +++ b/test/codegen-golden/FcvtV16VUInt16VF.c @@ -0,0 +1,62 @@ +// COMMAND: random_gen -r FcvtV16VUInt16VF -n 1 -l 7 --has-ta --has-ma -c FcvtV16VUInt16VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +uint16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfcvt_xu_f_v_operator_0() { +float16_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vuint16m1_t vec_value_1_0= vfcvt_xu_f_v_u16m1(vec_value_0_0, vl); + +vse16_v_u16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfcvt_xu_f_v_operator_0() { +uint16_t tmp[] = {4456,17888,15456,8584,12592,2774,4368,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfcvt_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfcvt_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VUInt16VF_TA.c b/test/codegen-golden/FcvtV16VUInt16VF_TA.c new file mode 100644 index 0000000..302c5d1 --- /dev/null +++ b/test/codegen-golden/FcvtV16VUInt16VF_TA.c @@ -0,0 +1,63 @@ +// COMMAND: random_gen -r FcvtV16VUInt16VF_TA -n 1 -l 7 --has-ta --has-ma -c FcvtV16VUInt16VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +uint16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfcvt_xu_f_v_operator_0() { +float16_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vuint16m1_t vec_value_1_0= vfcvt_xu_f_v_u16m1_ta(vec_value_0_0, tail_vl); + +vse16_v_u16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfcvt_xu_f_v_operator_0() { +uint16_t tmp[] = {4456,65535,15456,65535,12592,65535,4368,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfcvt_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfcvt_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FcvtV16VUInt16VUVF_TU.c b/test/codegen-golden/FcvtV16VUInt16VUVF_TU.c new file mode 100644 index 0000000..2888b40 --- /dev/null +++ b/test/codegen-golden/FcvtV16VUInt16VUVF_TU.c @@ -0,0 +1,78 @@ +// COMMAND: random_gen -r FcvtV16VUInt16VUVF_TU -n 1 -l 7 --has-ta --has-ma -c FcvtV16VUInt16VUVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +float16_t value_1[7]; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfcvt_xu_f_v_operator_0() { +uint16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m1_t vec_value_0_0= vle16_v_u16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vuint16m1_t vec_value_2_0= vfcvt_xu_f_v_u16m1_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_u16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_xu_f_v_operator_0() { +uint16_t tmp[] = {7804,8946,8472,4291,11616,1387,7404,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfcvt_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fcvt_rtzV16VInt16VBVF_TAMA.c b/test/codegen-golden/Fcvt_rtzV16VInt16VBVF_TAMA.c new file mode 100644 index 0000000..4581dde --- /dev/null +++ b/test/codegen-golden/Fcvt_rtzV16VInt16VBVF_TAMA.c @@ -0,0 +1,79 @@ +// COMMAND: random_gen -r Fcvt_rtzV16VInt16VBVF_TAMA -n 1 -l 7 --has-ta --has-ma -c Fcvt_rtzV16VInt16VBVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfcvt_rtz_x_f_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vint16m1_t vec_value_2_0= vfcvt_rtz_x_f_v_i16m1_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_i16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_rtz_x_f_v_operator_0() { +int16_t tmp[] = {-1,-1,8472,-1,11616,-1,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfcvt_rtz_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_rtz_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_rtz_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fcvt_rtzV16VInt16VBVIVF_TAMU.c b/test/codegen-golden/Fcvt_rtzV16VInt16VBVIVF_TAMU.c new file mode 100644 index 0000000..6403757 --- /dev/null +++ b/test/codegen-golden/Fcvt_rtzV16VInt16VBVIVF_TAMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r Fcvt_rtzV16VInt16VBVIVF_TAMU -n 1 -l 7 --has-ta --has-ma -c Fcvt_rtzV16VInt16VBVIVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +float16_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfcvt_rtz_x_f_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint16m1_t vec_value_3_0= vfcvt_rtz_x_f_v_i16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_rtz_x_f_v_operator_0() { +int16_t tmp[] = {2884,-1,8472,-1,11616,-1,-734,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_rtz_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_rtz_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_rtz_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fcvt_rtzV16VInt16VBVIVF_TUMA.c b/test/codegen-golden/Fcvt_rtzV16VInt16VBVIVF_TUMA.c new file mode 100644 index 0000000..3ed3415 --- /dev/null +++ b/test/codegen-golden/Fcvt_rtzV16VInt16VBVIVF_TUMA.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r Fcvt_rtzV16VInt16VBVIVF_TUMA -n 1 -l 7 --has-ta --has-ma -c Fcvt_rtzV16VInt16VBVIVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +float16_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfcvt_rtz_x_f_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint16m1_t vec_value_3_0= vfcvt_rtz_x_f_v_i16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_rtz_x_f_v_operator_0() { +int16_t tmp[] = {-1,8399,8472,1879,11616,-7354,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_rtz_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_rtz_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_rtz_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fcvt_rtzV16VInt16VBVIVF_TUMU.c b/test/codegen-golden/Fcvt_rtzV16VInt16VBVIVF_TUMU.c new file mode 100644 index 0000000..915ce4e --- /dev/null +++ b/test/codegen-golden/Fcvt_rtzV16VInt16VBVIVF_TUMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r Fcvt_rtzV16VInt16VBVIVF_TUMU -n 1 -l 7 --has-ta --has-ma -c Fcvt_rtzV16VInt16VBVIVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +float16_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfcvt_rtz_x_f_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint16m1_t vec_value_3_0= vfcvt_rtz_x_f_v_i16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_rtz_x_f_v_operator_0() { +int16_t tmp[] = {2884,8399,8472,1879,11616,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_rtz_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_rtz_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_rtz_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fcvt_rtzV16VInt16VBVIVF_m.c b/test/codegen-golden/Fcvt_rtzV16VInt16VBVIVF_m.c new file mode 100644 index 0000000..0043979 --- /dev/null +++ b/test/codegen-golden/Fcvt_rtzV16VInt16VBVIVF_m.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r Fcvt_rtzV16VInt16VBVIVF_m -n 1 -l 7 --has-ta --has-ma -c Fcvt_rtzV16VInt16VBVIVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +float16_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfcvt_rtz_x_f_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint16m1_t vec_value_3_0= vfcvt_rtz_x_f_v_i16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_i16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_rtz_x_f_v_operator_0() { +int16_t tmp[] = {2884,15000,8472,1879,11616,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_rtz_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_rtz_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_rtz_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fcvt_rtzV16VInt16VF.c b/test/codegen-golden/Fcvt_rtzV16VInt16VF.c new file mode 100644 index 0000000..840ead2 --- /dev/null +++ b/test/codegen-golden/Fcvt_rtzV16VInt16VF.c @@ -0,0 +1,62 @@ +// COMMAND: random_gen -r Fcvt_rtzV16VInt16VF -n 1 -l 7 --has-ta --has-ma -c Fcvt_rtzV16VInt16VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +int16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfcvt_rtz_x_f_v_operator_0() { +float16_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vint16m1_t vec_value_1_0= vfcvt_rtz_x_f_v_i16m1(vec_value_0_0, vl); + +vse16_v_i16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfcvt_rtz_x_f_v_operator_0() { +int16_t tmp[] = {4456,17888,15456,8584,12592,2774,4368,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfcvt_rtz_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_rtz_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfcvt_rtz_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fcvt_rtzV16VInt16VF_TA.c b/test/codegen-golden/Fcvt_rtzV16VInt16VF_TA.c new file mode 100644 index 0000000..a147168 --- /dev/null +++ b/test/codegen-golden/Fcvt_rtzV16VInt16VF_TA.c @@ -0,0 +1,63 @@ +// COMMAND: random_gen -r Fcvt_rtzV16VInt16VF_TA -n 1 -l 7 --has-ta --has-ma -c Fcvt_rtzV16VInt16VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +int16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfcvt_rtz_x_f_v_operator_0() { +float16_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vint16m1_t vec_value_1_0= vfcvt_rtz_x_f_v_i16m1_ta(vec_value_0_0, tail_vl); + +vse16_v_i16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfcvt_rtz_x_f_v_operator_0() { +int16_t tmp[] = {4456,-1,15456,-1,12592,-1,4368,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfcvt_rtz_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_rtz_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfcvt_rtz_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fcvt_rtzV16VInt16VIVF_TU.c b/test/codegen-golden/Fcvt_rtzV16VInt16VIVF_TU.c new file mode 100644 index 0000000..6bfad11 --- /dev/null +++ b/test/codegen-golden/Fcvt_rtzV16VInt16VIVF_TU.c @@ -0,0 +1,78 @@ +// COMMAND: random_gen -r Fcvt_rtzV16VInt16VIVF_TU -n 1 -l 7 --has-ta --has-ma -c Fcvt_rtzV16VInt16VIVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +float16_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfcvt_rtz_x_f_v_operator_0() { +int16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m1_t vec_value_0_0= vle16_v_i16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vint16m1_t vec_value_2_0= vfcvt_rtz_x_f_v_i16m1_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_i16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_rtz_x_f_v_operator_0() { +int16_t tmp[] = {7804,7893,8472,-1417,11616,-7226,7404,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfcvt_rtz_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_rtz_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_rtz_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fcvt_rtzV16VUInt16VBVF_TAMA.c b/test/codegen-golden/Fcvt_rtzV16VUInt16VBVF_TAMA.c new file mode 100644 index 0000000..ddcc413 --- /dev/null +++ b/test/codegen-golden/Fcvt_rtzV16VUInt16VBVF_TAMA.c @@ -0,0 +1,79 @@ +// COMMAND: random_gen -r Fcvt_rtzV16VUInt16VBVF_TAMA -n 1 -l 7 --has-ta --has-ma -c Fcvt_rtzV16VUInt16VBVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfcvt_rtz_xu_f_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vuint16m1_t vec_value_2_0= vfcvt_rtz_xu_f_v_u16m1_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_u16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_rtz_xu_f_v_operator_0() { +uint16_t tmp[] = {65535,65535,8472,65535,11616,65535,65535,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfcvt_rtz_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_rtz_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_rtz_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fcvt_rtzV16VUInt16VBVUVF_TAMU.c b/test/codegen-golden/Fcvt_rtzV16VUInt16VBVUVF_TAMU.c new file mode 100644 index 0000000..6f14033 --- /dev/null +++ b/test/codegen-golden/Fcvt_rtzV16VUInt16VBVUVF_TAMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r Fcvt_rtzV16VUInt16VBVUVF_TAMU -n 1 -l 7 --has-ta --has-ma -c Fcvt_rtzV16VUInt16VBVUVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +float16_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfcvt_rtz_xu_f_v_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint16m1_t vec_value_1_0= vle16_v_u16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint16m1_t vec_value_3_0= vfcvt_rtz_xu_f_v_u16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_rtz_xu_f_v_operator_0() { +uint16_t tmp[] = {6442,65535,8472,65535,11616,65535,4633,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_rtz_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_rtz_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_rtz_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fcvt_rtzV16VUInt16VBVUVF_TUMA.c b/test/codegen-golden/Fcvt_rtzV16VUInt16VBVUVF_TUMA.c new file mode 100644 index 0000000..3ff6232 --- /dev/null +++ b/test/codegen-golden/Fcvt_rtzV16VUInt16VBVUVF_TUMA.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r Fcvt_rtzV16VUInt16VBVUVF_TUMA -n 1 -l 7 --has-ta --has-ma -c Fcvt_rtzV16VUInt16VBVUVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +float16_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfcvt_rtz_xu_f_v_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint16m1_t vec_value_1_0= vle16_v_u16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint16m1_t vec_value_3_0= vfcvt_rtz_xu_f_v_u16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_rtz_xu_f_v_operator_0() { +uint16_t tmp[] = {65535,9200,8472,5940,11616,1323,65535,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_rtz_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_rtz_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_rtz_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fcvt_rtzV16VUInt16VBVUVF_TUMU.c b/test/codegen-golden/Fcvt_rtzV16VUInt16VBVUVF_TUMU.c new file mode 100644 index 0000000..61e6a2d --- /dev/null +++ b/test/codegen-golden/Fcvt_rtzV16VUInt16VBVUVF_TUMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r Fcvt_rtzV16VUInt16VBVUVF_TUMU -n 1 -l 7 --has-ta --has-ma -c Fcvt_rtzV16VUInt16VBVUVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +float16_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfcvt_rtz_xu_f_v_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint16m1_t vec_value_1_0= vle16_v_u16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint16m1_t vec_value_3_0= vfcvt_rtz_xu_f_v_u16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_rtz_xu_f_v_operator_0() { +uint16_t tmp[] = {6442,9200,8472,5940,11616,1323,4633,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_rtz_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_rtz_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_rtz_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fcvt_rtzV16VUInt16VBVUVF_m.c b/test/codegen-golden/Fcvt_rtzV16VUInt16VBVUVF_m.c new file mode 100644 index 0000000..c1ad31c --- /dev/null +++ b/test/codegen-golden/Fcvt_rtzV16VUInt16VBVUVF_m.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r Fcvt_rtzV16VUInt16VBVUVF_m -n 1 -l 7 --has-ta --has-ma -c Fcvt_rtzV16VUInt16VBVUVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +float16_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfcvt_rtz_xu_f_v_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint16m1_t vec_value_1_0= vle16_v_u16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint16m1_t vec_value_3_0= vfcvt_rtz_xu_f_v_u16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_u16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_rtz_xu_f_v_operator_0() { +uint16_t tmp[] = {6442,15000,8472,5940,11616,1323,4633,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfcvt_rtz_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_rtz_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_rtz_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fcvt_rtzV16VUInt16VF.c b/test/codegen-golden/Fcvt_rtzV16VUInt16VF.c new file mode 100644 index 0000000..6f820c6 --- /dev/null +++ b/test/codegen-golden/Fcvt_rtzV16VUInt16VF.c @@ -0,0 +1,62 @@ +// COMMAND: random_gen -r Fcvt_rtzV16VUInt16VF -n 1 -l 7 --has-ta --has-ma -c Fcvt_rtzV16VUInt16VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +uint16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfcvt_rtz_xu_f_v_operator_0() { +float16_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vuint16m1_t vec_value_1_0= vfcvt_rtz_xu_f_v_u16m1(vec_value_0_0, vl); + +vse16_v_u16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfcvt_rtz_xu_f_v_operator_0() { +uint16_t tmp[] = {4456,17888,15456,8584,12592,2774,4368,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfcvt_rtz_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_rtz_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfcvt_rtz_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fcvt_rtzV16VUInt16VF_TA.c b/test/codegen-golden/Fcvt_rtzV16VUInt16VF_TA.c new file mode 100644 index 0000000..c45facf --- /dev/null +++ b/test/codegen-golden/Fcvt_rtzV16VUInt16VF_TA.c @@ -0,0 +1,63 @@ +// COMMAND: random_gen -r Fcvt_rtzV16VUInt16VF_TA -n 1 -l 7 --has-ta --has-ma -c Fcvt_rtzV16VUInt16VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +uint16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfcvt_rtz_xu_f_v_operator_0() { +float16_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vuint16m1_t vec_value_1_0= vfcvt_rtz_xu_f_v_u16m1_ta(vec_value_0_0, tail_vl); + +vse16_v_u16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfcvt_rtz_xu_f_v_operator_0() { +uint16_t tmp[] = {4456,65535,15456,65535,12592,65535,4368,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfcvt_rtz_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_rtz_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfcvt_rtz_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fcvt_rtzV16VUInt16VUVF_TU.c b/test/codegen-golden/Fcvt_rtzV16VUInt16VUVF_TU.c new file mode 100644 index 0000000..6092e1d --- /dev/null +++ b/test/codegen-golden/Fcvt_rtzV16VUInt16VUVF_TU.c @@ -0,0 +1,78 @@ +// COMMAND: random_gen -r Fcvt_rtzV16VUInt16VUVF_TU -n 1 -l 7 --has-ta --has-ma -c Fcvt_rtzV16VUInt16VUVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +float16_t value_1[7]; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfcvt_rtz_xu_f_v_operator_0() { +uint16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m1_t vec_value_0_0= vle16_v_u16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vuint16m1_t vec_value_2_0= vfcvt_rtz_xu_f_v_u16m1_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_u16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfcvt_rtz_xu_f_v_operator_0() { +uint16_t tmp[] = {7804,8946,8472,4291,11616,1387,7404,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfcvt_rtz_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfcvt_rtz_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfcvt_rtz_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FdivVF16VFloat16VBVFSF_TAMA.c b/test/codegen-golden/FdivVF16VFloat16VBVFSF_TAMA.c new file mode 100644 index 0000000..64af763 --- /dev/null +++ b/test/codegen-golden/FdivVF16VFloat16VBVFSF_TAMA.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FdivVF16VFloat16VBVFSF_TAMA -n 1 -l 7 --has-ta --has-ma -c FdivVF16VFloat16VBVFSF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfdiv_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfdiv_vf_f16m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfdiv_vf_operator_0() { +uint64_t tmp[] = {65535,65535,15804,65535,14163,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfdiv_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfdiv_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfdiv_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FdivVF16VFloat16VBVFVFSF_TAMU.c b/test/codegen-golden/FdivVF16VFloat16VBVFVFSF_TAMU.c new file mode 100644 index 0000000..66746c1 --- /dev/null +++ b/test/codegen-golden/FdivVF16VFloat16VBVFVFSF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FdivVF16VFloat16VBVFVFSF_TAMU -n 1 -l 7 --has-ta --has-ma -c FdivVF16VFloat16VBVFVFSF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfdiv_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfdiv_vf_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfdiv_vf_operator_0() { +uint64_t tmp[] = {29523,65535,15895,65535,13677,65535,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfdiv_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfdiv_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfdiv_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FdivVF16VFloat16VBVFVFSF_TUMA.c b/test/codegen-golden/FdivVF16VFloat16VBVFVFSF_TUMA.c new file mode 100644 index 0000000..9e7e581 --- /dev/null +++ b/test/codegen-golden/FdivVF16VFloat16VBVFVFSF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FdivVF16VFloat16VBVFVFSF_TUMA -n 1 -l 7 --has-ta --has-ma -c FdivVF16VFloat16VBVFVFSF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfdiv_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfdiv_vf_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfdiv_vf_operator_0() { +uint64_t tmp[] = {65535,28707,15895,29100,13677,28475,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfdiv_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfdiv_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfdiv_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FdivVF16VFloat16VBVFVFSF_TUMU.c b/test/codegen-golden/FdivVF16VFloat16VBVFVFSF_TUMU.c new file mode 100644 index 0000000..a2bbd97 --- /dev/null +++ b/test/codegen-golden/FdivVF16VFloat16VBVFVFSF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FdivVF16VFloat16VBVFVFSF_TUMU -n 1 -l 7 --has-ta --has-ma -c FdivVF16VFloat16VBVFVFSF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfdiv_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfdiv_vf_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfdiv_vf_operator_0() { +uint64_t tmp[] = {29523,28707,15895,29100,13677,28475,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfdiv_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfdiv_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfdiv_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FdivVF16VFloat16VBVFVFSF_m.c b/test/codegen-golden/FdivVF16VFloat16VBVFVFSF_m.c new file mode 100644 index 0000000..5b1e18f --- /dev/null +++ b/test/codegen-golden/FdivVF16VFloat16VBVFVFSF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FdivVF16VFloat16VBVFVFSF_m -n 1 -l 7 --has-ta --has-ma -c FdivVF16VFloat16VBVFVFSF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfdiv_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfdiv_vf_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfdiv_vf_operator_0() { +uint64_t tmp[] = {29523,15905,15895,29100,13677,28475,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfdiv_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfdiv_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfdiv_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FdivVF16VFloat16VFSF.c b/test/codegen-golden/FdivVF16VFloat16VFSF.c new file mode 100644 index 0000000..35799cd --- /dev/null +++ b/test/codegen-golden/FdivVF16VFloat16VFSF.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r FdivVF16VFloat16VFSF -n 1 -l 7 --has-ta --has-ma -c FdivVF16VFloat16VFSF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfdiv_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_2_0= vfdiv_vf_f16m1(vec_value_0_0, placeholder1, vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfdiv_vf_operator_0() { +uint64_t tmp[] = {14481,16534,16364,15462,15988,13744,14458,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfdiv_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfdiv_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfdiv_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FdivVF16VFloat16VFSF_TA.c b/test/codegen-golden/FdivVF16VFloat16VFSF_TA.c new file mode 100644 index 0000000..40a3879 --- /dev/null +++ b/test/codegen-golden/FdivVF16VFloat16VFSF_TA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r FdivVF16VFloat16VFSF_TA -n 1 -l 7 --has-ta --has-ma -c FdivVF16VFloat16VFSF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfdiv_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_2_0= vfdiv_vf_f16m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfdiv_vf_operator_0() { +uint64_t tmp[] = {14481,65535,16364,65535,15988,65535,14458,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfdiv_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfdiv_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfdiv_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FdivVF16VFloat16VFVFSF_TU.c b/test/codegen-golden/FdivVF16VFloat16VFVFSF_TU.c new file mode 100644 index 0000000..4015ece --- /dev/null +++ b/test/codegen-golden/FdivVF16VFloat16VFVFSF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FdivVF16VFloat16VFVFSF_TU -n 1 -l 7 --has-ta --has-ma -c FdivVF16VFloat16VFVFSF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfdiv_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfdiv_vf_f16m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfdiv_vf_operator_0() { +uint64_t tmp[] = {16304,29790,15804,28721,14163,26987,16026,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfdiv_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfdiv_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfdiv_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FdivVV16VFloat16VBVFVFVF_TAMU.c b/test/codegen-golden/FdivVV16VFloat16VBVFVFVF_TAMU.c new file mode 100644 index 0000000..13baff7 --- /dev/null +++ b/test/codegen-golden/FdivVV16VFloat16VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FdivVV16VFloat16VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FdivVV16VFloat16VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfdiv_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfdiv_vv_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfdiv_vv_operator_0() { +uint64_t tmp[] = {29258,65535,16014,65535,14395,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfdiv_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfdiv_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfdiv_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FdivVV16VFloat16VBVFVFVF_TUMA.c b/test/codegen-golden/FdivVV16VFloat16VBVFVFVF_TUMA.c new file mode 100644 index 0000000..d632f3d --- /dev/null +++ b/test/codegen-golden/FdivVV16VFloat16VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FdivVV16VFloat16VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FdivVV16VFloat16VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfdiv_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfdiv_vv_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfdiv_vv_operator_0() { +uint64_t tmp[] = {65535,29822,16014,29133,14395,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfdiv_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfdiv_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfdiv_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FdivVV16VFloat16VBVFVFVF_TUMU.c b/test/codegen-golden/FdivVV16VFloat16VBVFVFVF_TUMU.c new file mode 100644 index 0000000..fad8b7d --- /dev/null +++ b/test/codegen-golden/FdivVV16VFloat16VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FdivVV16VFloat16VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FdivVV16VFloat16VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfdiv_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfdiv_vv_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfdiv_vv_operator_0() { +uint64_t tmp[] = {29258,29822,16014,29133,14395,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfdiv_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfdiv_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfdiv_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FdivVV16VFloat16VBVFVFVF_m.c b/test/codegen-golden/FdivVV16VFloat16VBVFVFVF_m.c new file mode 100644 index 0000000..abbce1b --- /dev/null +++ b/test/codegen-golden/FdivVV16VFloat16VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FdivVV16VFloat16VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FdivVV16VFloat16VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfdiv_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfdiv_vv_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfdiv_vv_operator_0() { +uint64_t tmp[] = {29258,14245,16014,29133,14395,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfdiv_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfdiv_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfdiv_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FdivVV16VFloat16VBVFVF_TAMA.c b/test/codegen-golden/FdivVV16VFloat16VBVFVF_TAMA.c new file mode 100644 index 0000000..e75663b --- /dev/null +++ b/test/codegen-golden/FdivVV16VFloat16VBVFVF_TAMA.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FdivVV16VFloat16VBVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FdivVV16VFloat16VBVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfdiv_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfdiv_vv_f16m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfdiv_vv_operator_0() { +uint64_t tmp[] = {65535,65535,15782,65535,15421,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfdiv_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfdiv_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfdiv_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FdivVV16VFloat16VFVF.c b/test/codegen-golden/FdivVV16VFloat16VFVF.c new file mode 100644 index 0000000..a7db0d8 --- /dev/null +++ b/test/codegen-golden/FdivVV16VFloat16VFVF.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r FdivVV16VFloat16VFVF -n 1 -l 7 --has-ta --has-ma -c FdivVV16VFloat16VFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfdiv_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfdiv_vv_f16m1(vec_value_0_0, vec_value_1_0, vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfdiv_vv_operator_0() { +uint64_t tmp[] = {14481,15557,16204,14884,15446,14902,14520,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfdiv_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfdiv_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfdiv_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FdivVV16VFloat16VFVFVF_TU.c b/test/codegen-golden/FdivVV16VFloat16VFVFVF_TU.c new file mode 100644 index 0000000..72b0fb1 --- /dev/null +++ b/test/codegen-golden/FdivVV16VFloat16VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FdivVV16VFloat16VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FdivVV16VFloat16VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfdiv_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfdiv_vv_f16m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfdiv_vv_operator_0() { +uint64_t tmp[] = {16026,29790,15782,28721,15421,26987,15617,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfdiv_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfdiv_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfdiv_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FdivVV16VFloat16VFVF_TA.c b/test/codegen-golden/FdivVV16VFloat16VFVF_TA.c new file mode 100644 index 0000000..ddeb827 --- /dev/null +++ b/test/codegen-golden/FdivVV16VFloat16VFVF_TA.c @@ -0,0 +1,85 @@ +// COMMAND: random_gen -r FdivVV16VFloat16VFVF_TA -n 1 -l 7 --has-ta --has-ma -c FdivVV16VFloat16VFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfdiv_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfdiv_vv_f16m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfdiv_vv_operator_0() { +uint64_t tmp[] = {14481,65535,16204,65535,15446,65535,14520,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfdiv_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfdiv_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfdiv_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FirstMSInt32VB.c b/test/codegen-golden/FirstMSInt32VB.c new file mode 100644 index 0000000..681fa51 --- /dev/null +++ b/test/codegen-golden/FirstMSInt32VB.c @@ -0,0 +1,59 @@ +// COMMAND: random_gen -r FirstMSInt32VB -n 1 -l 7 --has-ta --has-ma -c FirstMSInt32VB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vfirst_m_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = &value_1; +int placeholder2 = 7; + +int32_t placeholder3 = -1; +uint32_t placeholder4 = 0; +for (size_t vl = 0; placeholder3 == -1 && placeholder2 > 0; placeholder2 -= vl) { +placeholder4 += vl; +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +placeholder3 = vfirst_m_b8(mask_value_0_0, vl); +placeholder0 += vl; +} +if (placeholder3 != -1) placeholder3 += placeholder4; +*placeholder1 = placeholder3; +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfirst_m_operator_0() { +int32_t tmp = 1; +if(value_1 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfirst_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfirst_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfirst_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FirstMSInt32VBVB_m.c b/test/codegen-golden/FirstMSInt32VBVB_m.c new file mode 100644 index 0000000..8e09046 --- /dev/null +++ b/test/codegen-golden/FirstMSInt32VBVB_m.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r FirstMSInt32VBVB_m -n 1 -l 7 --has-ta --has-ma -c FirstMSInt32VBVB_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int32_t value_2; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfirst_m_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int32_t *placeholder2 = &value_2; +int placeholder3 = 7; + +int32_t placeholder4 = -1; +uint32_t placeholder5 = 0; +for (size_t vl = 0; placeholder4 == -1 && placeholder3 > 0; placeholder3 -= vl) { +placeholder5 += vl; +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +placeholder4 = vfirst_m_b8_m (mask_value_0_0, mask_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +} +if (placeholder4 != -1) placeholder4 += placeholder5; +*placeholder2 = placeholder4; +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfirst_m_operator_0() { +int32_t tmp = 1; +if(value_2 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfirst_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfirst_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfirst_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaccVF16VFloat16VBVFSFVF_TAMA.c b/test/codegen-golden/FmaccVF16VFloat16VBVFSFVF_TAMA.c new file mode 100644 index 0000000..dab4e21 --- /dev/null +++ b/test/codegen-golden/FmaccVF16VFloat16VBVFSFVF_TAMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FmaccVF16VFloat16VBVFSFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FmaccVF16VFloat16VBVFSFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfmacc_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmacc_vf_f16m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmacc_vf_operator_0() { +uint64_t tmp[] = {65535,65535,31744,65535,31744,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaccVF16VFloat16VBVFSFVF_TAMU.c b/test/codegen-golden/FmaccVF16VFloat16VBVFSFVF_TAMU.c new file mode 100644 index 0000000..7c35a02 --- /dev/null +++ b/test/codegen-golden/FmaccVF16VFloat16VBVFSFVF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FmaccVF16VFloat16VBVFSFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FmaccVF16VFloat16VBVFSFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfmacc_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmacc_vf_f16m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmacc_vf_operator_0() { +uint64_t tmp[] = {29258,65535,31744,65535,31744,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaccVF16VFloat16VBVFSFVF_TUMA.c b/test/codegen-golden/FmaccVF16VFloat16VBVFSFVF_TUMA.c new file mode 100644 index 0000000..94e90bb --- /dev/null +++ b/test/codegen-golden/FmaccVF16VFloat16VBVFSFVF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FmaccVF16VFloat16VBVFSFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FmaccVF16VFloat16VBVFSFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfmacc_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmacc_vf_f16m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmacc_vf_operator_0() { +uint64_t tmp[] = {65535,29822,31744,29133,31744,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaccVF16VFloat16VBVFSFVF_TUMU.c b/test/codegen-golden/FmaccVF16VFloat16VBVFSFVF_TUMU.c new file mode 100644 index 0000000..c0b3772 --- /dev/null +++ b/test/codegen-golden/FmaccVF16VFloat16VBVFSFVF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FmaccVF16VFloat16VBVFSFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FmaccVF16VFloat16VBVFSFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfmacc_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmacc_vf_f16m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmacc_vf_operator_0() { +uint64_t tmp[] = {29258,29822,31744,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaccVF16VFloat16VBVFSFVF_m.c b/test/codegen-golden/FmaccVF16VFloat16VBVFSFVF_m.c new file mode 100644 index 0000000..1e8db37 --- /dev/null +++ b/test/codegen-golden/FmaccVF16VFloat16VBVFSFVF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FmaccVF16VFloat16VBVFSFVF_m -n 1 -l 7 --has-ta --has-ma -c FmaccVF16VFloat16VBVFSFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfmacc_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmacc_vf_f16m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmacc_vf_operator_0() { +uint64_t tmp[] = {29258,31744,31744,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaccVF16VFloat16VFSFVF.c b/test/codegen-golden/FmaccVF16VFloat16VFSFVF.c new file mode 100644 index 0000000..c198846 --- /dev/null +++ b/test/codegen-golden/FmaccVF16VFloat16VFSFVF.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FmaccVF16VFloat16VFSFVF -n 1 -l 7 --has-ta --has-ma -c FmaccVF16VFloat16VFSFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfmacc_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmacc_vf_f16m1(vec_value_0_0, placeholder1, vec_value_2_0, vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmacc_vf_operator_0() { +uint64_t tmp[] = {31744,31744,31744,31744,31744,31744,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaccVF16VFloat16VFSFVF_TA.c b/test/codegen-golden/FmaccVF16VFloat16VFSFVF_TA.c new file mode 100644 index 0000000..bcf8f97 --- /dev/null +++ b/test/codegen-golden/FmaccVF16VFloat16VFSFVF_TA.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FmaccVF16VFloat16VFSFVF_TA -n 1 -l 7 --has-ta --has-ma -c FmaccVF16VFloat16VFSFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfmacc_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmacc_vf_f16m1_ta(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmacc_vf_operator_0() { +uint64_t tmp[] = {31744,65535,31744,65535,31744,65535,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaccVF16VFloat16VFSFVF_TU.c b/test/codegen-golden/FmaccVF16VFloat16VFSFVF_TU.c new file mode 100644 index 0000000..69bc8bc --- /dev/null +++ b/test/codegen-golden/FmaccVF16VFloat16VFSFVF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FmaccVF16VFloat16VFSFVF_TU -n 1 -l 7 --has-ta --has-ma -c FmaccVF16VFloat16VFSFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfmacc_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmacc_vf_f16m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmacc_vf_operator_0() { +uint64_t tmp[] = {31744,29790,31744,28721,31744,26987,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaccVV16VFloat16VBVFVFVF_TAMA.c b/test/codegen-golden/FmaccVV16VFloat16VBVFVFVF_TAMA.c new file mode 100644 index 0000000..16d8ea8 --- /dev/null +++ b/test/codegen-golden/FmaccVV16VFloat16VBVFVFVF_TAMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FmaccVV16VFloat16VBVFVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FmaccVV16VFloat16VBVFVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmacc_vv_f16m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmacc_vv_operator_0() { +uint64_t tmp[] = {65535,65535,31744,65535,31744,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaccVV16VFloat16VBVFVFVF_TAMU.c b/test/codegen-golden/FmaccVV16VFloat16VBVFVFVF_TAMU.c new file mode 100644 index 0000000..c8e2af7 --- /dev/null +++ b/test/codegen-golden/FmaccVV16VFloat16VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FmaccVV16VFloat16VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FmaccVV16VFloat16VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmacc_vv_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmacc_vv_operator_0() { +uint64_t tmp[] = {29258,65535,31744,65535,31744,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaccVV16VFloat16VBVFVFVF_TUMA.c b/test/codegen-golden/FmaccVV16VFloat16VBVFVFVF_TUMA.c new file mode 100644 index 0000000..002ec4a --- /dev/null +++ b/test/codegen-golden/FmaccVV16VFloat16VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FmaccVV16VFloat16VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FmaccVV16VFloat16VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmacc_vv_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmacc_vv_operator_0() { +uint64_t tmp[] = {65535,29822,31744,29133,31744,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaccVV16VFloat16VBVFVFVF_TUMU.c b/test/codegen-golden/FmaccVV16VFloat16VBVFVFVF_TUMU.c new file mode 100644 index 0000000..46b2ac8 --- /dev/null +++ b/test/codegen-golden/FmaccVV16VFloat16VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FmaccVV16VFloat16VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FmaccVV16VFloat16VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmacc_vv_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmacc_vv_operator_0() { +uint64_t tmp[] = {29258,29822,31744,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaccVV16VFloat16VBVFVFVF_m.c b/test/codegen-golden/FmaccVV16VFloat16VBVFVFVF_m.c new file mode 100644 index 0000000..665864b --- /dev/null +++ b/test/codegen-golden/FmaccVV16VFloat16VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FmaccVV16VFloat16VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FmaccVV16VFloat16VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmacc_vv_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmacc_vv_operator_0() { +uint64_t tmp[] = {29258,31744,31744,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaccVV16VFloat16VFVFVF.c b/test/codegen-golden/FmaccVV16VFloat16VFVFVF.c new file mode 100644 index 0000000..bcf99b1 --- /dev/null +++ b/test/codegen-golden/FmaccVV16VFloat16VFVFVF.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FmaccVV16VFloat16VFVFVF -n 1 -l 7 --has-ta --has-ma -c FmaccVV16VFloat16VFVFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmacc_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmacc_vv_f16m1(vec_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmacc_vv_operator_0() { +uint64_t tmp[] = {31744,31744,31744,31744,31744,31744,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaccVV16VFloat16VFVFVF_TA.c b/test/codegen-golden/FmaccVV16VFloat16VFVFVF_TA.c new file mode 100644 index 0000000..80385cc --- /dev/null +++ b/test/codegen-golden/FmaccVV16VFloat16VFVFVF_TA.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FmaccVV16VFloat16VFVFVF_TA -n 1 -l 7 --has-ta --has-ma -c FmaccVV16VFloat16VFVFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmacc_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmacc_vv_f16m1_ta(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmacc_vv_operator_0() { +uint64_t tmp[] = {31744,65535,31744,65535,31744,65535,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaccVV16VFloat16VFVFVF_TU.c b/test/codegen-golden/FmaccVV16VFloat16VFVFVF_TU.c new file mode 100644 index 0000000..72abfd5 --- /dev/null +++ b/test/codegen-golden/FmaccVV16VFloat16VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FmaccVV16VFloat16VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FmaccVV16VFloat16VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmacc_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmacc_vv_f16m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmacc_vv_operator_0() { +uint64_t tmp[] = {31744,29790,31744,28721,31744,26987,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaddVF16VFloat16VBVFSFVF_TAMA.c b/test/codegen-golden/FmaddVF16VFloat16VBVFSFVF_TAMA.c new file mode 100644 index 0000000..5c5e3c0 --- /dev/null +++ b/test/codegen-golden/FmaddVF16VFloat16VBVFSFVF_TAMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FmaddVF16VFloat16VBVFSFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FmaddVF16VFloat16VBVFSFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfmadd_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmadd_vf_f16m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmadd_vf_operator_0() { +uint64_t tmp[] = {65535,65535,31744,65535,31744,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaddVF16VFloat16VBVFSFVF_TAMU.c b/test/codegen-golden/FmaddVF16VFloat16VBVFSFVF_TAMU.c new file mode 100644 index 0000000..cde84e9 --- /dev/null +++ b/test/codegen-golden/FmaddVF16VFloat16VBVFSFVF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FmaddVF16VFloat16VBVFSFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FmaddVF16VFloat16VBVFSFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfmadd_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmadd_vf_f16m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmadd_vf_operator_0() { +uint64_t tmp[] = {29258,65535,31744,65535,31744,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaddVF16VFloat16VBVFSFVF_TUMA.c b/test/codegen-golden/FmaddVF16VFloat16VBVFSFVF_TUMA.c new file mode 100644 index 0000000..686fc4d --- /dev/null +++ b/test/codegen-golden/FmaddVF16VFloat16VBVFSFVF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FmaddVF16VFloat16VBVFSFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FmaddVF16VFloat16VBVFSFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfmadd_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmadd_vf_f16m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmadd_vf_operator_0() { +uint64_t tmp[] = {65535,29822,31744,29133,31744,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaddVF16VFloat16VBVFSFVF_TUMU.c b/test/codegen-golden/FmaddVF16VFloat16VBVFSFVF_TUMU.c new file mode 100644 index 0000000..7f01985 --- /dev/null +++ b/test/codegen-golden/FmaddVF16VFloat16VBVFSFVF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FmaddVF16VFloat16VBVFSFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FmaddVF16VFloat16VBVFSFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfmadd_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmadd_vf_f16m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmadd_vf_operator_0() { +uint64_t tmp[] = {29258,29822,31744,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaddVF16VFloat16VBVFSFVF_m.c b/test/codegen-golden/FmaddVF16VFloat16VBVFSFVF_m.c new file mode 100644 index 0000000..8c65593 --- /dev/null +++ b/test/codegen-golden/FmaddVF16VFloat16VBVFSFVF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FmaddVF16VFloat16VBVFSFVF_m -n 1 -l 7 --has-ta --has-ma -c FmaddVF16VFloat16VBVFSFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfmadd_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmadd_vf_f16m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmadd_vf_operator_0() { +uint64_t tmp[] = {29258,31744,31744,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaddVF16VFloat16VFSFVF.c b/test/codegen-golden/FmaddVF16VFloat16VFSFVF.c new file mode 100644 index 0000000..1b059fb --- /dev/null +++ b/test/codegen-golden/FmaddVF16VFloat16VFSFVF.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FmaddVF16VFloat16VFSFVF -n 1 -l 7 --has-ta --has-ma -c FmaddVF16VFloat16VFSFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfmadd_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmadd_vf_f16m1(vec_value_0_0, placeholder1, vec_value_2_0, vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmadd_vf_operator_0() { +uint64_t tmp[] = {31744,31744,31744,31744,31744,31744,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaddVF16VFloat16VFSFVF_TA.c b/test/codegen-golden/FmaddVF16VFloat16VFSFVF_TA.c new file mode 100644 index 0000000..fea1f2d --- /dev/null +++ b/test/codegen-golden/FmaddVF16VFloat16VFSFVF_TA.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FmaddVF16VFloat16VFSFVF_TA -n 1 -l 7 --has-ta --has-ma -c FmaddVF16VFloat16VFSFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfmadd_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmadd_vf_f16m1_ta(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmadd_vf_operator_0() { +uint64_t tmp[] = {31744,65535,31744,65535,31744,65535,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaddVF16VFloat16VFSFVF_TU.c b/test/codegen-golden/FmaddVF16VFloat16VFSFVF_TU.c new file mode 100644 index 0000000..236fc62 --- /dev/null +++ b/test/codegen-golden/FmaddVF16VFloat16VFSFVF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FmaddVF16VFloat16VFSFVF_TU -n 1 -l 7 --has-ta --has-ma -c FmaddVF16VFloat16VFSFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfmadd_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmadd_vf_f16m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmadd_vf_operator_0() { +uint64_t tmp[] = {31744,29790,31744,28721,31744,26987,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaddVV16VFloat16VBVFVFVF_TAMA.c b/test/codegen-golden/FmaddVV16VFloat16VBVFVFVF_TAMA.c new file mode 100644 index 0000000..2ac4ffc --- /dev/null +++ b/test/codegen-golden/FmaddVV16VFloat16VBVFVFVF_TAMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FmaddVV16VFloat16VBVFVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FmaddVV16VFloat16VBVFVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmadd_vv_f16m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmadd_vv_operator_0() { +uint64_t tmp[] = {65535,65535,31744,65535,31744,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaddVV16VFloat16VBVFVFVF_TAMU.c b/test/codegen-golden/FmaddVV16VFloat16VBVFVFVF_TAMU.c new file mode 100644 index 0000000..78d819e --- /dev/null +++ b/test/codegen-golden/FmaddVV16VFloat16VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FmaddVV16VFloat16VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FmaddVV16VFloat16VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmadd_vv_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmadd_vv_operator_0() { +uint64_t tmp[] = {29258,65535,31744,65535,31744,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaddVV16VFloat16VBVFVFVF_TUMA.c b/test/codegen-golden/FmaddVV16VFloat16VBVFVFVF_TUMA.c new file mode 100644 index 0000000..67fef34 --- /dev/null +++ b/test/codegen-golden/FmaddVV16VFloat16VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FmaddVV16VFloat16VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FmaddVV16VFloat16VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmadd_vv_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmadd_vv_operator_0() { +uint64_t tmp[] = {65535,29822,31744,29133,31744,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaddVV16VFloat16VBVFVFVF_TUMU.c b/test/codegen-golden/FmaddVV16VFloat16VBVFVFVF_TUMU.c new file mode 100644 index 0000000..aecfd4e --- /dev/null +++ b/test/codegen-golden/FmaddVV16VFloat16VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FmaddVV16VFloat16VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FmaddVV16VFloat16VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmadd_vv_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmadd_vv_operator_0() { +uint64_t tmp[] = {29258,29822,31744,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaddVV16VFloat16VBVFVFVF_m.c b/test/codegen-golden/FmaddVV16VFloat16VBVFVFVF_m.c new file mode 100644 index 0000000..dc8e24a --- /dev/null +++ b/test/codegen-golden/FmaddVV16VFloat16VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FmaddVV16VFloat16VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FmaddVV16VFloat16VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmadd_vv_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmadd_vv_operator_0() { +uint64_t tmp[] = {29258,31744,31744,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaddVV16VFloat16VFVFVF.c b/test/codegen-golden/FmaddVV16VFloat16VFVFVF.c new file mode 100644 index 0000000..964e650 --- /dev/null +++ b/test/codegen-golden/FmaddVV16VFloat16VFVFVF.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FmaddVV16VFloat16VFVFVF -n 1 -l 7 --has-ta --has-ma -c FmaddVV16VFloat16VFVFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmadd_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmadd_vv_f16m1(vec_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmadd_vv_operator_0() { +uint64_t tmp[] = {31744,31744,31744,31744,31744,31744,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaddVV16VFloat16VFVFVF_TA.c b/test/codegen-golden/FmaddVV16VFloat16VFVFVF_TA.c new file mode 100644 index 0000000..b57ab39 --- /dev/null +++ b/test/codegen-golden/FmaddVV16VFloat16VFVFVF_TA.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FmaddVV16VFloat16VFVFVF_TA -n 1 -l 7 --has-ta --has-ma -c FmaddVV16VFloat16VFVFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmadd_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmadd_vv_f16m1_ta(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmadd_vv_operator_0() { +uint64_t tmp[] = {31744,65535,31744,65535,31744,65535,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaddVV16VFloat16VFVFVF_TU.c b/test/codegen-golden/FmaddVV16VFloat16VFVFVF_TU.c new file mode 100644 index 0000000..4aa1838 --- /dev/null +++ b/test/codegen-golden/FmaddVV16VFloat16VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FmaddVV16VFloat16VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FmaddVV16VFloat16VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmadd_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmadd_vv_f16m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmadd_vv_operator_0() { +uint64_t tmp[] = {31744,29790,31744,28721,31744,26987,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaxVF16VFloat16VBVFSF_TAMA.c b/test/codegen-golden/FmaxVF16VFloat16VBVFSF_TAMA.c new file mode 100644 index 0000000..1b33274 --- /dev/null +++ b/test/codegen-golden/FmaxVF16VFloat16VBVFSF_TAMA.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FmaxVF16VFloat16VBVFSF_TAMA -n 1 -l 7 --has-ta --has-ma -c FmaxVF16VFloat16VBVFSF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmax_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfmax_vf_f16m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmax_vf_operator_0() { +uint64_t tmp[] = {65535,65535,29046,65535,28575,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmax_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmax_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmax_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaxVF16VFloat16VBVFVFSF_TAMU.c b/test/codegen-golden/FmaxVF16VFloat16VBVFVFSF_TAMU.c new file mode 100644 index 0000000..380608b --- /dev/null +++ b/test/codegen-golden/FmaxVF16VFloat16VBVFVFSF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FmaxVF16VFloat16VBVFVFSF_TAMU -n 1 -l 7 --has-ta --has-ma -c FmaxVF16VFloat16VBVFVFSF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmax_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfmax_vf_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmax_vf_operator_0() { +uint64_t tmp[] = {29523,65535,29133,65535,28575,65535,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmax_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmax_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmax_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaxVF16VFloat16VBVFVFSF_TUMA.c b/test/codegen-golden/FmaxVF16VFloat16VBVFVFSF_TUMA.c new file mode 100644 index 0000000..43f19a6 --- /dev/null +++ b/test/codegen-golden/FmaxVF16VFloat16VBVFVFSF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FmaxVF16VFloat16VBVFVFSF_TUMA -n 1 -l 7 --has-ta --has-ma -c FmaxVF16VFloat16VBVFVFSF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmax_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfmax_vf_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmax_vf_operator_0() { +uint64_t tmp[] = {65535,28707,29133,29100,28575,28475,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmax_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmax_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmax_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaxVF16VFloat16VBVFVFSF_TUMU.c b/test/codegen-golden/FmaxVF16VFloat16VBVFVFSF_TUMU.c new file mode 100644 index 0000000..c814045 --- /dev/null +++ b/test/codegen-golden/FmaxVF16VFloat16VBVFVFSF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FmaxVF16VFloat16VBVFVFSF_TUMU -n 1 -l 7 --has-ta --has-ma -c FmaxVF16VFloat16VBVFVFSF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmax_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfmax_vf_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmax_vf_operator_0() { +uint64_t tmp[] = {29523,28707,29133,29100,28575,28475,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmax_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmax_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmax_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaxVF16VFloat16VBVFVFSF_m.c b/test/codegen-golden/FmaxVF16VFloat16VBVFVFSF_m.c new file mode 100644 index 0000000..7c31b4f --- /dev/null +++ b/test/codegen-golden/FmaxVF16VFloat16VBVFVFSF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FmaxVF16VFloat16VBVFVFSF_m -n 1 -l 7 --has-ta --has-ma -c FmaxVF16VFloat16VBVFVFSF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmax_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfmax_vf_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmax_vf_operator_0() { +uint64_t tmp[] = {29523,29143,29133,29100,28575,28475,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmax_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmax_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmax_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaxVF16VFloat16VFSF.c b/test/codegen-golden/FmaxVF16VFloat16VFSF.c new file mode 100644 index 0000000..35169b4 --- /dev/null +++ b/test/codegen-golden/FmaxVF16VFloat16VFSF.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r FmaxVF16VFloat16VFSF -n 1 -l 7 --has-ta --has-ma -c FmaxVF16VFloat16VFSF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfmax_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_2_0= vfmax_vf_f16m1(vec_value_0_0, placeholder1, vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmax_vf_operator_0() { +uint64_t tmp[] = {28575,29790,29580,28721,29222,28575,28575,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfmax_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmax_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmax_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaxVF16VFloat16VFSF_TA.c b/test/codegen-golden/FmaxVF16VFloat16VFSF_TA.c new file mode 100644 index 0000000..791e8d3 --- /dev/null +++ b/test/codegen-golden/FmaxVF16VFloat16VFSF_TA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r FmaxVF16VFloat16VFSF_TA -n 1 -l 7 --has-ta --has-ma -c FmaxVF16VFloat16VFSF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfmax_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_2_0= vfmax_vf_f16m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmax_vf_operator_0() { +uint64_t tmp[] = {28575,65535,29580,65535,29222,65535,28575,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfmax_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmax_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmax_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaxVF16VFloat16VFVFSF_TU.c b/test/codegen-golden/FmaxVF16VFloat16VFVFSF_TU.c new file mode 100644 index 0000000..1ea85e8 --- /dev/null +++ b/test/codegen-golden/FmaxVF16VFloat16VFVFSF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FmaxVF16VFloat16VFVFSF_TU -n 1 -l 7 --has-ta --has-ma -c FmaxVF16VFloat16VFVFSF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmax_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfmax_vf_f16m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmax_vf_operator_0() { +uint64_t tmp[] = {29523,29790,29046,28721,28575,26987,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmax_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmax_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmax_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaxVV16VFloat16VBVFVFVF_TAMU.c b/test/codegen-golden/FmaxVV16VFloat16VBVFVFVF_TAMU.c new file mode 100644 index 0000000..bd5a1f8 --- /dev/null +++ b/test/codegen-golden/FmaxVV16VFloat16VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FmaxVV16VFloat16VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FmaxVV16VFloat16VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmax_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmax_vv_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmax_vv_operator_0() { +uint64_t tmp[] = {29258,65535,29383,65535,29100,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmax_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmax_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmax_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaxVV16VFloat16VBVFVFVF_TUMA.c b/test/codegen-golden/FmaxVV16VFloat16VBVFVFVF_TUMA.c new file mode 100644 index 0000000..65bbe1a --- /dev/null +++ b/test/codegen-golden/FmaxVV16VFloat16VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FmaxVV16VFloat16VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FmaxVV16VFloat16VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmax_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmax_vv_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmax_vv_operator_0() { +uint64_t tmp[] = {65535,29822,29383,29133,29100,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmax_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmax_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmax_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaxVV16VFloat16VBVFVFVF_TUMU.c b/test/codegen-golden/FmaxVV16VFloat16VBVFVFVF_TUMU.c new file mode 100644 index 0000000..13ef182 --- /dev/null +++ b/test/codegen-golden/FmaxVV16VFloat16VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FmaxVV16VFloat16VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FmaxVV16VFloat16VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmax_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmax_vv_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmax_vv_operator_0() { +uint64_t tmp[] = {29258,29822,29383,29133,29100,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmax_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmax_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmax_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaxVV16VFloat16VBVFVFVF_m.c b/test/codegen-golden/FmaxVV16VFloat16VBVFVFVF_m.c new file mode 100644 index 0000000..41a03b3 --- /dev/null +++ b/test/codegen-golden/FmaxVV16VFloat16VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FmaxVV16VFloat16VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FmaxVV16VFloat16VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmax_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmax_vv_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmax_vv_operator_0() { +uint64_t tmp[] = {29258,29523,29383,29133,29100,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmax_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmax_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmax_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaxVV16VFloat16VBVFVF_TAMA.c b/test/codegen-golden/FmaxVV16VFloat16VBVFVF_TAMA.c new file mode 100644 index 0000000..9ae5966 --- /dev/null +++ b/test/codegen-golden/FmaxVV16VFloat16VBVFVF_TAMA.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FmaxVV16VFloat16VBVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FmaxVV16VFloat16VBVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmax_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmax_vv_f16m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmax_vv_operator_0() { +uint64_t tmp[] = {65535,65535,29143,65535,29186,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmax_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmax_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmax_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaxVV16VFloat16VFVF.c b/test/codegen-golden/FmaxVV16VFloat16VFVF.c new file mode 100644 index 0000000..e0fb67a --- /dev/null +++ b/test/codegen-golden/FmaxVV16VFloat16VFVF.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r FmaxVV16VFloat16VFVF -n 1 -l 7 --has-ta --has-ma -c FmaxVV16VFloat16VFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmax_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfmax_vv_f16m1(vec_value_0_0, vec_value_1_0, vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmax_vv_operator_0() { +uint64_t tmp[] = {28575,29790,29580,29046,29222,27386,28475,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfmax_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmax_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmax_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaxVV16VFloat16VFVFVF_TU.c b/test/codegen-golden/FmaxVV16VFloat16VFVFVF_TU.c new file mode 100644 index 0000000..a495b2d --- /dev/null +++ b/test/codegen-golden/FmaxVV16VFloat16VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FmaxVV16VFloat16VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FmaxVV16VFloat16VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmax_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmax_vv_f16m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmax_vv_operator_0() { +uint64_t tmp[] = {29258,29790,29143,28721,29186,26987,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmax_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmax_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmax_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmaxVV16VFloat16VFVF_TA.c b/test/codegen-golden/FmaxVV16VFloat16VFVF_TA.c new file mode 100644 index 0000000..ffe027f --- /dev/null +++ b/test/codegen-golden/FmaxVV16VFloat16VFVF_TA.c @@ -0,0 +1,85 @@ +// COMMAND: random_gen -r FmaxVV16VFloat16VFVF_TA -n 1 -l 7 --has-ta --has-ma -c FmaxVV16VFloat16VFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmax_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfmax_vv_f16m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmax_vv_operator_0() { +uint64_t tmp[] = {28575,65535,29580,65535,29222,65535,28475,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfmax_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmax_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmax_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmergeVFM16VFloat16VBVFSF.c b/test/codegen-golden/FmergeVFM16VFloat16VBVFSF.c new file mode 100644 index 0000000..6610155 --- /dev/null +++ b/test/codegen-golden/FmergeVFM16VFloat16VBVFSF.c @@ -0,0 +1,97 @@ +// COMMAND: random_gen -r FmergeVFM16VFloat16VBVFSF -n 1 -l 7 --has-ta --has-ma -c FmergeVFM16VFloat16VBVFSF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmerge_vfm_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfmerge_vfm_f16m1(mask_value_0_0, vec_value_1_0, placeholder2, vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmerge_vfm_operator_0() { +uint64_t tmp[] = {29523,28575,28575,29100,28575,28475,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmerge_vfm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmerge_vfm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmerge_vfm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmergeVFM16VFloat16VBVFSF_TA.c b/test/codegen-golden/FmergeVFM16VFloat16VBVFSF_TA.c new file mode 100644 index 0000000..4b8298a --- /dev/null +++ b/test/codegen-golden/FmergeVFM16VFloat16VBVFSF_TA.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FmergeVFM16VFloat16VBVFSF_TA -n 1 -l 7 --has-ta --has-ma -c FmergeVFM16VFloat16VBVFSF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmerge_vfm_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfmerge_vfm_f16m1_ta(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmerge_vfm_operator_0() { +uint64_t tmp[] = {29523,65535,28575,65535,28575,65535,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmerge_vfm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmerge_vfm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmerge_vfm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmergeVFM16VFloat16VBVFVFSF_TU.c b/test/codegen-golden/FmergeVFM16VFloat16VBVFVFSF_TU.c new file mode 100644 index 0000000..953fbc3 --- /dev/null +++ b/test/codegen-golden/FmergeVFM16VFloat16VBVFVFSF_TU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FmergeVFM16VFloat16VBVFVFSF_TU -n 1 -l 7 --has-ta --has-ma -c FmergeVFM16VFloat16VBVFVFSF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmerge_vfm_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfmerge_vfm_f16m1_tu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmerge_vfm_operator_0() { +uint64_t tmp[] = {29822,28707,28575,29100,28575,28475,29733,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmerge_vfm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmerge_vfm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmerge_vfm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FminVF16VFloat16VBVFSF_TAMA.c b/test/codegen-golden/FminVF16VFloat16VBVFSF_TAMA.c new file mode 100644 index 0000000..a467a0a --- /dev/null +++ b/test/codegen-golden/FminVF16VFloat16VBVFSF_TAMA.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FminVF16VFloat16VBVFSF_TAMA -n 1 -l 7 --has-ta --has-ma -c FminVF16VFloat16VBVFSF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmin_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfmin_vf_f16m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmin_vf_operator_0() { +uint64_t tmp[] = {65535,65535,28575,65535,27386,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmin_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmin_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmin_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FminVF16VFloat16VBVFVFSF_TAMU.c b/test/codegen-golden/FminVF16VFloat16VBVFVFSF_TAMU.c new file mode 100644 index 0000000..172e84f --- /dev/null +++ b/test/codegen-golden/FminVF16VFloat16VBVFVFSF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FminVF16VFloat16VBVFVFSF_TAMU -n 1 -l 7 --has-ta --has-ma -c FminVF16VFloat16VBVFVFSF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmin_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfmin_vf_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmin_vf_operator_0() { +uint64_t tmp[] = {29523,65535,28575,65535,26923,65535,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmin_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmin_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmin_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FminVF16VFloat16VBVFVFSF_TUMA.c b/test/codegen-golden/FminVF16VFloat16VBVFVFSF_TUMA.c new file mode 100644 index 0000000..033b5b7 --- /dev/null +++ b/test/codegen-golden/FminVF16VFloat16VBVFVFSF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FminVF16VFloat16VBVFVFSF_TUMA -n 1 -l 7 --has-ta --has-ma -c FminVF16VFloat16VBVFVFSF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmin_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfmin_vf_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmin_vf_operator_0() { +uint64_t tmp[] = {65535,28707,28575,29100,26923,28475,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmin_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmin_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmin_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FminVF16VFloat16VBVFVFSF_TUMU.c b/test/codegen-golden/FminVF16VFloat16VBVFVFSF_TUMU.c new file mode 100644 index 0000000..c40be3c --- /dev/null +++ b/test/codegen-golden/FminVF16VFloat16VBVFVFSF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FminVF16VFloat16VBVFVFSF_TUMU -n 1 -l 7 --has-ta --has-ma -c FminVF16VFloat16VBVFVFSF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmin_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfmin_vf_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmin_vf_operator_0() { +uint64_t tmp[] = {29523,28707,28575,29100,26923,28475,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmin_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmin_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmin_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FminVF16VFloat16VBVFVFSF_m.c b/test/codegen-golden/FminVF16VFloat16VBVFVFSF_m.c new file mode 100644 index 0000000..992d2eb --- /dev/null +++ b/test/codegen-golden/FminVF16VFloat16VBVFVFSF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FminVF16VFloat16VBVFVFSF_m -n 1 -l 7 --has-ta --has-ma -c FminVF16VFloat16VBVFVFSF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmin_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfmin_vf_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmin_vf_operator_0() { +uint64_t tmp[] = {29523,28575,28575,29100,26923,28475,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmin_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmin_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmin_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FminVF16VFloat16VFSF.c b/test/codegen-golden/FminVF16VFloat16VFSF.c new file mode 100644 index 0000000..f04eddc --- /dev/null +++ b/test/codegen-golden/FminVF16VFloat16VFSF.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r FminVF16VFloat16VFSF -n 1 -l 7 --has-ta --has-ma -c FminVF16VFloat16VFSF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfmin_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_2_0= vfmin_vf_f16m1(vec_value_0_0, placeholder1, vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmin_vf_operator_0() { +uint64_t tmp[] = {27738,28575,28575,28575,28575,26987,27716,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfmin_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmin_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmin_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FminVF16VFloat16VFSF_TA.c b/test/codegen-golden/FminVF16VFloat16VFSF_TA.c new file mode 100644 index 0000000..b0ef261 --- /dev/null +++ b/test/codegen-golden/FminVF16VFloat16VFSF_TA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r FminVF16VFloat16VFSF_TA -n 1 -l 7 --has-ta --has-ma -c FminVF16VFloat16VFSF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfmin_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_2_0= vfmin_vf_f16m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmin_vf_operator_0() { +uint64_t tmp[] = {27738,65535,28575,65535,28575,65535,27716,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfmin_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmin_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmin_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FminVF16VFloat16VFVFSF_TU.c b/test/codegen-golden/FminVF16VFloat16VFVFSF_TU.c new file mode 100644 index 0000000..e6ea55c --- /dev/null +++ b/test/codegen-golden/FminVF16VFloat16VFVFSF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FminVF16VFloat16VFVFSF_TU -n 1 -l 7 --has-ta --has-ma -c FminVF16VFloat16VFVFSF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmin_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfmin_vf_f16m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmin_vf_operator_0() { +uint64_t tmp[] = {28575,29790,28575,28721,27386,26987,28575,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmin_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmin_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmin_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FminVV16VFloat16VBVFVFVF_TAMU.c b/test/codegen-golden/FminVV16VFloat16VBVFVFVF_TAMU.c new file mode 100644 index 0000000..de63a5d --- /dev/null +++ b/test/codegen-golden/FminVV16VFloat16VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FminVV16VFloat16VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FminVV16VFloat16VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmin_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmin_vv_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmin_vv_operator_0() { +uint64_t tmp[] = {29258,65535,28707,65535,28160,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmin_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmin_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmin_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FminVV16VFloat16VBVFVFVF_TUMA.c b/test/codegen-golden/FminVV16VFloat16VBVFVFVF_TUMA.c new file mode 100644 index 0000000..1437836 --- /dev/null +++ b/test/codegen-golden/FminVV16VFloat16VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FminVV16VFloat16VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FminVV16VFloat16VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmin_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmin_vv_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmin_vv_operator_0() { +uint64_t tmp[] = {65535,29822,28707,29133,28160,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmin_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmin_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmin_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FminVV16VFloat16VBVFVFVF_TUMU.c b/test/codegen-golden/FminVV16VFloat16VBVFVFVF_TUMU.c new file mode 100644 index 0000000..1e6ed1c --- /dev/null +++ b/test/codegen-golden/FminVV16VFloat16VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FminVV16VFloat16VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FminVV16VFloat16VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmin_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmin_vv_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmin_vv_operator_0() { +uint64_t tmp[] = {29258,29822,28707,29133,28160,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmin_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmin_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmin_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FminVV16VFloat16VBVFVFVF_m.c b/test/codegen-golden/FminVV16VFloat16VBVFVFVF_m.c new file mode 100644 index 0000000..b1df93e --- /dev/null +++ b/test/codegen-golden/FminVV16VFloat16VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FminVV16VFloat16VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FminVV16VFloat16VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmin_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmin_vv_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmin_vv_operator_0() { +uint64_t tmp[] = {29258,28416,28707,29133,28160,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmin_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmin_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmin_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FminVV16VFloat16VBVFVF_TAMA.c b/test/codegen-golden/FminVV16VFloat16VBVFVF_TAMA.c new file mode 100644 index 0000000..3f7bef6 --- /dev/null +++ b/test/codegen-golden/FminVV16VFloat16VBVFVF_TAMA.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FminVV16VFloat16VBVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FminVV16VFloat16VBVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmin_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmin_vv_f16m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmin_vv_operator_0() { +uint64_t tmp[] = {65535,65535,28707,65535,29100,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmin_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmin_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmin_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FminVV16VFloat16VFVF.c b/test/codegen-golden/FminVV16VFloat16VFVF.c new file mode 100644 index 0000000..2d76dce --- /dev/null +++ b/test/codegen-golden/FminVV16VFloat16VFVF.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r FminVV16VFloat16VFVF -n 1 -l 7 --has-ta --has-ma -c FminVV16VFloat16VFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmin_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfmin_vv_f16m1(vec_value_0_0, vec_value_1_0, vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmin_vv_operator_0() { +uint64_t tmp[] = {27738,29523,28707,28721,29100,26987,27716,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfmin_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmin_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmin_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FminVV16VFloat16VFVFVF_TU.c b/test/codegen-golden/FminVV16VFloat16VFVFVF_TU.c new file mode 100644 index 0000000..75650e3 --- /dev/null +++ b/test/codegen-golden/FminVV16VFloat16VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FminVV16VFloat16VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FminVV16VFloat16VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmin_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmin_vv_f16m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmin_vv_operator_0() { +uint64_t tmp[] = {28575,29790,28707,28721,29100,26987,28475,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmin_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmin_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmin_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FminVV16VFloat16VFVF_TA.c b/test/codegen-golden/FminVV16VFloat16VFVF_TA.c new file mode 100644 index 0000000..a71538c --- /dev/null +++ b/test/codegen-golden/FminVV16VFloat16VFVF_TA.c @@ -0,0 +1,85 @@ +// COMMAND: random_gen -r FminVV16VFloat16VFVF_TA -n 1 -l 7 --has-ta --has-ma -c FminVV16VFloat16VFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmin_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfmin_vv_f16m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmin_vv_operator_0() { +uint64_t tmp[] = {27738,65535,28707,65535,29100,65535,27716,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfmin_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmin_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmin_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsacVF16VFloat16VBVFSFVF_TAMA.c b/test/codegen-golden/FmsacVF16VFloat16VBVFSFVF_TAMA.c new file mode 100644 index 0000000..fe0a268 --- /dev/null +++ b/test/codegen-golden/FmsacVF16VFloat16VBVFSFVF_TAMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FmsacVF16VFloat16VBVFSFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FmsacVF16VFloat16VBVFSFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfmsac_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmsac_vf_f16m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmsac_vf_operator_0() { +uint64_t tmp[] = {65535,65535,31744,65535,31744,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsacVF16VFloat16VBVFSFVF_TAMU.c b/test/codegen-golden/FmsacVF16VFloat16VBVFSFVF_TAMU.c new file mode 100644 index 0000000..6985ca9 --- /dev/null +++ b/test/codegen-golden/FmsacVF16VFloat16VBVFSFVF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FmsacVF16VFloat16VBVFSFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FmsacVF16VFloat16VBVFSFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfmsac_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmsac_vf_f16m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmsac_vf_operator_0() { +uint64_t tmp[] = {29258,65535,31744,65535,31744,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsacVF16VFloat16VBVFSFVF_TUMA.c b/test/codegen-golden/FmsacVF16VFloat16VBVFSFVF_TUMA.c new file mode 100644 index 0000000..34cdd05 --- /dev/null +++ b/test/codegen-golden/FmsacVF16VFloat16VBVFSFVF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FmsacVF16VFloat16VBVFSFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FmsacVF16VFloat16VBVFSFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfmsac_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmsac_vf_f16m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmsac_vf_operator_0() { +uint64_t tmp[] = {65535,29822,31744,29133,31744,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsacVF16VFloat16VBVFSFVF_TUMU.c b/test/codegen-golden/FmsacVF16VFloat16VBVFSFVF_TUMU.c new file mode 100644 index 0000000..3ccdf1c --- /dev/null +++ b/test/codegen-golden/FmsacVF16VFloat16VBVFSFVF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FmsacVF16VFloat16VBVFSFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FmsacVF16VFloat16VBVFSFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfmsac_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmsac_vf_f16m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmsac_vf_operator_0() { +uint64_t tmp[] = {29258,29822,31744,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsacVF16VFloat16VBVFSFVF_m.c b/test/codegen-golden/FmsacVF16VFloat16VBVFSFVF_m.c new file mode 100644 index 0000000..e32e1d8 --- /dev/null +++ b/test/codegen-golden/FmsacVF16VFloat16VBVFSFVF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FmsacVF16VFloat16VBVFSFVF_m -n 1 -l 7 --has-ta --has-ma -c FmsacVF16VFloat16VBVFSFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfmsac_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmsac_vf_f16m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmsac_vf_operator_0() { +uint64_t tmp[] = {29258,31744,31744,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsacVF16VFloat16VFSFVF.c b/test/codegen-golden/FmsacVF16VFloat16VFSFVF.c new file mode 100644 index 0000000..5cb2e7b --- /dev/null +++ b/test/codegen-golden/FmsacVF16VFloat16VFSFVF.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FmsacVF16VFloat16VFSFVF -n 1 -l 7 --has-ta --has-ma -c FmsacVF16VFloat16VFSFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfmsac_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmsac_vf_f16m1(vec_value_0_0, placeholder1, vec_value_2_0, vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmsac_vf_operator_0() { +uint64_t tmp[] = {31744,31744,31744,31744,31744,31744,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsacVF16VFloat16VFSFVF_TA.c b/test/codegen-golden/FmsacVF16VFloat16VFSFVF_TA.c new file mode 100644 index 0000000..b53a819 --- /dev/null +++ b/test/codegen-golden/FmsacVF16VFloat16VFSFVF_TA.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FmsacVF16VFloat16VFSFVF_TA -n 1 -l 7 --has-ta --has-ma -c FmsacVF16VFloat16VFSFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfmsac_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmsac_vf_f16m1_ta(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmsac_vf_operator_0() { +uint64_t tmp[] = {31744,65535,31744,65535,31744,65535,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsacVF16VFloat16VFSFVF_TU.c b/test/codegen-golden/FmsacVF16VFloat16VFSFVF_TU.c new file mode 100644 index 0000000..76c0e7a --- /dev/null +++ b/test/codegen-golden/FmsacVF16VFloat16VFSFVF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FmsacVF16VFloat16VFSFVF_TU -n 1 -l 7 --has-ta --has-ma -c FmsacVF16VFloat16VFSFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfmsac_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmsac_vf_f16m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmsac_vf_operator_0() { +uint64_t tmp[] = {31744,29790,31744,28721,31744,26987,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsacVV16VFloat16VBVFVFVF_TAMA.c b/test/codegen-golden/FmsacVV16VFloat16VBVFVFVF_TAMA.c new file mode 100644 index 0000000..9c2322c --- /dev/null +++ b/test/codegen-golden/FmsacVV16VFloat16VBVFVFVF_TAMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FmsacVV16VFloat16VBVFVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FmsacVV16VFloat16VBVFVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmsac_vv_f16m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmsac_vv_operator_0() { +uint64_t tmp[] = {65535,65535,31744,65535,31744,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsacVV16VFloat16VBVFVFVF_TAMU.c b/test/codegen-golden/FmsacVV16VFloat16VBVFVFVF_TAMU.c new file mode 100644 index 0000000..13f63c8 --- /dev/null +++ b/test/codegen-golden/FmsacVV16VFloat16VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FmsacVV16VFloat16VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FmsacVV16VFloat16VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmsac_vv_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmsac_vv_operator_0() { +uint64_t tmp[] = {29258,65535,31744,65535,31744,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsacVV16VFloat16VBVFVFVF_TUMA.c b/test/codegen-golden/FmsacVV16VFloat16VBVFVFVF_TUMA.c new file mode 100644 index 0000000..2872d22 --- /dev/null +++ b/test/codegen-golden/FmsacVV16VFloat16VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FmsacVV16VFloat16VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FmsacVV16VFloat16VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmsac_vv_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmsac_vv_operator_0() { +uint64_t tmp[] = {65535,29822,31744,29133,31744,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsacVV16VFloat16VBVFVFVF_TUMU.c b/test/codegen-golden/FmsacVV16VFloat16VBVFVFVF_TUMU.c new file mode 100644 index 0000000..85aa581 --- /dev/null +++ b/test/codegen-golden/FmsacVV16VFloat16VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FmsacVV16VFloat16VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FmsacVV16VFloat16VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmsac_vv_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmsac_vv_operator_0() { +uint64_t tmp[] = {29258,29822,31744,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsacVV16VFloat16VBVFVFVF_m.c b/test/codegen-golden/FmsacVV16VFloat16VBVFVFVF_m.c new file mode 100644 index 0000000..d124cc9 --- /dev/null +++ b/test/codegen-golden/FmsacVV16VFloat16VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FmsacVV16VFloat16VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FmsacVV16VFloat16VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmsac_vv_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmsac_vv_operator_0() { +uint64_t tmp[] = {29258,31744,31744,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsacVV16VFloat16VFVFVF.c b/test/codegen-golden/FmsacVV16VFloat16VFVFVF.c new file mode 100644 index 0000000..9ae7248 --- /dev/null +++ b/test/codegen-golden/FmsacVV16VFloat16VFVFVF.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FmsacVV16VFloat16VFVFVF -n 1 -l 7 --has-ta --has-ma -c FmsacVV16VFloat16VFVFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmsac_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmsac_vv_f16m1(vec_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmsac_vv_operator_0() { +uint64_t tmp[] = {31744,31744,31744,31744,31744,31744,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsacVV16VFloat16VFVFVF_TA.c b/test/codegen-golden/FmsacVV16VFloat16VFVFVF_TA.c new file mode 100644 index 0000000..c3e177f --- /dev/null +++ b/test/codegen-golden/FmsacVV16VFloat16VFVFVF_TA.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FmsacVV16VFloat16VFVFVF_TA -n 1 -l 7 --has-ta --has-ma -c FmsacVV16VFloat16VFVFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmsac_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmsac_vv_f16m1_ta(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmsac_vv_operator_0() { +uint64_t tmp[] = {31744,65535,31744,65535,31744,65535,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsacVV16VFloat16VFVFVF_TU.c b/test/codegen-golden/FmsacVV16VFloat16VFVFVF_TU.c new file mode 100644 index 0000000..e390aca --- /dev/null +++ b/test/codegen-golden/FmsacVV16VFloat16VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FmsacVV16VFloat16VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FmsacVV16VFloat16VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmsac_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmsac_vv_f16m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmsac_vv_operator_0() { +uint64_t tmp[] = {31744,29790,31744,28721,31744,26987,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsubVF16VFloat16VBVFSFVF_TAMA.c b/test/codegen-golden/FmsubVF16VFloat16VBVFSFVF_TAMA.c new file mode 100644 index 0000000..79309dd --- /dev/null +++ b/test/codegen-golden/FmsubVF16VFloat16VBVFSFVF_TAMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FmsubVF16VFloat16VBVFSFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FmsubVF16VFloat16VBVFSFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfmsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmsub_vf_f16m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmsub_vf_operator_0() { +uint64_t tmp[] = {65535,65535,31744,65535,31744,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsubVF16VFloat16VBVFSFVF_TAMU.c b/test/codegen-golden/FmsubVF16VFloat16VBVFSFVF_TAMU.c new file mode 100644 index 0000000..60ceca2 --- /dev/null +++ b/test/codegen-golden/FmsubVF16VFloat16VBVFSFVF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FmsubVF16VFloat16VBVFSFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FmsubVF16VFloat16VBVFSFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfmsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmsub_vf_f16m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmsub_vf_operator_0() { +uint64_t tmp[] = {29258,65535,31744,65535,31744,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsubVF16VFloat16VBVFSFVF_TUMA.c b/test/codegen-golden/FmsubVF16VFloat16VBVFSFVF_TUMA.c new file mode 100644 index 0000000..c48c397 --- /dev/null +++ b/test/codegen-golden/FmsubVF16VFloat16VBVFSFVF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FmsubVF16VFloat16VBVFSFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FmsubVF16VFloat16VBVFSFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfmsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmsub_vf_f16m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmsub_vf_operator_0() { +uint64_t tmp[] = {65535,29822,31744,29133,31744,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsubVF16VFloat16VBVFSFVF_TUMU.c b/test/codegen-golden/FmsubVF16VFloat16VBVFSFVF_TUMU.c new file mode 100644 index 0000000..f93461a --- /dev/null +++ b/test/codegen-golden/FmsubVF16VFloat16VBVFSFVF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FmsubVF16VFloat16VBVFSFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FmsubVF16VFloat16VBVFSFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfmsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmsub_vf_f16m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmsub_vf_operator_0() { +uint64_t tmp[] = {29258,29822,31744,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsubVF16VFloat16VBVFSFVF_m.c b/test/codegen-golden/FmsubVF16VFloat16VBVFSFVF_m.c new file mode 100644 index 0000000..27574a9 --- /dev/null +++ b/test/codegen-golden/FmsubVF16VFloat16VBVFSFVF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FmsubVF16VFloat16VBVFSFVF_m -n 1 -l 7 --has-ta --has-ma -c FmsubVF16VFloat16VBVFSFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfmsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmsub_vf_f16m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmsub_vf_operator_0() { +uint64_t tmp[] = {29258,31744,31744,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsubVF16VFloat16VFSFVF.c b/test/codegen-golden/FmsubVF16VFloat16VFSFVF.c new file mode 100644 index 0000000..75d27c1 --- /dev/null +++ b/test/codegen-golden/FmsubVF16VFloat16VFSFVF.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FmsubVF16VFloat16VFSFVF -n 1 -l 7 --has-ta --has-ma -c FmsubVF16VFloat16VFSFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfmsub_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmsub_vf_f16m1(vec_value_0_0, placeholder1, vec_value_2_0, vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmsub_vf_operator_0() { +uint64_t tmp[] = {31744,31744,31744,31744,31744,31744,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsubVF16VFloat16VFSFVF_TA.c b/test/codegen-golden/FmsubVF16VFloat16VFSFVF_TA.c new file mode 100644 index 0000000..55e8886 --- /dev/null +++ b/test/codegen-golden/FmsubVF16VFloat16VFSFVF_TA.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FmsubVF16VFloat16VFSFVF_TA -n 1 -l 7 --has-ta --has-ma -c FmsubVF16VFloat16VFSFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfmsub_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmsub_vf_f16m1_ta(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmsub_vf_operator_0() { +uint64_t tmp[] = {31744,65535,31744,65535,31744,65535,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsubVF16VFloat16VFSFVF_TU.c b/test/codegen-golden/FmsubVF16VFloat16VFSFVF_TU.c new file mode 100644 index 0000000..86a25d1 --- /dev/null +++ b/test/codegen-golden/FmsubVF16VFloat16VFSFVF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FmsubVF16VFloat16VFSFVF_TU -n 1 -l 7 --has-ta --has-ma -c FmsubVF16VFloat16VFSFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfmsub_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmsub_vf_f16m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmsub_vf_operator_0() { +uint64_t tmp[] = {31744,29790,31744,28721,31744,26987,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsubVV16VFloat16VBVFVFVF_TAMA.c b/test/codegen-golden/FmsubVV16VFloat16VBVFVFVF_TAMA.c new file mode 100644 index 0000000..bf38a25 --- /dev/null +++ b/test/codegen-golden/FmsubVV16VFloat16VBVFVFVF_TAMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FmsubVV16VFloat16VBVFVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FmsubVV16VFloat16VBVFVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmsub_vv_f16m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmsub_vv_operator_0() { +uint64_t tmp[] = {65535,65535,31744,65535,31744,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsubVV16VFloat16VBVFVFVF_TAMU.c b/test/codegen-golden/FmsubVV16VFloat16VBVFVFVF_TAMU.c new file mode 100644 index 0000000..3af6a5a --- /dev/null +++ b/test/codegen-golden/FmsubVV16VFloat16VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FmsubVV16VFloat16VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FmsubVV16VFloat16VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmsub_vv_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmsub_vv_operator_0() { +uint64_t tmp[] = {29258,65535,31744,65535,31744,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsubVV16VFloat16VBVFVFVF_TUMA.c b/test/codegen-golden/FmsubVV16VFloat16VBVFVFVF_TUMA.c new file mode 100644 index 0000000..08c9164 --- /dev/null +++ b/test/codegen-golden/FmsubVV16VFloat16VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FmsubVV16VFloat16VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FmsubVV16VFloat16VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmsub_vv_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmsub_vv_operator_0() { +uint64_t tmp[] = {65535,29822,31744,29133,31744,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsubVV16VFloat16VBVFVFVF_TUMU.c b/test/codegen-golden/FmsubVV16VFloat16VBVFVFVF_TUMU.c new file mode 100644 index 0000000..32cbf09 --- /dev/null +++ b/test/codegen-golden/FmsubVV16VFloat16VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FmsubVV16VFloat16VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FmsubVV16VFloat16VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmsub_vv_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmsub_vv_operator_0() { +uint64_t tmp[] = {29258,29822,31744,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsubVV16VFloat16VBVFVFVF_m.c b/test/codegen-golden/FmsubVV16VFloat16VBVFVFVF_m.c new file mode 100644 index 0000000..3df91c7 --- /dev/null +++ b/test/codegen-golden/FmsubVV16VFloat16VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FmsubVV16VFloat16VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FmsubVV16VFloat16VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmsub_vv_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmsub_vv_operator_0() { +uint64_t tmp[] = {29258,31744,31744,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsubVV16VFloat16VFVFVF.c b/test/codegen-golden/FmsubVV16VFloat16VFVFVF.c new file mode 100644 index 0000000..86f8d71 --- /dev/null +++ b/test/codegen-golden/FmsubVV16VFloat16VFVFVF.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FmsubVV16VFloat16VFVFVF -n 1 -l 7 --has-ta --has-ma -c FmsubVV16VFloat16VFVFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmsub_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmsub_vv_f16m1(vec_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmsub_vv_operator_0() { +uint64_t tmp[] = {31744,31744,31744,31744,31744,31744,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsubVV16VFloat16VFVFVF_TA.c b/test/codegen-golden/FmsubVV16VFloat16VFVFVF_TA.c new file mode 100644 index 0000000..354bf7e --- /dev/null +++ b/test/codegen-golden/FmsubVV16VFloat16VFVFVF_TA.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FmsubVV16VFloat16VFVFVF_TA -n 1 -l 7 --has-ta --has-ma -c FmsubVV16VFloat16VFVFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmsub_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmsub_vv_f16m1_ta(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmsub_vv_operator_0() { +uint64_t tmp[] = {31744,65535,31744,65535,31744,65535,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmsubVV16VFloat16VFVFVF_TU.c b/test/codegen-golden/FmsubVV16VFloat16VFVFVF_TU.c new file mode 100644 index 0000000..a7dc0e4 --- /dev/null +++ b/test/codegen-golden/FmsubVV16VFloat16VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FmsubVV16VFloat16VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FmsubVV16VFloat16VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmsub_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmsub_vv_f16m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmsub_vv_operator_0() { +uint64_t tmp[] = {31744,29790,31744,28721,31744,26987,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmulVF16VFloat16VBVFSF_TAMA.c b/test/codegen-golden/FmulVF16VFloat16VBVFSF_TAMA.c new file mode 100644 index 0000000..2df5b2b --- /dev/null +++ b/test/codegen-golden/FmulVF16VFloat16VBVFSF_TAMA.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FmulVF16VFloat16VBVFSF_TAMA -n 1 -l 7 --has-ta --has-ma -c FmulVF16VFloat16VBVFSF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmul_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfmul_vf_f16m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmul_vf_operator_0() { +uint64_t tmp[] = {65535,65535,31744,65535,31744,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmul_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmul_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmul_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmulVF16VFloat16VBVFVFSF_TAMU.c b/test/codegen-golden/FmulVF16VFloat16VBVFVFSF_TAMU.c new file mode 100644 index 0000000..397c9a0 --- /dev/null +++ b/test/codegen-golden/FmulVF16VFloat16VBVFVFSF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FmulVF16VFloat16VBVFVFSF_TAMU -n 1 -l 7 --has-ta --has-ma -c FmulVF16VFloat16VBVFVFSF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmul_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfmul_vf_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmul_vf_operator_0() { +uint64_t tmp[] = {29523,65535,31744,65535,31744,65535,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmul_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmul_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmul_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmulVF16VFloat16VBVFVFSF_TUMA.c b/test/codegen-golden/FmulVF16VFloat16VBVFVFSF_TUMA.c new file mode 100644 index 0000000..6256ba7 --- /dev/null +++ b/test/codegen-golden/FmulVF16VFloat16VBVFVFSF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FmulVF16VFloat16VBVFVFSF_TUMA -n 1 -l 7 --has-ta --has-ma -c FmulVF16VFloat16VBVFVFSF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmul_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfmul_vf_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmul_vf_operator_0() { +uint64_t tmp[] = {65535,28707,31744,29100,31744,28475,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmul_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmul_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmul_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmulVF16VFloat16VBVFVFSF_TUMU.c b/test/codegen-golden/FmulVF16VFloat16VBVFVFSF_TUMU.c new file mode 100644 index 0000000..1f727eb --- /dev/null +++ b/test/codegen-golden/FmulVF16VFloat16VBVFVFSF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FmulVF16VFloat16VBVFVFSF_TUMU -n 1 -l 7 --has-ta --has-ma -c FmulVF16VFloat16VBVFVFSF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmul_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfmul_vf_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmul_vf_operator_0() { +uint64_t tmp[] = {29523,28707,31744,29100,31744,28475,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmul_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmul_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmul_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmulVF16VFloat16VBVFVFSF_m.c b/test/codegen-golden/FmulVF16VFloat16VBVFVFSF_m.c new file mode 100644 index 0000000..9be5566 --- /dev/null +++ b/test/codegen-golden/FmulVF16VFloat16VBVFVFSF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FmulVF16VFloat16VBVFVFSF_m -n 1 -l 7 --has-ta --has-ma -c FmulVF16VFloat16VBVFVFSF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmul_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfmul_vf_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmul_vf_operator_0() { +uint64_t tmp[] = {29523,31744,31744,29100,31744,28475,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmul_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmul_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmul_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmulVF16VFloat16VFSF.c b/test/codegen-golden/FmulVF16VFloat16VFSF.c new file mode 100644 index 0000000..d918169 --- /dev/null +++ b/test/codegen-golden/FmulVF16VFloat16VFSF.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r FmulVF16VFloat16VFSF -n 1 -l 7 --has-ta --has-ma -c FmulVF16VFloat16VFSF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfmul_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_2_0= vfmul_vf_f16m1(vec_value_0_0, placeholder1, vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmul_vf_operator_0() { +uint64_t tmp[] = {31744,31744,31744,31744,31744,31744,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfmul_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmul_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmul_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmulVF16VFloat16VFSF_TA.c b/test/codegen-golden/FmulVF16VFloat16VFSF_TA.c new file mode 100644 index 0000000..f540dad --- /dev/null +++ b/test/codegen-golden/FmulVF16VFloat16VFSF_TA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r FmulVF16VFloat16VFSF_TA -n 1 -l 7 --has-ta --has-ma -c FmulVF16VFloat16VFSF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfmul_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_2_0= vfmul_vf_f16m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmul_vf_operator_0() { +uint64_t tmp[] = {31744,65535,31744,65535,31744,65535,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfmul_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmul_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmul_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmulVF16VFloat16VFVFSF_TU.c b/test/codegen-golden/FmulVF16VFloat16VFVFSF_TU.c new file mode 100644 index 0000000..e55b2e3 --- /dev/null +++ b/test/codegen-golden/FmulVF16VFloat16VFVFSF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FmulVF16VFloat16VFVFSF_TU -n 1 -l 7 --has-ta --has-ma -c FmulVF16VFloat16VFVFSF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmul_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfmul_vf_f16m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmul_vf_operator_0() { +uint64_t tmp[] = {31744,29790,31744,28721,31744,26987,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmul_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmul_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmul_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmulVV16VFloat16VBVFVFVF_TAMU.c b/test/codegen-golden/FmulVV16VFloat16VBVFVFVF_TAMU.c new file mode 100644 index 0000000..738c352 --- /dev/null +++ b/test/codegen-golden/FmulVV16VFloat16VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FmulVV16VFloat16VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FmulVV16VFloat16VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmul_vv_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmul_vv_operator_0() { +uint64_t tmp[] = {29258,65535,31744,65535,31744,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmulVV16VFloat16VBVFVFVF_TUMA.c b/test/codegen-golden/FmulVV16VFloat16VBVFVFVF_TUMA.c new file mode 100644 index 0000000..ed48da2 --- /dev/null +++ b/test/codegen-golden/FmulVV16VFloat16VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FmulVV16VFloat16VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FmulVV16VFloat16VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmul_vv_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmul_vv_operator_0() { +uint64_t tmp[] = {65535,29822,31744,29133,31744,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmulVV16VFloat16VBVFVFVF_TUMU.c b/test/codegen-golden/FmulVV16VFloat16VBVFVFVF_TUMU.c new file mode 100644 index 0000000..ffd80c8 --- /dev/null +++ b/test/codegen-golden/FmulVV16VFloat16VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FmulVV16VFloat16VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FmulVV16VFloat16VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmul_vv_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmul_vv_operator_0() { +uint64_t tmp[] = {29258,29822,31744,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmulVV16VFloat16VBVFVFVF_m.c b/test/codegen-golden/FmulVV16VFloat16VBVFVFVF_m.c new file mode 100644 index 0000000..7478511 --- /dev/null +++ b/test/codegen-golden/FmulVV16VFloat16VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FmulVV16VFloat16VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FmulVV16VFloat16VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfmul_vv_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfmul_vv_operator_0() { +uint64_t tmp[] = {29258,31744,31744,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmulVV16VFloat16VBVFVF_TAMA.c b/test/codegen-golden/FmulVV16VFloat16VBVFVF_TAMA.c new file mode 100644 index 0000000..dfcbb3d --- /dev/null +++ b/test/codegen-golden/FmulVV16VFloat16VBVFVF_TAMA.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FmulVV16VFloat16VBVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FmulVV16VFloat16VBVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmul_vv_f16m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmul_vv_operator_0() { +uint64_t tmp[] = {65535,65535,31744,65535,31744,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmulVV16VFloat16VFVF.c b/test/codegen-golden/FmulVV16VFloat16VFVF.c new file mode 100644 index 0000000..372ea2e --- /dev/null +++ b/test/codegen-golden/FmulVV16VFloat16VFVF.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r FmulVV16VFloat16VFVF -n 1 -l 7 --has-ta --has-ma -c FmulVV16VFloat16VFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmul_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfmul_vv_f16m1(vec_value_0_0, vec_value_1_0, vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmul_vv_operator_0() { +uint64_t tmp[] = {31744,31744,31744,31744,31744,31744,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmulVV16VFloat16VFVFVF_TU.c b/test/codegen-golden/FmulVV16VFloat16VFVFVF_TU.c new file mode 100644 index 0000000..9901878 --- /dev/null +++ b/test/codegen-golden/FmulVV16VFloat16VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FmulVV16VFloat16VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FmulVV16VFloat16VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmul_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfmul_vv_f16m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmul_vv_operator_0() { +uint64_t tmp[] = {31744,29790,31744,28721,31744,26987,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmulVV16VFloat16VFVF_TA.c b/test/codegen-golden/FmulVV16VFloat16VFVF_TA.c new file mode 100644 index 0000000..c141287 --- /dev/null +++ b/test/codegen-golden/FmulVV16VFloat16VFVF_TA.c @@ -0,0 +1,85 @@ +// COMMAND: random_gen -r FmulVV16VFloat16VFVF_TA -n 1 -l 7 --has-ta --has-ma -c FmulVV16VFloat16VFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfmul_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfmul_vv_f16m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmul_vv_operator_0() { +uint64_t tmp[] = {31744,65535,31744,65535,31744,65535,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmvF16VFloat16SF.c b/test/codegen-golden/FmvF16VFloat16SF.c new file mode 100644 index 0000000..3c493b7 --- /dev/null +++ b/test/codegen-golden/FmvF16VFloat16SF.c @@ -0,0 +1,64 @@ +// COMMAND: random_gen -r FmvF16VFloat16SF -n 1 -l 7 --has-ta --has-ma -c FmvF16VFloat16SF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp = 27738; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_0 = converter.f; +} +void vfmv_v_f_operator_0() { +float16_t placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); + +vfloat16m1_t vec_value_1_0= vfmv_v_f_f16m1(placeholder0, vl); + +vse16_v_f16m1(placeholder1, vec_value_1_0, vl); + +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfmv_v_f_operator_0() { +uint64_t tmp[] = {27738,27738,27738,27738,27738,27738,27738,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfmv_v_f_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmv_v_f_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfmv_v_f_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmvF16VFloat16SF_TA.c b/test/codegen-golden/FmvF16VFloat16SF_TA.c new file mode 100644 index 0000000..6c506f8 --- /dev/null +++ b/test/codegen-golden/FmvF16VFloat16SF_TA.c @@ -0,0 +1,65 @@ +// COMMAND: random_gen -r FmvF16VFloat16SF_TA -n 1 -l 7 --has-ta --has-ma -c FmvF16VFloat16SF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp = 27738; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_0 = converter.f; +} +void vfmv_v_f_operator_0() { +float16_t placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; + +vfloat16m1_t vec_value_1_0= vfmv_v_f_f16m1_ta(placeholder0, tail_vl); + +vse16_v_f16m1(placeholder1, vec_value_1_0, vl); + +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfmv_v_f_operator_0() { +uint64_t tmp[] = {27738,65535,27738,65535,27738,65535,27738,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfmv_v_f_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmv_v_f_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfmv_v_f_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FmvF16VFloat16VFSF_TU.c b/test/codegen-golden/FmvF16VFloat16VFSF_TU.c new file mode 100644 index 0000000..9b0dbe2 --- /dev/null +++ b/test/codegen-golden/FmvF16VFloat16VFSF_TU.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r FmvF16VFloat16VFSF_TU -n 1 -l 7 --has-ta --has-ma -c FmvF16VFloat16VFSF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfmv_v_f_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_2_0= vfmv_v_f_f16m1_tu(vec_value_0_0, placeholder1, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfmv_v_f_operator_0() { +uint64_t tmp[] = {28575,29790,28575,28721,28575,26987,28575,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfmv_v_f_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfmv_v_f_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfmv_v_f_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV16VInt8VBVF_TAMA.c b/test/codegen-golden/FncvtV16VInt8VBVF_TAMA.c new file mode 100644 index 0000000..f5b95a8 --- /dev/null +++ b/test/codegen-golden/FncvtV16VInt8VBVF_TAMA.c @@ -0,0 +1,79 @@ +// COMMAND: random_gen -r FncvtV16VInt8VBVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FncvtV16VInt8VBVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_x_f_w_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vint8mf2_t vec_value_2_0= vfncvt_x_f_w_i8mf2_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8mf2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_x_f_w_operator_0() { +int8_t tmp[] = {-1,-1,127,-1,127,-1,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfncvt_x_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_x_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_x_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV16VInt8VBVIVF_TAMU.c b/test/codegen-golden/FncvtV16VInt8VBVIVF_TAMU.c new file mode 100644 index 0000000..5b4187b --- /dev/null +++ b/test/codegen-golden/FncvtV16VInt8VBVIVF_TAMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r FncvtV16VInt8VBVIVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FncvtV16VInt8VBVIVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfncvt_x_f_w_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1_0= vle8_v_i8mf2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint8mf2_t vec_value_3_0= vfncvt_x_f_w_i8mf2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_x_f_w_operator_0() { +int8_t tmp[] = {29,-1,127,-1,127,-1,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_x_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_x_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_x_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV16VInt8VBVIVF_TUMA.c b/test/codegen-golden/FncvtV16VInt8VBVIVF_TUMA.c new file mode 100644 index 0000000..671f265 --- /dev/null +++ b/test/codegen-golden/FncvtV16VInt8VBVIVF_TUMA.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r FncvtV16VInt8VBVIVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FncvtV16VInt8VBVIVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfncvt_x_f_w_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1_0= vle8_v_i8mf2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint8mf2_t vec_value_3_0= vfncvt_x_f_w_i8mf2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_x_f_w_operator_0() { +int8_t tmp[] = {-1,84,127,19,127,-74,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_x_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_x_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_x_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV16VInt8VBVIVF_TUMU.c b/test/codegen-golden/FncvtV16VInt8VBVIVF_TUMU.c new file mode 100644 index 0000000..c4dafcb --- /dev/null +++ b/test/codegen-golden/FncvtV16VInt8VBVIVF_TUMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r FncvtV16VInt8VBVIVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FncvtV16VInt8VBVIVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfncvt_x_f_w_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1_0= vle8_v_i8mf2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint8mf2_t vec_value_3_0= vfncvt_x_f_w_i8mf2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_x_f_w_operator_0() { +int8_t tmp[] = {29,84,127,19,127,-74,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_x_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_x_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_x_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV16VInt8VBVIVF_m.c b/test/codegen-golden/FncvtV16VInt8VBVIVF_m.c new file mode 100644 index 0000000..e4f108c --- /dev/null +++ b/test/codegen-golden/FncvtV16VInt8VBVIVF_m.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r FncvtV16VInt8VBVIVF_m -n 1 -l 7 --has-ta --has-ma -c FncvtV16VInt8VBVIVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfncvt_x_f_w_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1_0= vle8_v_i8mf2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint8mf2_t vec_value_3_0= vfncvt_x_f_w_i8mf2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse8_v_i8mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_x_f_w_operator_0() { +int8_t tmp[] = {29,127,127,19,127,-74,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_x_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_x_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_x_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV16VInt8VF.c b/test/codegen-golden/FncvtV16VInt8VF.c new file mode 100644 index 0000000..b0f5cbb --- /dev/null +++ b/test/codegen-golden/FncvtV16VInt8VF.c @@ -0,0 +1,62 @@ +// COMMAND: random_gen -r FncvtV16VInt8VF -n 1 -l 7 --has-ta --has-ma -c FncvtV16VInt8VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfncvt_x_f_w_operator_0() { +float16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vint8mf2_t vec_value_1_0= vfncvt_x_f_w_i8mf2(vec_value_0_0, vl); + +vse8_v_i8mf2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfncvt_x_f_w_operator_0() { +int8_t tmp[] = {127,127,127,127,127,127,127,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfncvt_x_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_x_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfncvt_x_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV16VInt8VF_TA.c b/test/codegen-golden/FncvtV16VInt8VF_TA.c new file mode 100644 index 0000000..322f3ba --- /dev/null +++ b/test/codegen-golden/FncvtV16VInt8VF_TA.c @@ -0,0 +1,63 @@ +// COMMAND: random_gen -r FncvtV16VInt8VF_TA -n 1 -l 7 --has-ta --has-ma -c FncvtV16VInt8VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfncvt_x_f_w_operator_0() { +float16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vint8mf2_t vec_value_1_0= vfncvt_x_f_w_i8mf2_ta(vec_value_0_0, tail_vl); + +vse8_v_i8mf2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfncvt_x_f_w_operator_0() { +int8_t tmp[] = {127,-1,127,-1,127,-1,127,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfncvt_x_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_x_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfncvt_x_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV16VInt8VIVF_TU.c b/test/codegen-golden/FncvtV16VInt8VIVF_TU.c new file mode 100644 index 0000000..ba289c0 --- /dev/null +++ b/test/codegen-golden/FncvtV16VInt8VIVF_TU.c @@ -0,0 +1,78 @@ +// COMMAND: random_gen -r FncvtV16VInt8VIVF_TU -n 1 -l 7 --has-ta --has-ma -c FncvtV16VInt8VIVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_x_f_w_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0_0= vle8_v_i8mf2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vint8mf2_t vec_value_2_0= vfncvt_x_f_w_i8mf2_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8mf2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_x_f_w_operator_0() { +int8_t tmp[] = {127,79,127,-14,127,-73,127,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfncvt_x_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_x_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_x_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV16VUInt8VBVF_TAMA.c b/test/codegen-golden/FncvtV16VUInt8VBVF_TAMA.c new file mode 100644 index 0000000..2fbc5ea --- /dev/null +++ b/test/codegen-golden/FncvtV16VUInt8VBVF_TAMA.c @@ -0,0 +1,79 @@ +// COMMAND: random_gen -r FncvtV16VUInt8VBVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FncvtV16VUInt8VBVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_xu_f_w_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vuint8mf2_t vec_value_2_0= vfncvt_xu_f_w_u8mf2_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_u8mf2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_xu_f_w_operator_0() { +uint8_t tmp[] = {255,255,255,255,255,255,255,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfncvt_xu_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_xu_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_xu_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV16VUInt8VBVUVF_TAMU.c b/test/codegen-golden/FncvtV16VUInt8VBVUVF_TAMU.c new file mode 100644 index 0000000..c0649ae --- /dev/null +++ b/test/codegen-golden/FncvtV16VUInt8VBVUVF_TAMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r FncvtV16VUInt8VBVUVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FncvtV16VUInt8VBVUVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +float16_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfncvt_xu_f_w_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint8mf2_t vec_value_1_0= vle8_v_u8mf2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint8mf2_t vec_value_3_0= vfncvt_xu_f_w_u8mf2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_xu_f_w_operator_0() { +uint8_t tmp[] = {65,255,255,255,255,255,46,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_xu_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_xu_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_xu_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV16VUInt8VBVUVF_TUMA.c b/test/codegen-golden/FncvtV16VUInt8VBVUVF_TUMA.c new file mode 100644 index 0000000..565dc6a --- /dev/null +++ b/test/codegen-golden/FncvtV16VUInt8VBVUVF_TUMA.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r FncvtV16VUInt8VBVUVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FncvtV16VUInt8VBVUVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +float16_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfncvt_xu_f_w_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint8mf2_t vec_value_1_0= vle8_v_u8mf2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint8mf2_t vec_value_3_0= vfncvt_xu_f_w_u8mf2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_xu_f_w_operator_0() { +uint8_t tmp[] = {255,92,255,59,255,13,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_xu_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_xu_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_xu_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV16VUInt8VBVUVF_TUMU.c b/test/codegen-golden/FncvtV16VUInt8VBVUVF_TUMU.c new file mode 100644 index 0000000..6cf6b6d --- /dev/null +++ b/test/codegen-golden/FncvtV16VUInt8VBVUVF_TUMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r FncvtV16VUInt8VBVUVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FncvtV16VUInt8VBVUVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +float16_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfncvt_xu_f_w_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint8mf2_t vec_value_1_0= vle8_v_u8mf2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint8mf2_t vec_value_3_0= vfncvt_xu_f_w_u8mf2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_xu_f_w_operator_0() { +uint8_t tmp[] = {65,92,255,59,255,13,46,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_xu_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_xu_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_xu_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV16VUInt8VBVUVF_m.c b/test/codegen-golden/FncvtV16VUInt8VBVUVF_m.c new file mode 100644 index 0000000..f842315 --- /dev/null +++ b/test/codegen-golden/FncvtV16VUInt8VBVUVF_m.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r FncvtV16VUInt8VBVUVF_m -n 1 -l 7 --has-ta --has-ma -c FncvtV16VUInt8VBVUVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +float16_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfncvt_xu_f_w_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint8mf2_t vec_value_1_0= vle8_v_u8mf2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint8mf2_t vec_value_3_0= vfncvt_xu_f_w_u8mf2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse8_v_u8mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_xu_f_w_operator_0() { +uint8_t tmp[] = {65,255,255,59,255,13,46,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_xu_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_xu_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_xu_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV16VUInt8VF.c b/test/codegen-golden/FncvtV16VUInt8VF.c new file mode 100644 index 0000000..f8c1f78 --- /dev/null +++ b/test/codegen-golden/FncvtV16VUInt8VF.c @@ -0,0 +1,62 @@ +// COMMAND: random_gen -r FncvtV16VUInt8VF -n 1 -l 7 --has-ta --has-ma -c FncvtV16VUInt8VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +uint8_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfncvt_xu_f_w_operator_0() { +float16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vuint8mf2_t vec_value_1_0= vfncvt_xu_f_w_u8mf2(vec_value_0_0, vl); + +vse8_v_u8mf2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfncvt_xu_f_w_operator_0() { +uint8_t tmp[] = {255,255,255,255,255,255,255,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfncvt_xu_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_xu_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfncvt_xu_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV16VUInt8VF_TA.c b/test/codegen-golden/FncvtV16VUInt8VF_TA.c new file mode 100644 index 0000000..8c8c895 --- /dev/null +++ b/test/codegen-golden/FncvtV16VUInt8VF_TA.c @@ -0,0 +1,63 @@ +// COMMAND: random_gen -r FncvtV16VUInt8VF_TA -n 1 -l 7 --has-ta --has-ma -c FncvtV16VUInt8VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +uint8_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfncvt_xu_f_w_operator_0() { +float16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vuint8mf2_t vec_value_1_0= vfncvt_xu_f_w_u8mf2_ta(vec_value_0_0, tail_vl); + +vse8_v_u8mf2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfncvt_xu_f_w_operator_0() { +uint8_t tmp[] = {255,255,255,255,255,255,255,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfncvt_xu_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_xu_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfncvt_xu_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV16VUInt8VUVF_TU.c b/test/codegen-golden/FncvtV16VUInt8VUVF_TU.c new file mode 100644 index 0000000..77f7d37 --- /dev/null +++ b/test/codegen-golden/FncvtV16VUInt8VUVF_TU.c @@ -0,0 +1,78 @@ +// COMMAND: random_gen -r FncvtV16VUInt8VUVF_TU -n 1 -l 7 --has-ta --has-ma -c FncvtV16VUInt8VUVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +float16_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_xu_f_w_operator_0() { +uint8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8mf2_t vec_value_0_0= vle8_v_u8mf2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vuint8mf2_t vec_value_2_0= vfncvt_xu_f_w_u8mf2_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_u8mf2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_xu_f_w_operator_0() { +uint8_t tmp[] = {255,90,255,43,255,14,255,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfncvt_xu_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_xu_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_xu_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VBVFVF_TAMU.c b/test/codegen-golden/FncvtV32VFloat16VBVFVF_TAMU.c new file mode 100644 index 0000000..4a35071 --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VBVFVF_TAMU.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VBVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VBVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1257125040u,1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_f_f_w_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat16mf2_t vec_value_1_0= vle16_v_f16mf2(placeholder1, vl); +vfloat32m1_t vec_value_2_0= vle32_v_f32m1(placeholder2, vl); + +vfloat16mf2_t vec_value_3_0= vfncvt_f_f_w_f16mf2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_f_f_w_operator_0() { +uint64_t tmp[] = {29258,65535,31744,65535,31744,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_f_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_f_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VBVFVF_TUMA.c b/test/codegen-golden/FncvtV32VFloat16VBVFVF_TUMA.c new file mode 100644 index 0000000..12e6f78 --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VBVFVF_TUMA.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VBVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VBVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1257125040u,1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_f_f_w_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat16mf2_t vec_value_1_0= vle16_v_f16mf2(placeholder1, vl); +vfloat32m1_t vec_value_2_0= vle32_v_f32m1(placeholder2, vl); + +vfloat16mf2_t vec_value_3_0= vfncvt_f_f_w_f16mf2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_f_f_w_operator_0() { +uint64_t tmp[] = {65535,29822,31744,29133,31744,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_f_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_f_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VBVFVF_TUMU.c b/test/codegen-golden/FncvtV32VFloat16VBVFVF_TUMU.c new file mode 100644 index 0000000..23f642c --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VBVFVF_TUMU.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VBVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VBVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1257125040u,1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_f_f_w_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat16mf2_t vec_value_1_0= vle16_v_f16mf2(placeholder1, vl); +vfloat32m1_t vec_value_2_0= vle32_v_f32m1(placeholder2, vl); + +vfloat16mf2_t vec_value_3_0= vfncvt_f_f_w_f16mf2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_f_f_w_operator_0() { +uint64_t tmp[] = {29258,29822,31744,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_f_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_f_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VBVFVF_m.c b/test/codegen-golden/FncvtV32VFloat16VBVFVF_m.c new file mode 100644 index 0000000..a86cdc8 --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VBVFVF_m.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VBVFVF_m -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VBVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1257125040u,1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_f_f_w_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat16mf2_t vec_value_1_0= vle16_v_f16mf2(placeholder1, vl); +vfloat32m1_t vec_value_2_0= vle32_v_f32m1(placeholder2, vl); + +vfloat16mf2_t vec_value_3_0= vfncvt_f_f_w_f16mf2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_f16mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_f_f_w_operator_0() { +uint64_t tmp[] = {29258,31744,31744,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_f_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_f_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VBVFVI_TAMU.c b/test/codegen-golden/FncvtV32VFloat16VBVFVI_TAMU.c new file mode 100644 index 0000000..c266d8e --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VBVFVI_TAMU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VBVFVI_TAMU -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VBVFVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +int32_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int32_t tmp[] = {-2194472,5000420,-1529498,1184154,1613727,-6426492,-2595685,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_f_x_w_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat16mf2_t vec_value_1_0= vle16_v_f16mf2(placeholder1, vl); +vint32m1_t vec_value_2_0= vle32_v_i32m1(placeholder2, vl); + +vfloat16mf2_t vec_value_3_0= vfncvt_f_x_w_f16mf2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_f_x_w_operator_0() { +uint64_t tmp[] = {29258,65535,64512,65535,31744,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_f_x_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_x_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_f_x_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VBVFVI_TUMA.c b/test/codegen-golden/FncvtV32VFloat16VBVFVI_TUMA.c new file mode 100644 index 0000000..4249f43 --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VBVFVI_TUMA.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VBVFVI_TUMA -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VBVFVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +int32_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int32_t tmp[] = {-2194472,5000420,-1529498,1184154,1613727,-6426492,-2595685,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_f_x_w_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat16mf2_t vec_value_1_0= vle16_v_f16mf2(placeholder1, vl); +vint32m1_t vec_value_2_0= vle32_v_i32m1(placeholder2, vl); + +vfloat16mf2_t vec_value_3_0= vfncvt_f_x_w_f16mf2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_f_x_w_operator_0() { +uint64_t tmp[] = {65535,29822,64512,29133,31744,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_f_x_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_x_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_f_x_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VBVFVI_TUMU.c b/test/codegen-golden/FncvtV32VFloat16VBVFVI_TUMU.c new file mode 100644 index 0000000..c3fa319 --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VBVFVI_TUMU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VBVFVI_TUMU -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VBVFVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +int32_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int32_t tmp[] = {-2194472,5000420,-1529498,1184154,1613727,-6426492,-2595685,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_f_x_w_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat16mf2_t vec_value_1_0= vle16_v_f16mf2(placeholder1, vl); +vint32m1_t vec_value_2_0= vle32_v_i32m1(placeholder2, vl); + +vfloat16mf2_t vec_value_3_0= vfncvt_f_x_w_f16mf2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_f_x_w_operator_0() { +uint64_t tmp[] = {29258,29822,64512,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_f_x_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_x_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_f_x_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VBVFVI_m.c b/test/codegen-golden/FncvtV32VFloat16VBVFVI_m.c new file mode 100644 index 0000000..2ac73c8 --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VBVFVI_m.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VBVFVI_m -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VBVFVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +int32_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int32_t tmp[] = {-2194472,5000420,-1529498,1184154,1613727,-6426492,-2595685,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_f_x_w_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat16mf2_t vec_value_1_0= vle16_v_f16mf2(placeholder1, vl); +vint32m1_t vec_value_2_0= vle32_v_i32m1(placeholder2, vl); + +vfloat16mf2_t vec_value_3_0= vfncvt_f_x_w_f16mf2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_f16mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_f_x_w_operator_0() { +uint64_t tmp[] = {29258,31744,64512,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_f_x_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_x_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_f_x_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VBVFVU_TAMU.c b/test/codegen-golden/FncvtV32VFloat16VBVFVU_TAMU.c new file mode 100644 index 0000000..febf38e --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VBVFVU_TAMU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VBVFVU_TAMU -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VBVFVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +uint32_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_f_xu_w_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat16mf2_t vec_value_1_0= vle16_v_f16mf2(placeholder1, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1(placeholder2, vl); + +vfloat16mf2_t vec_value_3_0= vfncvt_f_xu_w_f16mf2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_f_xu_w_operator_0() { +uint64_t tmp[] = {29258,65535,31744,65535,31744,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_f_xu_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_xu_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_f_xu_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VBVFVU_TUMA.c b/test/codegen-golden/FncvtV32VFloat16VBVFVU_TUMA.c new file mode 100644 index 0000000..e805e92 --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VBVFVU_TUMA.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VBVFVU_TUMA -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VBVFVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +uint32_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_f_xu_w_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat16mf2_t vec_value_1_0= vle16_v_f16mf2(placeholder1, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1(placeholder2, vl); + +vfloat16mf2_t vec_value_3_0= vfncvt_f_xu_w_f16mf2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_f_xu_w_operator_0() { +uint64_t tmp[] = {65535,29822,31744,29133,31744,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_f_xu_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_xu_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_f_xu_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VBVFVU_TUMU.c b/test/codegen-golden/FncvtV32VFloat16VBVFVU_TUMU.c new file mode 100644 index 0000000..50e3bfc --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VBVFVU_TUMU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VBVFVU_TUMU -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VBVFVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +uint32_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_f_xu_w_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat16mf2_t vec_value_1_0= vle16_v_f16mf2(placeholder1, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1(placeholder2, vl); + +vfloat16mf2_t vec_value_3_0= vfncvt_f_xu_w_f16mf2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_f_xu_w_operator_0() { +uint64_t tmp[] = {29258,29822,31744,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_f_xu_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_xu_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_f_xu_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VBVFVU_m.c b/test/codegen-golden/FncvtV32VFloat16VBVFVU_m.c new file mode 100644 index 0000000..df9c3fd --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VBVFVU_m.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VBVFVU_m -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VBVFVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +uint32_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_f_xu_w_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat16mf2_t vec_value_1_0= vle16_v_f16mf2(placeholder1, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1(placeholder2, vl); + +vfloat16mf2_t vec_value_3_0= vfncvt_f_xu_w_f16mf2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_f16mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_f_xu_w_operator_0() { +uint64_t tmp[] = {29258,31744,31744,29133,31744,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_f_xu_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_xu_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_f_xu_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VBVF_TAMA.c b/test/codegen-golden/FncvtV32VFloat16VBVF_TAMA.c new file mode 100644 index 0000000..85d8c79 --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VBVF_TAMA.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VBVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VBVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1257125040u,1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_f_f_w_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); + +vfloat16mf2_t vec_value_2_0= vfncvt_f_f_w_f16mf2_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16mf2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_f_f_w_operator_0() { +uint64_t tmp[] = {65535,65535,31744,65535,31744,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfncvt_f_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_f_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VBVI_TAMA.c b/test/codegen-golden/FncvtV32VFloat16VBVI_TAMA.c new file mode 100644 index 0000000..dbce24a --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VBVI_TAMA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VBVI_TAMA -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VBVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {-2194472,5000420,-1529498,1184154,1613727,-6426492,-2595685,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfncvt_f_x_w_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); + +vfloat16mf2_t vec_value_2_0= vfncvt_f_x_w_f16mf2_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16mf2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_f_x_w_operator_0() { +uint64_t tmp[] = {65535,65535,64512,65535,31744,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfncvt_f_x_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_x_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_f_x_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VBVU_TAMA.c b/test/codegen-golden/FncvtV32VFloat16VBVU_TAMA.c new file mode 100644 index 0000000..3be6064 --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VBVU_TAMA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VBVU_TAMA -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VBVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfncvt_f_xu_w_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); + +vfloat16mf2_t vec_value_2_0= vfncvt_f_xu_w_f16mf2_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16mf2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_f_xu_w_operator_0() { +uint64_t tmp[] = {65535,65535,31744,65535,31744,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfncvt_f_xu_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_xu_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_f_xu_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VF.c b/test/codegen-golden/FncvtV32VFloat16VF.c new file mode 100644 index 0000000..856ceb1 --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VF.c @@ -0,0 +1,67 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VF -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfncvt_f_f_w_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e32m1(placeholder2); +vfloat32m1_t vec_value_0_0= vle32_v_f32m1(placeholder0, vl); + +vfloat16mf2_t vec_value_1_0= vfncvt_f_f_w_f16mf2(vec_value_0_0, vl); + +vse16_v_f16mf2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfncvt_f_f_w_operator_0() { +uint64_t tmp[] = {31744,31744,31744,31744,31744,31744,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfncvt_f_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfncvt_f_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VFVF_TU.c b/test/codegen-golden/FncvtV32VFloat16VFVF_TU.c new file mode 100644 index 0000000..03d5e70 --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VFVF_TU.c @@ -0,0 +1,85 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VFVF_TU -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1257125040u,1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_f_f_w_operator_0() { +float16_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16mf2_t vec_value_0_0= vle16_v_f16mf2(placeholder0, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); + +vfloat16mf2_t vec_value_2_0= vfncvt_f_f_w_f16mf2_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16mf2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_f_f_w_operator_0() { +uint64_t tmp[] = {31744,29790,31744,28721,31744,26987,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfncvt_f_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_f_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VFVI_TU.c b/test/codegen-golden/FncvtV32VFloat16VFVI_TU.c new file mode 100644 index 0000000..73e8d63 --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VFVI_TU.c @@ -0,0 +1,83 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VFVI_TU -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VFVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +int32_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {-2194472,5000420,-1529498,1184154,1613727,-6426492,-2595685,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfncvt_f_x_w_operator_0() { +float16_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16mf2_t vec_value_0_0= vle16_v_f16mf2(placeholder0, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); + +vfloat16mf2_t vec_value_2_0= vfncvt_f_x_w_f16mf2_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16mf2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_f_x_w_operator_0() { +uint64_t tmp[] = {64512,29790,64512,28721,31744,26987,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfncvt_f_x_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_x_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_f_x_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VFVU_TU.c b/test/codegen-golden/FncvtV32VFloat16VFVU_TU.c new file mode 100644 index 0000000..a8a4ae9 --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VFVU_TU.c @@ -0,0 +1,83 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VFVU_TU -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VFVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +uint32_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfncvt_f_xu_w_operator_0() { +float16_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16mf2_t vec_value_0_0= vle16_v_f16mf2(placeholder0, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); + +vfloat16mf2_t vec_value_2_0= vfncvt_f_xu_w_f16mf2_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16mf2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_f_xu_w_operator_0() { +uint64_t tmp[] = {31744,29790,31744,28721,31744,26987,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfncvt_f_xu_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_xu_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_f_xu_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VF_TA.c b/test/codegen-golden/FncvtV32VFloat16VF_TA.c new file mode 100644 index 0000000..6628717 --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VF_TA.c @@ -0,0 +1,68 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VF_TA -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfncvt_f_f_w_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m1_t vec_value_0_0= vle32_v_f32m1(placeholder0, vl); + +vfloat16mf2_t vec_value_1_0= vfncvt_f_f_w_f16mf2_ta(vec_value_0_0, tail_vl); + +vse16_v_f16mf2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfncvt_f_f_w_operator_0() { +uint64_t tmp[] = {31744,65535,31744,65535,31744,65535,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfncvt_f_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfncvt_f_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VI.c b/test/codegen-golden/FncvtV32VFloat16VI.c new file mode 100644 index 0000000..0281e4d --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VI.c @@ -0,0 +1,65 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VI -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int32_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vfncvt_f_x_w_operator_0() { +int32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e32m1(placeholder2); +vint32m1_t vec_value_0_0= vle32_v_i32m1(placeholder0, vl); + +vfloat16mf2_t vec_value_1_0= vfncvt_f_x_w_f16mf2(vec_value_0_0, vl); + +vse16_v_f16mf2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfncvt_f_x_w_operator_0() { +uint64_t tmp[] = {64512,31744,31744,64512,31744,64512,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfncvt_f_x_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_x_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfncvt_f_x_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VI_TA.c b/test/codegen-golden/FncvtV32VFloat16VI_TA.c new file mode 100644 index 0000000..fdac84f --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VI_TA.c @@ -0,0 +1,66 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VI_TA -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int32_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vfncvt_f_x_w_operator_0() { +int32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint32m1_t vec_value_0_0= vle32_v_i32m1(placeholder0, vl); + +vfloat16mf2_t vec_value_1_0= vfncvt_f_x_w_f16mf2_ta(vec_value_0_0, tail_vl); + +vse16_v_f16mf2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfncvt_f_x_w_operator_0() { +uint64_t tmp[] = {64512,65535,31744,65535,31744,65535,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfncvt_f_x_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_x_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfncvt_f_x_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VU.c b/test/codegen-golden/FncvtV32VFloat16VU.c new file mode 100644 index 0000000..f590176 --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VU.c @@ -0,0 +1,65 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VU -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint32_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vfncvt_f_xu_w_operator_0() { +uint32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e32m1(placeholder2); +vuint32m1_t vec_value_0_0= vle32_v_u32m1(placeholder0, vl); + +vfloat16mf2_t vec_value_1_0= vfncvt_f_xu_w_f16mf2(vec_value_0_0, vl); + +vse16_v_f16mf2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfncvt_f_xu_w_operator_0() { +uint64_t tmp[] = {31744,31744,31744,31744,31744,31744,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfncvt_f_xu_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_xu_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfncvt_f_xu_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FncvtV32VFloat16VU_TA.c b/test/codegen-golden/FncvtV32VFloat16VU_TA.c new file mode 100644 index 0000000..4edb830 --- /dev/null +++ b/test/codegen-golden/FncvtV32VFloat16VU_TA.c @@ -0,0 +1,66 @@ +// COMMAND: random_gen -r FncvtV32VFloat16VU_TA -n 1 -l 7 --has-ta --has-ma -c FncvtV32VFloat16VU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint32_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vfncvt_f_xu_w_operator_0() { +uint32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint32m1_t vec_value_0_0= vle32_v_u32m1(placeholder0, vl); + +vfloat16mf2_t vec_value_1_0= vfncvt_f_xu_w_f16mf2_ta(vec_value_0_0, tail_vl); + +vse16_v_f16mf2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfncvt_f_xu_w_operator_0() { +uint64_t tmp[] = {31744,65535,31744,65535,31744,65535,31744,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfncvt_f_xu_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_f_xu_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfncvt_f_xu_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rodV32VFloat16VBVFVF_TAMU.c b/test/codegen-golden/Fncvt_rodV32VFloat16VBVFVF_TAMU.c new file mode 100644 index 0000000..21da79a --- /dev/null +++ b/test/codegen-golden/Fncvt_rodV32VFloat16VBVFVF_TAMU.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r Fncvt_rodV32VFloat16VBVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c Fncvt_rodV32VFloat16VBVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1257125040u,1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_rod_f_f_w_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat16mf2_t vec_value_1_0= vle16_v_f16mf2(placeholder1, vl); +vfloat32m1_t vec_value_2_0= vle32_v_f32m1(placeholder2, vl); + +vfloat16mf2_t vec_value_3_0= vfncvt_rod_f_f_w_f16mf2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_rod_f_f_w_operator_0() { +uint64_t tmp[] = {29258,65535,31743,65535,31743,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_rod_f_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rod_f_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_rod_f_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rodV32VFloat16VBVFVF_TUMA.c b/test/codegen-golden/Fncvt_rodV32VFloat16VBVFVF_TUMA.c new file mode 100644 index 0000000..7bba4b6 --- /dev/null +++ b/test/codegen-golden/Fncvt_rodV32VFloat16VBVFVF_TUMA.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r Fncvt_rodV32VFloat16VBVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c Fncvt_rodV32VFloat16VBVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1257125040u,1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_rod_f_f_w_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat16mf2_t vec_value_1_0= vle16_v_f16mf2(placeholder1, vl); +vfloat32m1_t vec_value_2_0= vle32_v_f32m1(placeholder2, vl); + +vfloat16mf2_t vec_value_3_0= vfncvt_rod_f_f_w_f16mf2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_rod_f_f_w_operator_0() { +uint64_t tmp[] = {65535,29822,31743,29133,31743,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_rod_f_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rod_f_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_rod_f_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rodV32VFloat16VBVFVF_TUMU.c b/test/codegen-golden/Fncvt_rodV32VFloat16VBVFVF_TUMU.c new file mode 100644 index 0000000..acd96c1 --- /dev/null +++ b/test/codegen-golden/Fncvt_rodV32VFloat16VBVFVF_TUMU.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r Fncvt_rodV32VFloat16VBVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c Fncvt_rodV32VFloat16VBVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1257125040u,1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_rod_f_f_w_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat16mf2_t vec_value_1_0= vle16_v_f16mf2(placeholder1, vl); +vfloat32m1_t vec_value_2_0= vle32_v_f32m1(placeholder2, vl); + +vfloat16mf2_t vec_value_3_0= vfncvt_rod_f_f_w_f16mf2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_rod_f_f_w_operator_0() { +uint64_t tmp[] = {29258,29822,31743,29133,31743,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_rod_f_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rod_f_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_rod_f_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rodV32VFloat16VBVFVF_m.c b/test/codegen-golden/Fncvt_rodV32VFloat16VBVFVF_m.c new file mode 100644 index 0000000..0f4193b --- /dev/null +++ b/test/codegen-golden/Fncvt_rodV32VFloat16VBVFVF_m.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r Fncvt_rodV32VFloat16VBVFVF_m -n 1 -l 7 --has-ta --has-ma -c Fncvt_rodV32VFloat16VBVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1257125040u,1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_rod_f_f_w_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat16mf2_t vec_value_1_0= vle16_v_f16mf2(placeholder1, vl); +vfloat32m1_t vec_value_2_0= vle32_v_f32m1(placeholder2, vl); + +vfloat16mf2_t vec_value_3_0= vfncvt_rod_f_f_w_f16mf2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_f16mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_rod_f_f_w_operator_0() { +uint64_t tmp[] = {29258,31743,31743,29133,31743,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_rod_f_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rod_f_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_rod_f_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rodV32VFloat16VBVF_TAMA.c b/test/codegen-golden/Fncvt_rodV32VFloat16VBVF_TAMA.c new file mode 100644 index 0000000..7309363 --- /dev/null +++ b/test/codegen-golden/Fncvt_rodV32VFloat16VBVF_TAMA.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r Fncvt_rodV32VFloat16VBVF_TAMA -n 1 -l 7 --has-ta --has-ma -c Fncvt_rodV32VFloat16VBVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1257125040u,1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_rod_f_f_w_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); + +vfloat16mf2_t vec_value_2_0= vfncvt_rod_f_f_w_f16mf2_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16mf2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_rod_f_f_w_operator_0() { +uint64_t tmp[] = {65535,65535,31743,65535,31743,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfncvt_rod_f_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rod_f_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_rod_f_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rodV32VFloat16VF.c b/test/codegen-golden/Fncvt_rodV32VFloat16VF.c new file mode 100644 index 0000000..e8495e9 --- /dev/null +++ b/test/codegen-golden/Fncvt_rodV32VFloat16VF.c @@ -0,0 +1,67 @@ +// COMMAND: random_gen -r Fncvt_rodV32VFloat16VF -n 1 -l 7 --has-ta --has-ma -c Fncvt_rodV32VFloat16VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfncvt_rod_f_f_w_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e32m1(placeholder2); +vfloat32m1_t vec_value_0_0= vle32_v_f32m1(placeholder0, vl); + +vfloat16mf2_t vec_value_1_0= vfncvt_rod_f_f_w_f16mf2(vec_value_0_0, vl); + +vse16_v_f16mf2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfncvt_rod_f_f_w_operator_0() { +uint64_t tmp[] = {31743,31743,31743,31743,31743,31743,31743,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfncvt_rod_f_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rod_f_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfncvt_rod_f_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rodV32VFloat16VFVF_TU.c b/test/codegen-golden/Fncvt_rodV32VFloat16VFVF_TU.c new file mode 100644 index 0000000..e95c243 --- /dev/null +++ b/test/codegen-golden/Fncvt_rodV32VFloat16VFVF_TU.c @@ -0,0 +1,85 @@ +// COMMAND: random_gen -r Fncvt_rodV32VFloat16VFVF_TU -n 1 -l 7 --has-ta --has-ma -c Fncvt_rodV32VFloat16VFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1257125040u,1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_rod_f_f_w_operator_0() { +float16_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16mf2_t vec_value_0_0= vle16_v_f16mf2(placeholder0, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); + +vfloat16mf2_t vec_value_2_0= vfncvt_rod_f_f_w_f16mf2_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16mf2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_rod_f_f_w_operator_0() { +uint64_t tmp[] = {31743,29790,31743,28721,31743,26987,31743,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfncvt_rod_f_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rod_f_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_rod_f_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rodV32VFloat16VF_TA.c b/test/codegen-golden/Fncvt_rodV32VFloat16VF_TA.c new file mode 100644 index 0000000..a77be10 --- /dev/null +++ b/test/codegen-golden/Fncvt_rodV32VFloat16VF_TA.c @@ -0,0 +1,68 @@ +// COMMAND: random_gen -r Fncvt_rodV32VFloat16VF_TA -n 1 -l 7 --has-ta --has-ma -c Fncvt_rodV32VFloat16VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfncvt_rod_f_f_w_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m1_t vec_value_0_0= vle32_v_f32m1(placeholder0, vl); + +vfloat16mf2_t vec_value_1_0= vfncvt_rod_f_f_w_f16mf2_ta(vec_value_0_0, tail_vl); + +vse16_v_f16mf2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfncvt_rod_f_f_w_operator_0() { +uint64_t tmp[] = {31743,65535,31743,65535,31743,65535,31743,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfncvt_rod_f_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rod_f_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfncvt_rod_f_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rtzV16VInt8VBVF_TAMA.c b/test/codegen-golden/Fncvt_rtzV16VInt8VBVF_TAMA.c new file mode 100644 index 0000000..c6a44a2 --- /dev/null +++ b/test/codegen-golden/Fncvt_rtzV16VInt8VBVF_TAMA.c @@ -0,0 +1,79 @@ +// COMMAND: random_gen -r Fncvt_rtzV16VInt8VBVF_TAMA -n 1 -l 7 --has-ta --has-ma -c Fncvt_rtzV16VInt8VBVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_rtz_x_f_w_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vint8mf2_t vec_value_2_0= vfncvt_rtz_x_f_w_i8mf2_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8mf2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_rtz_x_f_w_operator_0() { +int8_t tmp[] = {-1,-1,127,-1,127,-1,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfncvt_rtz_x_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rtz_x_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_rtz_x_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rtzV16VInt8VBVIVF_TAMU.c b/test/codegen-golden/Fncvt_rtzV16VInt8VBVIVF_TAMU.c new file mode 100644 index 0000000..6858e4a --- /dev/null +++ b/test/codegen-golden/Fncvt_rtzV16VInt8VBVIVF_TAMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r Fncvt_rtzV16VInt8VBVIVF_TAMU -n 1 -l 7 --has-ta --has-ma -c Fncvt_rtzV16VInt8VBVIVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfncvt_rtz_x_f_w_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1_0= vle8_v_i8mf2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint8mf2_t vec_value_3_0= vfncvt_rtz_x_f_w_i8mf2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_rtz_x_f_w_operator_0() { +int8_t tmp[] = {29,-1,127,-1,127,-1,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_rtz_x_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rtz_x_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_rtz_x_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rtzV16VInt8VBVIVF_TUMA.c b/test/codegen-golden/Fncvt_rtzV16VInt8VBVIVF_TUMA.c new file mode 100644 index 0000000..e617a11 --- /dev/null +++ b/test/codegen-golden/Fncvt_rtzV16VInt8VBVIVF_TUMA.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r Fncvt_rtzV16VInt8VBVIVF_TUMA -n 1 -l 7 --has-ta --has-ma -c Fncvt_rtzV16VInt8VBVIVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfncvt_rtz_x_f_w_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1_0= vle8_v_i8mf2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint8mf2_t vec_value_3_0= vfncvt_rtz_x_f_w_i8mf2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_rtz_x_f_w_operator_0() { +int8_t tmp[] = {-1,84,127,19,127,-74,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_rtz_x_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rtz_x_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_rtz_x_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rtzV16VInt8VBVIVF_TUMU.c b/test/codegen-golden/Fncvt_rtzV16VInt8VBVIVF_TUMU.c new file mode 100644 index 0000000..942be21 --- /dev/null +++ b/test/codegen-golden/Fncvt_rtzV16VInt8VBVIVF_TUMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r Fncvt_rtzV16VInt8VBVIVF_TUMU -n 1 -l 7 --has-ta --has-ma -c Fncvt_rtzV16VInt8VBVIVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfncvt_rtz_x_f_w_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1_0= vle8_v_i8mf2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint8mf2_t vec_value_3_0= vfncvt_rtz_x_f_w_i8mf2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_rtz_x_f_w_operator_0() { +int8_t tmp[] = {29,84,127,19,127,-74,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_rtz_x_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rtz_x_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_rtz_x_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rtzV16VInt8VBVIVF_m.c b/test/codegen-golden/Fncvt_rtzV16VInt8VBVIVF_m.c new file mode 100644 index 0000000..7e7bea6 --- /dev/null +++ b/test/codegen-golden/Fncvt_rtzV16VInt8VBVIVF_m.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r Fncvt_rtzV16VInt8VBVIVF_m -n 1 -l 7 --has-ta --has-ma -c Fncvt_rtzV16VInt8VBVIVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfncvt_rtz_x_f_w_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1_0= vle8_v_i8mf2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint8mf2_t vec_value_3_0= vfncvt_rtz_x_f_w_i8mf2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse8_v_i8mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_rtz_x_f_w_operator_0() { +int8_t tmp[] = {29,127,127,19,127,-74,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_rtz_x_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rtz_x_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_rtz_x_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rtzV16VInt8VF.c b/test/codegen-golden/Fncvt_rtzV16VInt8VF.c new file mode 100644 index 0000000..b3d3c27 --- /dev/null +++ b/test/codegen-golden/Fncvt_rtzV16VInt8VF.c @@ -0,0 +1,62 @@ +// COMMAND: random_gen -r Fncvt_rtzV16VInt8VF -n 1 -l 7 --has-ta --has-ma -c Fncvt_rtzV16VInt8VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfncvt_rtz_x_f_w_operator_0() { +float16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vint8mf2_t vec_value_1_0= vfncvt_rtz_x_f_w_i8mf2(vec_value_0_0, vl); + +vse8_v_i8mf2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfncvt_rtz_x_f_w_operator_0() { +int8_t tmp[] = {127,127,127,127,127,127,127,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfncvt_rtz_x_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rtz_x_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfncvt_rtz_x_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rtzV16VInt8VF_TA.c b/test/codegen-golden/Fncvt_rtzV16VInt8VF_TA.c new file mode 100644 index 0000000..cb56bc2 --- /dev/null +++ b/test/codegen-golden/Fncvt_rtzV16VInt8VF_TA.c @@ -0,0 +1,63 @@ +// COMMAND: random_gen -r Fncvt_rtzV16VInt8VF_TA -n 1 -l 7 --has-ta --has-ma -c Fncvt_rtzV16VInt8VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfncvt_rtz_x_f_w_operator_0() { +float16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vint8mf2_t vec_value_1_0= vfncvt_rtz_x_f_w_i8mf2_ta(vec_value_0_0, tail_vl); + +vse8_v_i8mf2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfncvt_rtz_x_f_w_operator_0() { +int8_t tmp[] = {127,-1,127,-1,127,-1,127,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfncvt_rtz_x_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rtz_x_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfncvt_rtz_x_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rtzV16VInt8VIVF_TU.c b/test/codegen-golden/Fncvt_rtzV16VInt8VIVF_TU.c new file mode 100644 index 0000000..9661e01 --- /dev/null +++ b/test/codegen-golden/Fncvt_rtzV16VInt8VIVF_TU.c @@ -0,0 +1,78 @@ +// COMMAND: random_gen -r Fncvt_rtzV16VInt8VIVF_TU -n 1 -l 7 --has-ta --has-ma -c Fncvt_rtzV16VInt8VIVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_rtz_x_f_w_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0_0= vle8_v_i8mf2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vint8mf2_t vec_value_2_0= vfncvt_rtz_x_f_w_i8mf2_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8mf2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_rtz_x_f_w_operator_0() { +int8_t tmp[] = {127,79,127,-14,127,-73,127,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfncvt_rtz_x_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rtz_x_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_rtz_x_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rtzV16VUInt8VBVF_TAMA.c b/test/codegen-golden/Fncvt_rtzV16VUInt8VBVF_TAMA.c new file mode 100644 index 0000000..12da4c8 --- /dev/null +++ b/test/codegen-golden/Fncvt_rtzV16VUInt8VBVF_TAMA.c @@ -0,0 +1,79 @@ +// COMMAND: random_gen -r Fncvt_rtzV16VUInt8VBVF_TAMA -n 1 -l 7 --has-ta --has-ma -c Fncvt_rtzV16VUInt8VBVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_rtz_xu_f_w_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vuint8mf2_t vec_value_2_0= vfncvt_rtz_xu_f_w_u8mf2_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_u8mf2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_rtz_xu_f_w_operator_0() { +uint8_t tmp[] = {255,255,255,255,255,255,255,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfncvt_rtz_xu_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rtz_xu_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_rtz_xu_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rtzV16VUInt8VBVUVF_TAMU.c b/test/codegen-golden/Fncvt_rtzV16VUInt8VBVUVF_TAMU.c new file mode 100644 index 0000000..0b5adaf --- /dev/null +++ b/test/codegen-golden/Fncvt_rtzV16VUInt8VBVUVF_TAMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r Fncvt_rtzV16VUInt8VBVUVF_TAMU -n 1 -l 7 --has-ta --has-ma -c Fncvt_rtzV16VUInt8VBVUVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +float16_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfncvt_rtz_xu_f_w_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint8mf2_t vec_value_1_0= vle8_v_u8mf2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint8mf2_t vec_value_3_0= vfncvt_rtz_xu_f_w_u8mf2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_rtz_xu_f_w_operator_0() { +uint8_t tmp[] = {65,255,255,255,255,255,46,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_rtz_xu_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rtz_xu_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_rtz_xu_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rtzV16VUInt8VBVUVF_TUMA.c b/test/codegen-golden/Fncvt_rtzV16VUInt8VBVUVF_TUMA.c new file mode 100644 index 0000000..e094d70 --- /dev/null +++ b/test/codegen-golden/Fncvt_rtzV16VUInt8VBVUVF_TUMA.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r Fncvt_rtzV16VUInt8VBVUVF_TUMA -n 1 -l 7 --has-ta --has-ma -c Fncvt_rtzV16VUInt8VBVUVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +float16_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfncvt_rtz_xu_f_w_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint8mf2_t vec_value_1_0= vle8_v_u8mf2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint8mf2_t vec_value_3_0= vfncvt_rtz_xu_f_w_u8mf2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_rtz_xu_f_w_operator_0() { +uint8_t tmp[] = {255,92,255,59,255,13,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_rtz_xu_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rtz_xu_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_rtz_xu_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rtzV16VUInt8VBVUVF_TUMU.c b/test/codegen-golden/Fncvt_rtzV16VUInt8VBVUVF_TUMU.c new file mode 100644 index 0000000..dbc5fa0 --- /dev/null +++ b/test/codegen-golden/Fncvt_rtzV16VUInt8VBVUVF_TUMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r Fncvt_rtzV16VUInt8VBVUVF_TUMU -n 1 -l 7 --has-ta --has-ma -c Fncvt_rtzV16VUInt8VBVUVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +float16_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfncvt_rtz_xu_f_w_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint8mf2_t vec_value_1_0= vle8_v_u8mf2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint8mf2_t vec_value_3_0= vfncvt_rtz_xu_f_w_u8mf2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_rtz_xu_f_w_operator_0() { +uint8_t tmp[] = {65,92,255,59,255,13,46,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_rtz_xu_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rtz_xu_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_rtz_xu_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rtzV16VUInt8VBVUVF_m.c b/test/codegen-golden/Fncvt_rtzV16VUInt8VBVUVF_m.c new file mode 100644 index 0000000..b3d1808 --- /dev/null +++ b/test/codegen-golden/Fncvt_rtzV16VUInt8VBVUVF_m.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r Fncvt_rtzV16VUInt8VBVUVF_m -n 1 -l 7 --has-ta --has-ma -c Fncvt_rtzV16VUInt8VBVUVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +float16_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfncvt_rtz_xu_f_w_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint8mf2_t vec_value_1_0= vle8_v_u8mf2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint8mf2_t vec_value_3_0= vfncvt_rtz_xu_f_w_u8mf2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse8_v_u8mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_rtz_xu_f_w_operator_0() { +uint8_t tmp[] = {65,255,255,59,255,13,46,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfncvt_rtz_xu_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rtz_xu_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_rtz_xu_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rtzV16VUInt8VF.c b/test/codegen-golden/Fncvt_rtzV16VUInt8VF.c new file mode 100644 index 0000000..69b803a --- /dev/null +++ b/test/codegen-golden/Fncvt_rtzV16VUInt8VF.c @@ -0,0 +1,62 @@ +// COMMAND: random_gen -r Fncvt_rtzV16VUInt8VF -n 1 -l 7 --has-ta --has-ma -c Fncvt_rtzV16VUInt8VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +uint8_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfncvt_rtz_xu_f_w_operator_0() { +float16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vuint8mf2_t vec_value_1_0= vfncvt_rtz_xu_f_w_u8mf2(vec_value_0_0, vl); + +vse8_v_u8mf2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfncvt_rtz_xu_f_w_operator_0() { +uint8_t tmp[] = {255,255,255,255,255,255,255,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfncvt_rtz_xu_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rtz_xu_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfncvt_rtz_xu_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rtzV16VUInt8VF_TA.c b/test/codegen-golden/Fncvt_rtzV16VUInt8VF_TA.c new file mode 100644 index 0000000..d6b9941 --- /dev/null +++ b/test/codegen-golden/Fncvt_rtzV16VUInt8VF_TA.c @@ -0,0 +1,63 @@ +// COMMAND: random_gen -r Fncvt_rtzV16VUInt8VF_TA -n 1 -l 7 --has-ta --has-ma -c Fncvt_rtzV16VUInt8VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +uint8_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfncvt_rtz_xu_f_w_operator_0() { +float16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vuint8mf2_t vec_value_1_0= vfncvt_rtz_xu_f_w_u8mf2_ta(vec_value_0_0, tail_vl); + +vse8_v_u8mf2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfncvt_rtz_xu_f_w_operator_0() { +uint8_t tmp[] = {255,255,255,255,255,255,255,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfncvt_rtz_xu_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rtz_xu_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfncvt_rtz_xu_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fncvt_rtzV16VUInt8VUVF_TU.c b/test/codegen-golden/Fncvt_rtzV16VUInt8VUVF_TU.c new file mode 100644 index 0000000..9a0d65e --- /dev/null +++ b/test/codegen-golden/Fncvt_rtzV16VUInt8VUVF_TU.c @@ -0,0 +1,78 @@ +// COMMAND: random_gen -r Fncvt_rtzV16VUInt8VUVF_TU -n 1 -l 7 --has-ta --has-ma -c Fncvt_rtzV16VUInt8VUVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +float16_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfncvt_rtz_xu_f_w_operator_0() { +uint8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8mf2_t vec_value_0_0= vle8_v_u8mf2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vuint8mf2_t vec_value_2_0= vfncvt_rtz_xu_f_w_u8mf2_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_u8mf2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfncvt_rtz_xu_f_w_operator_0() { +uint8_t tmp[] = {255,90,255,43,255,14,255,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfncvt_rtz_xu_f_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfncvt_rtz_xu_f_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfncvt_rtz_xu_f_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnegV16VFloat16VBVFVF_TAMU.c b/test/codegen-golden/FnegV16VFloat16VBVFVF_TAMU.c new file mode 100644 index 0000000..a95762c --- /dev/null +++ b/test/codegen-golden/FnegV16VFloat16VBVFVF_TAMU.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FnegV16VFloat16VBVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FnegV16VFloat16VBVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfneg_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfneg_v_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfneg_v_operator_0() { +uint64_t tmp[] = {29258,65535,61475,65535,61868,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfneg_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfneg_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfneg_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnegV16VFloat16VBVFVF_TUMA.c b/test/codegen-golden/FnegV16VFloat16VBVFVF_TUMA.c new file mode 100644 index 0000000..da83ac6 --- /dev/null +++ b/test/codegen-golden/FnegV16VFloat16VBVFVF_TUMA.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FnegV16VFloat16VBVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FnegV16VFloat16VBVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfneg_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfneg_v_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfneg_v_operator_0() { +uint64_t tmp[] = {65535,29822,61475,29133,61868,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfneg_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfneg_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfneg_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnegV16VFloat16VBVFVF_TUMU.c b/test/codegen-golden/FnegV16VFloat16VBVFVF_TUMU.c new file mode 100644 index 0000000..abd7279 --- /dev/null +++ b/test/codegen-golden/FnegV16VFloat16VBVFVF_TUMU.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FnegV16VFloat16VBVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FnegV16VFloat16VBVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfneg_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfneg_v_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfneg_v_operator_0() { +uint64_t tmp[] = {29258,29822,61475,29133,61868,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfneg_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfneg_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfneg_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnegV16VFloat16VBVFVF_m.c b/test/codegen-golden/FnegV16VFloat16VBVFVF_m.c new file mode 100644 index 0000000..659de87 --- /dev/null +++ b/test/codegen-golden/FnegV16VFloat16VBVFVF_m.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r FnegV16VFloat16VBVFVF_m -n 1 -l 7 --has-ta --has-ma -c FnegV16VFloat16VBVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfneg_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfneg_v_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfneg_v_operator_0() { +uint64_t tmp[] = {29258,62291,61475,29133,61868,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfneg_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfneg_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfneg_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnegV16VFloat16VBVF_TAMA.c b/test/codegen-golden/FnegV16VFloat16VBVF_TAMA.c new file mode 100644 index 0000000..8b5047b --- /dev/null +++ b/test/codegen-golden/FnegV16VFloat16VBVF_TAMA.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r FnegV16VFloat16VBVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FnegV16VFloat16VBVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfneg_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfneg_v_f16m1_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfneg_v_operator_0() { +uint64_t tmp[] = {65535,65535,61475,65535,61868,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfneg_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfneg_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfneg_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnegV16VFloat16VF.c b/test/codegen-golden/FnegV16VFloat16VF.c new file mode 100644 index 0000000..1da13da --- /dev/null +++ b/test/codegen-golden/FnegV16VFloat16VF.c @@ -0,0 +1,67 @@ +// COMMAND: random_gen -r FnegV16VFloat16VF -n 1 -l 7 --has-ta --has-ma -c FnegV16VFloat16VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfneg_v_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_1_0= vfneg_v_f16m1(vec_value_0_0, vl); + +vse16_v_f16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfneg_v_operator_0() { +uint64_t tmp[] = {60506,62558,62348,61489,61990,59755,60484,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfneg_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfneg_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfneg_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnegV16VFloat16VFVF_TU.c b/test/codegen-golden/FnegV16VFloat16VFVF_TU.c new file mode 100644 index 0000000..dabd5fe --- /dev/null +++ b/test/codegen-golden/FnegV16VFloat16VFVF_TU.c @@ -0,0 +1,85 @@ +// COMMAND: random_gen -r FnegV16VFloat16VFVF_TU -n 1 -l 7 --has-ta --has-ma -c FnegV16VFloat16VFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfneg_v_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfneg_v_f16m1_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfneg_v_operator_0() { +uint64_t tmp[] = {61343,29790,61475,28721,61868,26987,61243,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfneg_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfneg_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfneg_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnegV16VFloat16VF_TA.c b/test/codegen-golden/FnegV16VFloat16VF_TA.c new file mode 100644 index 0000000..889d4f2 --- /dev/null +++ b/test/codegen-golden/FnegV16VFloat16VF_TA.c @@ -0,0 +1,68 @@ +// COMMAND: random_gen -r FnegV16VFloat16VF_TA -n 1 -l 7 --has-ta --has-ma -c FnegV16VFloat16VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfneg_v_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_1_0= vfneg_v_f16m1_ta(vec_value_0_0, tail_vl); + +vse16_v_f16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfneg_v_operator_0() { +uint64_t tmp[] = {60506,65535,62348,65535,61990,65535,60484,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfneg_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfneg_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfneg_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaccVF16VFloat16VBVFSFVF_TAMA.c b/test/codegen-golden/FnmaccVF16VFloat16VBVFSFVF_TAMA.c new file mode 100644 index 0000000..7ff75a8 --- /dev/null +++ b/test/codegen-golden/FnmaccVF16VFloat16VBVFSFVF_TAMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FnmaccVF16VFloat16VBVFSFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FnmaccVF16VFloat16VBVFSFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfnmacc_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmacc_vf_f16m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmacc_vf_operator_0() { +uint64_t tmp[] = {65535,65535,64512,65535,64512,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaccVF16VFloat16VBVFSFVF_TAMU.c b/test/codegen-golden/FnmaccVF16VFloat16VBVFSFVF_TAMU.c new file mode 100644 index 0000000..2833069 --- /dev/null +++ b/test/codegen-golden/FnmaccVF16VFloat16VBVFSFVF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FnmaccVF16VFloat16VBVFSFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FnmaccVF16VFloat16VBVFSFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfnmacc_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmacc_vf_f16m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmacc_vf_operator_0() { +uint64_t tmp[] = {29258,65535,64512,65535,64512,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaccVF16VFloat16VBVFSFVF_TUMA.c b/test/codegen-golden/FnmaccVF16VFloat16VBVFSFVF_TUMA.c new file mode 100644 index 0000000..66f6ac3 --- /dev/null +++ b/test/codegen-golden/FnmaccVF16VFloat16VBVFSFVF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FnmaccVF16VFloat16VBVFSFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FnmaccVF16VFloat16VBVFSFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfnmacc_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmacc_vf_f16m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmacc_vf_operator_0() { +uint64_t tmp[] = {65535,29822,64512,29133,64512,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaccVF16VFloat16VBVFSFVF_TUMU.c b/test/codegen-golden/FnmaccVF16VFloat16VBVFSFVF_TUMU.c new file mode 100644 index 0000000..0a5f11a --- /dev/null +++ b/test/codegen-golden/FnmaccVF16VFloat16VBVFSFVF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FnmaccVF16VFloat16VBVFSFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FnmaccVF16VFloat16VBVFSFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfnmacc_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmacc_vf_f16m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmacc_vf_operator_0() { +uint64_t tmp[] = {29258,29822,64512,29133,64512,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaccVF16VFloat16VBVFSFVF_m.c b/test/codegen-golden/FnmaccVF16VFloat16VBVFSFVF_m.c new file mode 100644 index 0000000..aacb341 --- /dev/null +++ b/test/codegen-golden/FnmaccVF16VFloat16VBVFSFVF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FnmaccVF16VFloat16VBVFSFVF_m -n 1 -l 7 --has-ta --has-ma -c FnmaccVF16VFloat16VBVFSFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfnmacc_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmacc_vf_f16m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmacc_vf_operator_0() { +uint64_t tmp[] = {29258,64512,64512,29133,64512,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaccVF16VFloat16VFSFVF.c b/test/codegen-golden/FnmaccVF16VFloat16VFSFVF.c new file mode 100644 index 0000000..1fe9535 --- /dev/null +++ b/test/codegen-golden/FnmaccVF16VFloat16VFSFVF.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FnmaccVF16VFloat16VFSFVF -n 1 -l 7 --has-ta --has-ma -c FnmaccVF16VFloat16VFSFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfnmacc_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmacc_vf_f16m1(vec_value_0_0, placeholder1, vec_value_2_0, vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmacc_vf_operator_0() { +uint64_t tmp[] = {64512,64512,64512,64512,64512,64512,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaccVF16VFloat16VFSFVF_TA.c b/test/codegen-golden/FnmaccVF16VFloat16VFSFVF_TA.c new file mode 100644 index 0000000..967b59e --- /dev/null +++ b/test/codegen-golden/FnmaccVF16VFloat16VFSFVF_TA.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FnmaccVF16VFloat16VFSFVF_TA -n 1 -l 7 --has-ta --has-ma -c FnmaccVF16VFloat16VFSFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfnmacc_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmacc_vf_f16m1_ta(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmacc_vf_operator_0() { +uint64_t tmp[] = {64512,65535,64512,65535,64512,65535,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaccVF16VFloat16VFSFVF_TU.c b/test/codegen-golden/FnmaccVF16VFloat16VFSFVF_TU.c new file mode 100644 index 0000000..92362d7 --- /dev/null +++ b/test/codegen-golden/FnmaccVF16VFloat16VFSFVF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FnmaccVF16VFloat16VFSFVF_TU -n 1 -l 7 --has-ta --has-ma -c FnmaccVF16VFloat16VFSFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfnmacc_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmacc_vf_f16m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmacc_vf_operator_0() { +uint64_t tmp[] = {64512,29790,64512,28721,64512,26987,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaccVV16VFloat16VBVFVFVF_TAMA.c b/test/codegen-golden/FnmaccVV16VFloat16VBVFVFVF_TAMA.c new file mode 100644 index 0000000..137528e --- /dev/null +++ b/test/codegen-golden/FnmaccVV16VFloat16VBVFVFVF_TAMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FnmaccVV16VFloat16VBVFVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FnmaccVV16VFloat16VBVFVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfnmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmacc_vv_f16m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmacc_vv_operator_0() { +uint64_t tmp[] = {65535,65535,64512,65535,64512,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaccVV16VFloat16VBVFVFVF_TAMU.c b/test/codegen-golden/FnmaccVV16VFloat16VBVFVFVF_TAMU.c new file mode 100644 index 0000000..4e5fbb6 --- /dev/null +++ b/test/codegen-golden/FnmaccVV16VFloat16VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FnmaccVV16VFloat16VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FnmaccVV16VFloat16VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfnmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmacc_vv_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmacc_vv_operator_0() { +uint64_t tmp[] = {29258,65535,64512,65535,64512,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaccVV16VFloat16VBVFVFVF_TUMA.c b/test/codegen-golden/FnmaccVV16VFloat16VBVFVFVF_TUMA.c new file mode 100644 index 0000000..01bb926 --- /dev/null +++ b/test/codegen-golden/FnmaccVV16VFloat16VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FnmaccVV16VFloat16VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FnmaccVV16VFloat16VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfnmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmacc_vv_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmacc_vv_operator_0() { +uint64_t tmp[] = {65535,29822,64512,29133,64512,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaccVV16VFloat16VBVFVFVF_TUMU.c b/test/codegen-golden/FnmaccVV16VFloat16VBVFVFVF_TUMU.c new file mode 100644 index 0000000..1b0a8b1 --- /dev/null +++ b/test/codegen-golden/FnmaccVV16VFloat16VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FnmaccVV16VFloat16VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FnmaccVV16VFloat16VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfnmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmacc_vv_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmacc_vv_operator_0() { +uint64_t tmp[] = {29258,29822,64512,29133,64512,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaccVV16VFloat16VBVFVFVF_m.c b/test/codegen-golden/FnmaccVV16VFloat16VBVFVFVF_m.c new file mode 100644 index 0000000..0d724b2 --- /dev/null +++ b/test/codegen-golden/FnmaccVV16VFloat16VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FnmaccVV16VFloat16VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FnmaccVV16VFloat16VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfnmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmacc_vv_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmacc_vv_operator_0() { +uint64_t tmp[] = {29258,64512,64512,29133,64512,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaccVV16VFloat16VFVFVF.c b/test/codegen-golden/FnmaccVV16VFloat16VFVFVF.c new file mode 100644 index 0000000..15d5d2e --- /dev/null +++ b/test/codegen-golden/FnmaccVV16VFloat16VFVFVF.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FnmaccVV16VFloat16VFVFVF -n 1 -l 7 --has-ta --has-ma -c FnmaccVV16VFloat16VFVFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfnmacc_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmacc_vv_f16m1(vec_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmacc_vv_operator_0() { +uint64_t tmp[] = {64512,64512,64512,64512,64512,64512,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaccVV16VFloat16VFVFVF_TA.c b/test/codegen-golden/FnmaccVV16VFloat16VFVFVF_TA.c new file mode 100644 index 0000000..c3fb1a5 --- /dev/null +++ b/test/codegen-golden/FnmaccVV16VFloat16VFVFVF_TA.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FnmaccVV16VFloat16VFVFVF_TA -n 1 -l 7 --has-ta --has-ma -c FnmaccVV16VFloat16VFVFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfnmacc_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmacc_vv_f16m1_ta(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmacc_vv_operator_0() { +uint64_t tmp[] = {64512,65535,64512,65535,64512,65535,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaccVV16VFloat16VFVFVF_TU.c b/test/codegen-golden/FnmaccVV16VFloat16VFVFVF_TU.c new file mode 100644 index 0000000..a0d1489 --- /dev/null +++ b/test/codegen-golden/FnmaccVV16VFloat16VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FnmaccVV16VFloat16VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FnmaccVV16VFloat16VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfnmacc_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmacc_vv_f16m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmacc_vv_operator_0() { +uint64_t tmp[] = {64512,29790,64512,28721,64512,26987,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaddVF16VFloat16VBVFSFVF_TAMA.c b/test/codegen-golden/FnmaddVF16VFloat16VBVFSFVF_TAMA.c new file mode 100644 index 0000000..9c618b3 --- /dev/null +++ b/test/codegen-golden/FnmaddVF16VFloat16VBVFSFVF_TAMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FnmaddVF16VFloat16VBVFSFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FnmaddVF16VFloat16VBVFSFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfnmadd_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmadd_vf_f16m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmadd_vf_operator_0() { +uint64_t tmp[] = {65535,65535,64512,65535,64512,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaddVF16VFloat16VBVFSFVF_TAMU.c b/test/codegen-golden/FnmaddVF16VFloat16VBVFSFVF_TAMU.c new file mode 100644 index 0000000..61bcaad --- /dev/null +++ b/test/codegen-golden/FnmaddVF16VFloat16VBVFSFVF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FnmaddVF16VFloat16VBVFSFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FnmaddVF16VFloat16VBVFSFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfnmadd_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmadd_vf_f16m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmadd_vf_operator_0() { +uint64_t tmp[] = {29258,65535,64512,65535,64512,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaddVF16VFloat16VBVFSFVF_TUMA.c b/test/codegen-golden/FnmaddVF16VFloat16VBVFSFVF_TUMA.c new file mode 100644 index 0000000..31f3fe0 --- /dev/null +++ b/test/codegen-golden/FnmaddVF16VFloat16VBVFSFVF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FnmaddVF16VFloat16VBVFSFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FnmaddVF16VFloat16VBVFSFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfnmadd_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmadd_vf_f16m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmadd_vf_operator_0() { +uint64_t tmp[] = {65535,29822,64512,29133,64512,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaddVF16VFloat16VBVFSFVF_TUMU.c b/test/codegen-golden/FnmaddVF16VFloat16VBVFSFVF_TUMU.c new file mode 100644 index 0000000..a0fa282 --- /dev/null +++ b/test/codegen-golden/FnmaddVF16VFloat16VBVFSFVF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FnmaddVF16VFloat16VBVFSFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FnmaddVF16VFloat16VBVFSFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfnmadd_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmadd_vf_f16m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmadd_vf_operator_0() { +uint64_t tmp[] = {29258,29822,64512,29133,64512,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaddVF16VFloat16VBVFSFVF_m.c b/test/codegen-golden/FnmaddVF16VFloat16VBVFSFVF_m.c new file mode 100644 index 0000000..400d60c --- /dev/null +++ b/test/codegen-golden/FnmaddVF16VFloat16VBVFSFVF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FnmaddVF16VFloat16VBVFSFVF_m -n 1 -l 7 --has-ta --has-ma -c FnmaddVF16VFloat16VBVFSFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfnmadd_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmadd_vf_f16m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmadd_vf_operator_0() { +uint64_t tmp[] = {29258,64512,64512,29133,64512,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaddVF16VFloat16VFSFVF.c b/test/codegen-golden/FnmaddVF16VFloat16VFSFVF.c new file mode 100644 index 0000000..43bd585 --- /dev/null +++ b/test/codegen-golden/FnmaddVF16VFloat16VFSFVF.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FnmaddVF16VFloat16VFSFVF -n 1 -l 7 --has-ta --has-ma -c FnmaddVF16VFloat16VFSFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfnmadd_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmadd_vf_f16m1(vec_value_0_0, placeholder1, vec_value_2_0, vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmadd_vf_operator_0() { +uint64_t tmp[] = {64512,64512,64512,64512,64512,64512,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaddVF16VFloat16VFSFVF_TA.c b/test/codegen-golden/FnmaddVF16VFloat16VFSFVF_TA.c new file mode 100644 index 0000000..e9917f6 --- /dev/null +++ b/test/codegen-golden/FnmaddVF16VFloat16VFSFVF_TA.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FnmaddVF16VFloat16VFSFVF_TA -n 1 -l 7 --has-ta --has-ma -c FnmaddVF16VFloat16VFSFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfnmadd_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmadd_vf_f16m1_ta(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmadd_vf_operator_0() { +uint64_t tmp[] = {64512,65535,64512,65535,64512,65535,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaddVF16VFloat16VFSFVF_TU.c b/test/codegen-golden/FnmaddVF16VFloat16VFSFVF_TU.c new file mode 100644 index 0000000..4763bab --- /dev/null +++ b/test/codegen-golden/FnmaddVF16VFloat16VFSFVF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FnmaddVF16VFloat16VFSFVF_TU -n 1 -l 7 --has-ta --has-ma -c FnmaddVF16VFloat16VFSFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfnmadd_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmadd_vf_f16m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmadd_vf_operator_0() { +uint64_t tmp[] = {64512,29790,64512,28721,64512,26987,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaddVV16VFloat16VBVFVFVF_TAMA.c b/test/codegen-golden/FnmaddVV16VFloat16VBVFVFVF_TAMA.c new file mode 100644 index 0000000..2235e0e --- /dev/null +++ b/test/codegen-golden/FnmaddVV16VFloat16VBVFVFVF_TAMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FnmaddVV16VFloat16VBVFVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FnmaddVV16VFloat16VBVFVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfnmadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmadd_vv_f16m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmadd_vv_operator_0() { +uint64_t tmp[] = {65535,65535,64512,65535,64512,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaddVV16VFloat16VBVFVFVF_TAMU.c b/test/codegen-golden/FnmaddVV16VFloat16VBVFVFVF_TAMU.c new file mode 100644 index 0000000..219e4a1 --- /dev/null +++ b/test/codegen-golden/FnmaddVV16VFloat16VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FnmaddVV16VFloat16VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FnmaddVV16VFloat16VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfnmadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmadd_vv_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmadd_vv_operator_0() { +uint64_t tmp[] = {29258,65535,64512,65535,64512,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaddVV16VFloat16VBVFVFVF_TUMA.c b/test/codegen-golden/FnmaddVV16VFloat16VBVFVFVF_TUMA.c new file mode 100644 index 0000000..b7e7d1a --- /dev/null +++ b/test/codegen-golden/FnmaddVV16VFloat16VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FnmaddVV16VFloat16VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FnmaddVV16VFloat16VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfnmadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmadd_vv_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmadd_vv_operator_0() { +uint64_t tmp[] = {65535,29822,64512,29133,64512,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaddVV16VFloat16VBVFVFVF_TUMU.c b/test/codegen-golden/FnmaddVV16VFloat16VBVFVFVF_TUMU.c new file mode 100644 index 0000000..5bcfda4 --- /dev/null +++ b/test/codegen-golden/FnmaddVV16VFloat16VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FnmaddVV16VFloat16VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FnmaddVV16VFloat16VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfnmadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmadd_vv_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmadd_vv_operator_0() { +uint64_t tmp[] = {29258,29822,64512,29133,64512,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaddVV16VFloat16VBVFVFVF_m.c b/test/codegen-golden/FnmaddVV16VFloat16VBVFVFVF_m.c new file mode 100644 index 0000000..e153a2c --- /dev/null +++ b/test/codegen-golden/FnmaddVV16VFloat16VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FnmaddVV16VFloat16VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FnmaddVV16VFloat16VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfnmadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmadd_vv_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmadd_vv_operator_0() { +uint64_t tmp[] = {29258,64512,64512,29133,64512,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaddVV16VFloat16VFVFVF.c b/test/codegen-golden/FnmaddVV16VFloat16VFVFVF.c new file mode 100644 index 0000000..8573e10 --- /dev/null +++ b/test/codegen-golden/FnmaddVV16VFloat16VFVFVF.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FnmaddVV16VFloat16VFVFVF -n 1 -l 7 --has-ta --has-ma -c FnmaddVV16VFloat16VFVFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfnmadd_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmadd_vv_f16m1(vec_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmadd_vv_operator_0() { +uint64_t tmp[] = {64512,64512,64512,64512,64512,64512,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaddVV16VFloat16VFVFVF_TA.c b/test/codegen-golden/FnmaddVV16VFloat16VFVFVF_TA.c new file mode 100644 index 0000000..e4a5d4f --- /dev/null +++ b/test/codegen-golden/FnmaddVV16VFloat16VFVFVF_TA.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FnmaddVV16VFloat16VFVFVF_TA -n 1 -l 7 --has-ta --has-ma -c FnmaddVV16VFloat16VFVFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfnmadd_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmadd_vv_f16m1_ta(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmadd_vv_operator_0() { +uint64_t tmp[] = {64512,65535,64512,65535,64512,65535,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmaddVV16VFloat16VFVFVF_TU.c b/test/codegen-golden/FnmaddVV16VFloat16VFVFVF_TU.c new file mode 100644 index 0000000..ea4baf4 --- /dev/null +++ b/test/codegen-golden/FnmaddVV16VFloat16VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FnmaddVV16VFloat16VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FnmaddVV16VFloat16VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfnmadd_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmadd_vv_f16m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmadd_vv_operator_0() { +uint64_t tmp[] = {64512,29790,64512,28721,64512,26987,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsacVF16VFloat16VBVFSFVF_TAMA.c b/test/codegen-golden/FnmsacVF16VFloat16VBVFSFVF_TAMA.c new file mode 100644 index 0000000..5fd17c9 --- /dev/null +++ b/test/codegen-golden/FnmsacVF16VFloat16VBVFSFVF_TAMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FnmsacVF16VFloat16VBVFSFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FnmsacVF16VFloat16VBVFSFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfnmsac_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmsac_vf_f16m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmsac_vf_operator_0() { +uint64_t tmp[] = {65535,65535,64512,65535,64512,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsacVF16VFloat16VBVFSFVF_TAMU.c b/test/codegen-golden/FnmsacVF16VFloat16VBVFSFVF_TAMU.c new file mode 100644 index 0000000..0a00d91 --- /dev/null +++ b/test/codegen-golden/FnmsacVF16VFloat16VBVFSFVF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FnmsacVF16VFloat16VBVFSFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FnmsacVF16VFloat16VBVFSFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfnmsac_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmsac_vf_f16m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmsac_vf_operator_0() { +uint64_t tmp[] = {29258,65535,64512,65535,64512,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsacVF16VFloat16VBVFSFVF_TUMA.c b/test/codegen-golden/FnmsacVF16VFloat16VBVFSFVF_TUMA.c new file mode 100644 index 0000000..3231a2d --- /dev/null +++ b/test/codegen-golden/FnmsacVF16VFloat16VBVFSFVF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FnmsacVF16VFloat16VBVFSFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FnmsacVF16VFloat16VBVFSFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfnmsac_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmsac_vf_f16m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmsac_vf_operator_0() { +uint64_t tmp[] = {65535,29822,64512,29133,64512,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsacVF16VFloat16VBVFSFVF_TUMU.c b/test/codegen-golden/FnmsacVF16VFloat16VBVFSFVF_TUMU.c new file mode 100644 index 0000000..ced4bc9 --- /dev/null +++ b/test/codegen-golden/FnmsacVF16VFloat16VBVFSFVF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FnmsacVF16VFloat16VBVFSFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FnmsacVF16VFloat16VBVFSFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfnmsac_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmsac_vf_f16m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmsac_vf_operator_0() { +uint64_t tmp[] = {29258,29822,64512,29133,64512,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsacVF16VFloat16VBVFSFVF_m.c b/test/codegen-golden/FnmsacVF16VFloat16VBVFSFVF_m.c new file mode 100644 index 0000000..67be7c2 --- /dev/null +++ b/test/codegen-golden/FnmsacVF16VFloat16VBVFSFVF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FnmsacVF16VFloat16VBVFSFVF_m -n 1 -l 7 --has-ta --has-ma -c FnmsacVF16VFloat16VBVFSFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfnmsac_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmsac_vf_f16m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmsac_vf_operator_0() { +uint64_t tmp[] = {29258,64512,64512,29133,64512,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsacVF16VFloat16VFSFVF.c b/test/codegen-golden/FnmsacVF16VFloat16VFSFVF.c new file mode 100644 index 0000000..5d282df --- /dev/null +++ b/test/codegen-golden/FnmsacVF16VFloat16VFSFVF.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FnmsacVF16VFloat16VFSFVF -n 1 -l 7 --has-ta --has-ma -c FnmsacVF16VFloat16VFSFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfnmsac_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmsac_vf_f16m1(vec_value_0_0, placeholder1, vec_value_2_0, vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmsac_vf_operator_0() { +uint64_t tmp[] = {64512,64512,64512,64512,64512,64512,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsacVF16VFloat16VFSFVF_TA.c b/test/codegen-golden/FnmsacVF16VFloat16VFSFVF_TA.c new file mode 100644 index 0000000..0fd87a8 --- /dev/null +++ b/test/codegen-golden/FnmsacVF16VFloat16VFSFVF_TA.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FnmsacVF16VFloat16VFSFVF_TA -n 1 -l 7 --has-ta --has-ma -c FnmsacVF16VFloat16VFSFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfnmsac_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmsac_vf_f16m1_ta(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmsac_vf_operator_0() { +uint64_t tmp[] = {64512,65535,64512,65535,64512,65535,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsacVF16VFloat16VFSFVF_TU.c b/test/codegen-golden/FnmsacVF16VFloat16VFSFVF_TU.c new file mode 100644 index 0000000..71b1f16 --- /dev/null +++ b/test/codegen-golden/FnmsacVF16VFloat16VFSFVF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FnmsacVF16VFloat16VFSFVF_TU -n 1 -l 7 --has-ta --has-ma -c FnmsacVF16VFloat16VFSFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfnmsac_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmsac_vf_f16m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmsac_vf_operator_0() { +uint64_t tmp[] = {64512,29790,64512,28721,64512,26987,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsacVV16VFloat16VBVFVFVF_TAMA.c b/test/codegen-golden/FnmsacVV16VFloat16VBVFVFVF_TAMA.c new file mode 100644 index 0000000..54ebe7e --- /dev/null +++ b/test/codegen-golden/FnmsacVV16VFloat16VBVFVFVF_TAMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FnmsacVV16VFloat16VBVFVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FnmsacVV16VFloat16VBVFVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfnmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmsac_vv_f16m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmsac_vv_operator_0() { +uint64_t tmp[] = {65535,65535,64512,65535,64512,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsacVV16VFloat16VBVFVFVF_TAMU.c b/test/codegen-golden/FnmsacVV16VFloat16VBVFVFVF_TAMU.c new file mode 100644 index 0000000..5fd2135 --- /dev/null +++ b/test/codegen-golden/FnmsacVV16VFloat16VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FnmsacVV16VFloat16VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FnmsacVV16VFloat16VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfnmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmsac_vv_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmsac_vv_operator_0() { +uint64_t tmp[] = {29258,65535,64512,65535,64512,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsacVV16VFloat16VBVFVFVF_TUMA.c b/test/codegen-golden/FnmsacVV16VFloat16VBVFVFVF_TUMA.c new file mode 100644 index 0000000..db4ffdb --- /dev/null +++ b/test/codegen-golden/FnmsacVV16VFloat16VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FnmsacVV16VFloat16VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FnmsacVV16VFloat16VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfnmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmsac_vv_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmsac_vv_operator_0() { +uint64_t tmp[] = {65535,29822,64512,29133,64512,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsacVV16VFloat16VBVFVFVF_TUMU.c b/test/codegen-golden/FnmsacVV16VFloat16VBVFVFVF_TUMU.c new file mode 100644 index 0000000..071b803 --- /dev/null +++ b/test/codegen-golden/FnmsacVV16VFloat16VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FnmsacVV16VFloat16VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FnmsacVV16VFloat16VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfnmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmsac_vv_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmsac_vv_operator_0() { +uint64_t tmp[] = {29258,29822,64512,29133,64512,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsacVV16VFloat16VBVFVFVF_m.c b/test/codegen-golden/FnmsacVV16VFloat16VBVFVFVF_m.c new file mode 100644 index 0000000..c244b38 --- /dev/null +++ b/test/codegen-golden/FnmsacVV16VFloat16VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FnmsacVV16VFloat16VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FnmsacVV16VFloat16VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfnmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmsac_vv_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmsac_vv_operator_0() { +uint64_t tmp[] = {29258,64512,64512,29133,64512,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsacVV16VFloat16VFVFVF.c b/test/codegen-golden/FnmsacVV16VFloat16VFVFVF.c new file mode 100644 index 0000000..be4837c --- /dev/null +++ b/test/codegen-golden/FnmsacVV16VFloat16VFVFVF.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FnmsacVV16VFloat16VFVFVF -n 1 -l 7 --has-ta --has-ma -c FnmsacVV16VFloat16VFVFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfnmsac_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmsac_vv_f16m1(vec_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmsac_vv_operator_0() { +uint64_t tmp[] = {64512,64512,64512,64512,64512,64512,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsacVV16VFloat16VFVFVF_TA.c b/test/codegen-golden/FnmsacVV16VFloat16VFVFVF_TA.c new file mode 100644 index 0000000..da22152 --- /dev/null +++ b/test/codegen-golden/FnmsacVV16VFloat16VFVFVF_TA.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FnmsacVV16VFloat16VFVFVF_TA -n 1 -l 7 --has-ta --has-ma -c FnmsacVV16VFloat16VFVFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfnmsac_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmsac_vv_f16m1_ta(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmsac_vv_operator_0() { +uint64_t tmp[] = {64512,65535,64512,65535,64512,65535,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsacVV16VFloat16VFVFVF_TU.c b/test/codegen-golden/FnmsacVV16VFloat16VFVFVF_TU.c new file mode 100644 index 0000000..669fa1d --- /dev/null +++ b/test/codegen-golden/FnmsacVV16VFloat16VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FnmsacVV16VFloat16VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FnmsacVV16VFloat16VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfnmsac_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmsac_vv_f16m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmsac_vv_operator_0() { +uint64_t tmp[] = {64512,29790,64512,28721,64512,26987,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsubVF16VFloat16VBVFSFVF_TAMA.c b/test/codegen-golden/FnmsubVF16VFloat16VBVFSFVF_TAMA.c new file mode 100644 index 0000000..e22ac7c --- /dev/null +++ b/test/codegen-golden/FnmsubVF16VFloat16VBVFSFVF_TAMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FnmsubVF16VFloat16VBVFSFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FnmsubVF16VFloat16VBVFSFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfnmsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmsub_vf_f16m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmsub_vf_operator_0() { +uint64_t tmp[] = {65535,65535,64512,65535,64512,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsubVF16VFloat16VBVFSFVF_TAMU.c b/test/codegen-golden/FnmsubVF16VFloat16VBVFSFVF_TAMU.c new file mode 100644 index 0000000..44e8c24 --- /dev/null +++ b/test/codegen-golden/FnmsubVF16VFloat16VBVFSFVF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FnmsubVF16VFloat16VBVFSFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FnmsubVF16VFloat16VBVFSFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfnmsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmsub_vf_f16m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmsub_vf_operator_0() { +uint64_t tmp[] = {29258,65535,64512,65535,64512,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsubVF16VFloat16VBVFSFVF_TUMA.c b/test/codegen-golden/FnmsubVF16VFloat16VBVFSFVF_TUMA.c new file mode 100644 index 0000000..dc1d75b --- /dev/null +++ b/test/codegen-golden/FnmsubVF16VFloat16VBVFSFVF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FnmsubVF16VFloat16VBVFSFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FnmsubVF16VFloat16VBVFSFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfnmsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmsub_vf_f16m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmsub_vf_operator_0() { +uint64_t tmp[] = {65535,29822,64512,29133,64512,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsubVF16VFloat16VBVFSFVF_TUMU.c b/test/codegen-golden/FnmsubVF16VFloat16VBVFSFVF_TUMU.c new file mode 100644 index 0000000..78ff33f --- /dev/null +++ b/test/codegen-golden/FnmsubVF16VFloat16VBVFSFVF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FnmsubVF16VFloat16VBVFSFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FnmsubVF16VFloat16VBVFSFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfnmsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmsub_vf_f16m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmsub_vf_operator_0() { +uint64_t tmp[] = {29258,29822,64512,29133,64512,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsubVF16VFloat16VBVFSFVF_m.c b/test/codegen-golden/FnmsubVF16VFloat16VBVFSFVF_m.c new file mode 100644 index 0000000..0a80175 --- /dev/null +++ b/test/codegen-golden/FnmsubVF16VFloat16VBVFSFVF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FnmsubVF16VFloat16VBVFSFVF_m -n 1 -l 7 --has-ta --has-ma -c FnmsubVF16VFloat16VBVFSFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfnmsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmsub_vf_f16m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmsub_vf_operator_0() { +uint64_t tmp[] = {29258,64512,64512,29133,64512,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsubVF16VFloat16VFSFVF.c b/test/codegen-golden/FnmsubVF16VFloat16VFSFVF.c new file mode 100644 index 0000000..e56ec52 --- /dev/null +++ b/test/codegen-golden/FnmsubVF16VFloat16VFSFVF.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FnmsubVF16VFloat16VFSFVF -n 1 -l 7 --has-ta --has-ma -c FnmsubVF16VFloat16VFSFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfnmsub_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmsub_vf_f16m1(vec_value_0_0, placeholder1, vec_value_2_0, vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmsub_vf_operator_0() { +uint64_t tmp[] = {64512,64512,64512,64512,64512,64512,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsubVF16VFloat16VFSFVF_TA.c b/test/codegen-golden/FnmsubVF16VFloat16VFSFVF_TA.c new file mode 100644 index 0000000..eabfc56 --- /dev/null +++ b/test/codegen-golden/FnmsubVF16VFloat16VFSFVF_TA.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FnmsubVF16VFloat16VFSFVF_TA -n 1 -l 7 --has-ta --has-ma -c FnmsubVF16VFloat16VFSFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfnmsub_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmsub_vf_f16m1_ta(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmsub_vf_operator_0() { +uint64_t tmp[] = {64512,65535,64512,65535,64512,65535,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsubVF16VFloat16VFSFVF_TU.c b/test/codegen-golden/FnmsubVF16VFloat16VFSFVF_TU.c new file mode 100644 index 0000000..847324c --- /dev/null +++ b/test/codegen-golden/FnmsubVF16VFloat16VFSFVF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FnmsubVF16VFloat16VFSFVF_TU -n 1 -l 7 --has-ta --has-ma -c FnmsubVF16VFloat16VFSFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfnmsub_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmsub_vf_f16m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmsub_vf_operator_0() { +uint64_t tmp[] = {64512,29790,64512,28721,64512,26987,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsubVV16VFloat16VBVFVFVF_TAMA.c b/test/codegen-golden/FnmsubVV16VFloat16VBVFVFVF_TAMA.c new file mode 100644 index 0000000..03aaae3 --- /dev/null +++ b/test/codegen-golden/FnmsubVV16VFloat16VBVFVFVF_TAMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FnmsubVV16VFloat16VBVFVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FnmsubVV16VFloat16VBVFVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfnmsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmsub_vv_f16m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmsub_vv_operator_0() { +uint64_t tmp[] = {65535,65535,64512,65535,64512,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsubVV16VFloat16VBVFVFVF_TAMU.c b/test/codegen-golden/FnmsubVV16VFloat16VBVFVFVF_TAMU.c new file mode 100644 index 0000000..089df69 --- /dev/null +++ b/test/codegen-golden/FnmsubVV16VFloat16VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FnmsubVV16VFloat16VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FnmsubVV16VFloat16VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfnmsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmsub_vv_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmsub_vv_operator_0() { +uint64_t tmp[] = {29258,65535,64512,65535,64512,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsubVV16VFloat16VBVFVFVF_TUMA.c b/test/codegen-golden/FnmsubVV16VFloat16VBVFVFVF_TUMA.c new file mode 100644 index 0000000..19b82ba --- /dev/null +++ b/test/codegen-golden/FnmsubVV16VFloat16VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FnmsubVV16VFloat16VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FnmsubVV16VFloat16VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfnmsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmsub_vv_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmsub_vv_operator_0() { +uint64_t tmp[] = {65535,29822,64512,29133,64512,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsubVV16VFloat16VBVFVFVF_TUMU.c b/test/codegen-golden/FnmsubVV16VFloat16VBVFVFVF_TUMU.c new file mode 100644 index 0000000..d6f4aa9 --- /dev/null +++ b/test/codegen-golden/FnmsubVV16VFloat16VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FnmsubVV16VFloat16VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FnmsubVV16VFloat16VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfnmsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmsub_vv_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmsub_vv_operator_0() { +uint64_t tmp[] = {29258,29822,64512,29133,64512,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsubVV16VFloat16VBVFVFVF_m.c b/test/codegen-golden/FnmsubVV16VFloat16VBVFVFVF_m.c new file mode 100644 index 0000000..b284dd3 --- /dev/null +++ b/test/codegen-golden/FnmsubVV16VFloat16VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FnmsubVV16VFloat16VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FnmsubVV16VFloat16VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfnmsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfnmsub_vv_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfnmsub_vv_operator_0() { +uint64_t tmp[] = {29258,64512,64512,29133,64512,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfnmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfnmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsubVV16VFloat16VFVFVF.c b/test/codegen-golden/FnmsubVV16VFloat16VFVFVF.c new file mode 100644 index 0000000..86c16ae --- /dev/null +++ b/test/codegen-golden/FnmsubVV16VFloat16VFVFVF.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FnmsubVV16VFloat16VFVFVF -n 1 -l 7 --has-ta --has-ma -c FnmsubVV16VFloat16VFVFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfnmsub_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmsub_vv_f16m1(vec_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmsub_vv_operator_0() { +uint64_t tmp[] = {64512,64512,64512,64512,64512,64512,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsubVV16VFloat16VFVFVF_TA.c b/test/codegen-golden/FnmsubVV16VFloat16VFVFVF_TA.c new file mode 100644 index 0000000..ee648a3 --- /dev/null +++ b/test/codegen-golden/FnmsubVV16VFloat16VFVFVF_TA.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FnmsubVV16VFloat16VFVFVF_TA -n 1 -l 7 --has-ta --has-ma -c FnmsubVV16VFloat16VFVFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfnmsub_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmsub_vv_f16m1_ta(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmsub_vv_operator_0() { +uint64_t tmp[] = {64512,65535,64512,65535,64512,65535,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FnmsubVV16VFloat16VFVFVF_TU.c b/test/codegen-golden/FnmsubVV16VFloat16VFVFVF_TU.c new file mode 100644 index 0000000..b639d32 --- /dev/null +++ b/test/codegen-golden/FnmsubVV16VFloat16VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FnmsubVV16VFloat16VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FnmsubVV16VFloat16VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfnmsub_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfnmsub_vv_f16m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfnmsub_vv_operator_0() { +uint64_t tmp[] = {64512,29790,64512,28721,64512,26987,64512,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfnmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfnmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfnmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FrdivVF16VFloat16VBVFSF_TAMA.c b/test/codegen-golden/FrdivVF16VFloat16VBVFSF_TAMA.c new file mode 100644 index 0000000..95c623a --- /dev/null +++ b/test/codegen-golden/FrdivVF16VFloat16VBVFSF_TAMA.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FrdivVF16VFloat16VBVFSF_TAMA -n 1 -l 7 --has-ta --has-ma -c FrdivVF16VFloat16VBVFSF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfrdiv_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfrdiv_vf_f16m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfrdiv_vf_operator_0() { +uint64_t tmp[] = {65535,65535,14741,65535,16479,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfrdiv_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrdiv_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfrdiv_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FrdivVF16VFloat16VBVFVFSF_TAMU.c b/test/codegen-golden/FrdivVF16VFloat16VBVFVFSF_TAMU.c new file mode 100644 index 0000000..bb51d6e --- /dev/null +++ b/test/codegen-golden/FrdivVF16VFloat16VBVFVFSF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FrdivVF16VFloat16VBVFVFSF_TAMU -n 1 -l 7 --has-ta --has-ma -c FrdivVF16VFloat16VBVFVFSF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfrdiv_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfrdiv_vf_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfrdiv_vf_operator_0() { +uint64_t tmp[] = {29523,65535,14657,65535,16870,65535,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfrdiv_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrdiv_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfrdiv_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FrdivVF16VFloat16VBVFVFSF_TUMA.c b/test/codegen-golden/FrdivVF16VFloat16VBVFVFSF_TUMA.c new file mode 100644 index 0000000..2ebc2b6 --- /dev/null +++ b/test/codegen-golden/FrdivVF16VFloat16VBVFVFSF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FrdivVF16VFloat16VBVFVFSF_TUMA -n 1 -l 7 --has-ta --has-ma -c FrdivVF16VFloat16VBVFVFSF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfrdiv_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfrdiv_vf_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfrdiv_vf_operator_0() { +uint64_t tmp[] = {65535,28707,14657,29100,16870,28475,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfrdiv_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrdiv_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfrdiv_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FrdivVF16VFloat16VBVFVFSF_TUMU.c b/test/codegen-golden/FrdivVF16VFloat16VBVFVFSF_TUMU.c new file mode 100644 index 0000000..2729e7d --- /dev/null +++ b/test/codegen-golden/FrdivVF16VFloat16VBVFVFSF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FrdivVF16VFloat16VBVFVFSF_TUMU -n 1 -l 7 --has-ta --has-ma -c FrdivVF16VFloat16VBVFVFSF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfrdiv_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfrdiv_vf_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfrdiv_vf_operator_0() { +uint64_t tmp[] = {29523,28707,14657,29100,16870,28475,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfrdiv_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrdiv_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfrdiv_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FrdivVF16VFloat16VFSF.c b/test/codegen-golden/FrdivVF16VFloat16VFSF.c new file mode 100644 index 0000000..49a49df --- /dev/null +++ b/test/codegen-golden/FrdivVF16VFloat16VFSF.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r FrdivVF16VFloat16VFSF -n 1 -l 7 --has-ta --has-ma -c FrdivVF16VFloat16VFSF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfrdiv_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_2_0= vfrdiv_vf_f16m1(vec_value_0_0, placeholder1, vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfrdiv_vf_operator_0() { +uint64_t tmp[] = {16129,14075,14346,15174,14581,16800,16166,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfrdiv_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrdiv_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfrdiv_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FrdivVF16VFloat16VFSF_TA.c b/test/codegen-golden/FrdivVF16VFloat16VFSF_TA.c new file mode 100644 index 0000000..e13c3c8 --- /dev/null +++ b/test/codegen-golden/FrdivVF16VFloat16VFSF_TA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r FrdivVF16VFloat16VFSF_TA -n 1 -l 7 --has-ta --has-ma -c FrdivVF16VFloat16VFSF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfrdiv_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_2_0= vfrdiv_vf_f16m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfrdiv_vf_operator_0() { +uint64_t tmp[] = {16129,65535,14346,65535,14581,65535,16166,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfrdiv_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrdiv_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfrdiv_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FrdivVF16VFloat16VFVFSF_TU.c b/test/codegen-golden/FrdivVF16VFloat16VFVFSF_TU.c new file mode 100644 index 0000000..c6cb2a2 --- /dev/null +++ b/test/codegen-golden/FrdivVF16VFloat16VFVFSF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FrdivVF16VFloat16VFVFSF_TU -n 1 -l 7 --has-ta --has-ma -c FrdivVF16VFloat16VFVFSF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfrdiv_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfrdiv_vf_f16m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfrdiv_vf_operator_0() { +uint64_t tmp[] = {14378,29790,14741,28721,16479,26987,14553,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfrdiv_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrdiv_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfrdiv_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Frec7V16VFloat16VBVFVF_TAMU.c b/test/codegen-golden/Frec7V16VFloat16VBVFVF_TAMU.c new file mode 100644 index 0000000..488edae --- /dev/null +++ b/test/codegen-golden/Frec7V16VFloat16VBVFVF_TAMU.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r Frec7V16VFloat16VBVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c Frec7V16VFloat16VBVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfrec7_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfrec7_v_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfrec7_v_operator_0() { +uint64_t tmp[] = {29258,65535,1976,65535,1448,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfrec7_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrec7_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfrec7_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Frec7V16VFloat16VBVFVF_TUMA.c b/test/codegen-golden/Frec7V16VFloat16VBVFVF_TUMA.c new file mode 100644 index 0000000..d4a1df7 --- /dev/null +++ b/test/codegen-golden/Frec7V16VFloat16VBVFVF_TUMA.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r Frec7V16VFloat16VBVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c Frec7V16VFloat16VBVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfrec7_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfrec7_v_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfrec7_v_operator_0() { +uint64_t tmp[] = {65535,29822,1976,29133,1448,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfrec7_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrec7_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfrec7_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Frec7V16VFloat16VBVFVF_TUMU.c b/test/codegen-golden/Frec7V16VFloat16VBVFVF_TUMU.c new file mode 100644 index 0000000..0ad55da --- /dev/null +++ b/test/codegen-golden/Frec7V16VFloat16VBVFVF_TUMU.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r Frec7V16VFloat16VBVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c Frec7V16VFloat16VBVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfrec7_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfrec7_v_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfrec7_v_operator_0() { +uint64_t tmp[] = {29258,29822,1976,29133,1448,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfrec7_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrec7_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfrec7_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Frec7V16VFloat16VBVF_TAMA.c b/test/codegen-golden/Frec7V16VFloat16VBVF_TAMA.c new file mode 100644 index 0000000..74d5c37 --- /dev/null +++ b/test/codegen-golden/Frec7V16VFloat16VBVF_TAMA.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r Frec7V16VFloat16VBVF_TAMA -n 1 -l 7 --has-ta --has-ma -c Frec7V16VFloat16VBVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfrec7_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfrec7_v_f16m1_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfrec7_v_operator_0() { +uint64_t tmp[] = {65535,65535,1976,65535,1448,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfrec7_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrec7_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfrec7_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Frec7V16VFloat16VFVF_TU.c b/test/codegen-golden/Frec7V16VFloat16VFVF_TU.c new file mode 100644 index 0000000..52ad94f --- /dev/null +++ b/test/codegen-golden/Frec7V16VFloat16VFVF_TU.c @@ -0,0 +1,85 @@ +// COMMAND: random_gen -r Frec7V16VFloat16VFVF_TU -n 1 -l 7 --has-ta --has-ma -c Frec7V16VFloat16VFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfrec7_v_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfrec7_v_f16m1_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfrec7_v_operator_0() { +uint64_t tmp[] = {2104,29790,1976,28721,1448,26987,2160,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfrec7_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrec7_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfrec7_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Frec7V16VFloat16VF_TA.c b/test/codegen-golden/Frec7V16VFloat16VF_TA.c new file mode 100644 index 0000000..1ebc22b --- /dev/null +++ b/test/codegen-golden/Frec7V16VFloat16VF_TA.c @@ -0,0 +1,68 @@ +// COMMAND: random_gen -r Frec7V16VFloat16VF_TA -n 1 -l 7 --has-ta --has-ma -c Frec7V16VFloat16VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfrec7_v_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_1_0= vfrec7_v_f16m1_ta(vec_value_0_0, tail_vl); + +vse16_v_f16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfrec7_v_operator_0() { +uint64_t tmp[] = {2904,65535,1088,65535,1336,65535,2944,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfrec7_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrec7_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfrec7_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredmaxVS16SFloat16VBVFVF_TUM.c b/test/codegen-golden/FredmaxVS16SFloat16VBVFVF_TUM.c new file mode 100644 index 0000000..ad536ff --- /dev/null +++ b/test/codegen-golden/FredmaxVS16SFloat16VBVFVF_TUM.c @@ -0,0 +1,121 @@ +// COMMAND: random_gen -r FredmaxVS16SFloat16VBVFVF_TUM -n 1 -l 7 --has-ta --has-ma -c FredmaxVS16SFloat16VBVFVF_TUM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfredmax_vs_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +int placeholder4 = 7; + +vfloat16m1_t placeholder5= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder6= vmv_v_v_f16m1(placeholder5, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_3, value_1, sizeof(value_3)); +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +placeholder6 = vfredmax_vs_f16m1_f16m1_tum(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder6, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +float16_t *placeholder7 = value_3; +*placeholder7= vfmv_f_s_f16m1_f16(placeholder6); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfredmax_vs_operator_0() { +uint64_t tmp[] = {29523,29822,29143,29133,29186,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfredmax_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredmax_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfredmax_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredmaxVS16SFloat16VBVF_TAM.c b/test/codegen-golden/FredmaxVS16SFloat16VBVF_TAM.c new file mode 100644 index 0000000..e6d2be7 --- /dev/null +++ b/test/codegen-golden/FredmaxVS16SFloat16VBVF_TAM.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r FredmaxVS16SFloat16VBVF_TAM -n 1 -l 7 --has-ta --has-ma -c FredmaxVS16SFloat16VBVF_TAM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfredmax_vs_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int placeholder3 = 7; + +vfloat16m1_t placeholder4= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder5= vmv_v_v_f16m1(placeholder4, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_2, 0xff, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +placeholder5 = vfredmax_vs_f16m1_f16m1_tam(mask_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +float16_t *placeholder6 = value_2; +*placeholder6= vfmv_f_s_f16m1_f16(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfredmax_vs_operator_0() { +uint64_t tmp[] = {29523,65535,65535,65535,65535,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfredmax_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredmax_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfredmax_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredmaxVS16SFloat16VBVF_m.c b/test/codegen-golden/FredmaxVS16SFloat16VBVF_m.c new file mode 100644 index 0000000..ffa63eb --- /dev/null +++ b/test/codegen-golden/FredmaxVS16SFloat16VBVF_m.c @@ -0,0 +1,78 @@ +// COMMAND: random_gen -r FredmaxVS16SFloat16VBVF_m -n 1 -l 7 --has-ta --has-ma -c FredmaxVS16SFloat16VBVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfredmax_vs_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = &value_2; +int placeholder3 = 7; + +vfloat16m1_t placeholder4= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder5= vmv_v_v_f16m1(placeholder4, vsetvlmax_e16m1()); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +placeholder5 = vfredmax_vs_f16m1_f16m1_m (mask_value_0_0, placeholder5, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +} +float16_t *placeholder6 = &value_2; +*placeholder6= vfmv_f_s_f16m1_f16(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfredmax_vs_operator_0() { +uint16_t tmp = 29523; +union { float16_t f16; uint16_t u16; } converter, converter2; +converter.u16 = tmp; +converter2.f16 = value_2; +if(converter.f16 != value_2 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfredmax_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredmax_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfredmax_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredmaxVS16SFloat16VF.c b/test/codegen-golden/FredmaxVS16SFloat16VF.c new file mode 100644 index 0000000..9bfbc0b --- /dev/null +++ b/test/codegen-golden/FredmaxVS16SFloat16VF.c @@ -0,0 +1,62 @@ +// COMMAND: random_gen -r FredmaxVS16SFloat16VF -n 1 -l 7 --has-ta --has-ma -c FredmaxVS16SFloat16VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfredmax_vs_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = &value_1; +int placeholder2 = 7; + +vfloat16m1_t placeholder3= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder4= vmv_v_v_f16m1(placeholder3, vsetvlmax_e16m1()); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +placeholder4 = vfredmax_vs_f16m1_f16m1(placeholder4, vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +} +float16_t *placeholder5 = &value_1; +*placeholder5= vfmv_f_s_f16m1_f16(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfredmax_vs_operator_0() { +uint16_t tmp = 29790; +union { float16_t f16; uint16_t u16; } converter, converter2; +converter.u16 = tmp; +converter2.f16 = value_1; +if(converter.f16 != value_1 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfredmax_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredmax_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfredmax_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredmaxVS16SFloat16VFVF_TU.c b/test/codegen-golden/FredmaxVS16SFloat16VFVF_TU.c new file mode 100644 index 0000000..0fbeeb6 --- /dev/null +++ b/test/codegen-golden/FredmaxVS16SFloat16VFVF_TU.c @@ -0,0 +1,105 @@ +// COMMAND: random_gen -r FredmaxVS16SFloat16VFVF_TU -n 1 -l 7 --has-ta --has-ma -c FredmaxVS16SFloat16VFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfredmax_vs_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int placeholder3 = 7; + +vfloat16m1_t placeholder4= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder5= vmv_v_v_f16m1(placeholder4, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_2, value_0, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +placeholder5 = vfredmax_vs_f16m1_f16m1_tu(vec_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +float16_t *placeholder6 = value_2; +*placeholder6= vfmv_f_s_f16m1_f16(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfredmax_vs_operator_0() { +uint64_t tmp[] = {29523,29790,29580,28721,29222,26987,27716,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfredmax_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredmax_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfredmax_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredmaxVS16SFloat16VF_TA.c b/test/codegen-golden/FredmaxVS16SFloat16VF_TA.c new file mode 100644 index 0000000..2304090 --- /dev/null +++ b/test/codegen-golden/FredmaxVS16SFloat16VF_TA.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r FredmaxVS16SFloat16VF_TA -n 1 -l 7 --has-ta --has-ma -c FredmaxVS16SFloat16VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfredmax_vs_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int placeholder2 = 7; + +vfloat16m1_t placeholder3= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder4= vmv_v_v_f16m1(placeholder3, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_1, 0xff, sizeof(value_1)); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +placeholder4 = vfredmax_vs_f16m1_f16m1_ta(vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +placeholder1 += vl; +} +float16_t *placeholder5 = value_1; +*placeholder5= vfmv_f_s_f16m1_f16(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfredmax_vs_operator_0() { +uint64_t tmp[] = {29790,65535,65535,65535,65535,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfredmax_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredmax_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfredmax_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredminVS16SFloat16VBVFVF_TUM.c b/test/codegen-golden/FredminVS16SFloat16VBVFVF_TUM.c new file mode 100644 index 0000000..4d91bf4 --- /dev/null +++ b/test/codegen-golden/FredminVS16SFloat16VBVFVF_TUM.c @@ -0,0 +1,121 @@ +// COMMAND: random_gen -r FredminVS16SFloat16VBVFVF_TUM -n 1 -l 7 --has-ta --has-ma -c FredminVS16SFloat16VBVFVF_TUM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfredmin_vs_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +int placeholder4 = 7; + +vfloat16m1_t placeholder5= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder6= vmv_v_v_f16m1(placeholder5, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_3, value_1, sizeof(value_3)); +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +placeholder6 = vfredmin_vs_f16m1_f16m1_tum(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder6, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +float16_t *placeholder7 = value_3; +*placeholder7= vfmv_f_s_f16m1_f16(placeholder6); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfredmin_vs_operator_0() { +uint64_t tmp[] = {0,29822,29143,29133,29186,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfredmin_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredmin_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfredmin_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredminVS16SFloat16VBVF_TAM.c b/test/codegen-golden/FredminVS16SFloat16VBVF_TAM.c new file mode 100644 index 0000000..1a7d6a2 --- /dev/null +++ b/test/codegen-golden/FredminVS16SFloat16VBVF_TAM.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r FredminVS16SFloat16VBVF_TAM -n 1 -l 7 --has-ta --has-ma -c FredminVS16SFloat16VBVF_TAM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfredmin_vs_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int placeholder3 = 7; + +vfloat16m1_t placeholder4= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder5= vmv_v_v_f16m1(placeholder4, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_2, 0xff, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +placeholder5 = vfredmin_vs_f16m1_f16m1_tam(mask_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +float16_t *placeholder6 = value_2; +*placeholder6= vfmv_f_s_f16m1_f16(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfredmin_vs_operator_0() { +uint64_t tmp[] = {0,65535,65535,65535,65535,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfredmin_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredmin_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfredmin_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredminVS16SFloat16VBVF_m.c b/test/codegen-golden/FredminVS16SFloat16VBVF_m.c new file mode 100644 index 0000000..a9f5f1b --- /dev/null +++ b/test/codegen-golden/FredminVS16SFloat16VBVF_m.c @@ -0,0 +1,78 @@ +// COMMAND: random_gen -r FredminVS16SFloat16VBVF_m -n 1 -l 7 --has-ta --has-ma -c FredminVS16SFloat16VBVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfredmin_vs_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = &value_2; +int placeholder3 = 7; + +vfloat16m1_t placeholder4= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder5= vmv_v_v_f16m1(placeholder4, vsetvlmax_e16m1()); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +placeholder5 = vfredmin_vs_f16m1_f16m1_m (mask_value_0_0, placeholder5, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +} +float16_t *placeholder6 = &value_2; +*placeholder6= vfmv_f_s_f16m1_f16(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfredmin_vs_operator_0() { +uint16_t tmp = 0; +union { float16_t f16; uint16_t u16; } converter, converter2; +converter.u16 = tmp; +converter2.f16 = value_2; +if(converter.f16 != value_2 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfredmin_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredmin_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfredmin_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredminVS16SFloat16VF.c b/test/codegen-golden/FredminVS16SFloat16VF.c new file mode 100644 index 0000000..cf1691d --- /dev/null +++ b/test/codegen-golden/FredminVS16SFloat16VF.c @@ -0,0 +1,62 @@ +// COMMAND: random_gen -r FredminVS16SFloat16VF -n 1 -l 7 --has-ta --has-ma -c FredminVS16SFloat16VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfredmin_vs_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = &value_1; +int placeholder2 = 7; + +vfloat16m1_t placeholder3= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder4= vmv_v_v_f16m1(placeholder3, vsetvlmax_e16m1()); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +placeholder4 = vfredmin_vs_f16m1_f16m1(placeholder4, vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +} +float16_t *placeholder5 = &value_1; +*placeholder5= vfmv_f_s_f16m1_f16(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfredmin_vs_operator_0() { +uint16_t tmp = 0; +union { float16_t f16; uint16_t u16; } converter, converter2; +converter.u16 = tmp; +converter2.f16 = value_1; +if(converter.f16 != value_1 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfredmin_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredmin_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfredmin_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredminVS16SFloat16VFVF_TU.c b/test/codegen-golden/FredminVS16SFloat16VFVF_TU.c new file mode 100644 index 0000000..c96c0d5 --- /dev/null +++ b/test/codegen-golden/FredminVS16SFloat16VFVF_TU.c @@ -0,0 +1,105 @@ +// COMMAND: random_gen -r FredminVS16SFloat16VFVF_TU -n 1 -l 7 --has-ta --has-ma -c FredminVS16SFloat16VFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfredmin_vs_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int placeholder3 = 7; + +vfloat16m1_t placeholder4= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder5= vmv_v_v_f16m1(placeholder4, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_2, value_0, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +placeholder5 = vfredmin_vs_f16m1_f16m1_tu(vec_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +float16_t *placeholder6 = value_2; +*placeholder6= vfmv_f_s_f16m1_f16(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfredmin_vs_operator_0() { +uint64_t tmp[] = {0,29790,29580,28721,29222,26987,27716,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfredmin_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredmin_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfredmin_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredminVS16SFloat16VF_TA.c b/test/codegen-golden/FredminVS16SFloat16VF_TA.c new file mode 100644 index 0000000..b60ed58 --- /dev/null +++ b/test/codegen-golden/FredminVS16SFloat16VF_TA.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r FredminVS16SFloat16VF_TA -n 1 -l 7 --has-ta --has-ma -c FredminVS16SFloat16VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfredmin_vs_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int placeholder2 = 7; + +vfloat16m1_t placeholder3= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder4= vmv_v_v_f16m1(placeholder3, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_1, 0xff, sizeof(value_1)); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +placeholder4 = vfredmin_vs_f16m1_f16m1_ta(vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +placeholder1 += vl; +} +float16_t *placeholder5 = value_1; +*placeholder5= vfmv_f_s_f16m1_f16(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfredmin_vs_operator_0() { +uint64_t tmp[] = {0,65535,65535,65535,65535,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfredmin_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredmin_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfredmin_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredosumVS16SFloat16VBVFVF_TUM.c b/test/codegen-golden/FredosumVS16SFloat16VBVFVF_TUM.c new file mode 100644 index 0000000..a5dd188 --- /dev/null +++ b/test/codegen-golden/FredosumVS16SFloat16VBVFVF_TUM.c @@ -0,0 +1,121 @@ +// COMMAND: random_gen -r FredosumVS16SFloat16VBVFVF_TUM -n 1 -l 7 --has-ta --has-ma -c FredosumVS16SFloat16VBVFVF_TUM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfredosum_vs_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +int placeholder4 = 7; + +vfloat16m1_t placeholder5= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder6= vmv_v_v_f16m1(placeholder5, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_3, value_1, sizeof(value_3)); +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +placeholder6 = vfredosum_vs_f16m1_f16m1_tum(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder6, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +float16_t *placeholder7 = value_3; +*placeholder7= vfmv_f_s_f16m1_f16(placeholder6); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfredosum_vs_operator_0() { +uint64_t tmp[] = {30792,29822,29143,29133,29186,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfredosum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredosum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfredosum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredosumVS16SFloat16VBVF_TAM.c b/test/codegen-golden/FredosumVS16SFloat16VBVF_TAM.c new file mode 100644 index 0000000..bd80961 --- /dev/null +++ b/test/codegen-golden/FredosumVS16SFloat16VBVF_TAM.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r FredosumVS16SFloat16VBVF_TAM -n 1 -l 7 --has-ta --has-ma -c FredosumVS16SFloat16VBVF_TAM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfredosum_vs_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int placeholder3 = 7; + +vfloat16m1_t placeholder4= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder5= vmv_v_v_f16m1(placeholder4, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_2, 0xff, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +placeholder5 = vfredosum_vs_f16m1_f16m1_tam(mask_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +float16_t *placeholder6 = value_2; +*placeholder6= vfmv_f_s_f16m1_f16(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfredosum_vs_operator_0() { +uint64_t tmp[] = {30792,65535,65535,65535,65535,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfredosum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredosum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfredosum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredosumVS16SFloat16VBVF_m.c b/test/codegen-golden/FredosumVS16SFloat16VBVF_m.c new file mode 100644 index 0000000..29059f9 --- /dev/null +++ b/test/codegen-golden/FredosumVS16SFloat16VBVF_m.c @@ -0,0 +1,78 @@ +// COMMAND: random_gen -r FredosumVS16SFloat16VBVF_m -n 1 -l 7 --has-ta --has-ma -c FredosumVS16SFloat16VBVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfredosum_vs_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = &value_2; +int placeholder3 = 7; + +vfloat16m1_t placeholder4= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder5= vmv_v_v_f16m1(placeholder4, vsetvlmax_e16m1()); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +placeholder5 = vfredosum_vs_f16m1_f16m1_m (mask_value_0_0, placeholder5, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +} +float16_t *placeholder6 = &value_2; +*placeholder6= vfmv_f_s_f16m1_f16(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfredosum_vs_operator_0() { +uint16_t tmp = 30792; +union { float16_t f16; uint16_t u16; } converter, converter2; +converter.u16 = tmp; +converter2.f16 = value_2; +if(converter.f16 != value_2 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfredosum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredosum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfredosum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredosumVS16SFloat16VF.c b/test/codegen-golden/FredosumVS16SFloat16VF.c new file mode 100644 index 0000000..c092018 --- /dev/null +++ b/test/codegen-golden/FredosumVS16SFloat16VF.c @@ -0,0 +1,62 @@ +// COMMAND: random_gen -r FredosumVS16SFloat16VF -n 1 -l 7 --has-ta --has-ma -c FredosumVS16SFloat16VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfredosum_vs_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = &value_1; +int placeholder2 = 7; + +vfloat16m1_t placeholder3= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder4= vmv_v_v_f16m1(placeholder3, vsetvlmax_e16m1()); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +placeholder4 = vfredosum_vs_f16m1_f16m1(placeholder4, vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +} +float16_t *placeholder5 = &value_1; +*placeholder5= vfmv_f_s_f16m1_f16(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfredosum_vs_operator_0() { +uint16_t tmp = 31744; +union { float16_t f16; uint16_t u16; } converter, converter2; +converter.u16 = tmp; +converter2.f16 = value_1; +if(converter.f16 != value_1 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfredosum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredosum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfredosum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredosumVS16SFloat16VFVF_TU.c b/test/codegen-golden/FredosumVS16SFloat16VFVF_TU.c new file mode 100644 index 0000000..3f0ddca --- /dev/null +++ b/test/codegen-golden/FredosumVS16SFloat16VFVF_TU.c @@ -0,0 +1,105 @@ +// COMMAND: random_gen -r FredosumVS16SFloat16VFVF_TU -n 1 -l 7 --has-ta --has-ma -c FredosumVS16SFloat16VFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfredosum_vs_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int placeholder3 = 7; + +vfloat16m1_t placeholder4= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder5= vmv_v_v_f16m1(placeholder4, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_2, value_0, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +placeholder5 = vfredosum_vs_f16m1_f16m1_tu(vec_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +float16_t *placeholder6 = value_2; +*placeholder6= vfmv_f_s_f16m1_f16(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfredosum_vs_operator_0() { +uint64_t tmp[] = {31728,29790,29580,28721,29222,26987,27716,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfredosum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredosum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfredosum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredosumVS16SFloat16VF_TA.c b/test/codegen-golden/FredosumVS16SFloat16VF_TA.c new file mode 100644 index 0000000..566f60e --- /dev/null +++ b/test/codegen-golden/FredosumVS16SFloat16VF_TA.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r FredosumVS16SFloat16VF_TA -n 1 -l 7 --has-ta --has-ma -c FredosumVS16SFloat16VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfredosum_vs_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int placeholder2 = 7; + +vfloat16m1_t placeholder3= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder4= vmv_v_v_f16m1(placeholder3, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_1, 0xff, sizeof(value_1)); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +placeholder4 = vfredosum_vs_f16m1_f16m1_ta(vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +placeholder1 += vl; +} +float16_t *placeholder5 = value_1; +*placeholder5= vfmv_f_s_f16m1_f16(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfredosum_vs_operator_0() { +uint64_t tmp[] = {31744,65535,65535,65535,65535,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfredosum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredosum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfredosum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredusumVS16SFloat16VBVFVF_TUM.c b/test/codegen-golden/FredusumVS16SFloat16VBVFVF_TUM.c new file mode 100644 index 0000000..cd0b04f --- /dev/null +++ b/test/codegen-golden/FredusumVS16SFloat16VBVFVF_TUM.c @@ -0,0 +1,121 @@ +// COMMAND: random_gen -r FredusumVS16SFloat16VBVFVF_TUM -n 1 -l 7 --has-ta --has-ma -c FredusumVS16SFloat16VBVFVF_TUM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfredusum_vs_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +int placeholder4 = 7; + +vfloat16m1_t placeholder5= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder6= vmv_v_v_f16m1(placeholder5, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_3, value_1, sizeof(value_3)); +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +placeholder6 = vfredusum_vs_f16m1_f16m1_tum(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder6, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +float16_t *placeholder7 = value_3; +*placeholder7= vfmv_f_s_f16m1_f16(placeholder6); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfredusum_vs_operator_0() { +uint64_t tmp[] = {30792,29822,29143,29133,29186,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfredusum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredusum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfredusum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredusumVS16SFloat16VBVF_TAM.c b/test/codegen-golden/FredusumVS16SFloat16VBVF_TAM.c new file mode 100644 index 0000000..a78dcf8 --- /dev/null +++ b/test/codegen-golden/FredusumVS16SFloat16VBVF_TAM.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r FredusumVS16SFloat16VBVF_TAM -n 1 -l 7 --has-ta --has-ma -c FredusumVS16SFloat16VBVF_TAM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfredusum_vs_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int placeholder3 = 7; + +vfloat16m1_t placeholder4= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder5= vmv_v_v_f16m1(placeholder4, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_2, 0xff, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +placeholder5 = vfredusum_vs_f16m1_f16m1_tam(mask_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +float16_t *placeholder6 = value_2; +*placeholder6= vfmv_f_s_f16m1_f16(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfredusum_vs_operator_0() { +uint64_t tmp[] = {30792,65535,65535,65535,65535,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfredusum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredusum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfredusum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredusumVS16SFloat16VBVF_m.c b/test/codegen-golden/FredusumVS16SFloat16VBVF_m.c new file mode 100644 index 0000000..b1efa8c --- /dev/null +++ b/test/codegen-golden/FredusumVS16SFloat16VBVF_m.c @@ -0,0 +1,78 @@ +// COMMAND: random_gen -r FredusumVS16SFloat16VBVF_m -n 1 -l 7 --has-ta --has-ma -c FredusumVS16SFloat16VBVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfredusum_vs_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = &value_2; +int placeholder3 = 7; + +vfloat16m1_t placeholder4= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder5= vmv_v_v_f16m1(placeholder4, vsetvlmax_e16m1()); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +placeholder5 = vfredusum_vs_f16m1_f16m1_m (mask_value_0_0, placeholder5, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +} +float16_t *placeholder6 = &value_2; +*placeholder6= vfmv_f_s_f16m1_f16(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfredusum_vs_operator_0() { +uint16_t tmp = 30792; +union { float16_t f16; uint16_t u16; } converter, converter2; +converter.u16 = tmp; +converter2.f16 = value_2; +if(converter.f16 != value_2 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfredusum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredusum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfredusum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredusumVS16SFloat16VF.c b/test/codegen-golden/FredusumVS16SFloat16VF.c new file mode 100644 index 0000000..a43abb5 --- /dev/null +++ b/test/codegen-golden/FredusumVS16SFloat16VF.c @@ -0,0 +1,62 @@ +// COMMAND: random_gen -r FredusumVS16SFloat16VF -n 1 -l 7 --has-ta --has-ma -c FredusumVS16SFloat16VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfredusum_vs_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = &value_1; +int placeholder2 = 7; + +vfloat16m1_t placeholder3= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder4= vmv_v_v_f16m1(placeholder3, vsetvlmax_e16m1()); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +placeholder4 = vfredusum_vs_f16m1_f16m1(placeholder4, vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +} +float16_t *placeholder5 = &value_1; +*placeholder5= vfmv_f_s_f16m1_f16(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfredusum_vs_operator_0() { +uint16_t tmp = 31744; +union { float16_t f16; uint16_t u16; } converter, converter2; +converter.u16 = tmp; +converter2.f16 = value_1; +if(converter.f16 != value_1 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfredusum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredusum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfredusum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredusumVS16SFloat16VFVF_TU.c b/test/codegen-golden/FredusumVS16SFloat16VFVF_TU.c new file mode 100644 index 0000000..cccee7c --- /dev/null +++ b/test/codegen-golden/FredusumVS16SFloat16VFVF_TU.c @@ -0,0 +1,105 @@ +// COMMAND: random_gen -r FredusumVS16SFloat16VFVF_TU -n 1 -l 7 --has-ta --has-ma -c FredusumVS16SFloat16VFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfredusum_vs_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int placeholder3 = 7; + +vfloat16m1_t placeholder4= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder5= vmv_v_v_f16m1(placeholder4, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_2, value_0, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +placeholder5 = vfredusum_vs_f16m1_f16m1_tu(vec_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +float16_t *placeholder6 = value_2; +*placeholder6= vfmv_f_s_f16m1_f16(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfredusum_vs_operator_0() { +uint64_t tmp[] = {31728,29790,29580,28721,29222,26987,27716,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfredusum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredusum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfredusum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FredusumVS16SFloat16VF_TA.c b/test/codegen-golden/FredusumVS16SFloat16VF_TA.c new file mode 100644 index 0000000..6a76c8c --- /dev/null +++ b/test/codegen-golden/FredusumVS16SFloat16VF_TA.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r FredusumVS16SFloat16VF_TA -n 1 -l 7 --has-ta --has-ma -c FredusumVS16SFloat16VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfredusum_vs_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int placeholder2 = 7; + +vfloat16m1_t placeholder3= vfmv_v_f_f16m1(0, vsetvlmax_e16m1()); +vfloat16m1_t placeholder4= vmv_v_v_f16m1(placeholder3, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_1, 0xff, sizeof(value_1)); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +placeholder4 = vfredusum_vs_f16m1_f16m1_ta(vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +placeholder1 += vl; +} +float16_t *placeholder5 = value_1; +*placeholder5= vfmv_f_s_f16m1_f16(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfredusum_vs_operator_0() { +uint64_t tmp[] = {31744,65535,65535,65535,65535,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfredusum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfredusum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfredusum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Frsqrt7V16VFloat16VBVFVF_TAMU.c b/test/codegen-golden/Frsqrt7V16VFloat16VBVFVF_TAMU.c new file mode 100644 index 0000000..8326800 --- /dev/null +++ b/test/codegen-golden/Frsqrt7V16VFloat16VBVFVF_TAMU.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r Frsqrt7V16VFloat16VBVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c Frsqrt7V16VFloat16VBVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfrsqrt7_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfrsqrt7_v_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfrsqrt7_v_operator_0() { +uint64_t tmp[] = {29258,65535,8592,65535,8384,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfrsqrt7_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrsqrt7_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfrsqrt7_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Frsqrt7V16VFloat16VBVFVF_TUMA.c b/test/codegen-golden/Frsqrt7V16VFloat16VBVFVF_TUMA.c new file mode 100644 index 0000000..fb23f7b --- /dev/null +++ b/test/codegen-golden/Frsqrt7V16VFloat16VBVFVF_TUMA.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r Frsqrt7V16VFloat16VBVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c Frsqrt7V16VFloat16VBVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfrsqrt7_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfrsqrt7_v_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfrsqrt7_v_operator_0() { +uint64_t tmp[] = {65535,29822,8592,29133,8384,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfrsqrt7_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrsqrt7_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfrsqrt7_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Frsqrt7V16VFloat16VBVFVF_TUMU.c b/test/codegen-golden/Frsqrt7V16VFloat16VBVFVF_TUMU.c new file mode 100644 index 0000000..7bf9df2 --- /dev/null +++ b/test/codegen-golden/Frsqrt7V16VFloat16VBVFVF_TUMU.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r Frsqrt7V16VFloat16VBVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c Frsqrt7V16VFloat16VBVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfrsqrt7_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfrsqrt7_v_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfrsqrt7_v_operator_0() { +uint64_t tmp[] = {29258,29822,8592,29133,8384,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfrsqrt7_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrsqrt7_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfrsqrt7_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Frsqrt7V16VFloat16VBVFVF_m.c b/test/codegen-golden/Frsqrt7V16VFloat16VBVFVF_m.c new file mode 100644 index 0000000..b5cbb98 --- /dev/null +++ b/test/codegen-golden/Frsqrt7V16VFloat16VBVFVF_m.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r Frsqrt7V16VFloat16VBVFVF_m -n 1 -l 7 --has-ta --has-ma -c Frsqrt7V16VFloat16VBVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfrsqrt7_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfrsqrt7_v_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfrsqrt7_v_operator_0() { +uint64_t tmp[] = {29258,8240,8592,29133,8384,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfrsqrt7_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrsqrt7_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfrsqrt7_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Frsqrt7V16VFloat16VBVF_TAMA.c b/test/codegen-golden/Frsqrt7V16VFloat16VBVF_TAMA.c new file mode 100644 index 0000000..f776fb9 --- /dev/null +++ b/test/codegen-golden/Frsqrt7V16VFloat16VBVF_TAMA.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r Frsqrt7V16VFloat16VBVF_TAMA -n 1 -l 7 --has-ta --has-ma -c Frsqrt7V16VFloat16VBVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfrsqrt7_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfrsqrt7_v_f16m1_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfrsqrt7_v_operator_0() { +uint64_t tmp[] = {65535,65535,8592,65535,8384,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfrsqrt7_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrsqrt7_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfrsqrt7_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Frsqrt7V16VFloat16VF.c b/test/codegen-golden/Frsqrt7V16VFloat16VF.c new file mode 100644 index 0000000..59855d8 --- /dev/null +++ b/test/codegen-golden/Frsqrt7V16VFloat16VF.c @@ -0,0 +1,67 @@ +// COMMAND: random_gen -r Frsqrt7V16VFloat16VF -n 1 -l 7 --has-ta --has-ma -c Frsqrt7V16VFloat16VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfrsqrt7_v_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_1_0= vfrsqrt7_v_f16m1(vec_value_0_0, vl); + +vse16_v_f16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfrsqrt7_v_operator_0() { +uint64_t tmp[] = {9136,8112,8224,8576,8336,9440,9144,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfrsqrt7_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrsqrt7_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfrsqrt7_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Frsqrt7V16VFloat16VFVF_TU.c b/test/codegen-golden/Frsqrt7V16VFloat16VFVF_TU.c new file mode 100644 index 0000000..a2175b0 --- /dev/null +++ b/test/codegen-golden/Frsqrt7V16VFloat16VFVF_TU.c @@ -0,0 +1,85 @@ +// COMMAND: random_gen -r Frsqrt7V16VFloat16VFVF_TU -n 1 -l 7 --has-ta --has-ma -c Frsqrt7V16VFloat16VFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfrsqrt7_v_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfrsqrt7_v_f16m1_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfrsqrt7_v_operator_0() { +uint64_t tmp[] = {8656,29790,8592,28721,8384,26987,8696,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfrsqrt7_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrsqrt7_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfrsqrt7_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Frsqrt7V16VFloat16VF_TA.c b/test/codegen-golden/Frsqrt7V16VFloat16VF_TA.c new file mode 100644 index 0000000..ae31ffa --- /dev/null +++ b/test/codegen-golden/Frsqrt7V16VFloat16VF_TA.c @@ -0,0 +1,68 @@ +// COMMAND: random_gen -r Frsqrt7V16VFloat16VF_TA -n 1 -l 7 --has-ta --has-ma -c Frsqrt7V16VFloat16VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfrsqrt7_v_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_1_0= vfrsqrt7_v_f16m1_ta(vec_value_0_0, tail_vl); + +vse16_v_f16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfrsqrt7_v_operator_0() { +uint64_t tmp[] = {9136,65535,8224,65535,8336,65535,9144,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfrsqrt7_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrsqrt7_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfrsqrt7_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FrsubVF16VFloat16VBVFSF_TAMA.c b/test/codegen-golden/FrsubVF16VFloat16VBVFSF_TAMA.c new file mode 100644 index 0000000..7fd99e7 --- /dev/null +++ b/test/codegen-golden/FrsubVF16VFloat16VBVFSF_TAMA.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FrsubVF16VFloat16VBVFSF_TAMA -n 1 -l 7 --has-ta --has-ma -c FrsubVF16VFloat16VBVFSF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfrsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfrsub_vf_f16m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfrsub_vf_operator_0() { +uint64_t tmp[] = {65535,65535,60058,65535,27682,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfrsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfrsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FrsubVF16VFloat16VBVFVFSF_TAMU.c b/test/codegen-golden/FrsubVF16VFloat16VBVFVFSF_TAMU.c new file mode 100644 index 0000000..a333ddf --- /dev/null +++ b/test/codegen-golden/FrsubVF16VFloat16VBVFVFSF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FrsubVF16VFloat16VBVFVFSF_TAMU -n 1 -l 7 --has-ta --has-ma -c FrsubVF16VFloat16VBVFVFSF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfrsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfrsub_vf_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfrsub_vf_operator_0() { +uint64_t tmp[] = {29523,65535,60406,65535,27914,65535,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfrsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfrsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FrsubVF16VFloat16VBVFVFSF_TUMA.c b/test/codegen-golden/FrsubVF16VFloat16VBVFVFSF_TUMA.c new file mode 100644 index 0000000..3dc3521 --- /dev/null +++ b/test/codegen-golden/FrsubVF16VFloat16VBVFVFSF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FrsubVF16VFloat16VBVFVFSF_TUMA -n 1 -l 7 --has-ta --has-ma -c FrsubVF16VFloat16VBVFVFSF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfrsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfrsub_vf_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfrsub_vf_operator_0() { +uint64_t tmp[] = {65535,28707,60406,29100,27914,28475,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfrsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfrsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FrsubVF16VFloat16VBVFVFSF_TUMU.c b/test/codegen-golden/FrsubVF16VFloat16VBVFVFSF_TUMU.c new file mode 100644 index 0000000..ee20024 --- /dev/null +++ b/test/codegen-golden/FrsubVF16VFloat16VBVFVFSF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FrsubVF16VFloat16VBVFVFSF_TUMU -n 1 -l 7 --has-ta --has-ma -c FrsubVF16VFloat16VBVFVFSF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfrsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfrsub_vf_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfrsub_vf_operator_0() { +uint64_t tmp[] = {29523,28707,60406,29100,27914,28475,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfrsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfrsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FrsubVF16VFloat16VBVFVFSF_m.c b/test/codegen-golden/FrsubVF16VFloat16VBVFVFSF_m.c new file mode 100644 index 0000000..154dd0c --- /dev/null +++ b/test/codegen-golden/FrsubVF16VFloat16VBVFVFSF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FrsubVF16VFloat16VBVFVFSF_m -n 1 -l 7 --has-ta --has-ma -c FrsubVF16VFloat16VBVFVFSF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfrsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfrsub_vf_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfrsub_vf_operator_0() { +uint64_t tmp[] = {29523,60431,60406,29100,27914,28475,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfrsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfrsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FrsubVF16VFloat16VFSF.c b/test/codegen-golden/FrsubVF16VFloat16VFSF.c new file mode 100644 index 0000000..77ddb06 --- /dev/null +++ b/test/codegen-golden/FrsubVF16VFloat16VFSF.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r FrsubVF16VFloat16VFSF -n 1 -l 7 --has-ta --has-ma -c FrsubVF16VFloat16VFSF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfrsub_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_2_0= vfrsub_vf_f16m1(vec_value_0_0, placeholder1, vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfrsub_vf_operator_0() { +uint64_t tmp[] = {27274,61676,61305,57880,60589,27882,27318,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfrsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfrsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FrsubVF16VFloat16VFSF_TA.c b/test/codegen-golden/FrsubVF16VFloat16VFSF_TA.c new file mode 100644 index 0000000..8a548d1 --- /dev/null +++ b/test/codegen-golden/FrsubVF16VFloat16VFSF_TA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r FrsubVF16VFloat16VFSF_TA -n 1 -l 7 --has-ta --has-ma -c FrsubVF16VFloat16VFSF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfrsub_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_2_0= vfrsub_vf_f16m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfrsub_vf_operator_0() { +uint64_t tmp[] = {27274,65535,61305,65535,60589,65535,27318,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfrsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfrsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FrsubVF16VFloat16VFVFSF_TU.c b/test/codegen-golden/FrsubVF16VFloat16VFVFSF_TU.c new file mode 100644 index 0000000..d92e4f8 --- /dev/null +++ b/test/codegen-golden/FrsubVF16VFloat16VFVFSF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FrsubVF16VFloat16VFVFSF_TU -n 1 -l 7 --has-ta --has-ma -c FrsubVF16VFloat16VFVFSF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfrsub_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfrsub_vf_f16m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfrsub_vf_operator_0() { +uint64_t tmp[] = {61191,29790,60058,28721,27682,26987,60661,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfrsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfrsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfrsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjVF16VFloat16VBVFSF_TAMA.c b/test/codegen-golden/FsgnjVF16VFloat16VBVFSF_TAMA.c new file mode 100644 index 0000000..f3e72aa --- /dev/null +++ b/test/codegen-golden/FsgnjVF16VFloat16VBVFSF_TAMA.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FsgnjVF16VFloat16VBVFSF_TAMA -n 1 -l 7 --has-ta --has-ma -c FsgnjVF16VFloat16VBVFSF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsgnj_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfsgnj_vf_f16m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnj_vf_operator_0() { +uint64_t tmp[] = {65535,65535,29046,65535,27386,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfsgnj_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnj_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnj_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjVF16VFloat16VBVFVFSF_TAMU.c b/test/codegen-golden/FsgnjVF16VFloat16VBVFVFSF_TAMU.c new file mode 100644 index 0000000..fc5dc5d --- /dev/null +++ b/test/codegen-golden/FsgnjVF16VFloat16VBVFVFSF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FsgnjVF16VFloat16VBVFVFSF_TAMU -n 1 -l 7 --has-ta --has-ma -c FsgnjVF16VFloat16VBVFVFSF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnj_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfsgnj_vf_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnj_vf_operator_0() { +uint64_t tmp[] = {29523,65535,29133,65535,26923,65535,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnj_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnj_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnj_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjVF16VFloat16VBVFVFSF_TUMA.c b/test/codegen-golden/FsgnjVF16VFloat16VBVFVFSF_TUMA.c new file mode 100644 index 0000000..6b611af --- /dev/null +++ b/test/codegen-golden/FsgnjVF16VFloat16VBVFVFSF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FsgnjVF16VFloat16VBVFVFSF_TUMA -n 1 -l 7 --has-ta --has-ma -c FsgnjVF16VFloat16VBVFVFSF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnj_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfsgnj_vf_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnj_vf_operator_0() { +uint64_t tmp[] = {65535,28707,29133,29100,26923,28475,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnj_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnj_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnj_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjVF16VFloat16VBVFVFSF_TUMU.c b/test/codegen-golden/FsgnjVF16VFloat16VBVFVFSF_TUMU.c new file mode 100644 index 0000000..15bb5cc --- /dev/null +++ b/test/codegen-golden/FsgnjVF16VFloat16VBVFVFSF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FsgnjVF16VFloat16VBVFVFSF_TUMU -n 1 -l 7 --has-ta --has-ma -c FsgnjVF16VFloat16VBVFVFSF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnj_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfsgnj_vf_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnj_vf_operator_0() { +uint64_t tmp[] = {29523,28707,29133,29100,26923,28475,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnj_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnj_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnj_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjVF16VFloat16VBVFVFSF_m.c b/test/codegen-golden/FsgnjVF16VFloat16VBVFVFSF_m.c new file mode 100644 index 0000000..1739c2b --- /dev/null +++ b/test/codegen-golden/FsgnjVF16VFloat16VBVFVFSF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FsgnjVF16VFloat16VBVFVFSF_m -n 1 -l 7 --has-ta --has-ma -c FsgnjVF16VFloat16VBVFVFSF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnj_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfsgnj_vf_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnj_vf_operator_0() { +uint64_t tmp[] = {29523,29143,29133,29100,26923,28475,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnj_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnj_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnj_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjVF16VFloat16VFSF.c b/test/codegen-golden/FsgnjVF16VFloat16VFSF.c new file mode 100644 index 0000000..638c2e9 --- /dev/null +++ b/test/codegen-golden/FsgnjVF16VFloat16VFSF.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r FsgnjVF16VFloat16VFSF -n 1 -l 7 --has-ta --has-ma -c FsgnjVF16VFloat16VFSF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfsgnj_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_2_0= vfsgnj_vf_f16m1(vec_value_0_0, placeholder1, vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnj_vf_operator_0() { +uint64_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfsgnj_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnj_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnj_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjVF16VFloat16VFSF_TA.c b/test/codegen-golden/FsgnjVF16VFloat16VFSF_TA.c new file mode 100644 index 0000000..2c4dbd6 --- /dev/null +++ b/test/codegen-golden/FsgnjVF16VFloat16VFSF_TA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r FsgnjVF16VFloat16VFSF_TA -n 1 -l 7 --has-ta --has-ma -c FsgnjVF16VFloat16VFSF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfsgnj_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_2_0= vfsgnj_vf_f16m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnj_vf_operator_0() { +uint64_t tmp[] = {27738,65535,29580,65535,29222,65535,27716,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfsgnj_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnj_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnj_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjVF16VFloat16VFVFSF_TU.c b/test/codegen-golden/FsgnjVF16VFloat16VFVFSF_TU.c new file mode 100644 index 0000000..08adcd6 --- /dev/null +++ b/test/codegen-golden/FsgnjVF16VFloat16VFVFSF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FsgnjVF16VFloat16VFVFSF_TU -n 1 -l 7 --has-ta --has-ma -c FsgnjVF16VFloat16VFVFSF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsgnj_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfsgnj_vf_f16m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnj_vf_operator_0() { +uint64_t tmp[] = {29523,29790,29046,28721,27386,26987,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfsgnj_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnj_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnj_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjVV16VFloat16VBVFVFVF_TAMU.c b/test/codegen-golden/FsgnjVV16VFloat16VBVFVFVF_TAMU.c new file mode 100644 index 0000000..b3c0e77 --- /dev/null +++ b/test/codegen-golden/FsgnjVV16VFloat16VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FsgnjVV16VFloat16VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FsgnjVV16VFloat16VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnj_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfsgnj_vv_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnj_vv_operator_0() { +uint64_t tmp[] = {29258,65535,29383,65535,28160,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnj_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnj_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnj_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjVV16VFloat16VBVFVFVF_TUMA.c b/test/codegen-golden/FsgnjVV16VFloat16VBVFVFVF_TUMA.c new file mode 100644 index 0000000..89caa9e --- /dev/null +++ b/test/codegen-golden/FsgnjVV16VFloat16VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FsgnjVV16VFloat16VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FsgnjVV16VFloat16VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnj_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfsgnj_vv_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnj_vv_operator_0() { +uint64_t tmp[] = {65535,29822,29383,29133,28160,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnj_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnj_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnj_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjVV16VFloat16VBVFVFVF_TUMU.c b/test/codegen-golden/FsgnjVV16VFloat16VBVFVFVF_TUMU.c new file mode 100644 index 0000000..000a0d1 --- /dev/null +++ b/test/codegen-golden/FsgnjVV16VFloat16VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FsgnjVV16VFloat16VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FsgnjVV16VFloat16VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnj_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfsgnj_vv_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnj_vv_operator_0() { +uint64_t tmp[] = {29258,29822,29383,29133,28160,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnj_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnj_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnj_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjVV16VFloat16VBVFVFVF_m.c b/test/codegen-golden/FsgnjVV16VFloat16VBVFVFVF_m.c new file mode 100644 index 0000000..9d65c93 --- /dev/null +++ b/test/codegen-golden/FsgnjVV16VFloat16VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FsgnjVV16VFloat16VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FsgnjVV16VFloat16VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnj_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfsgnj_vv_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnj_vv_operator_0() { +uint64_t tmp[] = {29258,28416,29383,29133,28160,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnj_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnj_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnj_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjVV16VFloat16VBVFVF_TAMA.c b/test/codegen-golden/FsgnjVV16VFloat16VBVFVF_TAMA.c new file mode 100644 index 0000000..4a28bc2 --- /dev/null +++ b/test/codegen-golden/FsgnjVV16VFloat16VBVFVF_TAMA.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FsgnjVV16VFloat16VBVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FsgnjVV16VFloat16VBVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsgnj_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfsgnj_vv_f16m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnj_vv_operator_0() { +uint64_t tmp[] = {65535,65535,29143,65535,29186,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfsgnj_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnj_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnj_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjVV16VFloat16VFVF.c b/test/codegen-golden/FsgnjVV16VFloat16VFVF.c new file mode 100644 index 0000000..8f971f1 --- /dev/null +++ b/test/codegen-golden/FsgnjVV16VFloat16VFVF.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r FsgnjVV16VFloat16VFVF -n 1 -l 7 --has-ta --has-ma -c FsgnjVV16VFloat16VFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsgnj_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfsgnj_vv_f16m1(vec_value_0_0, vec_value_1_0, vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnj_vv_operator_0() { +uint64_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfsgnj_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnj_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnj_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjVV16VFloat16VFVFVF_TU.c b/test/codegen-golden/FsgnjVV16VFloat16VFVFVF_TU.c new file mode 100644 index 0000000..46cb38f --- /dev/null +++ b/test/codegen-golden/FsgnjVV16VFloat16VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FsgnjVV16VFloat16VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FsgnjVV16VFloat16VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsgnj_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfsgnj_vv_f16m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnj_vv_operator_0() { +uint64_t tmp[] = {29258,29790,29143,28721,29186,26987,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfsgnj_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnj_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnj_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjVV16VFloat16VFVF_TA.c b/test/codegen-golden/FsgnjVV16VFloat16VFVF_TA.c new file mode 100644 index 0000000..18b39a2 --- /dev/null +++ b/test/codegen-golden/FsgnjVV16VFloat16VFVF_TA.c @@ -0,0 +1,85 @@ +// COMMAND: random_gen -r FsgnjVV16VFloat16VFVF_TA -n 1 -l 7 --has-ta --has-ma -c FsgnjVV16VFloat16VFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsgnj_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfsgnj_vv_f16m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnj_vv_operator_0() { +uint64_t tmp[] = {27738,65535,29580,65535,29222,65535,27716,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfsgnj_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnj_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnj_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjnVF16VFloat16VBVFSF_TAMA.c b/test/codegen-golden/FsgnjnVF16VFloat16VBVFSF_TAMA.c new file mode 100644 index 0000000..7c0e5fd --- /dev/null +++ b/test/codegen-golden/FsgnjnVF16VFloat16VBVFSF_TAMA.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FsgnjnVF16VFloat16VBVFSF_TAMA -n 1 -l 7 --has-ta --has-ma -c FsgnjnVF16VFloat16VBVFSF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsgnjn_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfsgnjn_vf_f16m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnjn_vf_operator_0() { +uint64_t tmp[] = {65535,65535,61814,65535,60154,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfsgnjn_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjn_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnjn_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjnVF16VFloat16VBVFVFSF_TAMU.c b/test/codegen-golden/FsgnjnVF16VFloat16VBVFVFSF_TAMU.c new file mode 100644 index 0000000..46b1f07 --- /dev/null +++ b/test/codegen-golden/FsgnjnVF16VFloat16VBVFVFSF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FsgnjnVF16VFloat16VBVFVFSF_TAMU -n 1 -l 7 --has-ta --has-ma -c FsgnjnVF16VFloat16VBVFVFSF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnjn_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfsgnjn_vf_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnjn_vf_operator_0() { +uint64_t tmp[] = {29523,65535,61901,65535,59691,65535,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnjn_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjn_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnjn_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjnVF16VFloat16VBVFVFSF_TUMA.c b/test/codegen-golden/FsgnjnVF16VFloat16VBVFVFSF_TUMA.c new file mode 100644 index 0000000..8cd88b4 --- /dev/null +++ b/test/codegen-golden/FsgnjnVF16VFloat16VBVFVFSF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FsgnjnVF16VFloat16VBVFVFSF_TUMA -n 1 -l 7 --has-ta --has-ma -c FsgnjnVF16VFloat16VBVFVFSF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnjn_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfsgnjn_vf_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnjn_vf_operator_0() { +uint64_t tmp[] = {65535,28707,61901,29100,59691,28475,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnjn_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjn_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnjn_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjnVF16VFloat16VBVFVFSF_TUMU.c b/test/codegen-golden/FsgnjnVF16VFloat16VBVFVFSF_TUMU.c new file mode 100644 index 0000000..2aa0ec1 --- /dev/null +++ b/test/codegen-golden/FsgnjnVF16VFloat16VBVFVFSF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FsgnjnVF16VFloat16VBVFVFSF_TUMU -n 1 -l 7 --has-ta --has-ma -c FsgnjnVF16VFloat16VBVFVFSF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnjn_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfsgnjn_vf_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnjn_vf_operator_0() { +uint64_t tmp[] = {29523,28707,61901,29100,59691,28475,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnjn_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjn_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnjn_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjnVF16VFloat16VBVFVFSF_m.c b/test/codegen-golden/FsgnjnVF16VFloat16VBVFVFSF_m.c new file mode 100644 index 0000000..0f90c0b --- /dev/null +++ b/test/codegen-golden/FsgnjnVF16VFloat16VBVFVFSF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FsgnjnVF16VFloat16VBVFVFSF_m -n 1 -l 7 --has-ta --has-ma -c FsgnjnVF16VFloat16VBVFVFSF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnjn_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfsgnjn_vf_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnjn_vf_operator_0() { +uint64_t tmp[] = {29523,61911,61901,29100,59691,28475,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnjn_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjn_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnjn_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjnVF16VFloat16VFSF.c b/test/codegen-golden/FsgnjnVF16VFloat16VFSF.c new file mode 100644 index 0000000..c14d27f --- /dev/null +++ b/test/codegen-golden/FsgnjnVF16VFloat16VFSF.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r FsgnjnVF16VFloat16VFSF -n 1 -l 7 --has-ta --has-ma -c FsgnjnVF16VFloat16VFSF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfsgnjn_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_2_0= vfsgnjn_vf_f16m1(vec_value_0_0, placeholder1, vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnjn_vf_operator_0() { +uint64_t tmp[] = {60506,62558,62348,61489,61990,59755,60484,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfsgnjn_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjn_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnjn_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjnVF16VFloat16VFSF_TA.c b/test/codegen-golden/FsgnjnVF16VFloat16VFSF_TA.c new file mode 100644 index 0000000..6c3feae --- /dev/null +++ b/test/codegen-golden/FsgnjnVF16VFloat16VFSF_TA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r FsgnjnVF16VFloat16VFSF_TA -n 1 -l 7 --has-ta --has-ma -c FsgnjnVF16VFloat16VFSF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfsgnjn_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_2_0= vfsgnjn_vf_f16m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnjn_vf_operator_0() { +uint64_t tmp[] = {60506,65535,62348,65535,61990,65535,60484,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfsgnjn_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjn_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnjn_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjnVF16VFloat16VFVFSF_TU.c b/test/codegen-golden/FsgnjnVF16VFloat16VFVFSF_TU.c new file mode 100644 index 0000000..27c571b --- /dev/null +++ b/test/codegen-golden/FsgnjnVF16VFloat16VFVFSF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FsgnjnVF16VFloat16VFVFSF_TU -n 1 -l 7 --has-ta --has-ma -c FsgnjnVF16VFloat16VFVFSF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsgnjn_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfsgnjn_vf_f16m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnjn_vf_operator_0() { +uint64_t tmp[] = {62291,29790,61814,28721,60154,26987,62026,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfsgnjn_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjn_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnjn_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjnVV16VFloat16VBVFVFVF_TAMU.c b/test/codegen-golden/FsgnjnVV16VFloat16VBVFVFVF_TAMU.c new file mode 100644 index 0000000..831fe0b --- /dev/null +++ b/test/codegen-golden/FsgnjnVV16VFloat16VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FsgnjnVV16VFloat16VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FsgnjnVV16VFloat16VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnjn_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfsgnjn_vv_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnjn_vv_operator_0() { +uint64_t tmp[] = {29258,65535,62151,65535,60928,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnjn_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjn_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnjn_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjnVV16VFloat16VBVFVFVF_TUMA.c b/test/codegen-golden/FsgnjnVV16VFloat16VBVFVFVF_TUMA.c new file mode 100644 index 0000000..15fa3ab --- /dev/null +++ b/test/codegen-golden/FsgnjnVV16VFloat16VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FsgnjnVV16VFloat16VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FsgnjnVV16VFloat16VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnjn_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfsgnjn_vv_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnjn_vv_operator_0() { +uint64_t tmp[] = {65535,29822,62151,29133,60928,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnjn_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjn_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnjn_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjnVV16VFloat16VBVFVFVF_TUMU.c b/test/codegen-golden/FsgnjnVV16VFloat16VBVFVFVF_TUMU.c new file mode 100644 index 0000000..5c38acb --- /dev/null +++ b/test/codegen-golden/FsgnjnVV16VFloat16VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FsgnjnVV16VFloat16VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FsgnjnVV16VFloat16VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnjn_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfsgnjn_vv_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnjn_vv_operator_0() { +uint64_t tmp[] = {29258,29822,62151,29133,60928,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnjn_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjn_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnjn_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjnVV16VFloat16VBVFVFVF_m.c b/test/codegen-golden/FsgnjnVV16VFloat16VBVFVFVF_m.c new file mode 100644 index 0000000..be50ee8 --- /dev/null +++ b/test/codegen-golden/FsgnjnVV16VFloat16VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FsgnjnVV16VFloat16VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FsgnjnVV16VFloat16VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnjn_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfsgnjn_vv_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnjn_vv_operator_0() { +uint64_t tmp[] = {29258,61184,62151,29133,60928,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnjn_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjn_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnjn_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjnVV16VFloat16VBVFVF_TAMA.c b/test/codegen-golden/FsgnjnVV16VFloat16VBVFVF_TAMA.c new file mode 100644 index 0000000..ca56833 --- /dev/null +++ b/test/codegen-golden/FsgnjnVV16VFloat16VBVFVF_TAMA.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FsgnjnVV16VFloat16VBVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FsgnjnVV16VFloat16VBVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsgnjn_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfsgnjn_vv_f16m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnjn_vv_operator_0() { +uint64_t tmp[] = {65535,65535,61911,65535,61954,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfsgnjn_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjn_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnjn_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjnVV16VFloat16VFVF.c b/test/codegen-golden/FsgnjnVV16VFloat16VFVF.c new file mode 100644 index 0000000..3dd2973 --- /dev/null +++ b/test/codegen-golden/FsgnjnVV16VFloat16VFVF.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r FsgnjnVV16VFloat16VFVF -n 1 -l 7 --has-ta --has-ma -c FsgnjnVV16VFloat16VFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsgnjn_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfsgnjn_vv_f16m1(vec_value_0_0, vec_value_1_0, vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnjn_vv_operator_0() { +uint64_t tmp[] = {60506,62558,62348,61489,61990,59755,60484,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfsgnjn_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjn_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnjn_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjnVV16VFloat16VFVFVF_TU.c b/test/codegen-golden/FsgnjnVV16VFloat16VFVFVF_TU.c new file mode 100644 index 0000000..3b1c858 --- /dev/null +++ b/test/codegen-golden/FsgnjnVV16VFloat16VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FsgnjnVV16VFloat16VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FsgnjnVV16VFloat16VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsgnjn_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfsgnjn_vv_f16m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnjn_vv_operator_0() { +uint64_t tmp[] = {62026,29790,61911,28721,61954,26987,61574,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfsgnjn_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjn_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnjn_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjnVV16VFloat16VFVF_TA.c b/test/codegen-golden/FsgnjnVV16VFloat16VFVF_TA.c new file mode 100644 index 0000000..988d69a --- /dev/null +++ b/test/codegen-golden/FsgnjnVV16VFloat16VFVF_TA.c @@ -0,0 +1,85 @@ +// COMMAND: random_gen -r FsgnjnVV16VFloat16VFVF_TA -n 1 -l 7 --has-ta --has-ma -c FsgnjnVV16VFloat16VFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsgnjn_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfsgnjn_vv_f16m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnjn_vv_operator_0() { +uint64_t tmp[] = {60506,65535,62348,65535,61990,65535,60484,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfsgnjn_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjn_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnjn_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjxVF16VFloat16VBVFSF_TAMA.c b/test/codegen-golden/FsgnjxVF16VFloat16VBVFSF_TAMA.c new file mode 100644 index 0000000..8681bab --- /dev/null +++ b/test/codegen-golden/FsgnjxVF16VFloat16VBVFSF_TAMA.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FsgnjxVF16VFloat16VBVFSF_TAMA -n 1 -l 7 --has-ta --has-ma -c FsgnjxVF16VFloat16VBVFSF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsgnjx_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfsgnjx_vf_f16m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnjx_vf_operator_0() { +uint64_t tmp[] = {65535,65535,29046,65535,27386,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfsgnjx_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjx_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnjx_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjxVF16VFloat16VBVFVFSF_TAMU.c b/test/codegen-golden/FsgnjxVF16VFloat16VBVFVFSF_TAMU.c new file mode 100644 index 0000000..693b847 --- /dev/null +++ b/test/codegen-golden/FsgnjxVF16VFloat16VBVFVFSF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FsgnjxVF16VFloat16VBVFVFSF_TAMU -n 1 -l 7 --has-ta --has-ma -c FsgnjxVF16VFloat16VBVFVFSF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnjx_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfsgnjx_vf_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnjx_vf_operator_0() { +uint64_t tmp[] = {29523,65535,29133,65535,26923,65535,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnjx_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjx_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnjx_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjxVF16VFloat16VBVFVFSF_TUMA.c b/test/codegen-golden/FsgnjxVF16VFloat16VBVFVFSF_TUMA.c new file mode 100644 index 0000000..c1c847c --- /dev/null +++ b/test/codegen-golden/FsgnjxVF16VFloat16VBVFVFSF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FsgnjxVF16VFloat16VBVFVFSF_TUMA -n 1 -l 7 --has-ta --has-ma -c FsgnjxVF16VFloat16VBVFVFSF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnjx_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfsgnjx_vf_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnjx_vf_operator_0() { +uint64_t tmp[] = {65535,28707,29133,29100,26923,28475,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnjx_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjx_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnjx_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjxVF16VFloat16VBVFVFSF_TUMU.c b/test/codegen-golden/FsgnjxVF16VFloat16VBVFVFSF_TUMU.c new file mode 100644 index 0000000..1cc6261 --- /dev/null +++ b/test/codegen-golden/FsgnjxVF16VFloat16VBVFVFSF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FsgnjxVF16VFloat16VBVFVFSF_TUMU -n 1 -l 7 --has-ta --has-ma -c FsgnjxVF16VFloat16VBVFVFSF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnjx_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfsgnjx_vf_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnjx_vf_operator_0() { +uint64_t tmp[] = {29523,28707,29133,29100,26923,28475,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnjx_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjx_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnjx_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjxVF16VFloat16VBVFVFSF_m.c b/test/codegen-golden/FsgnjxVF16VFloat16VBVFVFSF_m.c new file mode 100644 index 0000000..a174793 --- /dev/null +++ b/test/codegen-golden/FsgnjxVF16VFloat16VBVFVFSF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FsgnjxVF16VFloat16VBVFVFSF_m -n 1 -l 7 --has-ta --has-ma -c FsgnjxVF16VFloat16VBVFVFSF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnjx_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfsgnjx_vf_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnjx_vf_operator_0() { +uint64_t tmp[] = {29523,29143,29133,29100,26923,28475,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnjx_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjx_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnjx_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjxVF16VFloat16VFSF.c b/test/codegen-golden/FsgnjxVF16VFloat16VFSF.c new file mode 100644 index 0000000..79d8205 --- /dev/null +++ b/test/codegen-golden/FsgnjxVF16VFloat16VFSF.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r FsgnjxVF16VFloat16VFSF -n 1 -l 7 --has-ta --has-ma -c FsgnjxVF16VFloat16VFSF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfsgnjx_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_2_0= vfsgnjx_vf_f16m1(vec_value_0_0, placeholder1, vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnjx_vf_operator_0() { +uint64_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfsgnjx_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjx_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnjx_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjxVF16VFloat16VFSF_TA.c b/test/codegen-golden/FsgnjxVF16VFloat16VFSF_TA.c new file mode 100644 index 0000000..9f3bf55 --- /dev/null +++ b/test/codegen-golden/FsgnjxVF16VFloat16VFSF_TA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r FsgnjxVF16VFloat16VFSF_TA -n 1 -l 7 --has-ta --has-ma -c FsgnjxVF16VFloat16VFSF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfsgnjx_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_2_0= vfsgnjx_vf_f16m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnjx_vf_operator_0() { +uint64_t tmp[] = {27738,65535,29580,65535,29222,65535,27716,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfsgnjx_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjx_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnjx_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjxVF16VFloat16VFVFSF_TU.c b/test/codegen-golden/FsgnjxVF16VFloat16VFVFSF_TU.c new file mode 100644 index 0000000..67e761e --- /dev/null +++ b/test/codegen-golden/FsgnjxVF16VFloat16VFVFSF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FsgnjxVF16VFloat16VFVFSF_TU -n 1 -l 7 --has-ta --has-ma -c FsgnjxVF16VFloat16VFVFSF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsgnjx_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfsgnjx_vf_f16m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnjx_vf_operator_0() { +uint64_t tmp[] = {29523,29790,29046,28721,27386,26987,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfsgnjx_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjx_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnjx_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjxVV16VFloat16VBVFVFVF_TAMU.c b/test/codegen-golden/FsgnjxVV16VFloat16VBVFVFVF_TAMU.c new file mode 100644 index 0000000..8bdb776 --- /dev/null +++ b/test/codegen-golden/FsgnjxVV16VFloat16VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FsgnjxVV16VFloat16VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FsgnjxVV16VFloat16VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnjx_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfsgnjx_vv_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnjx_vv_operator_0() { +uint64_t tmp[] = {29258,65535,29383,65535,28160,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnjx_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjx_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnjx_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjxVV16VFloat16VBVFVFVF_TUMA.c b/test/codegen-golden/FsgnjxVV16VFloat16VBVFVFVF_TUMA.c new file mode 100644 index 0000000..156f2bd --- /dev/null +++ b/test/codegen-golden/FsgnjxVV16VFloat16VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FsgnjxVV16VFloat16VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FsgnjxVV16VFloat16VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnjx_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfsgnjx_vv_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnjx_vv_operator_0() { +uint64_t tmp[] = {65535,29822,29383,29133,28160,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnjx_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjx_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnjx_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjxVV16VFloat16VBVFVFVF_TUMU.c b/test/codegen-golden/FsgnjxVV16VFloat16VBVFVFVF_TUMU.c new file mode 100644 index 0000000..cd4951d --- /dev/null +++ b/test/codegen-golden/FsgnjxVV16VFloat16VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FsgnjxVV16VFloat16VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FsgnjxVV16VFloat16VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnjx_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfsgnjx_vv_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnjx_vv_operator_0() { +uint64_t tmp[] = {29258,29822,29383,29133,28160,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnjx_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjx_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnjx_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjxVV16VFloat16VBVFVFVF_m.c b/test/codegen-golden/FsgnjxVV16VFloat16VBVFVFVF_m.c new file mode 100644 index 0000000..c6c7f7a --- /dev/null +++ b/test/codegen-golden/FsgnjxVV16VFloat16VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FsgnjxVV16VFloat16VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FsgnjxVV16VFloat16VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsgnjx_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfsgnjx_vv_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsgnjx_vv_operator_0() { +uint64_t tmp[] = {29258,28416,29383,29133,28160,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsgnjx_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjx_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsgnjx_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjxVV16VFloat16VBVFVF_TAMA.c b/test/codegen-golden/FsgnjxVV16VFloat16VBVFVF_TAMA.c new file mode 100644 index 0000000..ff295e6 --- /dev/null +++ b/test/codegen-golden/FsgnjxVV16VFloat16VBVFVF_TAMA.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FsgnjxVV16VFloat16VBVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FsgnjxVV16VFloat16VBVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsgnjx_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfsgnjx_vv_f16m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnjx_vv_operator_0() { +uint64_t tmp[] = {65535,65535,29143,65535,29186,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfsgnjx_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjx_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnjx_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjxVV16VFloat16VFVF.c b/test/codegen-golden/FsgnjxVV16VFloat16VFVF.c new file mode 100644 index 0000000..d79e16a --- /dev/null +++ b/test/codegen-golden/FsgnjxVV16VFloat16VFVF.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r FsgnjxVV16VFloat16VFVF -n 1 -l 7 --has-ta --has-ma -c FsgnjxVV16VFloat16VFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsgnjx_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfsgnjx_vv_f16m1(vec_value_0_0, vec_value_1_0, vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnjx_vv_operator_0() { +uint64_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfsgnjx_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjx_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnjx_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjxVV16VFloat16VFVFVF_TU.c b/test/codegen-golden/FsgnjxVV16VFloat16VFVFVF_TU.c new file mode 100644 index 0000000..a57b1d9 --- /dev/null +++ b/test/codegen-golden/FsgnjxVV16VFloat16VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FsgnjxVV16VFloat16VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FsgnjxVV16VFloat16VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsgnjx_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfsgnjx_vv_f16m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnjx_vv_operator_0() { +uint64_t tmp[] = {29258,29790,29143,28721,29186,26987,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfsgnjx_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjx_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnjx_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsgnjxVV16VFloat16VFVF_TA.c b/test/codegen-golden/FsgnjxVV16VFloat16VFVF_TA.c new file mode 100644 index 0000000..df18220 --- /dev/null +++ b/test/codegen-golden/FsgnjxVV16VFloat16VFVF_TA.c @@ -0,0 +1,85 @@ +// COMMAND: random_gen -r FsgnjxVV16VFloat16VFVF_TA -n 1 -l 7 --has-ta --has-ma -c FsgnjxVV16VFloat16VFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsgnjx_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfsgnjx_vv_f16m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsgnjx_vv_operator_0() { +uint64_t tmp[] = {27738,65535,29580,65535,29222,65535,27716,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfsgnjx_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsgnjx_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsgnjx_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsqrtV16VFloat16VBVFVF_TAMU.c b/test/codegen-golden/FsqrtV16VFloat16VBVFVF_TAMU.c new file mode 100644 index 0000000..56718fc --- /dev/null +++ b/test/codegen-golden/FsqrtV16VFloat16VBVFVF_TAMU.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FsqrtV16VFloat16VBVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FsqrtV16VFloat16VBVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsqrt_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfsqrt_v_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsqrt_v_operator_0() { +uint64_t tmp[] = {29258,65535,21953,65535,22204,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfsqrt_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsqrt_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsqrt_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsqrtV16VFloat16VBVFVF_TUMA.c b/test/codegen-golden/FsqrtV16VFloat16VBVFVF_TUMA.c new file mode 100644 index 0000000..8f5dfa8 --- /dev/null +++ b/test/codegen-golden/FsqrtV16VFloat16VBVFVF_TUMA.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FsqrtV16VFloat16VBVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FsqrtV16VFloat16VBVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsqrt_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfsqrt_v_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsqrt_v_operator_0() { +uint64_t tmp[] = {65535,29822,21953,29133,22204,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfsqrt_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsqrt_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsqrt_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsqrtV16VFloat16VBVFVF_TUMU.c b/test/codegen-golden/FsqrtV16VFloat16VBVFVF_TUMU.c new file mode 100644 index 0000000..e586986 --- /dev/null +++ b/test/codegen-golden/FsqrtV16VFloat16VBVFVF_TUMU.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FsqrtV16VFloat16VBVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FsqrtV16VFloat16VBVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsqrt_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfsqrt_v_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsqrt_v_operator_0() { +uint64_t tmp[] = {29258,29822,21953,29133,22204,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfsqrt_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsqrt_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsqrt_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsqrtV16VFloat16VBVFVF_m.c b/test/codegen-golden/FsqrtV16VFloat16VBVFVF_m.c new file mode 100644 index 0000000..f1fd709 --- /dev/null +++ b/test/codegen-golden/FsqrtV16VFloat16VBVFVF_m.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r FsqrtV16VFloat16VBVFVF_m -n 1 -l 7 --has-ta --has-ma -c FsqrtV16VFloat16VBVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsqrt_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfsqrt_v_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsqrt_v_operator_0() { +uint64_t tmp[] = {29258,22440,21953,29133,22204,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfsqrt_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsqrt_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsqrt_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsqrtV16VFloat16VBVF_TAMA.c b/test/codegen-golden/FsqrtV16VFloat16VBVF_TAMA.c new file mode 100644 index 0000000..cf193c0 --- /dev/null +++ b/test/codegen-golden/FsqrtV16VFloat16VBVF_TAMA.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r FsqrtV16VFloat16VBVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FsqrtV16VFloat16VBVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsqrt_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfsqrt_v_f16m1_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsqrt_v_operator_0() { +uint64_t tmp[] = {65535,65535,21953,65535,22204,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfsqrt_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsqrt_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsqrt_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsqrtV16VFloat16VF.c b/test/codegen-golden/FsqrtV16VFloat16VF.c new file mode 100644 index 0000000..6e21701 --- /dev/null +++ b/test/codegen-golden/FsqrtV16VFloat16VF.c @@ -0,0 +1,67 @@ +// COMMAND: random_gen -r FsqrtV16VFloat16VF -n 1 -l 7 --has-ta --has-ma -c FsqrtV16VFloat16VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfsqrt_v_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_1_0= vfsqrt_v_f16m1(vec_value_0_0, vl); + +vse16_v_f16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfsqrt_v_operator_0() { +uint64_t tmp[] = {21548,22574,22469,21962,22275,21141,21537,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfsqrt_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsqrt_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfsqrt_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsqrtV16VFloat16VFVF_TU.c b/test/codegen-golden/FsqrtV16VFloat16VFVF_TU.c new file mode 100644 index 0000000..254a6a8 --- /dev/null +++ b/test/codegen-golden/FsqrtV16VFloat16VFVF_TU.c @@ -0,0 +1,85 @@ +// COMMAND: random_gen -r FsqrtV16VFloat16VFVF_TU -n 1 -l 7 --has-ta --has-ma -c FsqrtV16VFloat16VFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsqrt_v_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfsqrt_v_f16m1_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsqrt_v_operator_0() { +uint64_t tmp[] = {21893,29790,21953,28721,22204,26987,21857,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfsqrt_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsqrt_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsqrt_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsqrtV16VFloat16VF_TA.c b/test/codegen-golden/FsqrtV16VFloat16VF_TA.c new file mode 100644 index 0000000..99faf38 --- /dev/null +++ b/test/codegen-golden/FsqrtV16VFloat16VF_TA.c @@ -0,0 +1,68 @@ +// COMMAND: random_gen -r FsqrtV16VFloat16VF_TA -n 1 -l 7 --has-ta --has-ma -c FsqrtV16VFloat16VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfsqrt_v_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_1_0= vfsqrt_v_f16m1_ta(vec_value_0_0, tail_vl); + +vse16_v_f16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfsqrt_v_operator_0() { +uint64_t tmp[] = {21548,65535,22469,65535,22275,65535,21537,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfsqrt_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsqrt_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfsqrt_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsubVF16VFloat16VBVFSF_TAMA.c b/test/codegen-golden/FsubVF16VFloat16VBVFSF_TAMA.c new file mode 100644 index 0000000..b28a090 --- /dev/null +++ b/test/codegen-golden/FsubVF16VFloat16VBVFSF_TAMA.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FsubVF16VFloat16VBVFSF_TAMA -n 1 -l 7 --has-ta --has-ma -c FsubVF16VFloat16VBVFSF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfsub_vf_f16m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsub_vf_operator_0() { +uint64_t tmp[] = {65535,65535,27290,65535,60450,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsubVF16VFloat16VBVFVFSF_TAMU.c b/test/codegen-golden/FsubVF16VFloat16VBVFVFSF_TAMU.c new file mode 100644 index 0000000..8f72c43 --- /dev/null +++ b/test/codegen-golden/FsubVF16VFloat16VBVFVFSF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FsubVF16VFloat16VBVFVFSF_TAMU -n 1 -l 7 --has-ta --has-ma -c FsubVF16VFloat16VBVFVFSF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfsub_vf_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsub_vf_operator_0() { +uint64_t tmp[] = {29523,65535,27638,65535,60682,65535,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsubVF16VFloat16VBVFVFSF_TUMA.c b/test/codegen-golden/FsubVF16VFloat16VBVFVFSF_TUMA.c new file mode 100644 index 0000000..953c79e --- /dev/null +++ b/test/codegen-golden/FsubVF16VFloat16VBVFVFSF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FsubVF16VFloat16VBVFVFSF_TUMA -n 1 -l 7 --has-ta --has-ma -c FsubVF16VFloat16VBVFVFSF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfsub_vf_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsub_vf_operator_0() { +uint64_t tmp[] = {65535,28707,27638,29100,60682,28475,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsubVF16VFloat16VBVFVFSF_TUMU.c b/test/codegen-golden/FsubVF16VFloat16VBVFVFSF_TUMU.c new file mode 100644 index 0000000..17d49e1 --- /dev/null +++ b/test/codegen-golden/FsubVF16VFloat16VBVFVFSF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FsubVF16VFloat16VBVFVFSF_TUMU -n 1 -l 7 --has-ta --has-ma -c FsubVF16VFloat16VBVFVFSF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfsub_vf_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsub_vf_operator_0() { +uint64_t tmp[] = {29523,28707,27638,29100,60682,28475,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsubVF16VFloat16VBVFVFSF_m.c b/test/codegen-golden/FsubVF16VFloat16VBVFVFSF_m.c new file mode 100644 index 0000000..277548e --- /dev/null +++ b/test/codegen-golden/FsubVF16VFloat16VBVFVFSF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FsubVF16VFloat16VBVFVFSF_m -n 1 -l 7 --has-ta --has-ma -c FsubVF16VFloat16VBVFVFSF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_4_0= vfsub_vf_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsub_vf_operator_0() { +uint64_t tmp[] = {29523,27663,27638,29100,60682,28475,29258,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsubVF16VFloat16VFSF.c b/test/codegen-golden/FsubVF16VFloat16VFSF.c new file mode 100644 index 0000000..c4cc622 --- /dev/null +++ b/test/codegen-golden/FsubVF16VFloat16VFSF.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r FsubVF16VFloat16VFSF -n 1 -l 7 --has-ta --has-ma -c FsubVF16VFloat16VFSF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfsub_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_2_0= vfsub_vf_f16m1(vec_value_0_0, placeholder1, vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsub_vf_operator_0() { +uint64_t tmp[] = {60042,28908,28537,25112,27821,60650,60086,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsubVF16VFloat16VFSF_TA.c b/test/codegen-golden/FsubVF16VFloat16VFSF_TA.c new file mode 100644 index 0000000..9493910 --- /dev/null +++ b/test/codegen-golden/FsubVF16VFloat16VFSF_TA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r FsubVF16VFloat16VFSF_TA -n 1 -l 7 --has-ta --has-ma -c FsubVF16VFloat16VFSF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfsub_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat16m1_t vec_value_2_0= vfsub_vf_f16m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsub_vf_operator_0() { +uint64_t tmp[] = {60042,65535,28537,65535,27821,65535,60086,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsubVF16VFloat16VFVFSF_TU.c b/test/codegen-golden/FsubVF16VFloat16VFVFSF_TU.c new file mode 100644 index 0000000..8e54d2a --- /dev/null +++ b/test/codegen-golden/FsubVF16VFloat16VFVFSF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FsubVF16VFloat16VFVFSF_TU -n 1 -l 7 --has-ta --has-ma -c FsubVF16VFloat16VFVFSF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsub_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_3_0= vfsub_vf_f16m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsub_vf_operator_0() { +uint64_t tmp[] = {28423,29790,27290,28721,60450,26987,27893,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsubVV16VFloat16VBVFVFVF_TAMU.c b/test/codegen-golden/FsubVV16VFloat16VBVFVFVF_TAMU.c new file mode 100644 index 0000000..006fbdd --- /dev/null +++ b/test/codegen-golden/FsubVV16VFloat16VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FsubVV16VFloat16VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FsubVV16VFloat16VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfsub_vv_f16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsub_vv_operator_0() { +uint64_t tmp[] = {29258,65535,27976,65535,60760,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsubVV16VFloat16VBVFVFVF_TUMA.c b/test/codegen-golden/FsubVV16VFloat16VBVFVFVF_TUMA.c new file mode 100644 index 0000000..048f34f --- /dev/null +++ b/test/codegen-golden/FsubVV16VFloat16VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FsubVV16VFloat16VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FsubVV16VFloat16VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfsub_vv_f16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsub_vv_operator_0() { +uint64_t tmp[] = {65535,29822,27976,29133,60760,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsubVV16VFloat16VBVFVFVF_TUMU.c b/test/codegen-golden/FsubVV16VFloat16VBVFVFVF_TUMU.c new file mode 100644 index 0000000..f34a2d4 --- /dev/null +++ b/test/codegen-golden/FsubVV16VFloat16VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FsubVV16VFloat16VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FsubVV16VFloat16VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfsub_vv_f16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsub_vv_operator_0() { +uint64_t tmp[] = {29258,29822,27976,29133,60760,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsubVV16VFloat16VBVFVFVF_m.c b/test/codegen-golden/FsubVV16VFloat16VBVFVFVF_m.c new file mode 100644 index 0000000..d0ef00a --- /dev/null +++ b/test/codegen-golden/FsubVV16VFloat16VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FsubVV16VFloat16VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FsubVV16VFloat16VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat16m1_t vec_value_4_0= vfsub_vv_f16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_f16m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfsub_vv_operator_0() { +uint64_t tmp[] = {29258,61350,27976,29133,60760,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_4[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsubVV16VFloat16VBVFVF_TAMA.c b/test/codegen-golden/FsubVV16VFloat16VBVFVF_TAMA.c new file mode 100644 index 0000000..1a7ace6 --- /dev/null +++ b/test/codegen-golden/FsubVV16VFloat16VBVFVF_TAMA.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FsubVV16VFloat16VBVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FsubVV16VFloat16VBVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfsub_vv_f16m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsub_vv_operator_0() { +uint64_t tmp[] = {65535,65535,27344,65535,24928,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsubVV16VFloat16VFVF.c b/test/codegen-golden/FsubVV16VFloat16VFVF.c new file mode 100644 index 0000000..6a88d7c --- /dev/null +++ b/test/codegen-golden/FsubVV16VFloat16VFVF.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r FsubVV16VFloat16VFVF -n 1 -l 7 --has-ta --has-ma -c FsubVV16VFloat16VFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsub_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfsub_vv_f16m1(vec_value_0_0, vec_value_1_0, vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsub_vv_operator_0() { +uint64_t tmp[] = {60042,27044,28370,59668,25504,57916,59886,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsubVV16VFloat16VFVFVF_TU.c b/test/codegen-golden/FsubVV16VFloat16VFVFVF_TU.c new file mode 100644 index 0000000..dbb7602 --- /dev/null +++ b/test/codegen-golden/FsubVV16VFloat16VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FsubVV16VFloat16VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FsubVV16VFloat16VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsub_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat16m1_t vec_value_3_0= vfsub_vv_f16m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsub_vv_operator_0() { +uint64_t tmp[] = {27893,29790,27344,28721,24928,26987,26436,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FsubVV16VFloat16VFVF_TA.c b/test/codegen-golden/FsubVV16VFloat16VFVF_TA.c new file mode 100644 index 0000000..a8f2ae0 --- /dev/null +++ b/test/codegen-golden/FsubVV16VFloat16VFVF_TA.c @@ -0,0 +1,85 @@ +// COMMAND: random_gen -r FsubVV16VFloat16VFVF_TA -n 1 -l 7 --has-ta --has-ma -c FsubVV16VFloat16VFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfsub_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat16m1_t vec_value_2_0= vfsub_vv_f16m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfsub_vv_operator_0() { +uint64_t tmp[] = {60042,65535,28370,65535,25504,65535,59886,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddVF16VFloat32VBVFSF_TAMA.c b/test/codegen-golden/FwaddVF16VFloat32VBVFSF_TAMA.c new file mode 100644 index 0000000..0869c35 --- /dev/null +++ b/test/codegen-golden/FwaddVF16VFloat32VBVFSF_TAMA.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FwaddVF16VFloat32VBVFSF_TAMA -n 1 -l 7 --has-ta --has-ma -c FwaddVF16VFloat32VBVFSF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwadd_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat32m2_t vec_value_3_0= vfwadd_vf_f32m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwadd_vf_operator_0() { +uint64_t tmp[] = {4294967295u,4294967295u,1184126976u,4294967295u,1177665536u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddVF16VFloat32VBVFVFSF_TAMU.c b/test/codegen-golden/FwaddVF16VFloat32VBVFVFSF_TAMU.c new file mode 100644 index 0000000..382b752 --- /dev/null +++ b/test/codegen-golden/FwaddVF16VFloat32VBVFVFSF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwaddVF16VFloat32VBVFVFSF_TAMU -n 1 -l 7 --has-ta --has-ma -c FwaddVF16VFloat32VBVFVFSF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwadd_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_4_0= vfwadd_vf_f32m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwadd_vf_operator_0() { +uint64_t tmp[] = {1264903012u,4294967295u,1184483328u,4294967295u,1176717312u,4294967295u,1262786923u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddVF16VFloat32VBVFVFSF_TUMA.c b/test/codegen-golden/FwaddVF16VFloat32VBVFVFSF_TUMA.c new file mode 100644 index 0000000..781a7e5 --- /dev/null +++ b/test/codegen-golden/FwaddVF16VFloat32VBVFVFSF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwaddVF16VFloat32VBVFVFSF_TUMA -n 1 -l 7 --has-ta --has-ma -c FwaddVF16VFloat32VBVFVFSF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwadd_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_4_0= vfwadd_vf_f32m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwadd_vf_operator_0() { +uint64_t tmp[] = {4294967295u,1258373094u,1184483328u,1261516319u,1176717312u,1256322614u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddVF16VFloat32VBVFVFSF_TUMU.c b/test/codegen-golden/FwaddVF16VFloat32VBVFVFSF_TUMU.c new file mode 100644 index 0000000..a98c16d --- /dev/null +++ b/test/codegen-golden/FwaddVF16VFloat32VBVFVFSF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwaddVF16VFloat32VBVFVFSF_TUMU -n 1 -l 7 --has-ta --has-ma -c FwaddVF16VFloat32VBVFVFSF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwadd_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_4_0= vfwadd_vf_f32m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwadd_vf_operator_0() { +uint64_t tmp[] = {1264903012u,1258373094u,1184483328u,1261516319u,1176717312u,1256322614u,1262786923u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddVF16VFloat32VBVFVFSF_m.c b/test/codegen-golden/FwaddVF16VFloat32VBVFVFSF_m.c new file mode 100644 index 0000000..218c78b --- /dev/null +++ b/test/codegen-golden/FwaddVF16VFloat32VBVFVFSF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FwaddVF16VFloat32VBVFVFSF_m -n 1 -l 7 --has-ta --has-ma -c FwaddVF16VFloat32VBVFVFSF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwadd_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_4_0= vfwadd_vf_f32m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwadd_vf_operator_0() { +uint64_t tmp[] = {1264903012u,1184524288u,1184483328u,1261516319u,1176717312u,1256322614u,1262786923u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddVF16VFloat32VFSF.c b/test/codegen-golden/FwaddVF16VFloat32VFSF.c new file mode 100644 index 0000000..eefe3af --- /dev/null +++ b/test/codegen-golden/FwaddVF16VFloat32VFSF.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r FwaddVF16VFloat32VFSF -n 1 -l 7 --has-ta --has-ma -c FwaddVF16VFloat32VFSF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfwadd_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat32m2_t vec_value_2_0= vfwadd_vf_f32m2(vec_value_0_0, placeholder1, vl); + +vse32_v_f32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwadd_vf_operator_0() { +uint64_t tmp[] = {1178570752u,1187559424u,1186314240u,1182795776u,1184847872u,1176848384u,1178480640u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddVF16VFloat32VFSF_TA.c b/test/codegen-golden/FwaddVF16VFloat32VFSF_TA.c new file mode 100644 index 0000000..3e15231 --- /dev/null +++ b/test/codegen-golden/FwaddVF16VFloat32VFSF_TA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r FwaddVF16VFloat32VFSF_TA -n 1 -l 7 --has-ta --has-ma -c FwaddVF16VFloat32VFSF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfwadd_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat32m2_t vec_value_2_0= vfwadd_vf_f32m2_ta(vec_value_0_0, placeholder1, tail_vl); + +vse32_v_f32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwadd_vf_operator_0() { +uint64_t tmp[] = {1178570752u,4294967295u,1186314240u,4294967295u,1184847872u,4294967295u,1178480640u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddVF16VFloat32VFVFSF_TU.c b/test/codegen-golden/FwaddVF16VFloat32VFVFSF_TU.c new file mode 100644 index 0000000..c25c2ad --- /dev/null +++ b/test/codegen-golden/FwaddVF16VFloat32VFVFSF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FwaddVF16VFloat32VFVFSF_TU -n 1 -l 7 --has-ta --has-ma -c FwaddVF16VFloat32VFVFSF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwadd_vf_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat32m2_t vec_value_3_0= vfwadd_vf_f32m2_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwadd_vf_operator_0() { +uint64_t tmp[] = {1186080768u,1267237304u,1184126976u,1258485599u,1177665536u,1244223528u,1184995328u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwadd_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwadd_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddVV16VFloat32VBVFVFVF_TAMU.c b/test/codegen-golden/FwaddVV16VFloat32VBVFVFVF_TAMU.c new file mode 100644 index 0000000..ab9831b --- /dev/null +++ b/test/codegen-golden/FwaddVV16VFloat32VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwaddVV16VFloat32VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FwaddVV16VFloat32VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwadd_vv_f32m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwadd_vv_operator_0() { +uint64_t tmp[] = {1262786923u,4294967295u,1185849344u,4294967295u,1183498240u,4294967295u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddVV16VFloat32VBVFVFVF_TUMA.c b/test/codegen-golden/FwaddVV16VFloat32VBVFVFVF_TUMA.c new file mode 100644 index 0000000..bd40f6c --- /dev/null +++ b/test/codegen-golden/FwaddVV16VFloat32VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwaddVV16VFloat32VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FwaddVV16VFloat32VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwadd_vv_f32m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwadd_vv_operator_0() { +uint64_t tmp[] = {4294967295u,1267490606u,1185849344u,1261781606u,1183498240u,1243709844u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddVV16VFloat32VBVFVFVF_TUMU.c b/test/codegen-golden/FwaddVV16VFloat32VBVFVFVF_TUMU.c new file mode 100644 index 0000000..54e8efe --- /dev/null +++ b/test/codegen-golden/FwaddVV16VFloat32VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwaddVV16VFloat32VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FwaddVV16VFloat32VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwadd_vv_f32m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwadd_vv_operator_0() { +uint64_t tmp[] = {1262786923u,1267490606u,1185849344u,1261781606u,1183498240u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddVV16VFloat32VBVFVFVF_m.c b/test/codegen-golden/FwaddVV16VFloat32VBVFVFVF_m.c new file mode 100644 index 0000000..51ae43e --- /dev/null +++ b/test/codegen-golden/FwaddVV16VFloat32VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FwaddVV16VFloat32VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FwaddVV16VFloat32VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwadd_vv_f32m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwadd_vv_operator_0() { +uint64_t tmp[] = {1262786923u,1185755136u,1185849344u,1261781606u,1183498240u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddVV16VFloat32VBVFVF_TAMA.c b/test/codegen-golden/FwaddVV16VFloat32VBVFVF_TAMA.c new file mode 100644 index 0000000..7cee6f4 --- /dev/null +++ b/test/codegen-golden/FwaddVV16VFloat32VBVFVF_TAMA.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FwaddVV16VFloat32VBVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FwaddVV16VFloat32VBVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwadd_vv_f32m2_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwadd_vv_operator_0() { +uint64_t tmp[] = {4294967295u,4294967295u,1184866304u,4294967295u,1186652160u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddVV16VFloat32VFVF.c b/test/codegen-golden/FwaddVV16VFloat32VFVF.c new file mode 100644 index 0000000..0e02594 --- /dev/null +++ b/test/codegen-golden/FwaddVV16VFloat32VFVF.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r FwaddVV16VFloat32VFVF -n 1 -l 7 --has-ta --has-ma -c FwaddVV16VFloat32VFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwadd_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat32m2_t vec_value_2_0= vfwadd_vv_f32m2(vec_value_0_0, vec_value_1_0, vl); + +vse32_v_f32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwadd_vv_operator_0() { +uint64_t tmp[] = {1178570752u,1191213056u,1186656256u,1184526336u,1186799616u,1170624512u,1178071040u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddVV16VFloat32VFVFVF_TU.c b/test/codegen-golden/FwaddVV16VFloat32VFVFVF_TU.c new file mode 100644 index 0000000..c15fa19 --- /dev/null +++ b/test/codegen-golden/FwaddVV16VFloat32VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FwaddVV16VFloat32VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FwaddVV16VFloat32VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwadd_vv_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwadd_vv_f32m2_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwadd_vv_operator_0() { +uint64_t tmp[] = {1184995328u,1267237304u,1184866304u,1258485599u,1186652160u,1244223528u,1182939136u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddVV16VFloat32VFVF_TA.c b/test/codegen-golden/FwaddVV16VFloat32VFVF_TA.c new file mode 100644 index 0000000..a82814f --- /dev/null +++ b/test/codegen-golden/FwaddVV16VFloat32VFVF_TA.c @@ -0,0 +1,85 @@ +// COMMAND: random_gen -r FwaddVV16VFloat32VFVF_TA -n 1 -l 7 --has-ta --has-ma -c FwaddVV16VFloat32VFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwadd_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat32m2_t vec_value_2_0= vfwadd_vv_f32m2_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse32_v_f32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwadd_vv_operator_0() { +uint64_t tmp[] = {1178570752u,4294967295u,1186656256u,4294967295u,1186799616u,4294967295u,1178071040u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddWF16VFloat32VBVFSF_TAMA.c b/test/codegen-golden/FwaddWF16VFloat32VBVFSF_TAMA.c new file mode 100644 index 0000000..22098ad --- /dev/null +++ b/test/codegen-golden/FwaddWF16VFloat32VBVFSF_TAMA.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FwaddWF16VFloat32VBVFSF_TAMA -n 1 -l 7 --has-ta --has-ma -c FwaddWF16VFloat32VBVFSF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwadd_wf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); + +vfloat32m2_t vec_value_3_0= vfwadd_wf_f32m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwadd_wf_operator_0() { +uint64_t tmp[] = {4294967295u,4294967295u,1261094550u,4294967295u,1247450624u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwadd_wf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_wf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwadd_wf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddWF16VFloat32VBVFVFSF_TAMU.c b/test/codegen-golden/FwaddWF16VFloat32VBVFVFSF_TAMU.c new file mode 100644 index 0000000..f96d276 --- /dev/null +++ b/test/codegen-golden/FwaddWF16VFloat32VBVFVFSF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwaddWF16VFloat32VBVFVFSF_TAMU -n 1 -l 7 --has-ta --has-ma -c FwaddWF16VFloat32VBVFVFSF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +float16_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,1266779219u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwadd_wf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat32m2_t vec_value_2_0= vle32_v_f32m2(placeholder2, vl); + +vfloat32m2_t vec_value_4_0= vfwadd_wf_f32m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwadd_wf_operator_0() { +uint64_t tmp[] = {1264903012u,4294967295u,1261789410u,4294967295u,1243741060u,4294967295u,1262786923u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwadd_wf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_wf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwadd_wf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddWF16VFloat32VBVFVFSF_TUMA.c b/test/codegen-golden/FwaddWF16VFloat32VBVFVFSF_TUMA.c new file mode 100644 index 0000000..60e89bb --- /dev/null +++ b/test/codegen-golden/FwaddWF16VFloat32VBVFVFSF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwaddWF16VFloat32VBVFVFSF_TUMA -n 1 -l 7 --has-ta --has-ma -c FwaddWF16VFloat32VBVFVFSF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +float16_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,1266779219u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwadd_wf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat32m2_t vec_value_2_0= vle32_v_f32m2(placeholder2, vl); + +vfloat32m2_t vec_value_4_0= vfwadd_wf_f32m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwadd_wf_operator_0() { +uint64_t tmp[] = {4294967295u,1258373094u,1261789410u,1261516319u,1243741060u,1256322614u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwadd_wf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_wf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwadd_wf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddWF16VFloat32VBVFVFSF_TUMU.c b/test/codegen-golden/FwaddWF16VFloat32VBVFVFSF_TUMU.c new file mode 100644 index 0000000..27fd451 --- /dev/null +++ b/test/codegen-golden/FwaddWF16VFloat32VBVFVFSF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwaddWF16VFloat32VBVFVFSF_TUMU -n 1 -l 7 --has-ta --has-ma -c FwaddWF16VFloat32VBVFVFSF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +float16_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,1266779219u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwadd_wf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat32m2_t vec_value_2_0= vle32_v_f32m2(placeholder2, vl); + +vfloat32m2_t vec_value_4_0= vfwadd_wf_f32m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwadd_wf_operator_0() { +uint64_t tmp[] = {1264903012u,1258373094u,1261789410u,1261516319u,1243741060u,1256322614u,1262786923u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwadd_wf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_wf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwadd_wf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddWF16VFloat32VFSF_TA.c b/test/codegen-golden/FwaddWF16VFloat32VFSF_TA.c new file mode 100644 index 0000000..821f5e9 --- /dev/null +++ b/test/codegen-golden/FwaddWF16VFloat32VFSF_TA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r FwaddWF16VFloat32VFSF_TA -n 1 -l 7 --has-ta --has-ma -c FwaddWF16VFloat32VFSF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfwadd_wf_operator_0() { +float32_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); + +vfloat32m2_t vec_value_2_0= vfwadd_wf_f32m2_ta(vec_value_0_0, placeholder1, tail_vl); + +vse32_v_f32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwadd_wf_operator_0() { +uint64_t tmp[] = {1250437964u,4294967295u,1265368270u,4294967295u,1262506504u,4294967295u,1250270228u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwadd_wf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_wf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwadd_wf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddWF16VFloat32VFVFSF_TU.c b/test/codegen-golden/FwaddWF16VFloat32VFVFSF_TU.c new file mode 100644 index 0000000..f5a8c4b --- /dev/null +++ b/test/codegen-golden/FwaddWF16VFloat32VFVFSF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FwaddWF16VFloat32VFVFSF_TU -n 1 -l 7 --has-ta --has-ma -c FwaddWF16VFloat32VFVFSF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwadd_wf_operator_0() { +float32_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); + +vfloat32m2_t vec_value_3_0= vfwadd_wf_f32m2_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwadd_wf_operator_0() { +uint64_t tmp[] = {1264910816u,1267237304u,1261094550u,1258485599u,1247450624u,1244223528u,1262794727u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwadd_wf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_wf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwadd_wf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddWV16VFloat32VBVFVFVF_TAMU.c b/test/codegen-golden/FwaddWV16VFloat32VBVFVFVF_TAMU.c new file mode 100644 index 0000000..1f40e10 --- /dev/null +++ b/test/codegen-golden/FwaddWV16VFloat32VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwaddWV16VFloat32VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FwaddWV16VFloat32VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1266779219u,1255845574u,1263781768u,1267886662u,1253798282u,1250916304u,1253542582u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwadd_wv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat32m2_t vec_value_2_0= vle32_v_f32m2(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwadd_wv_f32m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwadd_wv_operator_0() { +uint64_t tmp[] = {1262786923u,4294967295u,1263790240u,4294967295u,1253821514u,4294967295u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwadd_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwadd_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddWV16VFloat32VBVFVFVF_TUMA.c b/test/codegen-golden/FwaddWV16VFloat32VBVFVFVF_TUMA.c new file mode 100644 index 0000000..5062028 --- /dev/null +++ b/test/codegen-golden/FwaddWV16VFloat32VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwaddWV16VFloat32VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FwaddWV16VFloat32VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1266779219u,1255845574u,1263781768u,1267886662u,1253798282u,1250916304u,1253542582u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwadd_wv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat32m2_t vec_value_2_0= vle32_v_f32m2(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwadd_wv_f32m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwadd_wv_operator_0() { +uint64_t tmp[] = {4294967295u,1267490606u,1263790240u,1261781606u,1253821514u,1243709844u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwadd_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwadd_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddWV16VFloat32VBVFVFVF_TUMU.c b/test/codegen-golden/FwaddWV16VFloat32VBVFVFVF_TUMU.c new file mode 100644 index 0000000..96d3b2f --- /dev/null +++ b/test/codegen-golden/FwaddWV16VFloat32VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwaddWV16VFloat32VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FwaddWV16VFloat32VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1266779219u,1255845574u,1263781768u,1267886662u,1253798282u,1250916304u,1253542582u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwadd_wv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat32m2_t vec_value_2_0= vle32_v_f32m2(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwadd_wv_f32m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwadd_wv_operator_0() { +uint64_t tmp[] = {1262786923u,1267490606u,1263790240u,1261781606u,1253821514u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwadd_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwadd_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddWV16VFloat32VBVFVFVF_m.c b/test/codegen-golden/FwaddWV16VFloat32VBVFVFVF_m.c new file mode 100644 index 0000000..17e1454 --- /dev/null +++ b/test/codegen-golden/FwaddWV16VFloat32VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FwaddWV16VFloat32VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FwaddWV16VFloat32VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1266779219u,1255845574u,1263781768u,1267886662u,1253798282u,1250916304u,1253542582u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwadd_wv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m2(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat32m2_t vec_value_2_0= vle32_v_f32m2(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwadd_wv_f32m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwadd_wv_operator_0() { +uint64_t tmp[] = {1262786923u,1255875574u,1263790240u,1261781606u,1253821514u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwadd_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwadd_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddWV16VFloat32VBVFVF_TAMA.c b/test/codegen-golden/FwaddWV16VFloat32VBVFVF_TAMA.c new file mode 100644 index 0000000..ec9baa8 --- /dev/null +++ b/test/codegen-golden/FwaddWV16VFloat32VBVFVF_TAMA.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FwaddWV16VFloat32VBVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FwaddWV16VFloat32VBVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwadd_wv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwadd_wv_f32m2_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwadd_wv_operator_0() { +uint64_t tmp[] = {4294967295u,4294967295u,1261869462u,4294967295u,1262217395u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwadd_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwadd_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddWV16VFloat32VFVF.c b/test/codegen-golden/FwaddWV16VFloat32VFVF.c new file mode 100644 index 0000000..0c12740 --- /dev/null +++ b/test/codegen-golden/FwaddWV16VFloat32VFVF.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r FwaddWV16VFloat32VFVF -n 1 -l 7 --has-ta --has-ma -c FwaddWV16VFloat32VFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwadd_wv_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e32m2(placeholder3); +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat32m2_t vec_value_2_0= vfwadd_wv_f32m2(vec_value_0_0, vec_value_1_0, vl); + +vse32_v_f32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwadd_wv_operator_0() { +uint64_t tmp[] = {1250437964u,1267244804u,1265368938u,1258496783u,1262510316u,1244237816u,1250269428u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwadd_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwadd_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddWV16VFloat32VFVFVF_TU.c b/test/codegen-golden/FwaddWV16VFloat32VFVFVF_TU.c new file mode 100644 index 0000000..3152862 --- /dev/null +++ b/test/codegen-golden/FwaddWV16VFloat32VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FwaddWV16VFloat32VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FwaddWV16VFloat32VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwadd_wv_operator_0() { +float32_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwadd_wv_f32m2_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwadd_wv_operator_0() { +uint64_t tmp[] = {1262794727u,1267237304u,1261869462u,1258485599u,1262217395u,1244223528u,1259175682u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwadd_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwadd_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddWV16VFloat32VFVF_TA.c b/test/codegen-golden/FwaddWV16VFloat32VFVF_TA.c new file mode 100644 index 0000000..3e9f59a --- /dev/null +++ b/test/codegen-golden/FwaddWV16VFloat32VFVF_TA.c @@ -0,0 +1,85 @@ +// COMMAND: random_gen -r FwaddWV16VFloat32VFVF_TA -n 1 -l 7 --has-ta --has-ma -c FwaddWV16VFloat32VFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwadd_wv_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat32m2_t vec_value_2_0= vfwadd_wv_f32m2_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse32_v_f32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwadd_wv_operator_0() { +uint64_t tmp[] = {1250437964u,4294967295u,1265368938u,4294967295u,1262510316u,4294967295u,1250269428u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwadd_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwadd_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddWX16VFloat32VBVFVFSF_m.c b/test/codegen-golden/FwaddWX16VFloat32VBVFVFSF_m.c new file mode 100644 index 0000000..3a55c48 --- /dev/null +++ b/test/codegen-golden/FwaddWX16VFloat32VBVFVFSF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FwaddWX16VFloat32VBVFVFSF_m -n 1 -l 7 --has-ta --has-ma -c FwaddWX16VFloat32VBVFVFSF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +float16_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,1266779219u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwadd_wf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m2(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat32m2_t vec_value_2_0= vle32_v_f32m2(placeholder2, vl); + +vfloat32m2_t vec_value_4_0= vfwadd_wf_f32m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwadd_wf_operator_0() { +uint64_t tmp[] = {1264903012u,1261868794u,1261789410u,1261516319u,1243741060u,1256322614u,1262786923u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwadd_wf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_wf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwadd_wf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwaddWX16VFloat32VFSF.c b/test/codegen-golden/FwaddWX16VFloat32VFSF.c new file mode 100644 index 0000000..0e62a12 --- /dev/null +++ b/test/codegen-golden/FwaddWX16VFloat32VFSF.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r FwaddWX16VFloat32VFSF -n 1 -l 7 --has-ta --has-ma -c FwaddWX16VFloat32VFSF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfwadd_wf_operator_0() { +float32_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e32m2(placeholder3); +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); + +vfloat32m2_t vec_value_2_0= vfwadd_wf_f32m2(vec_value_0_0, placeholder1, vl); + +vse32_v_f32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwadd_wf_operator_0() { +uint64_t tmp[] = {1250437964u,1267241206u,1265368270u,1258493403u,1262506504u,1244254744u,1250270228u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwadd_wf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwadd_wf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwadd_wf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VFloat32VBVFVF_TAMU.c b/test/codegen-golden/FwcvtV16VFloat32VBVFVF_TAMU.c new file mode 100644 index 0000000..be21109 --- /dev/null +++ b/test/codegen-golden/FwcvtV16VFloat32VBVFVF_TAMU.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FwcvtV16VFloat32VBVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VFloat32VBVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwcvt_f_f_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwcvt_f_f_v_f32m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_f_f_v_operator_0() { +uint64_t tmp[] = {1262786923u,4294967295u,1174691840u,4294967295u,1177911296u,4294967295u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_f_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_f_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VFloat32VBVFVF_TUMA.c b/test/codegen-golden/FwcvtV16VFloat32VBVFVF_TUMA.c new file mode 100644 index 0000000..be7070d --- /dev/null +++ b/test/codegen-golden/FwcvtV16VFloat32VBVFVF_TUMA.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FwcvtV16VFloat32VBVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VFloat32VBVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwcvt_f_f_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwcvt_f_f_v_f32m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_f_f_v_operator_0() { +uint64_t tmp[] = {4294967295u,1267490606u,1174691840u,1261781606u,1177911296u,1243709844u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_f_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_f_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VFloat32VBVFVF_TUMU.c b/test/codegen-golden/FwcvtV16VFloat32VBVFVF_TUMU.c new file mode 100644 index 0000000..f4b9017 --- /dev/null +++ b/test/codegen-golden/FwcvtV16VFloat32VBVFVF_TUMU.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FwcvtV16VFloat32VBVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VFloat32VBVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwcvt_f_f_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwcvt_f_f_v_f32m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_f_f_v_operator_0() { +uint64_t tmp[] = {1262786923u,1267490606u,1174691840u,1261781606u,1177911296u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_f_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_f_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VFloat32VBVFVF_m.c b/test/codegen-golden/FwcvtV16VFloat32VBVFVF_m.c new file mode 100644 index 0000000..a8428ac --- /dev/null +++ b/test/codegen-golden/FwcvtV16VFloat32VBVFVF_m.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r FwcvtV16VFloat32VBVFVF_m -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VFloat32VBVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwcvt_f_f_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwcvt_f_f_v_f32m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_f_f_v_operator_0() { +uint64_t tmp[] = {1262786923u,1181376512u,1174691840u,1261781606u,1177911296u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_f_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_f_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VFloat32VBVF_TAMA.c b/test/codegen-golden/FwcvtV16VFloat32VBVF_TAMA.c new file mode 100644 index 0000000..d03efdc --- /dev/null +++ b/test/codegen-golden/FwcvtV16VFloat32VBVF_TAMA.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r FwcvtV16VFloat32VBVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VFloat32VBVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwcvt_f_f_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat32m2_t vec_value_2_0= vfwcvt_f_f_v_f32m2_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse32_v_f32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_f_f_v_operator_0() { +uint64_t tmp[] = {4294967295u,4294967295u,1174691840u,4294967295u,1177911296u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwcvt_f_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_f_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VFloat32VF.c b/test/codegen-golden/FwcvtV16VFloat32VF.c new file mode 100644 index 0000000..ddeb746 --- /dev/null +++ b/test/codegen-golden/FwcvtV16VFloat32VF.c @@ -0,0 +1,67 @@ +// COMMAND: random_gen -r FwcvtV16VFloat32VF -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VFloat32VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float32_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfwcvt_f_f_v_operator_0() { +float16_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat32m2_t vec_value_1_0= vfwcvt_f_f_v_f32m2(vec_value_0_0, vl); + +vse32_v_f32m2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfwcvt_f_f_v_operator_0() { +uint64_t tmp[] = {1166753792u,1183563776u,1181843456u,1174806528u,1178910720u,1160601600u,1166573568u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_1[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfwcvt_f_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfwcvt_f_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VFloat32VFVF_TU.c b/test/codegen-golden/FwcvtV16VFloat32VFVF_TU.c new file mode 100644 index 0000000..c1b7cf2 --- /dev/null +++ b/test/codegen-golden/FwcvtV16VFloat32VFVF_TU.c @@ -0,0 +1,85 @@ +// COMMAND: random_gen -r FwcvtV16VFloat32VFVF_TU -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VFloat32VFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwcvt_f_f_v_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat32m2_t vec_value_2_0= vfwcvt_f_f_v_f32m2_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse32_v_f32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_f_f_v_operator_0() { +uint64_t tmp[] = {1173610496u,1267237304u,1174691840u,1258485599u,1177911296u,1244223528u,1172791296u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwcvt_f_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_f_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VFloat32VF_TA.c b/test/codegen-golden/FwcvtV16VFloat32VF_TA.c new file mode 100644 index 0000000..a4d6edb --- /dev/null +++ b/test/codegen-golden/FwcvtV16VFloat32VF_TA.c @@ -0,0 +1,68 @@ +// COMMAND: random_gen -r FwcvtV16VFloat32VF_TA -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VFloat32VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float32_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfwcvt_f_f_v_operator_0() { +float16_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat32m2_t vec_value_1_0= vfwcvt_f_f_v_f32m2_ta(vec_value_0_0, tail_vl); + +vse32_v_f32m2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfwcvt_f_f_v_operator_0() { +uint64_t tmp[] = {1166753792u,4294967295u,1181843456u,4294967295u,1178910720u,4294967295u,1166573568u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_1[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfwcvt_f_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfwcvt_f_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VInt32VBVF_TAMA.c b/test/codegen-golden/FwcvtV16VInt32VBVF_TAMA.c new file mode 100644 index 0000000..93e2b51 --- /dev/null +++ b/test/codegen-golden/FwcvtV16VInt32VBVF_TAMA.c @@ -0,0 +1,79 @@ +// COMMAND: random_gen -r FwcvtV16VInt32VBVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VInt32VBVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +int32_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwcvt_x_f_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vint32m2_t vec_value_2_0= vfwcvt_x_f_v_i32m2_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse32_v_i32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_x_f_v_operator_0() { +int32_t tmp[] = {-1,-1,8472,-1,11616,-1,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwcvt_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VInt32VBVIVF_TAMU.c b/test/codegen-golden/FwcvtV16VInt32VBVIVF_TAMU.c new file mode 100644 index 0000000..43bda6e --- /dev/null +++ b/test/codegen-golden/FwcvtV16VInt32VBVIVF_TAMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r FwcvtV16VInt32VBVIVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VInt32VBVIVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +float16_t value_2[7]; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfwcvt_x_f_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint32m2_t vec_value_1_0= vle32_v_i32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint32m2_t vec_value_3_0= vfwcvt_x_f_v_i32m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_i32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_x_f_v_operator_0() { +int32_t tmp[] = {2884331,-1,8472,-1,11616,-1,-734314,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VInt32VBVIVF_TUMA.c b/test/codegen-golden/FwcvtV16VInt32VBVIVF_TUMA.c new file mode 100644 index 0000000..6a7e2e1 --- /dev/null +++ b/test/codegen-golden/FwcvtV16VInt32VBVIVF_TUMA.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r FwcvtV16VInt32VBVIVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VInt32VBVIVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +float16_t value_2[7]; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfwcvt_x_f_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint32m2_t vec_value_1_0= vle32_v_i32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint32m2_t vec_value_3_0= vfwcvt_x_f_v_i32m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_i32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_x_f_v_operator_0() { +int32_t tmp[] = {-1,8398813,8472,1879014,11616,-7353883,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VInt32VBVIVF_TUMU.c b/test/codegen-golden/FwcvtV16VInt32VBVIVF_TUMU.c new file mode 100644 index 0000000..85bf67b --- /dev/null +++ b/test/codegen-golden/FwcvtV16VInt32VBVIVF_TUMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r FwcvtV16VInt32VBVIVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VInt32VBVIVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +float16_t value_2[7]; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfwcvt_x_f_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint32m2_t vec_value_1_0= vle32_v_i32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint32m2_t vec_value_3_0= vfwcvt_x_f_v_i32m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_i32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_x_f_v_operator_0() { +int32_t tmp[] = {2884331,8398813,8472,1879014,11616,-7353883,-734314,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VInt32VBVIVF_m.c b/test/codegen-golden/FwcvtV16VInt32VBVIVF_m.c new file mode 100644 index 0000000..694ce72 --- /dev/null +++ b/test/codegen-golden/FwcvtV16VInt32VBVIVF_m.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r FwcvtV16VInt32VBVIVF_m -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VInt32VBVIVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +float16_t value_2[7]; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfwcvt_x_f_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint32m2_t vec_value_1_0= vle32_v_i32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint32m2_t vec_value_3_0= vfwcvt_x_f_v_i32m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse32_v_i32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_x_f_v_operator_0() { +int32_t tmp[] = {2884331,15000,8472,1879014,11616,-7353883,-734314,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VInt32VF.c b/test/codegen-golden/FwcvtV16VInt32VF.c new file mode 100644 index 0000000..12b7fa6 --- /dev/null +++ b/test/codegen-golden/FwcvtV16VInt32VF.c @@ -0,0 +1,62 @@ +// COMMAND: random_gen -r FwcvtV16VInt32VF -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VInt32VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +int32_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfwcvt_x_f_v_operator_0() { +float16_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vint32m2_t vec_value_1_0= vfwcvt_x_f_v_i32m2(vec_value_0_0, vl); + +vse32_v_i32m2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfwcvt_x_f_v_operator_0() { +int32_t tmp[] = {4456,17888,15456,8584,12592,2774,4368,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfwcvt_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfwcvt_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VInt32VF_TA.c b/test/codegen-golden/FwcvtV16VInt32VF_TA.c new file mode 100644 index 0000000..51408a8 --- /dev/null +++ b/test/codegen-golden/FwcvtV16VInt32VF_TA.c @@ -0,0 +1,63 @@ +// COMMAND: random_gen -r FwcvtV16VInt32VF_TA -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VInt32VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +int32_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfwcvt_x_f_v_operator_0() { +float16_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vint32m2_t vec_value_1_0= vfwcvt_x_f_v_i32m2_ta(vec_value_0_0, tail_vl); + +vse32_v_i32m2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfwcvt_x_f_v_operator_0() { +int32_t tmp[] = {4456,-1,15456,-1,12592,-1,4368,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfwcvt_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfwcvt_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VInt32VIVF_TU.c b/test/codegen-golden/FwcvtV16VInt32VIVF_TU.c new file mode 100644 index 0000000..59730c1 --- /dev/null +++ b/test/codegen-golden/FwcvtV16VInt32VIVF_TU.c @@ -0,0 +1,78 @@ +// COMMAND: random_gen -r FwcvtV16VInt32VIVF_TU -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VInt32VIVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int32_t value_0[7]; +float16_t value_1[7]; +int32_t value_2[7]; +void vinit_rif_operator_1() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwcvt_x_f_v_operator_0() { +int32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint32m2_t vec_value_0_0= vle32_v_i32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vint32m2_t vec_value_2_0= vfwcvt_x_f_v_i32m2_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse32_v_i32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_x_f_v_operator_0() { +int32_t tmp[] = {7804,7892207,8472,-1416993,11616,-7225462,7404,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwcvt_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VUInt32VBVF_TAMA.c b/test/codegen-golden/FwcvtV16VUInt32VBVF_TAMA.c new file mode 100644 index 0000000..b36e9ed --- /dev/null +++ b/test/codegen-golden/FwcvtV16VUInt32VBVF_TAMA.c @@ -0,0 +1,79 @@ +// COMMAND: random_gen -r FwcvtV16VUInt32VBVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VUInt32VBVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +uint32_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwcvt_xu_f_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vuint32m2_t vec_value_2_0= vfwcvt_xu_f_v_u32m2_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse32_v_u32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_xu_f_v_operator_0() { +uint32_t tmp[] = {4294967295u,4294967295u,8472u,4294967295u,11616u,4294967295u,4294967295u,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwcvt_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VUInt32VBVUVF_TAMU.c b/test/codegen-golden/FwcvtV16VUInt32VBVUVF_TAMU.c new file mode 100644 index 0000000..10e0597 --- /dev/null +++ b/test/codegen-golden/FwcvtV16VUInt32VBVUVF_TAMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r FwcvtV16VUInt32VBVUVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VUInt32VBVUVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +float16_t value_2[7]; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfwcvt_xu_f_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint32m2_t vec_value_1_0= vle32_v_u32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint32m2_t vec_value_3_0= vfwcvt_xu_f_v_u32m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_u32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_xu_f_v_operator_0() { +uint32_t tmp[] = {6442165u,4294967295u,8472u,4294967295u,11616u,4294967295u,4632843u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VUInt32VBVUVF_TUMA.c b/test/codegen-golden/FwcvtV16VUInt32VBVUVF_TUMA.c new file mode 100644 index 0000000..3bfb44b --- /dev/null +++ b/test/codegen-golden/FwcvtV16VUInt32VBVUVF_TUMA.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r FwcvtV16VUInt32VBVUVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VUInt32VBVUVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +float16_t value_2[7]; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfwcvt_xu_f_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint32m2_t vec_value_1_0= vle32_v_u32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint32m2_t vec_value_3_0= vfwcvt_xu_f_v_u32m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_u32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_xu_f_v_operator_0() { +uint32_t tmp[] = {4294967295u,9199407u,8472u,5939507u,11616u,1323058u,4294967295u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VUInt32VBVUVF_TUMU.c b/test/codegen-golden/FwcvtV16VUInt32VBVUVF_TUMU.c new file mode 100644 index 0000000..ddd2866 --- /dev/null +++ b/test/codegen-golden/FwcvtV16VUInt32VBVUVF_TUMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r FwcvtV16VUInt32VBVUVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VUInt32VBVUVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +float16_t value_2[7]; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfwcvt_xu_f_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint32m2_t vec_value_1_0= vle32_v_u32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint32m2_t vec_value_3_0= vfwcvt_xu_f_v_u32m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_u32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_xu_f_v_operator_0() { +uint32_t tmp[] = {6442165u,9199407u,8472u,5939507u,11616u,1323058u,4632843u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VUInt32VBVUVF_m.c b/test/codegen-golden/FwcvtV16VUInt32VBVUVF_m.c new file mode 100644 index 0000000..e7f7980 --- /dev/null +++ b/test/codegen-golden/FwcvtV16VUInt32VBVUVF_m.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r FwcvtV16VUInt32VBVUVF_m -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VUInt32VBVUVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +float16_t value_2[7]; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfwcvt_xu_f_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint32m2_t vec_value_1_0= vle32_v_u32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint32m2_t vec_value_3_0= vfwcvt_xu_f_v_u32m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse32_v_u32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_xu_f_v_operator_0() { +uint32_t tmp[] = {6442165u,15000u,8472u,5939507u,11616u,1323058u,4632843u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VUInt32VF.c b/test/codegen-golden/FwcvtV16VUInt32VF.c new file mode 100644 index 0000000..daa9b83 --- /dev/null +++ b/test/codegen-golden/FwcvtV16VUInt32VF.c @@ -0,0 +1,62 @@ +// COMMAND: random_gen -r FwcvtV16VUInt32VF -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VUInt32VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +uint32_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfwcvt_xu_f_v_operator_0() { +float16_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vuint32m2_t vec_value_1_0= vfwcvt_xu_f_v_u32m2(vec_value_0_0, vl); + +vse32_v_u32m2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfwcvt_xu_f_v_operator_0() { +uint32_t tmp[] = {4456u,17888u,15456u,8584u,12592u,2774u,4368u,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfwcvt_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfwcvt_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VUInt32VF_TA.c b/test/codegen-golden/FwcvtV16VUInt32VF_TA.c new file mode 100644 index 0000000..84b344d --- /dev/null +++ b/test/codegen-golden/FwcvtV16VUInt32VF_TA.c @@ -0,0 +1,63 @@ +// COMMAND: random_gen -r FwcvtV16VUInt32VF_TA -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VUInt32VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +uint32_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfwcvt_xu_f_v_operator_0() { +float16_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vuint32m2_t vec_value_1_0= vfwcvt_xu_f_v_u32m2_ta(vec_value_0_0, tail_vl); + +vse32_v_u32m2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfwcvt_xu_f_v_operator_0() { +uint32_t tmp[] = {4456u,4294967295u,15456u,4294967295u,12592u,4294967295u,4368u,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfwcvt_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfwcvt_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV16VUInt32VUVF_TU.c b/test/codegen-golden/FwcvtV16VUInt32VUVF_TU.c new file mode 100644 index 0000000..cbf27cd --- /dev/null +++ b/test/codegen-golden/FwcvtV16VUInt32VUVF_TU.c @@ -0,0 +1,78 @@ +// COMMAND: random_gen -r FwcvtV16VUInt32VUVF_TU -n 1 -l 7 --has-ta --has-ma -c FwcvtV16VUInt32VUVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint32_t value_0[7]; +float16_t value_1[7]; +uint32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwcvt_xu_f_v_operator_0() { +uint32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint32m2_t vec_value_0_0= vle32_v_u32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vuint32m2_t vec_value_2_0= vfwcvt_xu_f_v_u32m2_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse32_v_u32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_xu_f_v_operator_0() { +uint32_t tmp[] = {7804u,8946104u,8472u,4291503u,11616u,1387269u,7404u,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwcvt_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV8VFloat16VBVFVI_TAMU.c b/test/codegen-golden/FwcvtV8VFloat16VBVFVI_TAMU.c new file mode 100644 index 0000000..15c459a --- /dev/null +++ b/test/codegen-golden/FwcvtV8VFloat16VBVFVI_TAMU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FwcvtV8VFloat16VBVFVI_TAMU -n 1 -l 7 --has-ta --has-ma -c FwcvtV8VFloat16VBVFVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +int8_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwcvt_f_x_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vfloat16m2_t vec_value_1_0= vle16_v_f16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vfloat16m2_t vec_value_3_0= vfwcvt_f_x_v_f16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_f_x_v_operator_0() { +uint64_t tmp[] = {29258,65535,52096,65535,19456,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_f_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_f_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV8VFloat16VBVFVI_TUMA.c b/test/codegen-golden/FwcvtV8VFloat16VBVFVI_TUMA.c new file mode 100644 index 0000000..c2a72d3 --- /dev/null +++ b/test/codegen-golden/FwcvtV8VFloat16VBVFVI_TUMA.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FwcvtV8VFloat16VBVFVI_TUMA -n 1 -l 7 --has-ta --has-ma -c FwcvtV8VFloat16VBVFVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +int8_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwcvt_f_x_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vfloat16m2_t vec_value_1_0= vle16_v_f16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vfloat16m2_t vec_value_3_0= vfwcvt_f_x_v_f16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_f_x_v_operator_0() { +uint64_t tmp[] = {65535,29822,52096,29133,19456,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_f_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_f_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV8VFloat16VBVFVI_TUMU.c b/test/codegen-golden/FwcvtV8VFloat16VBVFVI_TUMU.c new file mode 100644 index 0000000..7adf0cb --- /dev/null +++ b/test/codegen-golden/FwcvtV8VFloat16VBVFVI_TUMU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FwcvtV8VFloat16VBVFVI_TUMU -n 1 -l 7 --has-ta --has-ma -c FwcvtV8VFloat16VBVFVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +int8_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwcvt_f_x_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vfloat16m2_t vec_value_1_0= vle16_v_f16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vfloat16m2_t vec_value_3_0= vfwcvt_f_x_v_f16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_f_x_v_operator_0() { +uint64_t tmp[] = {29258,29822,52096,29133,19456,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_f_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_f_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV8VFloat16VBVFVI_m.c b/test/codegen-golden/FwcvtV8VFloat16VBVFVI_m.c new file mode 100644 index 0000000..ca7c7a7 --- /dev/null +++ b/test/codegen-golden/FwcvtV8VFloat16VBVFVI_m.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FwcvtV8VFloat16VBVFVI_m -n 1 -l 7 --has-ta --has-ma -c FwcvtV8VFloat16VBVFVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +int8_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwcvt_f_x_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vfloat16m2_t vec_value_1_0= vle16_v_f16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vfloat16m2_t vec_value_3_0= vfwcvt_f_x_v_f16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_f16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_f_x_v_operator_0() { +uint64_t tmp[] = {29258,21056,52096,29133,19456,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_f_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_f_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV8VFloat16VBVFVU_TAMU.c b/test/codegen-golden/FwcvtV8VFloat16VBVFVU_TAMU.c new file mode 100644 index 0000000..24c8ebb --- /dev/null +++ b/test/codegen-golden/FwcvtV8VFloat16VBVFVU_TAMU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FwcvtV8VFloat16VBVFVU_TAMU -n 1 -l 7 --has-ta --has-ma -c FwcvtV8VFloat16VBVFVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +uint8_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwcvt_f_xu_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vfloat16m2_t vec_value_1_0= vle16_v_f16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vfloat16m2_t vec_value_3_0= vfwcvt_f_xu_v_f16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_f_xu_v_operator_0() { +uint64_t tmp[] = {29258,65535,20800,65535,21312,65535,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_f_xu_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_xu_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_f_xu_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV8VFloat16VBVFVU_TUMA.c b/test/codegen-golden/FwcvtV8VFloat16VBVFVU_TUMA.c new file mode 100644 index 0000000..c91b9b3 --- /dev/null +++ b/test/codegen-golden/FwcvtV8VFloat16VBVFVU_TUMA.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FwcvtV8VFloat16VBVFVU_TUMA -n 1 -l 7 --has-ta --has-ma -c FwcvtV8VFloat16VBVFVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +uint8_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwcvt_f_xu_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vfloat16m2_t vec_value_1_0= vle16_v_f16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vfloat16m2_t vec_value_3_0= vfwcvt_f_xu_v_f16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_f_xu_v_operator_0() { +uint64_t tmp[] = {65535,29822,20800,29133,21312,26923,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_f_xu_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_xu_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_f_xu_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV8VFloat16VBVFVU_TUMU.c b/test/codegen-golden/FwcvtV8VFloat16VBVFVU_TUMU.c new file mode 100644 index 0000000..9701d59 --- /dev/null +++ b/test/codegen-golden/FwcvtV8VFloat16VBVFVU_TUMU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FwcvtV8VFloat16VBVFVU_TUMU -n 1 -l 7 --has-ta --has-ma -c FwcvtV8VFloat16VBVFVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +uint8_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwcvt_f_xu_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vfloat16m2_t vec_value_1_0= vle16_v_f16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vfloat16m2_t vec_value_3_0= vfwcvt_f_xu_v_f16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_f16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_f_xu_v_operator_0() { +uint64_t tmp[] = {29258,29822,20800,29133,21312,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_f_xu_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_xu_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_f_xu_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV8VFloat16VBVFVU_m.c b/test/codegen-golden/FwcvtV8VFloat16VBVFVU_m.c new file mode 100644 index 0000000..8c82c44 --- /dev/null +++ b/test/codegen-golden/FwcvtV8VFloat16VBVFVU_m.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FwcvtV8VFloat16VBVFVU_m -n 1 -l 7 --has-ta --has-ma -c FwcvtV8VFloat16VBVFVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +uint8_t value_2[7]; +float16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwcvt_f_xu_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vfloat16m2_t vec_value_1_0= vle16_v_f16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vfloat16m2_t vec_value_3_0= vfwcvt_f_xu_v_f16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_f16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_f_xu_v_operator_0() { +uint64_t tmp[] = {29258,21680,20800,29133,21312,26923,28806,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_3[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_f_xu_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_xu_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_f_xu_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV8VFloat16VBVI_TAMA.c b/test/codegen-golden/FwcvtV8VFloat16VBVI_TAMA.c new file mode 100644 index 0000000..2676113 --- /dev/null +++ b/test/codegen-golden/FwcvtV8VFloat16VBVI_TAMA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r FwcvtV8VFloat16VBVI_TAMA -n 1 -l 7 --has-ta --has-ma -c FwcvtV8VFloat16VBVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfwcvt_f_x_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vfloat16m2_t vec_value_2_0= vfwcvt_f_x_v_f16m2_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_f_x_v_operator_0() { +uint64_t tmp[] = {65535,65535,52096,65535,19456,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwcvt_f_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_f_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV8VFloat16VBVU_TAMA.c b/test/codegen-golden/FwcvtV8VFloat16VBVU_TAMA.c new file mode 100644 index 0000000..727d000 --- /dev/null +++ b/test/codegen-golden/FwcvtV8VFloat16VBVU_TAMA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r FwcvtV8VFloat16VBVU_TAMA -n 1 -l 7 --has-ta --has-ma -c FwcvtV8VFloat16VBVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfwcvt_f_xu_v_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vfloat16m2_t vec_value_2_0= vfwcvt_f_xu_v_f16m2_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_f_xu_v_operator_0() { +uint64_t tmp[] = {65535,65535,20800,65535,21312,65535,65535,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwcvt_f_xu_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_xu_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_f_xu_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV8VFloat16VFVI_TU.c b/test/codegen-golden/FwcvtV8VFloat16VFVI_TU.c new file mode 100644 index 0000000..c496796 --- /dev/null +++ b/test/codegen-golden/FwcvtV8VFloat16VFVI_TU.c @@ -0,0 +1,83 @@ +// COMMAND: random_gen -r FwcvtV8VFloat16VFVI_TU -n 1 -l 7 --has-ta --has-ma -c FwcvtV8VFloat16VFVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfwcvt_f_x_v_operator_0() { +float16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m2_t vec_value_0_0= vle16_v_f16m2(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vfloat16m2_t vec_value_2_0= vfwcvt_f_x_v_f16m2_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_f_x_v_operator_0() { +uint64_t tmp[] = {52608,29790,52096,28721,19456,26987,52864,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwcvt_f_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_f_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV8VFloat16VFVU_TU.c b/test/codegen-golden/FwcvtV8VFloat16VFVU_TU.c new file mode 100644 index 0000000..cf380ea --- /dev/null +++ b/test/codegen-golden/FwcvtV8VFloat16VFVU_TU.c @@ -0,0 +1,83 @@ +// COMMAND: random_gen -r FwcvtV8VFloat16VFVU_TU -n 1 -l 7 --has-ta --has-ma -c FwcvtV8VFloat16VFVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +uint8_t value_1[7]; +float16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfwcvt_f_xu_v_operator_0() { +float16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m2_t vec_value_0_0= vle16_v_f16m2(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vfloat16m2_t vec_value_2_0= vfwcvt_f_xu_v_f16m2_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_f16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_f_xu_v_operator_0() { +uint64_t tmp[] = {20704,29790,20800,28721,21312,26987,20640,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_2[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwcvt_f_xu_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_xu_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_f_xu_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV8VFloat16VI.c b/test/codegen-golden/FwcvtV8VFloat16VI.c new file mode 100644 index 0000000..d4cfdac --- /dev/null +++ b/test/codegen-golden/FwcvtV8VFloat16VI.c @@ -0,0 +1,65 @@ +// COMMAND: random_gen -r FwcvtV8VFloat16VI -n 1 -l 7 --has-ta --has-ma -c FwcvtV8VFloat16VI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vfwcvt_f_x_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vfloat16m2_t vec_value_1_0= vfwcvt_f_x_v_f16m2(vec_value_0_0, vl); + +vse16_v_f16m2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfwcvt_f_x_v_operator_0() { +uint64_t tmp[] = {54016,21744,21216,51968,20096,54416,54048,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfwcvt_f_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfwcvt_f_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV8VFloat16VI_TA.c b/test/codegen-golden/FwcvtV8VFloat16VI_TA.c new file mode 100644 index 0000000..8c6bb5a --- /dev/null +++ b/test/codegen-golden/FwcvtV8VFloat16VI_TA.c @@ -0,0 +1,66 @@ +// COMMAND: random_gen -r FwcvtV8VFloat16VI_TA -n 1 -l 7 --has-ta --has-ma -c FwcvtV8VFloat16VI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vfwcvt_f_x_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vfloat16m2_t vec_value_1_0= vfwcvt_f_x_v_f16m2_ta(vec_value_0_0, tail_vl); + +vse16_v_f16m2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfwcvt_f_x_v_operator_0() { +uint64_t tmp[] = {54016,65535,21216,65535,20096,65535,54048,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfwcvt_f_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfwcvt_f_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV8VFloat16VU.c b/test/codegen-golden/FwcvtV8VFloat16VU.c new file mode 100644 index 0000000..b126c58 --- /dev/null +++ b/test/codegen-golden/FwcvtV8VFloat16VU.c @@ -0,0 +1,65 @@ +// COMMAND: random_gen -r FwcvtV8VFloat16VU -n 1 -l 7 --has-ta --has-ma -c FwcvtV8VFloat16VU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vfwcvt_f_xu_v_operator_0() { +uint8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vfloat16m2_t vec_value_1_0= vfwcvt_f_xu_v_f16m2(vec_value_0_0, vl); + +vse16_v_f16m2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfwcvt_f_xu_v_operator_0() { +uint64_t tmp[] = {19840,21920,21728,20832,21472,19200,19840,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfwcvt_f_xu_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_xu_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfwcvt_f_xu_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwcvtV8VFloat16VU_TA.c b/test/codegen-golden/FwcvtV8VFloat16VU_TA.c new file mode 100644 index 0000000..e2c4236 --- /dev/null +++ b/test/codegen-golden/FwcvtV8VFloat16VU_TA.c @@ -0,0 +1,66 @@ +// COMMAND: random_gen -r FwcvtV8VFloat16VU_TA -n 1 -l 7 --has-ta --has-ma -c FwcvtV8VFloat16VU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +float16_t value_1[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vfwcvt_f_xu_v_operator_0() { +uint8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vfloat16m2_t vec_value_1_0= vfwcvt_f_xu_v_f16m2_ta(vec_value_0_0, tail_vl); + +vse16_v_f16m2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfwcvt_f_xu_v_operator_0() { +uint64_t tmp[] = {19840,65535,21728,65535,21472,65535,19840,}; +union { float16_t f16; uint16_t u16; } converter; +union { float16_t f16; uint16_t u16; } converter2; +for (int i=0; i<7;++i){ +converter.u16 = tmp[i]; +converter2.f16 = value_1[i]; +if(converter.f16 != converter2.f16 && !(isNaNF16UI(converter.u16) && isNaNF16UI(converter2.u16))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfwcvt_f_xu_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_f_xu_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfwcvt_f_xu_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fwcvt_rtzV16VInt32VBVF_TAMA.c b/test/codegen-golden/Fwcvt_rtzV16VInt32VBVF_TAMA.c new file mode 100644 index 0000000..2ca9471 --- /dev/null +++ b/test/codegen-golden/Fwcvt_rtzV16VInt32VBVF_TAMA.c @@ -0,0 +1,79 @@ +// COMMAND: random_gen -r Fwcvt_rtzV16VInt32VBVF_TAMA -n 1 -l 7 --has-ta --has-ma -c Fwcvt_rtzV16VInt32VBVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +int32_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwcvt_rtz_x_f_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vint32m2_t vec_value_2_0= vfwcvt_rtz_x_f_v_i32m2_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse32_v_i32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_rtz_x_f_v_operator_0() { +int32_t tmp[] = {-1,-1,8472,-1,11616,-1,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwcvt_rtz_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_rtz_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_rtz_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fwcvt_rtzV16VInt32VBVIVF_TAMU.c b/test/codegen-golden/Fwcvt_rtzV16VInt32VBVIVF_TAMU.c new file mode 100644 index 0000000..3090e18 --- /dev/null +++ b/test/codegen-golden/Fwcvt_rtzV16VInt32VBVIVF_TAMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r Fwcvt_rtzV16VInt32VBVIVF_TAMU -n 1 -l 7 --has-ta --has-ma -c Fwcvt_rtzV16VInt32VBVIVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +float16_t value_2[7]; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfwcvt_rtz_x_f_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint32m2_t vec_value_1_0= vle32_v_i32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint32m2_t vec_value_3_0= vfwcvt_rtz_x_f_v_i32m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_i32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_rtz_x_f_v_operator_0() { +int32_t tmp[] = {2884331,-1,8472,-1,11616,-1,-734314,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_rtz_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_rtz_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_rtz_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fwcvt_rtzV16VInt32VBVIVF_TUMA.c b/test/codegen-golden/Fwcvt_rtzV16VInt32VBVIVF_TUMA.c new file mode 100644 index 0000000..5950ef1 --- /dev/null +++ b/test/codegen-golden/Fwcvt_rtzV16VInt32VBVIVF_TUMA.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r Fwcvt_rtzV16VInt32VBVIVF_TUMA -n 1 -l 7 --has-ta --has-ma -c Fwcvt_rtzV16VInt32VBVIVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +float16_t value_2[7]; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfwcvt_rtz_x_f_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint32m2_t vec_value_1_0= vle32_v_i32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint32m2_t vec_value_3_0= vfwcvt_rtz_x_f_v_i32m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_i32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_rtz_x_f_v_operator_0() { +int32_t tmp[] = {-1,8398813,8472,1879014,11616,-7353883,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_rtz_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_rtz_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_rtz_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fwcvt_rtzV16VInt32VBVIVF_TUMU.c b/test/codegen-golden/Fwcvt_rtzV16VInt32VBVIVF_TUMU.c new file mode 100644 index 0000000..51c0b9f --- /dev/null +++ b/test/codegen-golden/Fwcvt_rtzV16VInt32VBVIVF_TUMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r Fwcvt_rtzV16VInt32VBVIVF_TUMU -n 1 -l 7 --has-ta --has-ma -c Fwcvt_rtzV16VInt32VBVIVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +float16_t value_2[7]; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfwcvt_rtz_x_f_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint32m2_t vec_value_1_0= vle32_v_i32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint32m2_t vec_value_3_0= vfwcvt_rtz_x_f_v_i32m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_i32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_rtz_x_f_v_operator_0() { +int32_t tmp[] = {2884331,8398813,8472,1879014,11616,-7353883,-734314,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_rtz_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_rtz_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_rtz_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fwcvt_rtzV16VInt32VBVIVF_m.c b/test/codegen-golden/Fwcvt_rtzV16VInt32VBVIVF_m.c new file mode 100644 index 0000000..270b650 --- /dev/null +++ b/test/codegen-golden/Fwcvt_rtzV16VInt32VBVIVF_m.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r Fwcvt_rtzV16VInt32VBVIVF_m -n 1 -l 7 --has-ta --has-ma -c Fwcvt_rtzV16VInt32VBVIVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +float16_t value_2[7]; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfwcvt_rtz_x_f_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint32m2_t vec_value_1_0= vle32_v_i32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vint32m2_t vec_value_3_0= vfwcvt_rtz_x_f_v_i32m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse32_v_i32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_rtz_x_f_v_operator_0() { +int32_t tmp[] = {2884331,15000,8472,1879014,11616,-7353883,-734314,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_rtz_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_rtz_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_rtz_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fwcvt_rtzV16VInt32VF.c b/test/codegen-golden/Fwcvt_rtzV16VInt32VF.c new file mode 100644 index 0000000..3195757 --- /dev/null +++ b/test/codegen-golden/Fwcvt_rtzV16VInt32VF.c @@ -0,0 +1,62 @@ +// COMMAND: random_gen -r Fwcvt_rtzV16VInt32VF -n 1 -l 7 --has-ta --has-ma -c Fwcvt_rtzV16VInt32VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +int32_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfwcvt_rtz_x_f_v_operator_0() { +float16_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vint32m2_t vec_value_1_0= vfwcvt_rtz_x_f_v_i32m2(vec_value_0_0, vl); + +vse32_v_i32m2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfwcvt_rtz_x_f_v_operator_0() { +int32_t tmp[] = {4456,17888,15456,8584,12592,2774,4368,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfwcvt_rtz_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_rtz_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfwcvt_rtz_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fwcvt_rtzV16VInt32VF_TA.c b/test/codegen-golden/Fwcvt_rtzV16VInt32VF_TA.c new file mode 100644 index 0000000..ed3e52f --- /dev/null +++ b/test/codegen-golden/Fwcvt_rtzV16VInt32VF_TA.c @@ -0,0 +1,63 @@ +// COMMAND: random_gen -r Fwcvt_rtzV16VInt32VF_TA -n 1 -l 7 --has-ta --has-ma -c Fwcvt_rtzV16VInt32VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +int32_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfwcvt_rtz_x_f_v_operator_0() { +float16_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vint32m2_t vec_value_1_0= vfwcvt_rtz_x_f_v_i32m2_ta(vec_value_0_0, tail_vl); + +vse32_v_i32m2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfwcvt_rtz_x_f_v_operator_0() { +int32_t tmp[] = {4456,-1,15456,-1,12592,-1,4368,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfwcvt_rtz_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_rtz_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfwcvt_rtz_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fwcvt_rtzV16VInt32VIVF_TU.c b/test/codegen-golden/Fwcvt_rtzV16VInt32VIVF_TU.c new file mode 100644 index 0000000..ab90ba5 --- /dev/null +++ b/test/codegen-golden/Fwcvt_rtzV16VInt32VIVF_TU.c @@ -0,0 +1,78 @@ +// COMMAND: random_gen -r Fwcvt_rtzV16VInt32VIVF_TU -n 1 -l 7 --has-ta --has-ma -c Fwcvt_rtzV16VInt32VIVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int32_t value_0[7]; +float16_t value_1[7]; +int32_t value_2[7]; +void vinit_rif_operator_1() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwcvt_rtz_x_f_v_operator_0() { +int32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint32m2_t vec_value_0_0= vle32_v_i32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vint32m2_t vec_value_2_0= vfwcvt_rtz_x_f_v_i32m2_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse32_v_i32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_rtz_x_f_v_operator_0() { +int32_t tmp[] = {7804,7892207,8472,-1416993,11616,-7225462,7404,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwcvt_rtz_x_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_rtz_x_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_rtz_x_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fwcvt_rtzV16VUInt32VBVF_TAMA.c b/test/codegen-golden/Fwcvt_rtzV16VUInt32VBVF_TAMA.c new file mode 100644 index 0000000..ffd8db8 --- /dev/null +++ b/test/codegen-golden/Fwcvt_rtzV16VUInt32VBVF_TAMA.c @@ -0,0 +1,79 @@ +// COMMAND: random_gen -r Fwcvt_rtzV16VUInt32VBVF_TAMA -n 1 -l 7 --has-ta --has-ma -c Fwcvt_rtzV16VUInt32VBVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +uint32_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwcvt_rtz_xu_f_v_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vuint32m2_t vec_value_2_0= vfwcvt_rtz_xu_f_v_u32m2_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse32_v_u32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_rtz_xu_f_v_operator_0() { +uint32_t tmp[] = {4294967295u,4294967295u,8472u,4294967295u,11616u,4294967295u,4294967295u,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwcvt_rtz_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_rtz_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_rtz_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fwcvt_rtzV16VUInt32VBVUVF_TAMU.c b/test/codegen-golden/Fwcvt_rtzV16VUInt32VBVUVF_TAMU.c new file mode 100644 index 0000000..0861194 --- /dev/null +++ b/test/codegen-golden/Fwcvt_rtzV16VUInt32VBVUVF_TAMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r Fwcvt_rtzV16VUInt32VBVUVF_TAMU -n 1 -l 7 --has-ta --has-ma -c Fwcvt_rtzV16VUInt32VBVUVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +float16_t value_2[7]; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfwcvt_rtz_xu_f_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint32m2_t vec_value_1_0= vle32_v_u32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint32m2_t vec_value_3_0= vfwcvt_rtz_xu_f_v_u32m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_u32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_rtz_xu_f_v_operator_0() { +uint32_t tmp[] = {6442165u,4294967295u,8472u,4294967295u,11616u,4294967295u,4632843u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_rtz_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_rtz_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_rtz_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fwcvt_rtzV16VUInt32VBVUVF_TUMA.c b/test/codegen-golden/Fwcvt_rtzV16VUInt32VBVUVF_TUMA.c new file mode 100644 index 0000000..377fa85 --- /dev/null +++ b/test/codegen-golden/Fwcvt_rtzV16VUInt32VBVUVF_TUMA.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r Fwcvt_rtzV16VUInt32VBVUVF_TUMA -n 1 -l 7 --has-ta --has-ma -c Fwcvt_rtzV16VUInt32VBVUVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +float16_t value_2[7]; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfwcvt_rtz_xu_f_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint32m2_t vec_value_1_0= vle32_v_u32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint32m2_t vec_value_3_0= vfwcvt_rtz_xu_f_v_u32m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_u32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_rtz_xu_f_v_operator_0() { +uint32_t tmp[] = {4294967295u,9199407u,8472u,5939507u,11616u,1323058u,4294967295u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_rtz_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_rtz_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_rtz_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fwcvt_rtzV16VUInt32VBVUVF_TUMU.c b/test/codegen-golden/Fwcvt_rtzV16VUInt32VBVUVF_TUMU.c new file mode 100644 index 0000000..4a228b5 --- /dev/null +++ b/test/codegen-golden/Fwcvt_rtzV16VUInt32VBVUVF_TUMU.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r Fwcvt_rtzV16VUInt32VBVUVF_TUMU -n 1 -l 7 --has-ta --has-ma -c Fwcvt_rtzV16VUInt32VBVUVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +float16_t value_2[7]; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfwcvt_rtz_xu_f_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint32m2_t vec_value_1_0= vle32_v_u32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint32m2_t vec_value_3_0= vfwcvt_rtz_xu_f_v_u32m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_u32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_rtz_xu_f_v_operator_0() { +uint32_t tmp[] = {6442165u,9199407u,8472u,5939507u,11616u,1323058u,4632843u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_rtz_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_rtz_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_rtz_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fwcvt_rtzV16VUInt32VBVUVF_m.c b/test/codegen-golden/Fwcvt_rtzV16VUInt32VBVUVF_m.c new file mode 100644 index 0000000..038a7da --- /dev/null +++ b/test/codegen-golden/Fwcvt_rtzV16VUInt32VBVUVF_m.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r Fwcvt_rtzV16VUInt32VBVUVF_m -n 1 -l 7 --has-ta --has-ma -c Fwcvt_rtzV16VUInt32VBVUVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +float16_t value_2[7]; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vfwcvt_rtz_xu_f_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint32m2_t vec_value_1_0= vle32_v_u32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vuint32m2_t vec_value_3_0= vfwcvt_rtz_xu_f_v_u32m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse32_v_u32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_rtz_xu_f_v_operator_0() { +uint32_t tmp[] = {6442165u,15000u,8472u,5939507u,11616u,1323058u,4632843u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwcvt_rtz_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_rtz_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_rtz_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fwcvt_rtzV16VUInt32VF.c b/test/codegen-golden/Fwcvt_rtzV16VUInt32VF.c new file mode 100644 index 0000000..2747808 --- /dev/null +++ b/test/codegen-golden/Fwcvt_rtzV16VUInt32VF.c @@ -0,0 +1,62 @@ +// COMMAND: random_gen -r Fwcvt_rtzV16VUInt32VF -n 1 -l 7 --has-ta --has-ma -c Fwcvt_rtzV16VUInt32VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +uint32_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfwcvt_rtz_xu_f_v_operator_0() { +float16_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vuint32m2_t vec_value_1_0= vfwcvt_rtz_xu_f_v_u32m2(vec_value_0_0, vl); + +vse32_v_u32m2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfwcvt_rtz_xu_f_v_operator_0() { +uint32_t tmp[] = {4456u,17888u,15456u,8584u,12592u,2774u,4368u,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfwcvt_rtz_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_rtz_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfwcvt_rtz_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fwcvt_rtzV16VUInt32VF_TA.c b/test/codegen-golden/Fwcvt_rtzV16VUInt32VF_TA.c new file mode 100644 index 0000000..1c309bf --- /dev/null +++ b/test/codegen-golden/Fwcvt_rtzV16VUInt32VF_TA.c @@ -0,0 +1,63 @@ +// COMMAND: random_gen -r Fwcvt_rtzV16VUInt32VF_TA -n 1 -l 7 --has-ta --has-ma -c Fwcvt_rtzV16VUInt32VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +uint32_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfwcvt_rtz_xu_f_v_operator_0() { +float16_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vuint32m2_t vec_value_1_0= vfwcvt_rtz_xu_f_v_u32m2_ta(vec_value_0_0, tail_vl); + +vse32_v_u32m2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfwcvt_rtz_xu_f_v_operator_0() { +uint32_t tmp[] = {4456u,4294967295u,15456u,4294967295u,12592u,4294967295u,4368u,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfwcvt_rtz_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_rtz_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfwcvt_rtz_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Fwcvt_rtzV16VUInt32VUVF_TU.c b/test/codegen-golden/Fwcvt_rtzV16VUInt32VUVF_TU.c new file mode 100644 index 0000000..942ddb1 --- /dev/null +++ b/test/codegen-golden/Fwcvt_rtzV16VUInt32VUVF_TU.c @@ -0,0 +1,78 @@ +// COMMAND: random_gen -r Fwcvt_rtzV16VUInt32VUVF_TU -n 1 -l 7 --has-ta --has-ma -c Fwcvt_rtzV16VUInt32VUVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint32_t value_0[7]; +float16_t value_1[7]; +uint32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwcvt_rtz_xu_f_v_operator_0() { +uint32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint32m2_t vec_value_0_0= vle32_v_u32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vuint32m2_t vec_value_2_0= vfwcvt_rtz_xu_f_v_u32m2_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse32_v_u32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwcvt_rtz_xu_f_v_operator_0() { +uint32_t tmp[] = {7804u,8946104u,8472u,4291503u,11616u,1387269u,7404u,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwcvt_rtz_xu_f_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwcvt_rtz_xu_f_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwcvt_rtz_xu_f_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmaccVF16VFloat32VBVFSFVF_TAMA.c b/test/codegen-golden/FwmaccVF16VFloat32VBVFSFVF_TAMA.c new file mode 100644 index 0000000..8817c9a --- /dev/null +++ b/test/codegen-golden/FwmaccVF16VFloat32VBVFSFVF_TAMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwmaccVF16VFloat32VBVFSFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FwmaccVF16VFloat32VBVFSFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfwmacc_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmacc_vf_f32m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmacc_vf_operator_0() { +uint64_t tmp[] = {4294967295u,4294967295u,1293193216u,4294967295u,1296550549u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmaccVF16VFloat32VBVFSFVF_TAMU.c b/test/codegen-golden/FwmaccVF16VFloat32VBVFSFVF_TAMU.c new file mode 100644 index 0000000..a8bee97 --- /dev/null +++ b/test/codegen-golden/FwmaccVF16VFloat32VBVFSFVF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwmaccVF16VFloat32VBVFSFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FwmaccVF16VFloat32VBVFSFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfwmacc_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmacc_vf_f32m2_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmacc_vf_operator_0() { +uint64_t tmp[] = {1262786923u,4294967295u,1293193216u,4294967295u,1296550549u,4294967295u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmaccVF16VFloat32VBVFSFVF_TUMA.c b/test/codegen-golden/FwmaccVF16VFloat32VBVFSFVF_TUMA.c new file mode 100644 index 0000000..7c77ac0 --- /dev/null +++ b/test/codegen-golden/FwmaccVF16VFloat32VBVFSFVF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwmaccVF16VFloat32VBVFSFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FwmaccVF16VFloat32VBVFSFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfwmacc_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmacc_vf_f32m2_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmacc_vf_operator_0() { +uint64_t tmp[] = {4294967295u,1267490606u,1293193216u,1261781606u,1296550549u,1243709844u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmaccVF16VFloat32VBVFSFVF_TUMU.c b/test/codegen-golden/FwmaccVF16VFloat32VBVFSFVF_TUMU.c new file mode 100644 index 0000000..0bd4c07 --- /dev/null +++ b/test/codegen-golden/FwmaccVF16VFloat32VBVFSFVF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwmaccVF16VFloat32VBVFSFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FwmaccVF16VFloat32VBVFSFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfwmacc_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmacc_vf_f32m2_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmacc_vf_operator_0() { +uint64_t tmp[] = {1262786923u,1267490606u,1293193216u,1261781606u,1296550549u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmaccVF16VFloat32VBVFSFVF_m.c b/test/codegen-golden/FwmaccVF16VFloat32VBVFSFVF_m.c new file mode 100644 index 0000000..9694456 --- /dev/null +++ b/test/codegen-golden/FwmaccVF16VFloat32VBVFSFVF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FwmaccVF16VFloat32VBVFSFVF_m -n 1 -l 7 --has-ta --has-ma -c FwmaccVF16VFloat32VBVFSFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfwmacc_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmacc_vf_f32m2_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmacc_vf_operator_0() { +uint64_t tmp[] = {1262786923u,1300378095u,1293193216u,1261781606u,1296550549u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmaccVF16VFloat32VFSFVF.c b/test/codegen-golden/FwmaccVF16VFloat32VFSFVF.c new file mode 100644 index 0000000..c46b1da --- /dev/null +++ b/test/codegen-golden/FwmaccVF16VFloat32VFSFVF.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FwmaccVF16VFloat32VFSFVF -n 1 -l 7 --has-ta --has-ma -c FwmaccVF16VFloat32VFSFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfwmacc_vf_operator_0() { +float32_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwmacc_vf_f32m2(vec_value_0_0, placeholder1, vec_value_2_0, vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwmacc_vf_operator_0() { +uint64_t tmp[] = {1288189629u,1296650287u,1290640570u,1292996582u,1293595161u,1278875282u,1287535146u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmaccVF16VFloat32VFSFVF_TA.c b/test/codegen-golden/FwmaccVF16VFloat32VFSFVF_TA.c new file mode 100644 index 0000000..378f7cf --- /dev/null +++ b/test/codegen-golden/FwmaccVF16VFloat32VFSFVF_TA.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FwmaccVF16VFloat32VFSFVF_TA -n 1 -l 7 --has-ta --has-ma -c FwmaccVF16VFloat32VFSFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfwmacc_vf_operator_0() { +float32_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwmacc_vf_f32m2_ta(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwmacc_vf_operator_0() { +uint64_t tmp[] = {1288189629u,4294967295u,1290640570u,4294967295u,1293595161u,4294967295u,1287535146u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmaccVF16VFloat32VFSFVF_TU.c b/test/codegen-golden/FwmaccVF16VFloat32VFSFVF_TU.c new file mode 100644 index 0000000..e18851f --- /dev/null +++ b/test/codegen-golden/FwmaccVF16VFloat32VFSFVF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FwmaccVF16VFloat32VFSFVF_TU -n 1 -l 7 --has-ta --has-ma -c FwmaccVF16VFloat32VFSFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfwmacc_vf_operator_0() { +float32_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwmacc_vf_f32m2_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwmacc_vf_operator_0() { +uint64_t tmp[] = {1288189629u,1267237304u,1290640570u,1258485599u,1293595161u,1244223528u,1287535146u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmaccVV16VFloat32VBVFVFVF_TAMA.c b/test/codegen-golden/FwmaccVV16VFloat32VBVFVFVF_TAMA.c new file mode 100644 index 0000000..0a411c0 --- /dev/null +++ b/test/codegen-golden/FwmaccVV16VFloat32VBVFVFVF_TAMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwmaccVV16VFloat32VBVFVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FwmaccVV16VFloat32VBVFVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmacc_vv_f32m2_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmacc_vv_operator_0() { +uint64_t tmp[] = {4294967295u,4294967295u,1291262136u,4294967295u,1285527402u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmaccVV16VFloat32VBVFVFVF_TAMU.c b/test/codegen-golden/FwmaccVV16VFloat32VBVFVFVF_TAMU.c new file mode 100644 index 0000000..59f37b7 --- /dev/null +++ b/test/codegen-golden/FwmaccVV16VFloat32VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwmaccVV16VFloat32VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FwmaccVV16VFloat32VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmacc_vv_f32m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmacc_vv_operator_0() { +uint64_t tmp[] = {1262786923u,4294967295u,1291262136u,4294967295u,1285527402u,4294967295u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmaccVV16VFloat32VBVFVFVF_TUMA.c b/test/codegen-golden/FwmaccVV16VFloat32VBVFVFVF_TUMA.c new file mode 100644 index 0000000..cffef7b --- /dev/null +++ b/test/codegen-golden/FwmaccVV16VFloat32VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwmaccVV16VFloat32VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FwmaccVV16VFloat32VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmacc_vv_f32m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmacc_vv_operator_0() { +uint64_t tmp[] = {4294967295u,1267490606u,1291262136u,1261781606u,1285527402u,1243709844u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmaccVV16VFloat32VBVFVFVF_TUMU.c b/test/codegen-golden/FwmaccVV16VFloat32VBVFVFVF_TUMU.c new file mode 100644 index 0000000..a38aa93 --- /dev/null +++ b/test/codegen-golden/FwmaccVV16VFloat32VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwmaccVV16VFloat32VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FwmaccVV16VFloat32VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmacc_vv_f32m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmacc_vv_operator_0() { +uint64_t tmp[] = {1262786923u,1267490606u,1291262136u,1261781606u,1285527402u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmaccVV16VFloat32VBVFVFVF_m.c b/test/codegen-golden/FwmaccVV16VFloat32VBVFVFVF_m.c new file mode 100644 index 0000000..3e1641e --- /dev/null +++ b/test/codegen-golden/FwmaccVV16VFloat32VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FwmaccVV16VFloat32VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FwmaccVV16VFloat32VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmacc_vv_f32m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmacc_vv_operator_0() { +uint64_t tmp[] = {1262786923u,1290808268u,1291262136u,1261781606u,1285527402u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmaccVV16VFloat32VFVFVF.c b/test/codegen-golden/FwmaccVV16VFloat32VFVFVF.c new file mode 100644 index 0000000..d641959 --- /dev/null +++ b/test/codegen-golden/FwmaccVV16VFloat32VFVFVF.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FwmaccVV16VFloat32VFVFVF -n 1 -l 7 --has-ta --has-ma -c FwmaccVV16VFloat32VFVFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwmacc_vv_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwmacc_vv_f32m2(vec_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwmacc_vv_operator_0() { +uint64_t tmp[] = {1288189629u,1301029764u,1289666290u,1292297582u,1293176985u,1262128642u,1284188538u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmaccVV16VFloat32VFVFVF_TA.c b/test/codegen-golden/FwmaccVV16VFloat32VFVFVF_TA.c new file mode 100644 index 0000000..9904b81 --- /dev/null +++ b/test/codegen-golden/FwmaccVV16VFloat32VFVFVF_TA.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FwmaccVV16VFloat32VFVFVF_TA -n 1 -l 7 --has-ta --has-ma -c FwmaccVV16VFloat32VFVFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwmacc_vv_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwmacc_vv_f32m2_ta(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwmacc_vv_operator_0() { +uint64_t tmp[] = {1288189629u,4294967295u,1289666290u,4294967295u,1293176985u,4294967295u,1284188538u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmaccVV16VFloat32VFVFVF_TU.c b/test/codegen-golden/FwmaccVV16VFloat32VFVFVF_TU.c new file mode 100644 index 0000000..db3235f --- /dev/null +++ b/test/codegen-golden/FwmaccVV16VFloat32VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FwmaccVV16VFloat32VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FwmaccVV16VFloat32VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwmacc_vv_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwmacc_vv_f32m2_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwmacc_vv_operator_0() { +uint64_t tmp[] = {1288189629u,1267237304u,1289666290u,1258485599u,1293176985u,1244223528u,1284188538u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmsacVF16VFloat32VBVFSFVF_TAMA.c b/test/codegen-golden/FwmsacVF16VFloat32VBVFSFVF_TAMA.c new file mode 100644 index 0000000..c611494 --- /dev/null +++ b/test/codegen-golden/FwmsacVF16VFloat32VBVFSFVF_TAMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwmsacVF16VFloat32VBVFSFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FwmsacVF16VFloat32VBVFSFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfwmsac_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmsac_vf_f32m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmsac_vf_operator_0() { +uint64_t tmp[] = {4294967295u,4294967295u,1291551200u,4294967295u,1295012651u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmsacVF16VFloat32VBVFSFVF_TAMU.c b/test/codegen-golden/FwmsacVF16VFloat32VBVFSFVF_TAMU.c new file mode 100644 index 0000000..fef71b6 --- /dev/null +++ b/test/codegen-golden/FwmsacVF16VFloat32VBVFSFVF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwmsacVF16VFloat32VBVFSFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FwmsacVF16VFloat32VBVFSFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfwmsac_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmsac_vf_f32m2_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmsac_vf_operator_0() { +uint64_t tmp[] = {1262786923u,4294967295u,1291551200u,4294967295u,1295012651u,4294967295u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmsacVF16VFloat32VBVFSFVF_TUMA.c b/test/codegen-golden/FwmsacVF16VFloat32VBVFSFVF_TUMA.c new file mode 100644 index 0000000..c694eb8 --- /dev/null +++ b/test/codegen-golden/FwmsacVF16VFloat32VBVFSFVF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwmsacVF16VFloat32VBVFSFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FwmsacVF16VFloat32VBVFSFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfwmsac_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmsac_vf_f32m2_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmsac_vf_operator_0() { +uint64_t tmp[] = {4294967295u,1267490606u,1291551200u,1261781606u,1295012651u,1243709844u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmsacVF16VFloat32VBVFSFVF_TUMU.c b/test/codegen-golden/FwmsacVF16VFloat32VBVFSFVF_TUMU.c new file mode 100644 index 0000000..66be3c9 --- /dev/null +++ b/test/codegen-golden/FwmsacVF16VFloat32VBVFSFVF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwmsacVF16VFloat32VBVFSFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FwmsacVF16VFloat32VBVFSFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfwmsac_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmsac_vf_f32m2_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmsac_vf_operator_0() { +uint64_t tmp[] = {1262786923u,1267490606u,1291551200u,1261781606u,1295012651u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmsacVF16VFloat32VBVFSFVF_m.c b/test/codegen-golden/FwmsacVF16VFloat32VBVFSFVF_m.c new file mode 100644 index 0000000..e039a1e --- /dev/null +++ b/test/codegen-golden/FwmsacVF16VFloat32VBVFSFVF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FwmsacVF16VFloat32VBVFSFVF_m -n 1 -l 7 --has-ta --has-ma -c FwmsacVF16VFloat32VBVFSFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfwmsac_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmsac_vf_f32m2_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmsac_vf_operator_0() { +uint64_t tmp[] = {1262786923u,1298222098u,1291551200u,1261781606u,1295012651u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmsacVF16VFloat32VFSFVF.c b/test/codegen-golden/FwmsacVF16VFloat32VFSFVF.c new file mode 100644 index 0000000..718d236 --- /dev/null +++ b/test/codegen-golden/FwmsacVF16VFloat32VFSFVF.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FwmsacVF16VFloat32VFSFVF -n 1 -l 7 --has-ta --has-ma -c FwmsacVF16VFloat32VFSFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfwmsac_vf_operator_0() { +float32_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwmsac_vf_f32m2(vec_value_0_0, placeholder1, vec_value_2_0, vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwmsac_vf_operator_0() { +uint64_t tmp[] = {1287076083u,1294413761u,1286776102u,1291923706u,1292020647u,1277488014u,1286442566u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmsacVF16VFloat32VFSFVF_TA.c b/test/codegen-golden/FwmsacVF16VFloat32VFSFVF_TA.c new file mode 100644 index 0000000..1681c2a --- /dev/null +++ b/test/codegen-golden/FwmsacVF16VFloat32VFSFVF_TA.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FwmsacVF16VFloat32VFSFVF_TA -n 1 -l 7 --has-ta --has-ma -c FwmsacVF16VFloat32VFSFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfwmsac_vf_operator_0() { +float32_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwmsac_vf_f32m2_ta(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwmsac_vf_operator_0() { +uint64_t tmp[] = {1287076083u,4294967295u,1286776102u,4294967295u,1292020647u,4294967295u,1286442566u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmsacVF16VFloat32VFSFVF_TU.c b/test/codegen-golden/FwmsacVF16VFloat32VFSFVF_TU.c new file mode 100644 index 0000000..bd73766 --- /dev/null +++ b/test/codegen-golden/FwmsacVF16VFloat32VFSFVF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FwmsacVF16VFloat32VFSFVF_TU -n 1 -l 7 --has-ta --has-ma -c FwmsacVF16VFloat32VFSFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfwmsac_vf_operator_0() { +float32_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwmsac_vf_f32m2_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwmsac_vf_operator_0() { +uint64_t tmp[] = {1287076083u,1267237304u,1286776102u,1258485599u,1292020647u,1244223528u,1286442566u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmsacVV16VFloat32VBVFVFVF_TAMA.c b/test/codegen-golden/FwmsacVV16VFloat32VBVFVFVF_TAMA.c new file mode 100644 index 0000000..4eb589c --- /dev/null +++ b/test/codegen-golden/FwmsacVV16VFloat32VBVFVFVF_TAMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwmsacVV16VFloat32VBVFVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FwmsacVV16VFloat32VBVFVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmsac_vv_f32m2_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmsac_vv_operator_0() { +uint64_t tmp[] = {4294967295u,4294967295u,1288272536u,4294967295u,1281446187u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmsacVV16VFloat32VBVFVFVF_TAMU.c b/test/codegen-golden/FwmsacVV16VFloat32VBVFVFVF_TAMU.c new file mode 100644 index 0000000..2e77fda --- /dev/null +++ b/test/codegen-golden/FwmsacVV16VFloat32VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwmsacVV16VFloat32VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FwmsacVV16VFloat32VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmsac_vv_f32m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmsac_vv_operator_0() { +uint64_t tmp[] = {1262786923u,4294967295u,1288272536u,4294967295u,1281446187u,4294967295u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmsacVV16VFloat32VBVFVFVF_TUMA.c b/test/codegen-golden/FwmsacVV16VFloat32VBVFVFVF_TUMA.c new file mode 100644 index 0000000..a00fb86 --- /dev/null +++ b/test/codegen-golden/FwmsacVV16VFloat32VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwmsacVV16VFloat32VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FwmsacVV16VFloat32VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmsac_vv_f32m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmsac_vv_operator_0() { +uint64_t tmp[] = {4294967295u,1267490606u,1288272536u,1261781606u,1281446187u,1243709844u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmsacVV16VFloat32VBVFVFVF_TUMU.c b/test/codegen-golden/FwmsacVV16VFloat32VBVFVFVF_TUMU.c new file mode 100644 index 0000000..4250d42 --- /dev/null +++ b/test/codegen-golden/FwmsacVV16VFloat32VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwmsacVV16VFloat32VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FwmsacVV16VFloat32VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmsac_vv_f32m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmsac_vv_operator_0() { +uint64_t tmp[] = {1262786923u,1267490606u,1288272536u,1261781606u,1281446187u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmsacVV16VFloat32VBVFVFVF_m.c b/test/codegen-golden/FwmsacVV16VFloat32VBVFVFVF_m.c new file mode 100644 index 0000000..a6ade52 --- /dev/null +++ b/test/codegen-golden/FwmsacVV16VFloat32VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FwmsacVV16VFloat32VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FwmsacVV16VFloat32VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmsac_vv_f32m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmsac_vv_operator_0() { +uint64_t tmp[] = {1262786923u,1286208564u,1288272536u,1261781606u,1281446187u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmsacVV16VFloat32VFVFVF.c b/test/codegen-golden/FwmsacVV16VFloat32VFVFVF.c new file mode 100644 index 0000000..0d16b64 --- /dev/null +++ b/test/codegen-golden/FwmsacVV16VFloat32VFVFVF.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FwmsacVV16VFloat32VFVFVF -n 1 -l 7 --has-ta --has-ma -c FwmsacVV16VFloat32VFVFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwmsac_vv_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwmsac_vv_f32m2(vec_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwmsac_vv_operator_0() { +uint64_t tmp[] = {1287076083u,1299588761u,1285801822u,1290603780u,1291359310u,1254867932u,1282734892u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmsacVV16VFloat32VFVFVF_TA.c b/test/codegen-golden/FwmsacVV16VFloat32VFVFVF_TA.c new file mode 100644 index 0000000..2609289 --- /dev/null +++ b/test/codegen-golden/FwmsacVV16VFloat32VFVFVF_TA.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FwmsacVV16VFloat32VFVFVF_TA -n 1 -l 7 --has-ta --has-ma -c FwmsacVV16VFloat32VFVFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwmsac_vv_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwmsac_vv_f32m2_ta(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwmsac_vv_operator_0() { +uint64_t tmp[] = {1287076083u,4294967295u,1285801822u,4294967295u,1291359310u,4294967295u,1282734892u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmsacVV16VFloat32VFVFVF_TU.c b/test/codegen-golden/FwmsacVV16VFloat32VFVFVF_TU.c new file mode 100644 index 0000000..40fafb4 --- /dev/null +++ b/test/codegen-golden/FwmsacVV16VFloat32VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FwmsacVV16VFloat32VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FwmsacVV16VFloat32VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwmsac_vv_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwmsac_vv_f32m2_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwmsac_vv_operator_0() { +uint64_t tmp[] = {1287076083u,1267237304u,1285801822u,1258485599u,1291359310u,1244223528u,1282734892u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmulVF16VFloat32VBVFSF_TAMA.c b/test/codegen-golden/FwmulVF16VFloat32VBVFSF_TAMA.c new file mode 100644 index 0000000..e429d54 --- /dev/null +++ b/test/codegen-golden/FwmulVF16VFloat32VBVFSF_TAMA.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FwmulVF16VFloat32VBVFSF_TAMA -n 1 -l 7 --has-ta --has-ma -c FwmulVF16VFloat32VBVFSF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwmul_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat32m2_t vec_value_3_0= vfwmul_vf_f32m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwmul_vf_operator_0() { +uint64_t tmp[] = {4294967295u,4294967295u,1285978408u,4294967295u,1272229144u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwmul_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmul_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwmul_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmulVF16VFloat32VBVFVFSF_TAMU.c b/test/codegen-golden/FwmulVF16VFloat32VBVFVFSF_TAMU.c new file mode 100644 index 0000000..094019c --- /dev/null +++ b/test/codegen-golden/FwmulVF16VFloat32VBVFVFSF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwmulVF16VFloat32VBVFVFSF_TAMU -n 1 -l 7 --has-ta --has-ma -c FwmulVF16VFloat32VBVFVFSF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwmul_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_4_0= vfwmul_vf_f32m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmul_vf_operator_0() { +uint64_t tmp[] = {1264903012u,4294967295u,1286657356u,4294967295u,1268615892u,4294967295u,1262786923u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmul_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmul_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmul_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmulVF16VFloat32VBVFVFSF_TUMA.c b/test/codegen-golden/FwmulVF16VFloat32VBVFVFSF_TUMA.c new file mode 100644 index 0000000..a5666e2 --- /dev/null +++ b/test/codegen-golden/FwmulVF16VFloat32VBVFVFSF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwmulVF16VFloat32VBVFVFSF_TUMA -n 1 -l 7 --has-ta --has-ma -c FwmulVF16VFloat32VBVFVFSF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwmul_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_4_0= vfwmul_vf_f32m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmul_vf_operator_0() { +uint64_t tmp[] = {4294967295u,1258373094u,1286657356u,1261516319u,1268615892u,1256322614u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmul_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmul_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmul_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmulVF16VFloat32VBVFVFSF_TUMU.c b/test/codegen-golden/FwmulVF16VFloat32VBVFVFSF_TUMU.c new file mode 100644 index 0000000..3f98ada --- /dev/null +++ b/test/codegen-golden/FwmulVF16VFloat32VBVFVFSF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwmulVF16VFloat32VBVFVFSF_TUMU -n 1 -l 7 --has-ta --has-ma -c FwmulVF16VFloat32VBVFVFSF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwmul_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_4_0= vfwmul_vf_f32m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmul_vf_operator_0() { +uint64_t tmp[] = {1264903012u,1258373094u,1286657356u,1261516319u,1268615892u,1256322614u,1262786923u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmul_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmul_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmul_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmulVF16VFloat32VBVFVFSF_m.c b/test/codegen-golden/FwmulVF16VFloat32VBVFVFSF_m.c new file mode 100644 index 0000000..2ac8887 --- /dev/null +++ b/test/codegen-golden/FwmulVF16VFloat32VBVFVFSF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FwmulVF16VFloat32VBVFVFSF_m -n 1 -l 7 --has-ta --has-ma -c FwmulVF16VFloat32VBVFVFSF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwmul_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_4_0= vfwmul_vf_f32m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmul_vf_operator_0() { +uint64_t tmp[] = {1264903012u,1286735396u,1286657356u,1261516319u,1268615892u,1256322614u,1262786923u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmul_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmul_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmul_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmulVF16VFloat32VFSF.c b/test/codegen-golden/FwmulVF16VFloat32VFSF.c new file mode 100644 index 0000000..75a59d1 --- /dev/null +++ b/test/codegen-golden/FwmulVF16VFloat32VFSF.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r FwmulVF16VFloat32VFSF -n 1 -l 7 --has-ta --has-ma -c FwmulVF16VFloat32VFSF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfwmul_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat32m2_t vec_value_2_0= vfwmul_vf_f32m2(vec_value_0_0, placeholder1, vl); + +vse32_v_f32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwmul_vf_operator_0() { +uint64_t tmp[] = {1275373464u,1292181896u,1290145744u,1283427192u,1287351912u,1269115348u,1275201776u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwmul_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmul_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwmul_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmulVF16VFloat32VFSF_TA.c b/test/codegen-golden/FwmulVF16VFloat32VFSF_TA.c new file mode 100644 index 0000000..547db33 --- /dev/null +++ b/test/codegen-golden/FwmulVF16VFloat32VFSF_TA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r FwmulVF16VFloat32VFSF_TA -n 1 -l 7 --has-ta --has-ma -c FwmulVF16VFloat32VFSF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfwmul_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat32m2_t vec_value_2_0= vfwmul_vf_f32m2_ta(vec_value_0_0, placeholder1, tail_vl); + +vse32_v_f32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwmul_vf_operator_0() { +uint64_t tmp[] = {1275373464u,4294967295u,1290145744u,4294967295u,1287351912u,4294967295u,1275201776u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwmul_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmul_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwmul_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmulVF16VFloat32VFVFSF_TU.c b/test/codegen-golden/FwmulVF16VFloat32VFVFSF_TU.c new file mode 100644 index 0000000..86adf67 --- /dev/null +++ b/test/codegen-golden/FwmulVF16VFloat32VFVFSF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FwmulVF16VFloat32VFVFSF_TU -n 1 -l 7 --has-ta --has-ma -c FwmulVF16VFloat32VFVFSF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwmul_vf_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat32m2_t vec_value_3_0= vfwmul_vf_f32m2_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwmul_vf_operator_0() { +uint64_t tmp[] = {1289700916u,1267237304u,1285978408u,1258485599u,1272229144u,1244223528u,1287632856u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwmul_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmul_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwmul_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmulVV16VFloat32VBVFVFVF_TAMU.c b/test/codegen-golden/FwmulVV16VFloat32VBVFVFVF_TAMU.c new file mode 100644 index 0000000..0adf42c --- /dev/null +++ b/test/codegen-golden/FwmulVV16VFloat32VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwmulVV16VFloat32VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FwmulVV16VFloat32VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmul_vv_f32m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmul_vv_operator_0() { +uint64_t tmp[] = {1262786923u,4294967295u,1289767336u,4294967295u,1283989504u,4294967295u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmulVV16VFloat32VBVFVFVF_TUMA.c b/test/codegen-golden/FwmulVV16VFloat32VBVFVFVF_TUMA.c new file mode 100644 index 0000000..e1ba8e6 --- /dev/null +++ b/test/codegen-golden/FwmulVV16VFloat32VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwmulVV16VFloat32VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FwmulVV16VFloat32VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmul_vv_f32m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmul_vv_operator_0() { +uint64_t tmp[] = {4294967295u,1267490606u,1289767336u,1261781606u,1283989504u,1243709844u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmulVV16VFloat32VBVFVFVF_TUMU.c b/test/codegen-golden/FwmulVV16VFloat32VBVFVFVF_TUMU.c new file mode 100644 index 0000000..600b135 --- /dev/null +++ b/test/codegen-golden/FwmulVV16VFloat32VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwmulVV16VFloat32VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FwmulVV16VFloat32VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmul_vv_f32m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmul_vv_operator_0() { +uint64_t tmp[] = {1262786923u,1267490606u,1289767336u,1261781606u,1283989504u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmulVV16VFloat32VBVFVFVF_m.c b/test/codegen-golden/FwmulVV16VFloat32VBVFVFVF_m.c new file mode 100644 index 0000000..cfee912 --- /dev/null +++ b/test/codegen-golden/FwmulVV16VFloat32VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FwmulVV16VFloat32VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FwmulVV16VFloat32VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwmul_vv_f32m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwmul_vv_operator_0() { +uint64_t tmp[] = {1262786923u,1288508416u,1289767336u,1261781606u,1283989504u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmulVV16VFloat32VBVFVF_TAMA.c b/test/codegen-golden/FwmulVV16VFloat32VBVFVF_TAMA.c new file mode 100644 index 0000000..1784877 --- /dev/null +++ b/test/codegen-golden/FwmulVV16VFloat32VBVFVF_TAMA.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FwmulVV16VFloat32VBVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FwmulVV16VFloat32VBVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwmul_vv_f32m2_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwmul_vv_operator_0() { +uint64_t tmp[] = {4294967295u,4294967295u,1287734056u,4294967295u,1292389728u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmulVV16VFloat32VFVF.c b/test/codegen-golden/FwmulVV16VFloat32VFVF.c new file mode 100644 index 0000000..2034ed8 --- /dev/null +++ b/test/codegen-golden/FwmulVV16VFloat32VFVF.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r FwmulVV16VFloat32VFVF -n 1 -l 7 --has-ta --has-ma -c FwmulVV16VFloat32VFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwmul_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat32m2_t vec_value_2_0= vfwmul_vv_f32m2(vec_value_0_0, vec_value_1_0, vl); + +vse32_v_f32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwmul_vv_operator_0() { +uint64_t tmp[] = {1275373464u,1300227024u,1291436320u,1287068848u,1292598816u,1259811320u,1274461536u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmulVV16VFloat32VFVFVF_TU.c b/test/codegen-golden/FwmulVV16VFloat32VFVFVF_TU.c new file mode 100644 index 0000000..ba58990 --- /dev/null +++ b/test/codegen-golden/FwmulVV16VFloat32VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FwmulVV16VFloat32VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FwmulVV16VFloat32VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwmul_vv_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwmul_vv_f32m2_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwmul_vv_operator_0() { +uint64_t tmp[] = {1287632856u,1267237304u,1287734056u,1258485599u,1292389728u,1244223528u,1283642248u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwmulVV16VFloat32VFVF_TA.c b/test/codegen-golden/FwmulVV16VFloat32VFVF_TA.c new file mode 100644 index 0000000..40a3fbe --- /dev/null +++ b/test/codegen-golden/FwmulVV16VFloat32VFVF_TA.c @@ -0,0 +1,85 @@ +// COMMAND: random_gen -r FwmulVV16VFloat32VFVF_TA -n 1 -l 7 --has-ta --has-ma -c FwmulVV16VFloat32VFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwmul_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat32m2_t vec_value_2_0= vfwmul_vv_f32m2_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse32_v_f32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwmul_vv_operator_0() { +uint64_t tmp[] = {1275373464u,4294967295u,1291436320u,4294967295u,1292598816u,4294967295u,1274461536u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmaccVF16VFloat32VBVFSFVF_TAMA.c b/test/codegen-golden/FwnmaccVF16VFloat32VBVFSFVF_TAMA.c new file mode 100644 index 0000000..ea87d4c --- /dev/null +++ b/test/codegen-golden/FwnmaccVF16VFloat32VBVFSFVF_TAMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwnmaccVF16VFloat32VBVFSFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FwnmaccVF16VFloat32VBVFSFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfwnmacc_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwnmacc_vf_f32m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwnmacc_vf_operator_0() { +uint64_t tmp[] = {4294967295u,4294967295u,3440676864u,4294967295u,3444034197u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwnmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwnmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmaccVF16VFloat32VBVFSFVF_TAMU.c b/test/codegen-golden/FwnmaccVF16VFloat32VBVFSFVF_TAMU.c new file mode 100644 index 0000000..895770c --- /dev/null +++ b/test/codegen-golden/FwnmaccVF16VFloat32VBVFSFVF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwnmaccVF16VFloat32VBVFSFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FwnmaccVF16VFloat32VBVFSFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfwnmacc_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwnmacc_vf_f32m2_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwnmacc_vf_operator_0() { +uint64_t tmp[] = {1262786923u,4294967295u,3440676864u,4294967295u,3444034197u,4294967295u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwnmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwnmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmaccVF16VFloat32VBVFSFVF_TUMA.c b/test/codegen-golden/FwnmaccVF16VFloat32VBVFSFVF_TUMA.c new file mode 100644 index 0000000..f2cb205 --- /dev/null +++ b/test/codegen-golden/FwnmaccVF16VFloat32VBVFSFVF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwnmaccVF16VFloat32VBVFSFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FwnmaccVF16VFloat32VBVFSFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfwnmacc_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwnmacc_vf_f32m2_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwnmacc_vf_operator_0() { +uint64_t tmp[] = {4294967295u,1267490606u,3440676864u,1261781606u,3444034197u,1243709844u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwnmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwnmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmaccVF16VFloat32VBVFSFVF_TUMU.c b/test/codegen-golden/FwnmaccVF16VFloat32VBVFSFVF_TUMU.c new file mode 100644 index 0000000..b84640c --- /dev/null +++ b/test/codegen-golden/FwnmaccVF16VFloat32VBVFSFVF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwnmaccVF16VFloat32VBVFSFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FwnmaccVF16VFloat32VBVFSFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfwnmacc_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwnmacc_vf_f32m2_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwnmacc_vf_operator_0() { +uint64_t tmp[] = {1262786923u,1267490606u,3440676864u,1261781606u,3444034197u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwnmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwnmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmaccVF16VFloat32VBVFSFVF_m.c b/test/codegen-golden/FwnmaccVF16VFloat32VBVFSFVF_m.c new file mode 100644 index 0000000..8bdceec --- /dev/null +++ b/test/codegen-golden/FwnmaccVF16VFloat32VBVFSFVF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FwnmaccVF16VFloat32VBVFSFVF_m -n 1 -l 7 --has-ta --has-ma -c FwnmaccVF16VFloat32VBVFSFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfwnmacc_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwnmacc_vf_f32m2_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwnmacc_vf_operator_0() { +uint64_t tmp[] = {1262786923u,3447861743u,3440676864u,1261781606u,3444034197u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwnmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwnmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmaccVF16VFloat32VFSFVF.c b/test/codegen-golden/FwnmaccVF16VFloat32VFSFVF.c new file mode 100644 index 0000000..513f1d6 --- /dev/null +++ b/test/codegen-golden/FwnmaccVF16VFloat32VFSFVF.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FwnmaccVF16VFloat32VFSFVF -n 1 -l 7 --has-ta --has-ma -c FwnmaccVF16VFloat32VFSFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfwnmacc_vf_operator_0() { +float32_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwnmacc_vf_f32m2(vec_value_0_0, placeholder1, vec_value_2_0, vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwnmacc_vf_operator_0() { +uint64_t tmp[] = {3435673277u,3444133935u,3438124218u,3440480230u,3441078809u,3426358930u,3435018794u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwnmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwnmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmaccVF16VFloat32VFSFVF_TA.c b/test/codegen-golden/FwnmaccVF16VFloat32VFSFVF_TA.c new file mode 100644 index 0000000..85e7ac2 --- /dev/null +++ b/test/codegen-golden/FwnmaccVF16VFloat32VFSFVF_TA.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FwnmaccVF16VFloat32VFSFVF_TA -n 1 -l 7 --has-ta --has-ma -c FwnmaccVF16VFloat32VFSFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfwnmacc_vf_operator_0() { +float32_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwnmacc_vf_f32m2_ta(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwnmacc_vf_operator_0() { +uint64_t tmp[] = {3435673277u,4294967295u,3438124218u,4294967295u,3441078809u,4294967295u,3435018794u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwnmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwnmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmaccVF16VFloat32VFSFVF_TU.c b/test/codegen-golden/FwnmaccVF16VFloat32VFSFVF_TU.c new file mode 100644 index 0000000..59baa82 --- /dev/null +++ b/test/codegen-golden/FwnmaccVF16VFloat32VFSFVF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FwnmaccVF16VFloat32VFSFVF_TU -n 1 -l 7 --has-ta --has-ma -c FwnmaccVF16VFloat32VFSFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfwnmacc_vf_operator_0() { +float32_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwnmacc_vf_f32m2_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwnmacc_vf_operator_0() { +uint64_t tmp[] = {3435673277u,1267237304u,3438124218u,1258485599u,3441078809u,1244223528u,3435018794u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwnmacc_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmacc_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwnmacc_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmaccVV16VFloat32VBVFVFVF_TAMA.c b/test/codegen-golden/FwnmaccVV16VFloat32VBVFVFVF_TAMA.c new file mode 100644 index 0000000..957d4e8 --- /dev/null +++ b/test/codegen-golden/FwnmaccVV16VFloat32VBVFVFVF_TAMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwnmaccVV16VFloat32VBVFVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FwnmaccVV16VFloat32VBVFVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwnmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwnmacc_vv_f32m2_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwnmacc_vv_operator_0() { +uint64_t tmp[] = {4294967295u,4294967295u,3438745784u,4294967295u,3433011050u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwnmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwnmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmaccVV16VFloat32VBVFVFVF_TAMU.c b/test/codegen-golden/FwnmaccVV16VFloat32VBVFVFVF_TAMU.c new file mode 100644 index 0000000..52e0f28 --- /dev/null +++ b/test/codegen-golden/FwnmaccVV16VFloat32VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwnmaccVV16VFloat32VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FwnmaccVV16VFloat32VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwnmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwnmacc_vv_f32m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwnmacc_vv_operator_0() { +uint64_t tmp[] = {1262786923u,4294967295u,3438745784u,4294967295u,3433011050u,4294967295u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwnmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwnmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmaccVV16VFloat32VBVFVFVF_TUMA.c b/test/codegen-golden/FwnmaccVV16VFloat32VBVFVFVF_TUMA.c new file mode 100644 index 0000000..00ad55e --- /dev/null +++ b/test/codegen-golden/FwnmaccVV16VFloat32VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwnmaccVV16VFloat32VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FwnmaccVV16VFloat32VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwnmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwnmacc_vv_f32m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwnmacc_vv_operator_0() { +uint64_t tmp[] = {4294967295u,1267490606u,3438745784u,1261781606u,3433011050u,1243709844u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwnmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwnmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmaccVV16VFloat32VBVFVFVF_TUMU.c b/test/codegen-golden/FwnmaccVV16VFloat32VBVFVFVF_TUMU.c new file mode 100644 index 0000000..e2cc05b --- /dev/null +++ b/test/codegen-golden/FwnmaccVV16VFloat32VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwnmaccVV16VFloat32VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FwnmaccVV16VFloat32VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwnmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwnmacc_vv_f32m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwnmacc_vv_operator_0() { +uint64_t tmp[] = {1262786923u,1267490606u,3438745784u,1261781606u,3433011050u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwnmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwnmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmaccVV16VFloat32VBVFVFVF_m.c b/test/codegen-golden/FwnmaccVV16VFloat32VBVFVFVF_m.c new file mode 100644 index 0000000..014899d --- /dev/null +++ b/test/codegen-golden/FwnmaccVV16VFloat32VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FwnmaccVV16VFloat32VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FwnmaccVV16VFloat32VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwnmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwnmacc_vv_f32m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwnmacc_vv_operator_0() { +uint64_t tmp[] = {1262786923u,3438291916u,3438745784u,1261781606u,3433011050u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwnmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwnmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmaccVV16VFloat32VFVFVF.c b/test/codegen-golden/FwnmaccVV16VFloat32VFVFVF.c new file mode 100644 index 0000000..7521694 --- /dev/null +++ b/test/codegen-golden/FwnmaccVV16VFloat32VFVFVF.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FwnmaccVV16VFloat32VFVFVF -n 1 -l 7 --has-ta --has-ma -c FwnmaccVV16VFloat32VFVFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwnmacc_vv_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwnmacc_vv_f32m2(vec_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwnmacc_vv_operator_0() { +uint64_t tmp[] = {3435673277u,3448513412u,3437149938u,3439781230u,3440660633u,3409612290u,3431672186u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwnmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwnmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmaccVV16VFloat32VFVFVF_TA.c b/test/codegen-golden/FwnmaccVV16VFloat32VFVFVF_TA.c new file mode 100644 index 0000000..3c50364 --- /dev/null +++ b/test/codegen-golden/FwnmaccVV16VFloat32VFVFVF_TA.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FwnmaccVV16VFloat32VFVFVF_TA -n 1 -l 7 --has-ta --has-ma -c FwnmaccVV16VFloat32VFVFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwnmacc_vv_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwnmacc_vv_f32m2_ta(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwnmacc_vv_operator_0() { +uint64_t tmp[] = {3435673277u,4294967295u,3437149938u,4294967295u,3440660633u,4294967295u,3431672186u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwnmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwnmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmaccVV16VFloat32VFVFVF_TU.c b/test/codegen-golden/FwnmaccVV16VFloat32VFVFVF_TU.c new file mode 100644 index 0000000..5483213 --- /dev/null +++ b/test/codegen-golden/FwnmaccVV16VFloat32VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FwnmaccVV16VFloat32VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FwnmaccVV16VFloat32VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwnmacc_vv_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwnmacc_vv_f32m2_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwnmacc_vv_operator_0() { +uint64_t tmp[] = {3435673277u,1267237304u,3437149938u,1258485599u,3440660633u,1244223528u,3431672186u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwnmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwnmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmsacVF16VFloat32VBVFSFVF_TAMA.c b/test/codegen-golden/FwnmsacVF16VFloat32VBVFSFVF_TAMA.c new file mode 100644 index 0000000..4567727 --- /dev/null +++ b/test/codegen-golden/FwnmsacVF16VFloat32VBVFSFVF_TAMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwnmsacVF16VFloat32VBVFSFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FwnmsacVF16VFloat32VBVFSFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfwnmsac_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwnmsac_vf_f32m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwnmsac_vf_operator_0() { +uint64_t tmp[] = {4294967295u,4294967295u,3439034848u,4294967295u,3442496299u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwnmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwnmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmsacVF16VFloat32VBVFSFVF_TAMU.c b/test/codegen-golden/FwnmsacVF16VFloat32VBVFSFVF_TAMU.c new file mode 100644 index 0000000..85c79a0 --- /dev/null +++ b/test/codegen-golden/FwnmsacVF16VFloat32VBVFSFVF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwnmsacVF16VFloat32VBVFSFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FwnmsacVF16VFloat32VBVFSFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfwnmsac_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwnmsac_vf_f32m2_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwnmsac_vf_operator_0() { +uint64_t tmp[] = {1262786923u,4294967295u,3439034848u,4294967295u,3442496299u,4294967295u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwnmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwnmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmsacVF16VFloat32VBVFSFVF_TUMA.c b/test/codegen-golden/FwnmsacVF16VFloat32VBVFSFVF_TUMA.c new file mode 100644 index 0000000..152521f --- /dev/null +++ b/test/codegen-golden/FwnmsacVF16VFloat32VBVFSFVF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwnmsacVF16VFloat32VBVFSFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FwnmsacVF16VFloat32VBVFSFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfwnmsac_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwnmsac_vf_f32m2_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwnmsac_vf_operator_0() { +uint64_t tmp[] = {4294967295u,1267490606u,3439034848u,1261781606u,3442496299u,1243709844u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwnmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwnmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmsacVF16VFloat32VBVFSFVF_TUMU.c b/test/codegen-golden/FwnmsacVF16VFloat32VBVFSFVF_TUMU.c new file mode 100644 index 0000000..88b03a4 --- /dev/null +++ b/test/codegen-golden/FwnmsacVF16VFloat32VBVFSFVF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwnmsacVF16VFloat32VBVFSFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FwnmsacVF16VFloat32VBVFSFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfwnmsac_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwnmsac_vf_f32m2_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwnmsac_vf_operator_0() { +uint64_t tmp[] = {1262786923u,1267490606u,3439034848u,1261781606u,3442496299u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwnmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwnmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmsacVF16VFloat32VBVFSFVF_m.c b/test/codegen-golden/FwnmsacVF16VFloat32VBVFSFVF_m.c new file mode 100644 index 0000000..1475d54 --- /dev/null +++ b/test/codegen-golden/FwnmsacVF16VFloat32VBVFSFVF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FwnmsacVF16VFloat32VBVFSFVF_m -n 1 -l 7 --has-ta --has-ma -c FwnmsacVF16VFloat32VBVFSFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 29733; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vfwnmsac_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwnmsac_vf_f32m2_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwnmsac_vf_operator_0() { +uint64_t tmp[] = {1262786923u,3445705746u,3439034848u,1261781606u,3442496299u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwnmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwnmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmsacVF16VFloat32VFSFVF.c b/test/codegen-golden/FwnmsacVF16VFloat32VFSFVF.c new file mode 100644 index 0000000..5fd5c5b --- /dev/null +++ b/test/codegen-golden/FwnmsacVF16VFloat32VFSFVF.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FwnmsacVF16VFloat32VFSFVF -n 1 -l 7 --has-ta --has-ma -c FwnmsacVF16VFloat32VFSFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfwnmsac_vf_operator_0() { +float32_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwnmsac_vf_f32m2(vec_value_0_0, placeholder1, vec_value_2_0, vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwnmsac_vf_operator_0() { +uint64_t tmp[] = {3434559731u,3441897409u,3434259750u,3439407354u,3439504295u,3424971662u,3433926214u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwnmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwnmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmsacVF16VFloat32VFSFVF_TA.c b/test/codegen-golden/FwnmsacVF16VFloat32VFSFVF_TA.c new file mode 100644 index 0000000..e3bb62e --- /dev/null +++ b/test/codegen-golden/FwnmsacVF16VFloat32VFSFVF_TA.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FwnmsacVF16VFloat32VFSFVF_TA -n 1 -l 7 --has-ta --has-ma -c FwnmsacVF16VFloat32VFSFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfwnmsac_vf_operator_0() { +float32_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwnmsac_vf_f32m2_ta(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwnmsac_vf_operator_0() { +uint64_t tmp[] = {3434559731u,4294967295u,3434259750u,4294967295u,3439504295u,4294967295u,3433926214u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwnmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwnmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmsacVF16VFloat32VFSFVF_TU.c b/test/codegen-golden/FwnmsacVF16VFloat32VFSFVF_TU.c new file mode 100644 index 0000000..1bcf4ec --- /dev/null +++ b/test/codegen-golden/FwnmsacVF16VFloat32VFSFVF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FwnmsacVF16VFloat32VFSFVF_TU -n 1 -l 7 --has-ta --has-ma -c FwnmsacVF16VFloat32VFSFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 29258; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfwnmsac_vf_operator_0() { +float32_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwnmsac_vf_f32m2_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwnmsac_vf_operator_0() { +uint64_t tmp[] = {3434559731u,1267237304u,3434259750u,1258485599u,3439504295u,1244223528u,3433926214u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwnmsac_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmsac_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwnmsac_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmsacVV16VFloat32VBVFVFVF_TAMA.c b/test/codegen-golden/FwnmsacVV16VFloat32VBVFVFVF_TAMA.c new file mode 100644 index 0000000..273b21d --- /dev/null +++ b/test/codegen-golden/FwnmsacVV16VFloat32VBVFVFVF_TAMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwnmsacVV16VFloat32VBVFVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FwnmsacVV16VFloat32VBVFVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwnmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwnmsac_vv_f32m2_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwnmsac_vv_operator_0() { +uint64_t tmp[] = {4294967295u,4294967295u,3435756184u,4294967295u,3428929835u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmsacVV16VFloat32VBVFVFVF_TAMU.c b/test/codegen-golden/FwnmsacVV16VFloat32VBVFVFVF_TAMU.c new file mode 100644 index 0000000..7b34f27 --- /dev/null +++ b/test/codegen-golden/FwnmsacVV16VFloat32VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwnmsacVV16VFloat32VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FwnmsacVV16VFloat32VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwnmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwnmsac_vv_f32m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwnmsac_vv_operator_0() { +uint64_t tmp[] = {1262786923u,4294967295u,3435756184u,4294967295u,3428929835u,4294967295u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmsacVV16VFloat32VBVFVFVF_TUMA.c b/test/codegen-golden/FwnmsacVV16VFloat32VBVFVFVF_TUMA.c new file mode 100644 index 0000000..b00dce6 --- /dev/null +++ b/test/codegen-golden/FwnmsacVV16VFloat32VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwnmsacVV16VFloat32VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FwnmsacVV16VFloat32VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwnmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwnmsac_vv_f32m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwnmsac_vv_operator_0() { +uint64_t tmp[] = {4294967295u,1267490606u,3435756184u,1261781606u,3428929835u,1243709844u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmsacVV16VFloat32VBVFVFVF_TUMU.c b/test/codegen-golden/FwnmsacVV16VFloat32VBVFVFVF_TUMU.c new file mode 100644 index 0000000..104b642 --- /dev/null +++ b/test/codegen-golden/FwnmsacVV16VFloat32VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwnmsacVV16VFloat32VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FwnmsacVV16VFloat32VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwnmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwnmsac_vv_f32m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwnmsac_vv_operator_0() { +uint64_t tmp[] = {1262786923u,1267490606u,3435756184u,1261781606u,3428929835u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmsacVV16VFloat32VBVFVFVF_m.c b/test/codegen-golden/FwnmsacVV16VFloat32VBVFVFVF_m.c new file mode 100644 index 0000000..6372398 --- /dev/null +++ b/test/codegen-golden/FwnmsacVV16VFloat32VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FwnmsacVV16VFloat32VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FwnmsacVV16VFloat32VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwnmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwnmsac_vv_f32m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwnmsac_vv_operator_0() { +uint64_t tmp[] = {1262786923u,3433692212u,3435756184u,1261781606u,3428929835u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmsacVV16VFloat32VFVFVF.c b/test/codegen-golden/FwnmsacVV16VFloat32VFVFVF.c new file mode 100644 index 0000000..e4b693a --- /dev/null +++ b/test/codegen-golden/FwnmsacVV16VFloat32VFVFVF.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FwnmsacVV16VFloat32VFVFVF -n 1 -l 7 --has-ta --has-ma -c FwnmsacVV16VFloat32VFVFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwnmsac_vv_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwnmsac_vv_f32m2(vec_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwnmsac_vv_operator_0() { +uint64_t tmp[] = {3434559731u,3447072409u,3433285470u,3438087428u,3438842958u,3402351580u,3430218540u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmsacVV16VFloat32VFVFVF_TA.c b/test/codegen-golden/FwnmsacVV16VFloat32VFVFVF_TA.c new file mode 100644 index 0000000..7faceab --- /dev/null +++ b/test/codegen-golden/FwnmsacVV16VFloat32VFVFVF_TA.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FwnmsacVV16VFloat32VFVFVF_TA -n 1 -l 7 --has-ta --has-ma -c FwnmsacVV16VFloat32VFVFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwnmsac_vv_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwnmsac_vv_f32m2_ta(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwnmsac_vv_operator_0() { +uint64_t tmp[] = {3434559731u,4294967295u,3433285470u,4294967295u,3438842958u,4294967295u,3430218540u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwnmsacVV16VFloat32VFVFVF_TU.c b/test/codegen-golden/FwnmsacVV16VFloat32VFVFVF_TU.c new file mode 100644 index 0000000..cbf2ec4 --- /dev/null +++ b/test/codegen-golden/FwnmsacVV16VFloat32VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FwnmsacVV16VFloat32VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FwnmsacVV16VFloat32VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwnmsac_vv_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwnmsac_vv_f32m2_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwnmsac_vv_operator_0() { +uint64_t tmp[] = {3434559731u,1267237304u,3433285470u,1258485599u,3438842958u,1244223528u,3430218540u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwredosumVS16SFloat32VBVFVF_TUM.c b/test/codegen-golden/FwredosumVS16SFloat32VBVFVF_TUM.c new file mode 100644 index 0000000..1571480 --- /dev/null +++ b/test/codegen-golden/FwredosumVS16SFloat32VBVFVF_TUM.c @@ -0,0 +1,121 @@ +// COMMAND: random_gen -r FwredosumVS16SFloat32VBVFVF_TUM -n 1 -l 7 --has-ta --has-ma -c FwredosumVS16SFloat32VBVFVF_TUM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwredosum_vs_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; +int placeholder4 = 7; + +vfloat32m1_t placeholder5= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vfloat32m1_t placeholder6= vmv_v_v_f32m1(placeholder5, vsetvlmax_e32m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_3, value_1, sizeof(value_3)); +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +placeholder6 = vfwredosum_vs_f16m1_f32m1_tum(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder6, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +float32_t *placeholder7 = value_3; +*placeholder7= vfmv_f_s_f32m1_f32(placeholder6); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwredosum_vs_operator_0() { +uint64_t tmp[] = {1191776256u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwredosum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwredosum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwredosum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwredosumVS16SFloat32VBVF_TAM.c b/test/codegen-golden/FwredosumVS16SFloat32VBVF_TAM.c new file mode 100644 index 0000000..c0601e1 --- /dev/null +++ b/test/codegen-golden/FwredosumVS16SFloat32VBVF_TAM.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r FwredosumVS16SFloat32VBVF_TAM -n 1 -l 7 --has-ta --has-ma -c FwredosumVS16SFloat32VBVF_TAM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwredosum_vs_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +int placeholder3 = 7; + +vfloat32m1_t placeholder4= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vfloat32m1_t placeholder5= vmv_v_v_f32m1(placeholder4, vsetvlmax_e32m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_2, 0xff, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +placeholder5 = vfwredosum_vs_f16m1_f32m1_tam(mask_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +float32_t *placeholder6 = value_2; +*placeholder6= vfmv_f_s_f32m1_f32(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwredosum_vs_operator_0() { +uint64_t tmp[] = {1191776256u,4294967295u,4294967295u,4294967295u,4294967295u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwredosum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwredosum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwredosum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwredosumVS16SFloat32VBVF_m.c b/test/codegen-golden/FwredosumVS16SFloat32VBVF_m.c new file mode 100644 index 0000000..4987030 --- /dev/null +++ b/test/codegen-golden/FwredosumVS16SFloat32VBVF_m.c @@ -0,0 +1,78 @@ +// COMMAND: random_gen -r FwredosumVS16SFloat32VBVF_m -n 1 -l 7 --has-ta --has-ma -c FwredosumVS16SFloat32VBVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float32_t value_2; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwredosum_vs_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = &value_2; +int placeholder3 = 7; + +vfloat32m1_t placeholder4= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vfloat32m1_t placeholder5= vmv_v_v_f32m1(placeholder4, vsetvlmax_e32m1()); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +placeholder5 = vfwredosum_vs_f16m1_f32m1_m (mask_value_0_0, placeholder5, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +} +float32_t *placeholder6 = &value_2; +*placeholder6= vfmv_f_s_f32m1_f32(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwredosum_vs_operator_0() { +uint32_t tmp = 1191776256u; +union { float32_t f32; uint32_t u32; } converter, converter2; +converter.u32 = tmp; +converter2.f32 = value_2; +if(converter.f32 != value_2 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwredosum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwredosum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwredosum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwredosumVS16SFloat32VF.c b/test/codegen-golden/FwredosumVS16SFloat32VF.c new file mode 100644 index 0000000..b7184e2 --- /dev/null +++ b/test/codegen-golden/FwredosumVS16SFloat32VF.c @@ -0,0 +1,62 @@ +// COMMAND: random_gen -r FwredosumVS16SFloat32VF -n 1 -l 7 --has-ta --has-ma -c FwredosumVS16SFloat32VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float32_t value_1; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfwredosum_vs_operator_0() { +float16_t *placeholder0 = value_0; +float32_t *placeholder1 = &value_1; +int placeholder2 = 7; + +vfloat32m1_t placeholder3= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vfloat32m1_t placeholder4= vmv_v_v_f32m1(placeholder3, vsetvlmax_e32m1()); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +placeholder4 = vfwredosum_vs_f16m1_f32m1(placeholder4, vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +} +float32_t *placeholder5 = &value_1; +*placeholder5= vfmv_f_s_f32m1_f32(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfwredosum_vs_operator_0() { +uint32_t tmp = 1199645440u; +union { float32_t f32; uint32_t u32; } converter, converter2; +converter.u32 = tmp; +converter2.f32 = value_1; +if(converter.f32 != value_1 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfwredosum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwredosum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfwredosum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwredosumVS16SFloat32VFVF_TU.c b/test/codegen-golden/FwredosumVS16SFloat32VFVF_TU.c new file mode 100644 index 0000000..c2c617d --- /dev/null +++ b/test/codegen-golden/FwredosumVS16SFloat32VFVF_TU.c @@ -0,0 +1,105 @@ +// COMMAND: random_gen -r FwredosumVS16SFloat32VFVF_TU -n 1 -l 7 --has-ta --has-ma -c FwredosumVS16SFloat32VFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwredosum_vs_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +int placeholder3 = 7; + +vfloat32m1_t placeholder4= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vfloat32m1_t placeholder5= vmv_v_v_f32m1(placeholder4, vsetvlmax_e32m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_2, value_0, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat32m1_t vec_value_0_0= vle32_v_f32m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +placeholder5 = vfwredosum_vs_f16m1_f32m1_tu(vec_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +float32_t *placeholder6 = value_2; +*placeholder6= vfmv_f_s_f32m1_f32(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwredosum_vs_operator_0() { +uint64_t tmp[] = {1199447040u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwredosum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwredosum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwredosum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwredosumVS16SFloat32VF_TA.c b/test/codegen-golden/FwredosumVS16SFloat32VF_TA.c new file mode 100644 index 0000000..0998dfd --- /dev/null +++ b/test/codegen-golden/FwredosumVS16SFloat32VF_TA.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r FwredosumVS16SFloat32VF_TA -n 1 -l 7 --has-ta --has-ma -c FwredosumVS16SFloat32VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float32_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfwredosum_vs_operator_0() { +float16_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +int placeholder2 = 7; + +vfloat32m1_t placeholder3= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vfloat32m1_t placeholder4= vmv_v_v_f32m1(placeholder3, vsetvlmax_e32m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_1, 0xff, sizeof(value_1)); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +placeholder4 = vfwredosum_vs_f16m1_f32m1_ta(vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +placeholder1 += vl; +} +float32_t *placeholder5 = value_1; +*placeholder5= vfmv_f_s_f32m1_f32(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfwredosum_vs_operator_0() { +uint64_t tmp[] = {1199645440u,4294967295u,4294967295u,4294967295u,4294967295u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_1[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfwredosum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwredosum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfwredosum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwredusumVS16SFloat32VBVFVF_TUM.c b/test/codegen-golden/FwredusumVS16SFloat32VBVFVF_TUM.c new file mode 100644 index 0000000..772cdfb --- /dev/null +++ b/test/codegen-golden/FwredusumVS16SFloat32VBVFVF_TUM.c @@ -0,0 +1,121 @@ +// COMMAND: random_gen -r FwredusumVS16SFloat32VBVFVF_TUM -n 1 -l 7 --has-ta --has-ma -c FwredusumVS16SFloat32VBVFVF_TUM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwredusum_vs_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; +int placeholder4 = 7; + +vfloat32m1_t placeholder5= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vfloat32m1_t placeholder6= vmv_v_v_f32m1(placeholder5, vsetvlmax_e32m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_3, value_1, sizeof(value_3)); +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +placeholder6 = vfwredusum_vs_f16m1_f32m1_tum(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder6, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +float32_t *placeholder7 = value_3; +*placeholder7= vfmv_f_s_f32m1_f32(placeholder6); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwredusum_vs_operator_0() { +uint64_t tmp[] = {1191776256u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwredusum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwredusum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwredusum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwredusumVS16SFloat32VBVF_TAM.c b/test/codegen-golden/FwredusumVS16SFloat32VBVF_TAM.c new file mode 100644 index 0000000..5b31870 --- /dev/null +++ b/test/codegen-golden/FwredusumVS16SFloat32VBVF_TAM.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r FwredusumVS16SFloat32VBVF_TAM -n 1 -l 7 --has-ta --has-ma -c FwredusumVS16SFloat32VBVF_TAM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwredusum_vs_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +int placeholder3 = 7; + +vfloat32m1_t placeholder4= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vfloat32m1_t placeholder5= vmv_v_v_f32m1(placeholder4, vsetvlmax_e32m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_2, 0xff, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +placeholder5 = vfwredusum_vs_f16m1_f32m1_tam(mask_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +float32_t *placeholder6 = value_2; +*placeholder6= vfmv_f_s_f32m1_f32(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwredusum_vs_operator_0() { +uint64_t tmp[] = {1191776256u,4294967295u,4294967295u,4294967295u,4294967295u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwredusum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwredusum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwredusum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwredusumVS16SFloat32VBVF_m.c b/test/codegen-golden/FwredusumVS16SFloat32VBVF_m.c new file mode 100644 index 0000000..c5d9a67 --- /dev/null +++ b/test/codegen-golden/FwredusumVS16SFloat32VBVF_m.c @@ -0,0 +1,78 @@ +// COMMAND: random_gen -r FwredusumVS16SFloat32VBVF_m -n 1 -l 7 --has-ta --has-ma -c FwredusumVS16SFloat32VBVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float32_t value_2; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwredusum_vs_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = &value_2; +int placeholder3 = 7; + +vfloat32m1_t placeholder4= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vfloat32m1_t placeholder5= vmv_v_v_f32m1(placeholder4, vsetvlmax_e32m1()); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +placeholder5 = vfwredusum_vs_f16m1_f32m1_m (mask_value_0_0, placeholder5, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +} +float32_t *placeholder6 = &value_2; +*placeholder6= vfmv_f_s_f32m1_f32(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwredusum_vs_operator_0() { +uint32_t tmp = 1191776256u; +union { float32_t f32; uint32_t u32; } converter, converter2; +converter.u32 = tmp; +converter2.f32 = value_2; +if(converter.f32 != value_2 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwredusum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwredusum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwredusum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwredusumVS16SFloat32VF.c b/test/codegen-golden/FwredusumVS16SFloat32VF.c new file mode 100644 index 0000000..e54065a --- /dev/null +++ b/test/codegen-golden/FwredusumVS16SFloat32VF.c @@ -0,0 +1,62 @@ +// COMMAND: random_gen -r FwredusumVS16SFloat32VF -n 1 -l 7 --has-ta --has-ma -c FwredusumVS16SFloat32VF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float32_t value_1; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfwredusum_vs_operator_0() { +float16_t *placeholder0 = value_0; +float32_t *placeholder1 = &value_1; +int placeholder2 = 7; + +vfloat32m1_t placeholder3= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vfloat32m1_t placeholder4= vmv_v_v_f32m1(placeholder3, vsetvlmax_e32m1()); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +placeholder4 = vfwredusum_vs_f16m1_f32m1(placeholder4, vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +} +float32_t *placeholder5 = &value_1; +*placeholder5= vfmv_f_s_f32m1_f32(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfwredusum_vs_operator_0() { +uint32_t tmp = 1199645440u; +union { float32_t f32; uint32_t u32; } converter, converter2; +converter.u32 = tmp; +converter2.f32 = value_1; +if(converter.f32 != value_1 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfwredusum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwredusum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfwredusum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwredusumVS16SFloat32VFVF_TU.c b/test/codegen-golden/FwredusumVS16SFloat32VFVF_TU.c new file mode 100644 index 0000000..40a41fb --- /dev/null +++ b/test/codegen-golden/FwredusumVS16SFloat32VFVF_TU.c @@ -0,0 +1,105 @@ +// COMMAND: random_gen -r FwredusumVS16SFloat32VFVF_TU -n 1 -l 7 --has-ta --has-ma -c FwredusumVS16SFloat32VFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwredusum_vs_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +int placeholder3 = 7; + +vfloat32m1_t placeholder4= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vfloat32m1_t placeholder5= vmv_v_v_f32m1(placeholder4, vsetvlmax_e32m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_2, value_0, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat32m1_t vec_value_0_0= vle32_v_f32m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +placeholder5 = vfwredusum_vs_f16m1_f32m1_tu(vec_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +float32_t *placeholder6 = value_2; +*placeholder6= vfmv_f_s_f32m1_f32(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwredusum_vs_operator_0() { +uint64_t tmp[] = {1199447040u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwredusum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwredusum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwredusum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwredusumVS16SFloat32VF_TA.c b/test/codegen-golden/FwredusumVS16SFloat32VF_TA.c new file mode 100644 index 0000000..e41700e --- /dev/null +++ b/test/codegen-golden/FwredusumVS16SFloat32VF_TA.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r FwredusumVS16SFloat32VF_TA -n 1 -l 7 --has-ta --has-ma -c FwredusumVS16SFloat32VF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float32_t value_1[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vfwredusum_vs_operator_0() { +float16_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +int placeholder2 = 7; + +vfloat32m1_t placeholder3= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vfloat32m1_t placeholder4= vmv_v_v_f32m1(placeholder3, vsetvlmax_e32m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_1, 0xff, sizeof(value_1)); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +placeholder4 = vfwredusum_vs_f16m1_f32m1_ta(vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +placeholder1 += vl; +} +float32_t *placeholder5 = value_1; +*placeholder5= vfmv_f_s_f32m1_f32(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vfwredusum_vs_operator_0() { +uint64_t tmp[] = {1199645440u,4294967295u,4294967295u,4294967295u,4294967295u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_1[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vfwredusum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwredusum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vfwredusum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubVF16VFloat32VBVFSF_TAMA.c b/test/codegen-golden/FwsubVF16VFloat32VBVFSF_TAMA.c new file mode 100644 index 0000000..933f12c --- /dev/null +++ b/test/codegen-golden/FwsubVF16VFloat32VBVFSF_TAMA.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FwsubVF16VFloat32VBVFSF_TAMA -n 1 -l 7 --has-ta --has-ma -c FwsubVF16VFloat32VBVFSF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat32m2_t vec_value_3_0= vfwsub_vf_f32m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwsub_vf_operator_0() { +uint64_t tmp[] = {4294967295u,4294967295u,1163083776u,4294967295u,3313778688u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubVF16VFloat32VBVFVFSF_TAMU.c b/test/codegen-golden/FwsubVF16VFloat32VBVFVFSF_TAMU.c new file mode 100644 index 0000000..8178ca1 --- /dev/null +++ b/test/codegen-golden/FwsubVF16VFloat32VBVFVFSF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwsubVF16VFloat32VBVFVFSF_TAMU -n 1 -l 7 --has-ta --has-ma -c FwsubVF16VFloat32VBVFVFSF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_4_0= vfwsub_vf_f32m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwsub_vf_operator_0() { +uint64_t tmp[] = {1264903012u,4294967295u,1165934592u,4294967295u,3315675136u,4294967295u,1262786923u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubVF16VFloat32VBVFVFSF_TUMA.c b/test/codegen-golden/FwsubVF16VFloat32VBVFVFSF_TUMA.c new file mode 100644 index 0000000..1ff3322 --- /dev/null +++ b/test/codegen-golden/FwsubVF16VFloat32VBVFVFSF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwsubVF16VFloat32VBVFVFSF_TUMA -n 1 -l 7 --has-ta --has-ma -c FwsubVF16VFloat32VBVFVFSF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_4_0= vfwsub_vf_f32m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwsub_vf_operator_0() { +uint64_t tmp[] = {4294967295u,1258373094u,1165934592u,1261516319u,3315675136u,1256322614u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubVF16VFloat32VBVFVFSF_TUMU.c b/test/codegen-golden/FwsubVF16VFloat32VBVFVFSF_TUMU.c new file mode 100644 index 0000000..1f59880 --- /dev/null +++ b/test/codegen-golden/FwsubVF16VFloat32VBVFVFSF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwsubVF16VFloat32VBVFVFSF_TUMU -n 1 -l 7 --has-ta --has-ma -c FwsubVF16VFloat32VBVFVFSF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_4_0= vfwsub_vf_f32m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwsub_vf_operator_0() { +uint64_t tmp[] = {1264903012u,1258373094u,1165934592u,1261516319u,3315675136u,1256322614u,1262786923u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubVF16VFloat32VBVFVFSF_m.c b/test/codegen-golden/FwsubVF16VFloat32VBVFVFSF_m.c new file mode 100644 index 0000000..779bf64 --- /dev/null +++ b/test/codegen-golden/FwsubVF16VFloat32VBVFVFSF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FwsubVF16VFloat32VBVFVFSF_m -n 1 -l 7 --has-ta --has-ma -c FwsubVF16VFloat32VBVFVFSF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwsub_vf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_4_0= vfwsub_vf_f32m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwsub_vf_operator_0() { +uint64_t tmp[] = {1264903012u,1166139392u,1165934592u,1261516319u,3315675136u,1256322614u,1262786923u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubVF16VFloat32VFSF.c b/test/codegen-golden/FwsubVF16VFloat32VFSF.c new file mode 100644 index 0000000..7bca1a3 --- /dev/null +++ b/test/codegen-golden/FwsubVF16VFloat32VFSF.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r FwsubVF16VFloat32VFSF -n 1 -l 7 --has-ta --has-ma -c FwsubVF16VFloat32VFSF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfwsub_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat32m2_t vec_value_2_0= vfwsub_vf_f32m2(vec_value_0_0, placeholder1, vl); + +vse32_v_f32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwsub_vf_operator_0() { +uint64_t tmp[] = {3310436352u,1176342528u,1173299200u,1145241600u,1167433728u,3315412992u,3310796800u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubVF16VFloat32VFSF_TA.c b/test/codegen-golden/FwsubVF16VFloat32VFSF_TA.c new file mode 100644 index 0000000..14497c4 --- /dev/null +++ b/test/codegen-golden/FwsubVF16VFloat32VFSF_TA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r FwsubVF16VFloat32VFSF_TA -n 1 -l 7 --has-ta --has-ma -c FwsubVF16VFloat32VFSF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfwsub_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vfloat32m2_t vec_value_2_0= vfwsub_vf_f32m2_ta(vec_value_0_0, placeholder1, tail_vl); + +vse32_v_f32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwsub_vf_operator_0() { +uint64_t tmp[] = {3310436352u,4294967295u,1173299200u,4294967295u,1167433728u,4294967295u,3310796800u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubVF16VFloat32VFVFSF_TU.c b/test/codegen-golden/FwsubVF16VFloat32VFVFSF_TU.c new file mode 100644 index 0000000..2b8e06a --- /dev/null +++ b/test/codegen-golden/FwsubVF16VFloat32VFVFSF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FwsubVF16VFloat32VFVFSF_TU -n 1 -l 7 --has-ta --has-ma -c FwsubVF16VFloat32VFVFSF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwsub_vf_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat32m2_t vec_value_3_0= vfwsub_vf_f32m2_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwsub_vf_operator_0() { +uint64_t tmp[] = {1172365312u,1267237304u,1163083776u,1258485599u,3313778688u,1244223528u,1168023552u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwsub_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwsub_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubVV16VFloat32VBVFVFVF_TAMU.c b/test/codegen-golden/FwsubVV16VFloat32VBVFVFVF_TAMU.c new file mode 100644 index 0000000..7ede92a --- /dev/null +++ b/test/codegen-golden/FwsubVV16VFloat32VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwsubVV16VFloat32VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FwsubVV16VFloat32VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwsub_vv_f32m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwsub_vv_operator_0() { +uint64_t tmp[] = {1262786923u,4294967295u,1168703488u,4294967295u,3316318208u,4294967295u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubVV16VFloat32VBVFVFVF_TUMA.c b/test/codegen-golden/FwsubVV16VFloat32VBVFVFVF_TUMA.c new file mode 100644 index 0000000..e44be66 --- /dev/null +++ b/test/codegen-golden/FwsubVV16VFloat32VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwsubVV16VFloat32VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FwsubVV16VFloat32VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwsub_vv_f32m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwsub_vv_operator_0() { +uint64_t tmp[] = {4294967295u,1267490606u,1168703488u,1261781606u,3316318208u,1243709844u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubVV16VFloat32VBVFVFVF_TUMU.c b/test/codegen-golden/FwsubVV16VFloat32VBVFVFVF_TUMU.c new file mode 100644 index 0000000..a4121b8 --- /dev/null +++ b/test/codegen-golden/FwsubVV16VFloat32VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwsubVV16VFloat32VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FwsubVV16VFloat32VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwsub_vv_f32m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwsub_vv_operator_0() { +uint64_t tmp[] = {1262786923u,1267490606u,1168703488u,1261781606u,3316318208u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubVV16VFloat32VBVFVFVF_m.c b/test/codegen-golden/FwsubVV16VFloat32VBVFVFVF_m.c new file mode 100644 index 0000000..7bacafc --- /dev/null +++ b/test/codegen-golden/FwsubVV16VFloat32VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FwsubVV16VFloat32VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FwsubVV16VFloat32VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwsub_vv_f32m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwsub_vv_operator_0() { +uint64_t tmp[] = {1262786923u,3321151488u,1168703488u,1261781606u,3316318208u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubVV16VFloat32VBVFVF_TAMA.c b/test/codegen-golden/FwsubVV16VFloat32VBVFVF_TAMA.c new file mode 100644 index 0000000..d3bb7b4 --- /dev/null +++ b/test/codegen-golden/FwsubVV16VFloat32VBVFVF_TAMA.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FwsubVV16VFloat32VBVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FwsubVV16VFloat32VBVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwsub_vv_f32m2_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwsub_vv_operator_0() { +uint64_t tmp[] = {4294967295u,4294967295u,1163526144u,4294967295u,1143734272u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubVV16VFloat32VFVF.c b/test/codegen-golden/FwsubVV16VFloat32VFVF.c new file mode 100644 index 0000000..02c7e8d --- /dev/null +++ b/test/codegen-golden/FwsubVV16VFloat32VFVF.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r FwsubVV16VFloat32VFVF -n 1 -l 7 --has-ta --has-ma -c FwsubVV16VFloat32VFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwsub_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat32m2_t vec_value_2_0= vfwsub_vv_f32m2(vec_value_0_0, vec_value_1_0, vl); + +vse32_v_f32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwsub_vv_operator_0() { +uint64_t tmp[] = {3310436352u,1161068544u,1171931136u,3307372544u,1148452864u,3293020160u,3309158400u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubVV16VFloat32VFVFVF_TU.c b/test/codegen-golden/FwsubVV16VFloat32VFVFVF_TU.c new file mode 100644 index 0000000..c98f119 --- /dev/null +++ b/test/codegen-golden/FwsubVV16VFloat32VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FwsubVV16VFloat32VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FwsubVV16VFloat32VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwsub_vv_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwsub_vv_f32m2_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwsub_vv_operator_0() { +uint64_t tmp[] = {1168023552u,1267237304u,1163526144u,1258485599u,1143734272u,1244223528u,1156087808u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubVV16VFloat32VFVF_TA.c b/test/codegen-golden/FwsubVV16VFloat32VFVF_TA.c new file mode 100644 index 0000000..99cda45 --- /dev/null +++ b/test/codegen-golden/FwsubVV16VFloat32VFVF_TA.c @@ -0,0 +1,85 @@ +// COMMAND: random_gen -r FwsubVV16VFloat32VFVF_TA -n 1 -l 7 --has-ta --has-ma -c FwsubVV16VFloat32VFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwsub_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat32m2_t vec_value_2_0= vfwsub_vv_f32m2_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse32_v_f32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwsub_vv_operator_0() { +uint64_t tmp[] = {3310436352u,4294967295u,1171931136u,4294967295u,1148452864u,4294967295u,3309158400u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubWF16VFloat32VBVFSF_TAMA.c b/test/codegen-golden/FwsubWF16VFloat32VBVFSF_TAMA.c new file mode 100644 index 0000000..060b0ee --- /dev/null +++ b/test/codegen-golden/FwsubWF16VFloat32VBVFSF_TAMA.c @@ -0,0 +1,98 @@ +// COMMAND: random_gen -r FwsubWF16VFloat32VBVFSF_TAMA -n 1 -l 7 --has-ta --has-ma -c FwsubWF16VFloat32VBVFSF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwsub_wf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); + +vfloat32m2_t vec_value_3_0= vfwsub_wf_f32m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwsub_wf_operator_0() { +uint64_t tmp[] = {4294967295u,4294967295u,1261078942u,4294967295u,1247388192u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwsub_wf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_wf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwsub_wf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubWF16VFloat32VBVFVFSF_TAMU.c b/test/codegen-golden/FwsubWF16VFloat32VBVFVFSF_TAMU.c new file mode 100644 index 0000000..433d8ec --- /dev/null +++ b/test/codegen-golden/FwsubWF16VFloat32VBVFVFSF_TAMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwsubWF16VFloat32VBVFVFSF_TAMU -n 1 -l 7 --has-ta --has-ma -c FwsubWF16VFloat32VBVFVFSF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +float16_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,1266779219u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwsub_wf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat32m2_t vec_value_2_0= vle32_v_f32m2(placeholder2, vl); + +vfloat32m2_t vec_value_4_0= vfwsub_wf_f32m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwsub_wf_operator_0() { +uint64_t tmp[] = {1264903012u,4294967295u,1261773802u,4294967295u,1243678628u,4294967295u,1262786923u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwsub_wf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_wf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwsub_wf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubWF16VFloat32VBVFVFSF_TUMA.c b/test/codegen-golden/FwsubWF16VFloat32VBVFVFSF_TUMA.c new file mode 100644 index 0000000..4abca1e --- /dev/null +++ b/test/codegen-golden/FwsubWF16VFloat32VBVFVFSF_TUMA.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwsubWF16VFloat32VBVFVFSF_TUMA -n 1 -l 7 --has-ta --has-ma -c FwsubWF16VFloat32VBVFVFSF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +float16_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,1266779219u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwsub_wf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat32m2_t vec_value_2_0= vle32_v_f32m2(placeholder2, vl); + +vfloat32m2_t vec_value_4_0= vfwsub_wf_f32m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwsub_wf_operator_0() { +uint64_t tmp[] = {4294967295u,1258373094u,1261773802u,1261516319u,1243678628u,1256322614u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwsub_wf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_wf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwsub_wf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubWF16VFloat32VBVFVFSF_TUMU.c b/test/codegen-golden/FwsubWF16VFloat32VBVFVFSF_TUMU.c new file mode 100644 index 0000000..925d58d --- /dev/null +++ b/test/codegen-golden/FwsubWF16VFloat32VBVFVFSF_TUMU.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r FwsubWF16VFloat32VBVFVFSF_TUMU -n 1 -l 7 --has-ta --has-ma -c FwsubWF16VFloat32VBVFVFSF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +float16_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,1266779219u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwsub_wf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat32m2_t vec_value_2_0= vle32_v_f32m2(placeholder2, vl); + +vfloat32m2_t vec_value_4_0= vfwsub_wf_f32m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwsub_wf_operator_0() { +uint64_t tmp[] = {1264903012u,1258373094u,1261773802u,1261516319u,1243678628u,1256322614u,1262786923u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwsub_wf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_wf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwsub_wf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubWF16VFloat32VFSF_TA.c b/test/codegen-golden/FwsubWF16VFloat32VFSF_TA.c new file mode 100644 index 0000000..5d1dc6c --- /dev/null +++ b/test/codegen-golden/FwsubWF16VFloat32VFSF_TA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r FwsubWF16VFloat32VFSF_TA -n 1 -l 7 --has-ta --has-ma -c FwsubWF16VFloat32VFSF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfwsub_wf_operator_0() { +float32_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); + +vfloat32m2_t vec_value_2_0= vfwsub_wf_f32m2_ta(vec_value_0_0, placeholder1, tail_vl); + +vse32_v_f32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwsub_wf_operator_0() { +uint64_t tmp[] = {1250406748u,4294967295u,1265352662u,4294967295u,1262490896u,4294967295u,1250239012u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwsub_wf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_wf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwsub_wf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubWF16VFloat32VFVFSF_TU.c b/test/codegen-golden/FwsubWF16VFloat32VFVFSF_TU.c new file mode 100644 index 0000000..70b5398 --- /dev/null +++ b/test/codegen-golden/FwsubWF16VFloat32VFVFSF_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r FwsubWF16VFloat32VFVFSF_TU -n 1 -l 7 --has-ta --has-ma -c FwsubWF16VFloat32VFVFSF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float32_t value_1[7]; +float16_t value_2; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwsub_wf_operator_0() { +float32_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); + +vfloat32m2_t vec_value_3_0= vfwsub_wf_f32m2_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwsub_wf_operator_0() { +uint64_t tmp[] = {1264895208u,1267237304u,1261078942u,1258485599u,1247388192u,1244223528u,1262779119u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwsub_wf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_wf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwsub_wf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubWV16VFloat32VBVFVFVF_TAMU.c b/test/codegen-golden/FwsubWV16VFloat32VBVFVFVF_TAMU.c new file mode 100644 index 0000000..b6d756c --- /dev/null +++ b/test/codegen-golden/FwsubWV16VFloat32VBVFVFVF_TAMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwsubWV16VFloat32VBVFVFVF_TAMU -n 1 -l 7 --has-ta --has-ma -c FwsubWV16VFloat32VBVFVFVF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1266779219u,1255845574u,1263781768u,1267886662u,1253798282u,1250916304u,1253542582u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwsub_wv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat32m2_t vec_value_2_0= vle32_v_f32m2(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwsub_wv_f32m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwsub_wv_operator_0() { +uint64_t tmp[] = {1262786923u,4294967295u,1263773296u,4294967295u,1253775050u,4294967295u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwsub_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwsub_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubWV16VFloat32VBVFVFVF_TUMA.c b/test/codegen-golden/FwsubWV16VFloat32VBVFVFVF_TUMA.c new file mode 100644 index 0000000..dcda08f --- /dev/null +++ b/test/codegen-golden/FwsubWV16VFloat32VBVFVFVF_TUMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwsubWV16VFloat32VBVFVFVF_TUMA -n 1 -l 7 --has-ta --has-ma -c FwsubWV16VFloat32VBVFVFVF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1266779219u,1255845574u,1263781768u,1267886662u,1253798282u,1250916304u,1253542582u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwsub_wv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat32m2_t vec_value_2_0= vle32_v_f32m2(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwsub_wv_f32m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwsub_wv_operator_0() { +uint64_t tmp[] = {4294967295u,1267490606u,1263773296u,1261781606u,1253775050u,1243709844u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwsub_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwsub_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubWV16VFloat32VBVFVFVF_TUMU.c b/test/codegen-golden/FwsubWV16VFloat32VBVFVFVF_TUMU.c new file mode 100644 index 0000000..705ba73 --- /dev/null +++ b/test/codegen-golden/FwsubWV16VFloat32VBVFVFVF_TUMU.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r FwsubWV16VFloat32VBVFVFVF_TUMU -n 1 -l 7 --has-ta --has-ma -c FwsubWV16VFloat32VBVFVFVF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1266779219u,1255845574u,1263781768u,1267886662u,1253798282u,1250916304u,1253542582u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwsub_wv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat32m2_t vec_value_2_0= vle32_v_f32m2(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwsub_wv_f32m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwsub_wv_operator_0() { +uint64_t tmp[] = {1262786923u,1267490606u,1263773296u,1261781606u,1253775050u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwsub_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwsub_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubWV16VFloat32VBVFVFVF_m.c b/test/codegen-golden/FwsubWV16VFloat32VBVFVFVF_m.c new file mode 100644 index 0000000..a34a7eb --- /dev/null +++ b/test/codegen-golden/FwsubWV16VFloat32VBVFVFVF_m.c @@ -0,0 +1,117 @@ +// COMMAND: random_gen -r FwsubWV16VFloat32VBVFVFVF_m -n 1 -l 7 --has-ta --has-ma -c FwsubWV16VFloat32VBVFVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +float16_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1266779219u,1255845574u,1263781768u,1267886662u,1253798282u,1250916304u,1253542582u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwsub_wv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m2(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat32m2_t vec_value_2_0= vle32_v_f32m2(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vfloat32m2_t vec_value_4_0= vfwsub_wv_f32m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwsub_wv_operator_0() { +uint64_t tmp[] = {1262786923u,1255815574u,1263773296u,1261781606u,1253775050u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwsub_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwsub_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubWV16VFloat32VBVFVF_TAMA.c b/test/codegen-golden/FwsubWV16VFloat32VBVFVF_TAMA.c new file mode 100644 index 0000000..187c427 --- /dev/null +++ b/test/codegen-golden/FwsubWV16VFloat32VBVFVF_TAMA.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r FwsubWV16VFloat32VBVFVF_TAMA -n 1 -l 7 --has-ta --has-ma -c FwsubWV16VFloat32VBVFVF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwsub_wv_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwsub_wv_f32m2_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwsub_wv_operator_0() { +uint64_t tmp[] = {4294967295u,4294967295u,1261852518u,4294967295u,1262194163u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwsub_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwsub_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubWV16VFloat32VFVF.c b/test/codegen-golden/FwsubWV16VFloat32VFVF.c new file mode 100644 index 0000000..dbd34f6 --- /dev/null +++ b/test/codegen-golden/FwsubWV16VFloat32VFVF.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r FwsubWV16VFloat32VFVF -n 1 -l 7 --has-ta --has-ma -c FwsubWV16VFloat32VFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwsub_wv_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e32m2(placeholder3); +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat32m2_t vec_value_2_0= vfwsub_wv_f32m2(vec_value_0_0, vec_value_1_0, vl); + +vse32_v_f32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwsub_wv_operator_0() { +uint64_t tmp[] = {1250406748u,1267229804u,1265351994u,1258474415u,1262487084u,1244209240u,1250239812u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwsub_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwsub_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubWV16VFloat32VFVFVF_TU.c b/test/codegen-golden/FwsubWV16VFloat32VFVFVF_TU.c new file mode 100644 index 0000000..a03a84e --- /dev/null +++ b/test/codegen-golden/FwsubWV16VFloat32VFVFVF_TU.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r FwsubWV16VFloat32VFVFVF_TU -n 1 -l 7 --has-ta --has-ma -c FwsubWV16VFloat32VFVFVF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float32_t value_1[7]; +float16_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwsub_wv_operator_0() { +float32_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vfloat32m2_t vec_value_3_0= vfwsub_wv_f32m2_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_f32m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwsub_wv_operator_0() { +uint64_t tmp[] = {1262779119u,1267237304u,1261852518u,1258485599u,1262194163u,1244223528u,1259160874u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vfwsub_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwsub_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubWV16VFloat32VFVF_TA.c b/test/codegen-golden/FwsubWV16VFloat32VFVF_TA.c new file mode 100644 index 0000000..8cdfd63 --- /dev/null +++ b/test/codegen-golden/FwsubWV16VFloat32VFVF_TA.c @@ -0,0 +1,85 @@ +// COMMAND: random_gen -r FwsubWV16VFloat32VFVF_TA -n 1 -l 7 --has-ta --has-ma -c FwsubWV16VFloat32VFVF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vfwsub_wv_operator_0() { +float32_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vfloat32m2_t vec_value_2_0= vfwsub_wv_f32m2_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse32_v_f32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwsub_wv_operator_0() { +uint64_t tmp[] = {1250406748u,4294967295u,1265351994u,4294967295u,1262487084u,4294967295u,1250239812u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwsub_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwsub_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubWX16VFloat32VBVFVFSF_m.c b/test/codegen-golden/FwsubWX16VFloat32VBVFVFSF_m.c new file mode 100644 index 0000000..9650fe7 --- /dev/null +++ b/test/codegen-golden/FwsubWX16VFloat32VBVFVFSF_m.c @@ -0,0 +1,114 @@ +// COMMAND: random_gen -r FwsubWX16VFloat32VBVFVFSF_m -n 1 -l 7 --has-ta --has-ma -c FwsubWX16VFloat32VBVFVFSF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +float16_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,1266779219u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vfwsub_wf_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m2(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat32m2_t vec_value_1_0= vle32_v_f32m2(placeholder1, vl); +vfloat32m2_t vec_value_2_0= vle32_v_f32m2(placeholder2, vl); + +vfloat32m2_t vec_value_4_0= vfwsub_wf_f32m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse32_v_f32m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vfwsub_wf_operator_0() { +uint64_t tmp[] = {1264903012u,1261853186u,1261773802u,1261516319u,1243678628u,1256322614u,1262786923u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vfwsub_wf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_wf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vfwsub_wf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/FwsubWX16VFloat32VFSF.c b/test/codegen-golden/FwsubWX16VFloat32VFSF.c new file mode 100644 index 0000000..2a38acf --- /dev/null +++ b/test/codegen-golden/FwsubWX16VFloat32VFSF.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r FwsubWX16VFloat32VFSF -n 1 -l 7 --has-ta --has-ma -c FwsubWX16VFloat32VFSF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float16_t value_1; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vfwsub_wf_operator_0() { +float32_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +float32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e32m2(placeholder3); +vfloat32m2_t vec_value_0_0= vle32_v_f32m2(placeholder0, vl); + +vfloat32m2_t vec_value_2_0= vfwsub_wf_f32m2(vec_value_0_0, placeholder1, vl); + +vse32_v_f32m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vfwsub_wf_operator_0() { +uint64_t tmp[] = {1250406748u,1267233402u,1265352662u,1258477795u,1262490896u,1244192312u,1250239012u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vfwsub_wf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vfwsub_wf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vfwsub_wf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/IdM8VUInt8.c b/test/codegen-golden/IdM8VUInt8.c new file mode 100644 index 0000000..a3ffa78 --- /dev/null +++ b/test/codegen-golden/IdM8VUInt8.c @@ -0,0 +1,44 @@ +// COMMAND: random_gen -r IdM8VUInt8 -n 1 -l 7 --has-ta --has-ma -c IdM8VUInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +void vid_v_operator_0() { +uint8_t *placeholder0 = value_0; +int placeholder1 = 7; + +unsigned placeholder2 = 0; +for (size_t vl; placeholder1 > 0; placeholder1 -= vl) { +vl = vsetvl_e8m1(placeholder1); +vuint8m1_t vec_value_0_0= vid_v_u8m1(vl); +vec_value_0_0 = vadd_vx_u8m1(vec_value_0_0, placeholder2, vl); +vse8_v_u8m1(placeholder0, vec_value_0_0, vl); +placeholder2 += vl; +placeholder0 += vl; +} +} +int golden_vid_v_operator_0() { +uint8_t tmp[] = {0,1,2,3,4,5,6,}; +for (int i=0; i<7;++i) +if(value_0[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vid_v_operator_0(); +printf("operator_0 : %s\n", golden_vid_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vid_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/IdM8VUInt8VBVU_TAMU.c b/test/codegen-golden/IdM8VUInt8VBVU_TAMU.c new file mode 100644 index 0000000..a3ceebc --- /dev/null +++ b/test/codegen-golden/IdM8VUInt8VBVU_TAMU.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r IdM8VUInt8VBVU_TAMU -n 1 -l 7 --has-ta --has-ma -c IdM8VUInt8VBVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vid_v_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int placeholder3 = 7; + +unsigned placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vid_v_u8m1_tamu(mask_value_0_0, vec_value_1_0, tail_vl); +vec_value_2_0 = vadd_vx_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder4, tail_vl); +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); +placeholder4 += vl; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vid_v_operator_0() { +uint8_t tmp[] = {39,255,2,255,4,255,37,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vid_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vid_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vid_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/IdM8VUInt8VBVU_TUMA.c b/test/codegen-golden/IdM8VUInt8VBVU_TUMA.c new file mode 100644 index 0000000..578d114 --- /dev/null +++ b/test/codegen-golden/IdM8VUInt8VBVU_TUMA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r IdM8VUInt8VBVU_TUMA -n 1 -l 7 --has-ta --has-ma -c IdM8VUInt8VBVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vid_v_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int placeholder3 = 7; + +unsigned placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vid_v_u8m1_tuma(mask_value_0_0, vec_value_1_0, tail_vl); +vec_value_2_0 = vadd_vx_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder4, tail_vl); +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); +placeholder4 += vl; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vid_v_operator_0() { +uint8_t tmp[] = {255,75,2,56,4,18,255,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vid_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vid_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vid_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/IdM8VUInt8VBVU_TUMU.c b/test/codegen-golden/IdM8VUInt8VBVU_TUMU.c new file mode 100644 index 0000000..d2e7015 --- /dev/null +++ b/test/codegen-golden/IdM8VUInt8VBVU_TUMU.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r IdM8VUInt8VBVU_TUMU -n 1 -l 7 --has-ta --has-ma -c IdM8VUInt8VBVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vid_v_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int placeholder3 = 7; + +unsigned placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vid_v_u8m1_tumu(mask_value_0_0, vec_value_1_0, tail_vl); +vec_value_2_0 = vadd_vx_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder4, tail_vl); +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); +placeholder4 += vl; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vid_v_operator_0() { +uint8_t tmp[] = {39,75,2,56,4,18,37,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vid_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vid_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vid_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/IdM8VUInt8VBVU_m.c b/test/codegen-golden/IdM8VUInt8VBVU_m.c new file mode 100644 index 0000000..bb3bfe3 --- /dev/null +++ b/test/codegen-golden/IdM8VUInt8VBVU_m.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r IdM8VUInt8VBVU_m -n 1 -l 7 --has-ta --has-ma -c IdM8VUInt8VBVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vid_v_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int placeholder3 = 7; + +unsigned placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vid_v_u8m1_m (mask_value_0_0, vec_value_1_0, vl); +vec_value_2_0 = vadd_vx_u8m1_m(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder4, vl); +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); +placeholder4 += vl; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vid_v_operator_0() { +uint8_t tmp[] = {39,1,2,56,4,18,37,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vid_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vid_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vid_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/IdM8VUInt8VB_TAMA.c b/test/codegen-golden/IdM8VUInt8VB_TAMA.c new file mode 100644 index 0000000..0aa9ab5 --- /dev/null +++ b/test/codegen-golden/IdM8VUInt8VB_TAMA.c @@ -0,0 +1,61 @@ +// COMMAND: random_gen -r IdM8VUInt8VB_TAMA -n 1 -l 7 --has-ta --has-ma -c IdM8VUInt8VB_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vid_v_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int placeholder2 = 7; + +unsigned placeholder3 = 0; +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vid_v_u8m1_tama(mask_value_0_0, tail_vl); +vec_value_1_0 = vadd_vx_u8m1_tama(mask_value_0_0, vec_value_1_0, placeholder3, tail_vl); +vse8_v_u8m1(placeholder1, vec_value_1_0, vl); +placeholder3 += vl; +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vid_v_operator_0() { +uint8_t tmp[] = {255,255,2,255,4,255,255,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vid_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vid_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vid_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/IdM8VUInt8VU_TU.c b/test/codegen-golden/IdM8VUInt8VU_TU.c new file mode 100644 index 0000000..060616d --- /dev/null +++ b/test/codegen-golden/IdM8VUInt8VU_TU.c @@ -0,0 +1,60 @@ +// COMMAND: random_gen -r IdM8VUInt8VU_TU -n 1 -l 7 --has-ta --has-ma -c IdM8VUInt8VU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vid_v_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int placeholder2 = 7; + +unsigned placeholder3 = 0; +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vid_v_u8m1_tu(vec_value_0_0, tail_vl); +vec_value_1_0 = vadd_vx_u8m1_tu(vec_value_0_0, vec_value_1_0, placeholder3, tail_vl); +vse8_v_u8m1(placeholder1, vec_value_1_0, vl); +placeholder3 += vl; +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vid_v_operator_0() { +uint8_t tmp[] = {0,90,2,43,4,14,6,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vid_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vid_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vid_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/IdM8VUInt8_TA.c b/test/codegen-golden/IdM8VUInt8_TA.c new file mode 100644 index 0000000..c3e3541 --- /dev/null +++ b/test/codegen-golden/IdM8VUInt8_TA.c @@ -0,0 +1,45 @@ +// COMMAND: random_gen -r IdM8VUInt8_TA -n 1 -l 7 --has-ta --has-ma -c IdM8VUInt8_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +void vid_v_operator_0() { +uint8_t *placeholder0 = value_0; +int placeholder1 = 7; + +unsigned placeholder2 = 0; +for (size_t vl; placeholder1 > 0; placeholder1 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vid_v_u8m1_ta(tail_vl); +vec_value_0_0 = vadd_vx_u8m1_ta(vec_value_0_0, placeholder2, tail_vl); +vse8_v_u8m1(placeholder0, vec_value_0_0, vl); +placeholder2 += vl; +placeholder0 += vl; +} +} +int golden_vid_v_operator_0() { +uint8_t tmp[] = {0,255,2,255,4,255,6,}; +for (int i=0; i<7;++i) +if(value_0[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vid_v_operator_0(); +printf("operator_0 : %s\n", golden_vid_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vid_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/IotaM8VUInt8VB.c b/test/codegen-golden/IotaM8VUInt8VB.c new file mode 100644 index 0000000..71cb5a5 --- /dev/null +++ b/test/codegen-golden/IotaM8VUInt8VB.c @@ -0,0 +1,60 @@ +// COMMAND: random_gen -r IotaM8VUInt8VB -n 1 -l 7 --has-ta --has-ma -c IotaM8VUInt8VB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void viota_m_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int placeholder2 = 7; + +unsigned placeholder3 = 0; +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= viota_m_u8m1(mask_value_0_0, vl); +vec_value_1_0 = vadd_vx_u8m1(vec_value_1_0, placeholder3, vl); +vse8_v_u8m1(placeholder1, vec_value_1_0, vl); +placeholder3 += vcpop_m_b8(mask_value_0_0, vl); +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_viota_m_operator_0() { +uint8_t tmp[] = {0,0,1,2,2,3,3,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +viota_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_viota_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_viota_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/IotaM8VUInt8VBVB_TAMA.c b/test/codegen-golden/IotaM8VUInt8VBVB_TAMA.c new file mode 100644 index 0000000..796efc2 --- /dev/null +++ b/test/codegen-golden/IotaM8VUInt8VBVB_TAMA.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r IotaM8VUInt8VBVB_TAMA -n 1 -l 7 --has-ta --has-ma -c IotaM8VUInt8VBVB_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void viota_m_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int placeholder3 = 7; + +unsigned placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vuint8m1_t vec_value_2_0= viota_m_u8m1_tama(mask_value_0_0, mask_value_1_0, tail_vl); +vec_value_2_0 = vadd_vx_u8m1_tama(mask_value_0_0, vec_value_2_0, placeholder4, tail_vl); +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); +placeholder4 += vcpop_m_b8_m(mask_value_0_0, mask_value_1_0, tail_vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_viota_m_operator_0() { +uint8_t tmp[] = {255,255,0,255,0,255,255,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +viota_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_viota_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_viota_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/IotaM8VUInt8VBVUVB_TAMU.c b/test/codegen-golden/IotaM8VUInt8VBVUVB_TAMU.c new file mode 100644 index 0000000..828fa18 --- /dev/null +++ b/test/codegen-golden/IotaM8VUInt8VBVUVB_TAMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r IotaM8VUInt8VBVUVB_TAMU -n 1 -l 7 --has-ta --has-ma -c IotaM8VUInt8VBVUVB_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void viota_m_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int placeholder4 = 7; + +unsigned placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_0= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); +vuint8m1_t vec_value_3_0= viota_m_u8m1_tamu(mask_value_0_0, vec_value_1_0, mask_value_2_0, tail_vl); +vec_value_3_0 = vadd_vx_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_3_0, placeholder5, tail_vl); +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); +placeholder5 += vcpop_m_b8_m(mask_value_0_0, mask_value_2_0, tail_vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_viota_m_operator_0() { +uint8_t tmp[] = {65,255,0,255,0,255,46,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +viota_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_viota_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_viota_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/IotaM8VUInt8VBVUVB_TUMA.c b/test/codegen-golden/IotaM8VUInt8VBVUVB_TUMA.c new file mode 100644 index 0000000..6608d0c --- /dev/null +++ b/test/codegen-golden/IotaM8VUInt8VBVUVB_TUMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r IotaM8VUInt8VBVUVB_TUMA -n 1 -l 7 --has-ta --has-ma -c IotaM8VUInt8VBVUVB_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void viota_m_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int placeholder4 = 7; + +unsigned placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_0= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); +vuint8m1_t vec_value_3_0= viota_m_u8m1_tuma(mask_value_0_0, vec_value_1_0, mask_value_2_0, tail_vl); +vec_value_3_0 = vadd_vx_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_3_0, placeholder5, tail_vl); +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); +placeholder5 += vcpop_m_b8_m(mask_value_0_0, mask_value_2_0, tail_vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_viota_m_operator_0() { +uint8_t tmp[] = {255,92,0,59,0,13,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +viota_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_viota_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_viota_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/IotaM8VUInt8VBVUVB_TUMU.c b/test/codegen-golden/IotaM8VUInt8VBVUVB_TUMU.c new file mode 100644 index 0000000..febb91d --- /dev/null +++ b/test/codegen-golden/IotaM8VUInt8VBVUVB_TUMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r IotaM8VUInt8VBVUVB_TUMU -n 1 -l 7 --has-ta --has-ma -c IotaM8VUInt8VBVUVB_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void viota_m_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int placeholder4 = 7; + +unsigned placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_0= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); +vuint8m1_t vec_value_3_0= viota_m_u8m1_tumu(mask_value_0_0, vec_value_1_0, mask_value_2_0, tail_vl); +vec_value_3_0 = vadd_vx_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_3_0, placeholder5, tail_vl); +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); +placeholder5 += vcpop_m_b8_m(mask_value_0_0, mask_value_2_0, tail_vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_viota_m_operator_0() { +uint8_t tmp[] = {65,92,0,59,0,13,46,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +viota_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_viota_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_viota_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/IotaM8VUInt8VBVUVB_m.c b/test/codegen-golden/IotaM8VUInt8VBVUVB_m.c new file mode 100644 index 0000000..395923f --- /dev/null +++ b/test/codegen-golden/IotaM8VUInt8VBVUVB_m.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r IotaM8VUInt8VBVUVB_m -n 1 -l 7 --has-ta --has-ma -c IotaM8VUInt8VBVUVB_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void viota_m_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int placeholder4 = 7; + +unsigned placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_0= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); +vuint8m1_t vec_value_3_0= viota_m_u8m1_m (mask_value_0_0, vec_value_1_0, mask_value_2_0, vl); +vec_value_3_0 = vadd_vx_u8m1_m(mask_value_0_0, vec_value_1_0, vec_value_3_0, placeholder5, vl); +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); +placeholder5 += vcpop_m_b8_m(mask_value_0_0, mask_value_2_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_viota_m_operator_0() { +uint8_t tmp[] = {65,0,1,59,1,13,46,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +viota_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_viota_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_viota_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/IotaM8VUInt8VB_TA.c b/test/codegen-golden/IotaM8VUInt8VB_TA.c new file mode 100644 index 0000000..82feb7b --- /dev/null +++ b/test/codegen-golden/IotaM8VUInt8VB_TA.c @@ -0,0 +1,61 @@ +// COMMAND: random_gen -r IotaM8VUInt8VB_TA -n 1 -l 7 --has-ta --has-ma -c IotaM8VUInt8VB_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void viota_m_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int placeholder2 = 7; + +unsigned placeholder3 = 0; +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= viota_m_u8m1_ta(mask_value_0_0, tail_vl); +vec_value_1_0 = vadd_vx_u8m1_ta(vec_value_1_0, placeholder3, tail_vl); +vse8_v_u8m1(placeholder1, vec_value_1_0, vl); +placeholder3 += vcpop_m_b8(mask_value_0_0, tail_vl); +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_viota_m_operator_0() { +uint8_t tmp[] = {0,255,0,255,1,255,2,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +viota_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_viota_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_viota_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/IotaM8VUInt8VUVB_TU.c b/test/codegen-golden/IotaM8VUInt8VUVB_TU.c new file mode 100644 index 0000000..0de256b --- /dev/null +++ b/test/codegen-golden/IotaM8VUInt8VUVB_TU.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r IotaM8VUInt8VUVB_TU -n 1 -l 7 --has-ta --has-ma -c IotaM8VUInt8VUVB_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void viota_m_operator_0() { +uint8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int placeholder3 = 7; + +unsigned placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vuint8m1_t vec_value_2_0= viota_m_u8m1_tu(vec_value_0_0, mask_value_1_0, tail_vl); +vec_value_2_0 = vadd_vx_u8m1_tu(vec_value_0_0, vec_value_2_0, placeholder4, tail_vl); +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); +placeholder4 += vcpop_m_b8(mask_value_1_0, tail_vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_viota_m_operator_0() { +uint8_t tmp[] = {0,90,0,43,0,14,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +viota_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_viota_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_viota_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaccVV8VInt8.c b/test/codegen-golden/MaccVV8VInt8.c new file mode 100644 index 0000000..18f9dc8 --- /dev/null +++ b/test/codegen-golden/MaccVV8VInt8.c @@ -0,0 +1,90 @@ +// COMMAND: random_gen -r MaccVV8VInt8 -n 1 -l 7 --has-ta --has-ma -c MaccVV8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmacc_vv_i8m1(vec_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmacc_vv_operator_0() { +int8_t tmp[] = {74,-73,11,-42,-118,-127,125,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaccVV8VInt8VBVIVIVI_TAMA.c b/test/codegen-golden/MaccVV8VInt8VBVIVIVI_TAMA.c new file mode 100644 index 0000000..ab20e8a --- /dev/null +++ b/test/codegen-golden/MaccVV8VInt8VBVIVIVI_TAMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MaccVV8VInt8VBVIVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c MaccVV8VInt8VBVIVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmacc_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmacc_vv_operator_0() { +int8_t tmp[] = {-1,-1,-53,-1,-89,-1,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaccVV8VInt8VBVIVIVI_TAMU.c b/test/codegen-golden/MaccVV8VInt8VBVIVIVI_TAMU.c new file mode 100644 index 0000000..17c2665 --- /dev/null +++ b/test/codegen-golden/MaccVV8VInt8VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MaccVV8VInt8VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c MaccVV8VInt8VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmacc_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmacc_vv_operator_0() { +int8_t tmp[] = {29,-1,-53,-1,-89,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaccVV8VInt8VBVIVIVI_TUMA.c b/test/codegen-golden/MaccVV8VInt8VBVIVIVI_TUMA.c new file mode 100644 index 0000000..1530ac8 --- /dev/null +++ b/test/codegen-golden/MaccVV8VInt8VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MaccVV8VInt8VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c MaccVV8VInt8VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmacc_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmacc_vv_operator_0() { +int8_t tmp[] = {-1,84,-53,19,-89,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaccVV8VInt8VBVIVIVI_TUMU.c b/test/codegen-golden/MaccVV8VInt8VBVIVIVI_TUMU.c new file mode 100644 index 0000000..fee06fb --- /dev/null +++ b/test/codegen-golden/MaccVV8VInt8VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MaccVV8VInt8VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c MaccVV8VInt8VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmacc_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmacc_vv_operator_0() { +int8_t tmp[] = {29,84,-53,19,-89,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaccVV8VInt8VIVIVI_TA.c b/test/codegen-golden/MaccVV8VInt8VIVIVI_TA.c new file mode 100644 index 0000000..822c3c7 --- /dev/null +++ b/test/codegen-golden/MaccVV8VInt8VIVIVI_TA.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r MaccVV8VInt8VIVIVI_TA -n 1 -l 7 --has-ta --has-ma -c MaccVV8VInt8VIVIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmacc_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmacc_vv_operator_0() { +int8_t tmp[] = {74,-1,11,-1,-118,-1,125,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaccVV8VInt8VIVIVI_TU.c b/test/codegen-golden/MaccVV8VInt8VIVIVI_TU.c new file mode 100644 index 0000000..aaa017f --- /dev/null +++ b/test/codegen-golden/MaccVV8VInt8VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r MaccVV8VInt8VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c MaccVV8VInt8VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmacc_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmacc_vv_operator_0() { +int8_t tmp[] = {74,79,11,-14,-118,-73,125,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaccVV8VInt8_m.c b/test/codegen-golden/MaccVV8VInt8_m.c new file mode 100644 index 0000000..1f5db65 --- /dev/null +++ b/test/codegen-golden/MaccVV8VInt8_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r MaccVV8VInt8_m -n 1 -l 7 --has-ta --has-ma -c MaccVV8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmacc_vv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmacc_vv_operator_0() { +int8_t tmp[] = {29,-36,-53,19,-89,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaccVX8VInt8.c b/test/codegen-golden/MaccVX8VInt8.c new file mode 100644 index 0000000..90a00b3 --- /dev/null +++ b/test/codegen-golden/MaccVX8VInt8.c @@ -0,0 +1,87 @@ +// COMMAND: random_gen -r MaccVX8VInt8 -n 1 -l 7 --has-ta --has-ma -c MaccVX8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vmacc_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmacc_vx_i8m1(vec_value_0_0, placeholder1, vec_value_2_0, vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmacc_vx_operator_0() { +int8_t tmp[] = {74,-7,-124,78,-22,90,-43,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmacc_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmacc_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmacc_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaccVX8VInt8VBVISIVI_TAMA.c b/test/codegen-golden/MaccVX8VInt8VBVISIVI_TAMA.c new file mode 100644 index 0000000..f58512c --- /dev/null +++ b/test/codegen-golden/MaccVX8VInt8VBVISIVI_TAMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MaccVX8VInt8VBVISIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c MaccVX8VInt8VBVISIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vmacc_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmacc_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmacc_vx_operator_0() { +int8_t tmp[] = {-1,-1,-6,-1,119,-1,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmacc_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmacc_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmacc_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaccVX8VInt8VBVISIVI_TAMU.c b/test/codegen-golden/MaccVX8VInt8VBVISIVI_TAMU.c new file mode 100644 index 0000000..7f4c771 --- /dev/null +++ b/test/codegen-golden/MaccVX8VInt8VBVISIVI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MaccVX8VInt8VBVISIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c MaccVX8VInt8VBVISIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vmacc_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmacc_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmacc_vx_operator_0() { +int8_t tmp[] = {29,-1,-6,-1,119,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmacc_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmacc_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmacc_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaccVX8VInt8VBVISIVI_TUMA.c b/test/codegen-golden/MaccVX8VInt8VBVISIVI_TUMA.c new file mode 100644 index 0000000..29c8dbb --- /dev/null +++ b/test/codegen-golden/MaccVX8VInt8VBVISIVI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MaccVX8VInt8VBVISIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c MaccVX8VInt8VBVISIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vmacc_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmacc_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmacc_vx_operator_0() { +int8_t tmp[] = {-1,84,-6,19,119,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmacc_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmacc_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmacc_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaccVX8VInt8VBVISIVI_TUMU.c b/test/codegen-golden/MaccVX8VInt8VBVISIVI_TUMU.c new file mode 100644 index 0000000..189cfc6 --- /dev/null +++ b/test/codegen-golden/MaccVX8VInt8VBVISIVI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MaccVX8VInt8VBVISIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c MaccVX8VInt8VBVISIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vmacc_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmacc_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmacc_vx_operator_0() { +int8_t tmp[] = {29,84,-6,19,119,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmacc_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmacc_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmacc_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaccVX8VInt8VISIVI_TA.c b/test/codegen-golden/MaccVX8VInt8VISIVI_TA.c new file mode 100644 index 0000000..2c36fdd --- /dev/null +++ b/test/codegen-golden/MaccVX8VInt8VISIVI_TA.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r MaccVX8VInt8VISIVI_TA -n 1 -l 7 --has-ta --has-ma -c MaccVX8VInt8VISIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vmacc_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmacc_vx_i8m1_ta(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmacc_vx_operator_0() { +int8_t tmp[] = {74,-1,-124,-1,-22,-1,-43,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmacc_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmacc_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmacc_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaccVX8VInt8VISIVI_TU.c b/test/codegen-golden/MaccVX8VInt8VISIVI_TU.c new file mode 100644 index 0000000..3da5956 --- /dev/null +++ b/test/codegen-golden/MaccVX8VInt8VISIVI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r MaccVX8VInt8VISIVI_TU -n 1 -l 7 --has-ta --has-ma -c MaccVX8VInt8VISIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vmacc_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmacc_vx_i8m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmacc_vx_operator_0() { +int8_t tmp[] = {74,79,-124,-14,-22,-73,-43,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmacc_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmacc_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmacc_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaccVX8VInt8_m.c b/test/codegen-golden/MaccVX8VInt8_m.c new file mode 100644 index 0000000..8b70b48 --- /dev/null +++ b/test/codegen-golden/MaccVX8VInt8_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r MaccVX8VInt8_m -n 1 -l 7 --has-ta --has-ma -c MaccVX8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vmacc_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmacc_vx_i8m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmacc_vx_operator_0() { +int8_t tmp[] = {29,0,-6,19,119,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmacc_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmacc_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmacc_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MadcVV8VBoolVIVI.c b/test/codegen-golden/MadcVV8VBoolVIVI.c new file mode 100644 index 0000000..3f63cfb --- /dev/null +++ b/test/codegen-golden/MadcVV8VBoolVIVI.c @@ -0,0 +1,80 @@ +// COMMAND: random_gen -r MadcVV8VBoolVIVI -n 1 -l 7 --has-ta --has-ma -c MadcVV8VBoolVIVI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmadc_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vbool8_t vec_value_2_0= vmadc_vv_i8m1_b8(vec_value_0_0, vec_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmadc_vv_operator_0() { +int8_t tmp[] = {1,0,1,0,0,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmadc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmadc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmadc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MadcVVM8VBoolVIVIVB.c b/test/codegen-golden/MadcVVM8VBoolVIVIVB.c new file mode 100644 index 0000000..f832487 --- /dev/null +++ b/test/codegen-golden/MadcVVM8VBoolVIVIVB.c @@ -0,0 +1,96 @@ +// COMMAND: random_gen -r MadcVVM8VBoolVIVIVB -n 1 -l 7 --has-ta --has-ma -c MadcVVM8VBoolVIVIVB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmadc_vvm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_0= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); + +vbool8_t vec_value_3_0= vmadc_vvm_i8m1_b8(vec_value_0_0, vec_value_1_0, mask_value_2_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmadc_vvm_operator_0() { +int8_t tmp[] = {0,0,0,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmadc_vvm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmadc_vvm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmadc_vvm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MadcVX8VBoolVISI.c b/test/codegen-golden/MadcVX8VBoolVISI.c new file mode 100644 index 0000000..db13374 --- /dev/null +++ b/test/codegen-golden/MadcVX8VBoolVISI.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r MadcVX8VBoolVISI -n 1 -l 7 --has-ta --has-ma -c MadcVX8VBoolVISI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vmadc_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vbool8_t vec_value_2_0= vmadc_vx_i8m1_b8(vec_value_0_0, placeholder1, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmadc_vx_operator_0() { +int8_t tmp[] = {1,1,1,1,1,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmadc_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmadc_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmadc_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MadcVXM8VBoolVISIVB.c b/test/codegen-golden/MadcVXM8VBoolVISIVB.c new file mode 100644 index 0000000..d01ed83 --- /dev/null +++ b/test/codegen-golden/MadcVXM8VBoolVISIVB.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r MadcVXM8VBoolVISIVB -n 1 -l 7 --has-ta --has-ma -c MadcVXM8VBoolVISIVB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vmadc_vxm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_0= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); + +vbool8_t vec_value_3_0= vmadc_vxm_i8m1_b8(vec_value_0_0, placeholder1, mask_value_2_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmadc_vxm_operator_0() { +int8_t tmp[] = {0,0,0,1,0,0,0,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmadc_vxm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmadc_vxm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmadc_vxm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaddVV8VInt8.c b/test/codegen-golden/MaddVV8VInt8.c new file mode 100644 index 0000000..4c105a3 --- /dev/null +++ b/test/codegen-golden/MaddVV8VInt8.c @@ -0,0 +1,90 @@ +// COMMAND: random_gen -r MaddVV8VInt8 -n 1 -l 7 --has-ta --has-ma -c MaddVV8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmadd_vv_i8m1(vec_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmadd_vv_operator_0() { +int8_t tmp[] = {-110,30,61,2,102,-39,117,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaddVV8VInt8VBVIVIVI_TAMA.c b/test/codegen-golden/MaddVV8VInt8VBVIVIVI_TAMA.c new file mode 100644 index 0000000..4395dfa --- /dev/null +++ b/test/codegen-golden/MaddVV8VInt8VBVIVIVI_TAMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MaddVV8VInt8VBVIVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c MaddVV8VInt8VBVIVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmadd_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmadd_vv_operator_0() { +int8_t tmp[] = {-1,-1,-3,-1,-113,-1,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaddVV8VInt8VBVIVIVI_TAMU.c b/test/codegen-golden/MaddVV8VInt8VBVIVIVI_TAMU.c new file mode 100644 index 0000000..b352c20 --- /dev/null +++ b/test/codegen-golden/MaddVV8VInt8VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MaddVV8VInt8VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c MaddVV8VInt8VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmadd_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmadd_vv_operator_0() { +int8_t tmp[] = {29,-1,-3,-1,-113,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaddVV8VInt8VBVIVIVI_TUMA.c b/test/codegen-golden/MaddVV8VInt8VBVIVIVI_TUMA.c new file mode 100644 index 0000000..3137727 --- /dev/null +++ b/test/codegen-golden/MaddVV8VInt8VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MaddVV8VInt8VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c MaddVV8VInt8VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmadd_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmadd_vv_operator_0() { +int8_t tmp[] = {-1,84,-3,19,-113,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaddVV8VInt8VBVIVIVI_TUMU.c b/test/codegen-golden/MaddVV8VInt8VBVIVIVI_TUMU.c new file mode 100644 index 0000000..22c634c --- /dev/null +++ b/test/codegen-golden/MaddVV8VInt8VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MaddVV8VInt8VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c MaddVV8VInt8VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmadd_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmadd_vv_operator_0() { +int8_t tmp[] = {29,84,-3,19,-113,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaddVV8VInt8VIVIVI_TA.c b/test/codegen-golden/MaddVV8VInt8VIVIVI_TA.c new file mode 100644 index 0000000..700d97f --- /dev/null +++ b/test/codegen-golden/MaddVV8VInt8VIVIVI_TA.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r MaddVV8VInt8VIVIVI_TA -n 1 -l 7 --has-ta --has-ma -c MaddVV8VInt8VIVIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmadd_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmadd_vv_operator_0() { +int8_t tmp[] = {-110,-1,61,-1,102,-1,117,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaddVV8VInt8VIVIVI_TU.c b/test/codegen-golden/MaddVV8VInt8VIVIVI_TU.c new file mode 100644 index 0000000..a6da1f2 --- /dev/null +++ b/test/codegen-golden/MaddVV8VInt8VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r MaddVV8VInt8VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c MaddVV8VInt8VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmadd_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmadd_vv_operator_0() { +int8_t tmp[] = {-110,79,61,-14,102,-73,117,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaddVV8VInt8_m.c b/test/codegen-golden/MaddVV8VInt8_m.c new file mode 100644 index 0000000..88eadf0 --- /dev/null +++ b/test/codegen-golden/MaddVV8VInt8_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r MaddVV8VInt8_m -n 1 -l 7 --has-ta --has-ma -c MaddVV8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmadd_vv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmadd_vv_operator_0() { +int8_t tmp[] = {29,2,-3,19,-113,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaddVX8VInt8.c b/test/codegen-golden/MaddVX8VInt8.c new file mode 100644 index 0000000..ee277b6 --- /dev/null +++ b/test/codegen-golden/MaddVX8VInt8.c @@ -0,0 +1,87 @@ +// COMMAND: random_gen -r MaddVX8VInt8 -n 1 -l 7 --has-ta --has-ma -c MaddVX8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vmadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmadd_vx_i8m1(vec_value_0_0, placeholder1, vec_value_2_0, vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmadd_vx_operator_0() { +int8_t tmp[] = {-110,37,44,118,2,122,113,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaddVX8VInt8VBVISIVI_TAMA.c b/test/codegen-golden/MaddVX8VInt8VBVISIVI_TAMA.c new file mode 100644 index 0000000..2dd30c3 --- /dev/null +++ b/test/codegen-golden/MaddVX8VInt8VBVISIVI_TAMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MaddVX8VInt8VBVISIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c MaddVX8VInt8VBVISIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vmadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmadd_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmadd_vx_operator_0() { +int8_t tmp[] = {-1,-1,105,-1,90,-1,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaddVX8VInt8VBVISIVI_TAMU.c b/test/codegen-golden/MaddVX8VInt8VBVISIVI_TAMU.c new file mode 100644 index 0000000..2805647 --- /dev/null +++ b/test/codegen-golden/MaddVX8VInt8VBVISIVI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MaddVX8VInt8VBVISIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c MaddVX8VInt8VBVISIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vmadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmadd_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmadd_vx_operator_0() { +int8_t tmp[] = {29,-1,105,-1,90,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaddVX8VInt8VBVISIVI_TUMA.c b/test/codegen-golden/MaddVX8VInt8VBVISIVI_TUMA.c new file mode 100644 index 0000000..b7eb0fc --- /dev/null +++ b/test/codegen-golden/MaddVX8VInt8VBVISIVI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MaddVX8VInt8VBVISIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c MaddVX8VInt8VBVISIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vmadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmadd_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmadd_vx_operator_0() { +int8_t tmp[] = {-1,84,105,19,90,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaddVX8VInt8VBVISIVI_TUMU.c b/test/codegen-golden/MaddVX8VInt8VBVISIVI_TUMU.c new file mode 100644 index 0000000..3cb137d --- /dev/null +++ b/test/codegen-golden/MaddVX8VInt8VBVISIVI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MaddVX8VInt8VBVISIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c MaddVX8VInt8VBVISIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vmadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmadd_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmadd_vx_operator_0() { +int8_t tmp[] = {29,84,105,19,90,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaddVX8VInt8VISIVI_TA.c b/test/codegen-golden/MaddVX8VInt8VISIVI_TA.c new file mode 100644 index 0000000..76c4d7c --- /dev/null +++ b/test/codegen-golden/MaddVX8VInt8VISIVI_TA.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r MaddVX8VInt8VISIVI_TA -n 1 -l 7 --has-ta --has-ma -c MaddVX8VInt8VISIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vmadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmadd_vx_i8m1_ta(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmadd_vx_operator_0() { +int8_t tmp[] = {-110,-1,44,-1,2,-1,113,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaddVX8VInt8VISIVI_TU.c b/test/codegen-golden/MaddVX8VInt8VISIVI_TU.c new file mode 100644 index 0000000..caf1138 --- /dev/null +++ b/test/codegen-golden/MaddVX8VInt8VISIVI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r MaddVX8VInt8VISIVI_TU -n 1 -l 7 --has-ta --has-ma -c MaddVX8VInt8VISIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vmadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmadd_vx_i8m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmadd_vx_operator_0() { +int8_t tmp[] = {-110,79,44,-14,2,-73,113,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaddVX8VInt8_m.c b/test/codegen-golden/MaddVX8VInt8_m.c new file mode 100644 index 0000000..8ca6677 --- /dev/null +++ b/test/codegen-golden/MaddVX8VInt8_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r MaddVX8VInt8_m -n 1 -l 7 --has-ta --has-ma -c MaddVX8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vmadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmadd_vx_i8m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmadd_vx_operator_0() { +int8_t tmp[] = {29,42,105,19,90,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MandMMVBoolVBVB.c b/test/codegen-golden/MandMMVBoolVBVB.c new file mode 100644 index 0000000..daa6ca0 --- /dev/null +++ b/test/codegen-golden/MandMMVBoolVBVB.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r MandMMVBoolVBVB -n 1 -l 7 --has-ta --has-ma -c MandMMVBoolVBVB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmand_mm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); + +vbool8_t vec_value_2_0= vmand_mm_b8(mask_value_0_0, mask_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmand_mm_operator_0() { +int8_t tmp[] = {0,1,0,0,1,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmand_mm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmand_mm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmand_mm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MandnMMVBoolVBVB.c b/test/codegen-golden/MandnMMVBoolVBVB.c new file mode 100644 index 0000000..8998f0e --- /dev/null +++ b/test/codegen-golden/MandnMMVBoolVBVB.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r MandnMMVBoolVBVB -n 1 -l 7 --has-ta --has-ma -c MandnMMVBoolVBVB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmandn_mm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); + +vbool8_t vec_value_2_0= vmandn_mm_b8(mask_value_0_0, mask_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmandn_mm_operator_0() { +int8_t tmp[] = {0,0,1,0,0,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmandn_mm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmandn_mm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmandn_mm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxVV8VInt8.c b/test/codegen-golden/MaxVV8VInt8.c new file mode 100644 index 0000000..3cdc453 --- /dev/null +++ b/test/codegen-golden/MaxVV8VInt8.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r MaxVV8VInt8 -n 1 -l 7 --has-ta --has-ma -c MaxVV8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmax_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vmax_vv_i8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmax_vv_operator_0() { +int8_t tmp[] = {-22,79,55,12,26,-65,-26,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmax_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmax_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmax_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxVV8VInt8VBVIVIVI_TAMU.c b/test/codegen-golden/MaxVV8VInt8VBVIVIVI_TAMU.c new file mode 100644 index 0000000..a48ae05 --- /dev/null +++ b/test/codegen-golden/MaxVV8VInt8VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MaxVV8VInt8VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c MaxVV8VInt8VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmax_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmax_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmax_vv_operator_0() { +int8_t tmp[] = {29,-1,39,-1,16,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmax_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmax_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmax_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxVV8VInt8VBVIVIVI_TUMA.c b/test/codegen-golden/MaxVV8VInt8VBVIVIVI_TUMA.c new file mode 100644 index 0000000..b0adab8 --- /dev/null +++ b/test/codegen-golden/MaxVV8VInt8VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MaxVV8VInt8VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c MaxVV8VInt8VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmax_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmax_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmax_vv_operator_0() { +int8_t tmp[] = {-1,84,39,19,16,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmax_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmax_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmax_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxVV8VInt8VBVIVIVI_TUMU.c b/test/codegen-golden/MaxVV8VInt8VBVIVIVI_TUMU.c new file mode 100644 index 0000000..90a6974 --- /dev/null +++ b/test/codegen-golden/MaxVV8VInt8VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MaxVV8VInt8VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c MaxVV8VInt8VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmax_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmax_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmax_vv_operator_0() { +int8_t tmp[] = {29,84,39,19,16,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmax_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmax_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmax_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxVV8VInt8VBVIVI_TAMA.c b/test/codegen-golden/MaxVV8VInt8VBVIVI_TAMA.c new file mode 100644 index 0000000..36b2eed --- /dev/null +++ b/test/codegen-golden/MaxVV8VInt8VBVIVI_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r MaxVV8VInt8VBVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c MaxVV8VInt8VBVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmax_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmax_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmax_vv_operator_0() { +int8_t tmp[] = {-1,-1,20,-1,23,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmax_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmax_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmax_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxVV8VInt8VIVIVI_TU.c b/test/codegen-golden/MaxVV8VInt8VIVIVI_TU.c new file mode 100644 index 0000000..3cebbc9 --- /dev/null +++ b/test/codegen-golden/MaxVV8VInt8VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r MaxVV8VInt8VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c MaxVV8VInt8VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmax_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmax_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmax_vv_operator_0() { +int8_t tmp[] = {29,79,20,-14,23,-73,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmax_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmax_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmax_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxVV8VInt8VIVI_TA.c b/test/codegen-golden/MaxVV8VInt8VIVI_TA.c new file mode 100644 index 0000000..b4db22b --- /dev/null +++ b/test/codegen-golden/MaxVV8VInt8VIVI_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r MaxVV8VInt8VIVI_TA -n 1 -l 7 --has-ta --has-ma -c MaxVV8VInt8VIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmax_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vmax_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmax_vv_operator_0() { +int8_t tmp[] = {-22,-1,55,-1,26,-1,-26,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmax_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmax_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmax_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxVV8VInt8_m.c b/test/codegen-golden/MaxVV8VInt8_m.c new file mode 100644 index 0000000..71e48f2 --- /dev/null +++ b/test/codegen-golden/MaxVV8VInt8_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r MaxVV8VInt8_m -n 1 -l 7 --has-ta --has-ma -c MaxVV8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmax_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmax_vv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmax_vv_operator_0() { +int8_t tmp[] = {29,50,39,19,16,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmax_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmax_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmax_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxVX8VInt8.c b/test/codegen-golden/MaxVX8VInt8.c new file mode 100644 index 0000000..1c62a59 --- /dev/null +++ b/test/codegen-golden/MaxVX8VInt8.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r MaxVX8VInt8 -n 1 -l 7 --has-ta --has-ma -c MaxVX8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vmax_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vmax_vx_i8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmax_vx_operator_0() { +int8_t tmp[] = {-22,79,55,-14,26,-22,-22,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmax_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmax_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmax_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxVX8VInt8VBVISI_TAMA.c b/test/codegen-golden/MaxVX8VInt8VBVISI_TAMA.c new file mode 100644 index 0000000..179821c --- /dev/null +++ b/test/codegen-golden/MaxVX8VInt8VBVISI_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r MaxVX8VInt8VBVISI_TAMA -n 1 -l 7 --has-ta --has-ma -c MaxVX8VInt8VBVISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmax_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vmax_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmax_vx_operator_0() { +int8_t tmp[] = {-1,-1,12,-1,-22,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmax_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmax_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmax_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxVX8VInt8VBVIVISI_TAMU.c b/test/codegen-golden/MaxVX8VInt8VBVIVISI_TAMU.c new file mode 100644 index 0000000..6bc339e --- /dev/null +++ b/test/codegen-golden/MaxVX8VInt8VBVIVISI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MaxVX8VInt8VBVIVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c MaxVX8VInt8VBVIVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmax_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vmax_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmax_vx_operator_0() { +int8_t tmp[] = {50,-1,19,-1,-22,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmax_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmax_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmax_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxVX8VInt8VBVIVISI_TUMA.c b/test/codegen-golden/MaxVX8VInt8VBVIVISI_TUMA.c new file mode 100644 index 0000000..6fe5fa0 --- /dev/null +++ b/test/codegen-golden/MaxVX8VInt8VBVIVISI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MaxVX8VInt8VBVIVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c MaxVX8VInt8VBVIVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmax_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vmax_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmax_vx_operator_0() { +int8_t tmp[] = {-1,-15,19,16,-22,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmax_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmax_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmax_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxVX8VInt8VBVIVISI_TUMU.c b/test/codegen-golden/MaxVX8VInt8VBVIVISI_TUMU.c new file mode 100644 index 0000000..2e5c426 --- /dev/null +++ b/test/codegen-golden/MaxVX8VInt8VBVIVISI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MaxVX8VInt8VBVIVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c MaxVX8VInt8VBVIVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmax_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vmax_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmax_vx_operator_0() { +int8_t tmp[] = {50,-15,19,16,-22,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmax_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmax_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmax_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxVX8VInt8VISI_TA.c b/test/codegen-golden/MaxVX8VInt8VISI_TA.c new file mode 100644 index 0000000..a31a830 --- /dev/null +++ b/test/codegen-golden/MaxVX8VInt8VISI_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r MaxVX8VInt8VISI_TA -n 1 -l 7 --has-ta --has-ma -c MaxVX8VInt8VISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vmax_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vmax_vx_i8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmax_vx_operator_0() { +int8_t tmp[] = {-22,-1,55,-1,26,-1,-22,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmax_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmax_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmax_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxVX8VInt8VIVISI_TU.c b/test/codegen-golden/MaxVX8VInt8VIVISI_TU.c new file mode 100644 index 0000000..5cc9f92 --- /dev/null +++ b/test/codegen-golden/MaxVX8VInt8VIVISI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r MaxVX8VInt8VIVISI_TU -n 1 -l 7 --has-ta --has-ma -c MaxVX8VInt8VIVISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmax_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vmax_vx_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmax_vx_operator_0() { +int8_t tmp[] = {50,79,12,-14,-22,-73,29,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmax_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmax_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmax_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxVX8VInt8_m.c b/test/codegen-golden/MaxVX8VInt8_m.c new file mode 100644 index 0000000..c820a3f --- /dev/null +++ b/test/codegen-golden/MaxVX8VInt8_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r MaxVX8VInt8_m -n 1 -l 7 --has-ta --has-ma -c MaxVX8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmax_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vmax_vx_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmax_vx_operator_0() { +int8_t tmp[] = {50,20,19,16,-22,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmax_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmax_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmax_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxuVV8VUInt8.c b/test/codegen-golden/MaxuVV8VUInt8.c new file mode 100644 index 0000000..7a26fc2 --- /dev/null +++ b/test/codegen-golden/MaxuVV8VUInt8.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r MaxuVV8VUInt8 -n 1 -l 7 --has-ta --has-ma -c MaxuVV8VUInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmaxu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vmaxu_vv_u8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmaxu_vv_operator_0() { +uint8_t tmp[] = {39,90,78,56,63,18,37,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmaxu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmaxu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmaxu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxuVV8VUInt8VBVUVUVU_TAMU.c b/test/codegen-golden/MaxuVV8VUInt8VBVUVUVU_TAMU.c new file mode 100644 index 0000000..1b7ceb2 --- /dev/null +++ b/test/codegen-golden/MaxuVV8VUInt8VBVUVUVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MaxuVV8VUInt8VBVUVUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c MaxuVV8VUInt8VBVUVUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmaxu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vmaxu_vv_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmaxu_vv_operator_0() { +uint8_t tmp[] = {65,255,70,255,58,255,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmaxu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmaxu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmaxu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxuVV8VUInt8VBVUVUVU_TUMA.c b/test/codegen-golden/MaxuVV8VUInt8VBVUVUVU_TUMA.c new file mode 100644 index 0000000..020c615 --- /dev/null +++ b/test/codegen-golden/MaxuVV8VUInt8VBVUVUVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MaxuVV8VUInt8VBVUVUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c MaxuVV8VUInt8VBVUVUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmaxu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vmaxu_vv_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmaxu_vv_operator_0() { +uint8_t tmp[] = {255,92,70,59,58,13,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmaxu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmaxu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmaxu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxuVV8VUInt8VBVUVUVU_TUMU.c b/test/codegen-golden/MaxuVV8VUInt8VBVUVUVU_TUMU.c new file mode 100644 index 0000000..55f2401 --- /dev/null +++ b/test/codegen-golden/MaxuVV8VUInt8VBVUVUVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MaxuVV8VUInt8VBVUVUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c MaxuVV8VUInt8VBVUVUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmaxu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vmaxu_vv_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmaxu_vv_operator_0() { +uint8_t tmp[] = {65,92,70,59,58,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmaxu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmaxu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmaxu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxuVV8VUInt8VBVUVU_TAMA.c b/test/codegen-golden/MaxuVV8VUInt8VBVUVU_TAMA.c new file mode 100644 index 0000000..64e1c7c --- /dev/null +++ b/test/codegen-golden/MaxuVV8VUInt8VBVUVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r MaxuVV8VUInt8VBVUVU_TAMA -n 1 -l 7 --has-ta --has-ma -c MaxuVV8VUInt8VBVUVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmaxu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vmaxu_vv_u8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmaxu_vv_operator_0() { +uint8_t tmp[] = {255,255,60,255,62,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmaxu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmaxu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmaxu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxuVV8VUInt8VUVUVU_TU.c b/test/codegen-golden/MaxuVV8VUInt8VUVUVU_TU.c new file mode 100644 index 0000000..7323091 --- /dev/null +++ b/test/codegen-golden/MaxuVV8VUInt8VUVUVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r MaxuVV8VUInt8VUVUVU_TU -n 1 -l 7 --has-ta --has-ma -c MaxuVV8VUInt8VUVUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmaxu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vmaxu_vv_u8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmaxu_vv_operator_0() { +uint8_t tmp[] = {65,90,60,43,62,14,46,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmaxu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmaxu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmaxu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxuVV8VUInt8VUVU_TA.c b/test/codegen-golden/MaxuVV8VUInt8VUVU_TA.c new file mode 100644 index 0000000..a290c95 --- /dev/null +++ b/test/codegen-golden/MaxuVV8VUInt8VUVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r MaxuVV8VUInt8VUVU_TA -n 1 -l 7 --has-ta --has-ma -c MaxuVV8VUInt8VUVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmaxu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vmaxu_vv_u8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmaxu_vv_operator_0() { +uint8_t tmp[] = {39,255,78,255,63,255,37,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmaxu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmaxu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmaxu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxuVV8VUInt8_m.c b/test/codegen-golden/MaxuVV8VUInt8_m.c new file mode 100644 index 0000000..b711be7 --- /dev/null +++ b/test/codegen-golden/MaxuVV8VUInt8_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r MaxuVV8VUInt8_m -n 1 -l 7 --has-ta --has-ma -c MaxuVV8VUInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmaxu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vmaxu_vv_u8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmaxu_vv_operator_0() { +uint8_t tmp[] = {65,75,70,59,58,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmaxu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmaxu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmaxu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxuVX8VUInt8.c b/test/codegen-golden/MaxuVX8VUInt8.c new file mode 100644 index 0000000..f508433 --- /dev/null +++ b/test/codegen-golden/MaxuVX8VUInt8.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r MaxuVX8VUInt8 -n 1 -l 7 --has-ta --has-ma -c MaxuVX8VUInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vmaxu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vmaxu_vx_u8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmaxu_vx_operator_0() { +uint8_t tmp[] = {39,90,78,43,63,39,39,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmaxu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmaxu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmaxu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxuVX8VUInt8VBVUSU_TAMA.c b/test/codegen-golden/MaxuVX8VUInt8VBVUSU_TAMA.c new file mode 100644 index 0000000..c952383 --- /dev/null +++ b/test/codegen-golden/MaxuVX8VUInt8VBVUSU_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r MaxuVX8VUInt8VBVUSU_TAMA -n 1 -l 7 --has-ta --has-ma -c MaxuVX8VUInt8VBVUSU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmaxu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vmaxu_vx_u8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmaxu_vx_operator_0() { +uint8_t tmp[] = {255,255,56,255,39,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmaxu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmaxu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmaxu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxuVX8VUInt8VBVUVUSU_TAMU.c b/test/codegen-golden/MaxuVX8VUInt8VBVUVUSU_TAMU.c new file mode 100644 index 0000000..c7289a5 --- /dev/null +++ b/test/codegen-golden/MaxuVX8VUInt8VBVUVUSU_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MaxuVX8VUInt8VBVUVUSU_TAMU -n 1 -l 7 --has-ta --has-ma -c MaxuVX8VUInt8VBVUVUSU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmaxu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vmaxu_vx_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmaxu_vx_operator_0() { +uint8_t tmp[] = {75,255,59,255,39,255,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmaxu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmaxu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmaxu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxuVX8VUInt8VBVUVUSU_TUMA.c b/test/codegen-golden/MaxuVX8VUInt8VBVUVUSU_TUMA.c new file mode 100644 index 0000000..91dbf5c --- /dev/null +++ b/test/codegen-golden/MaxuVX8VUInt8VBVUVUSU_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MaxuVX8VUInt8VBVUVUSU_TUMA -n 1 -l 7 --has-ta --has-ma -c MaxuVX8VUInt8VBVUVUSU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmaxu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vmaxu_vx_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmaxu_vx_operator_0() { +uint8_t tmp[] = {255,42,59,58,39,37,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmaxu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmaxu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmaxu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxuVX8VUInt8VBVUVUSU_TUMU.c b/test/codegen-golden/MaxuVX8VUInt8VBVUVUSU_TUMU.c new file mode 100644 index 0000000..183aadd --- /dev/null +++ b/test/codegen-golden/MaxuVX8VUInt8VBVUVUSU_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MaxuVX8VUInt8VBVUVUSU_TUMU -n 1 -l 7 --has-ta --has-ma -c MaxuVX8VUInt8VBVUVUSU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmaxu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vmaxu_vx_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmaxu_vx_operator_0() { +uint8_t tmp[] = {75,42,59,58,39,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmaxu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmaxu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmaxu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxuVX8VUInt8VUSU_TA.c b/test/codegen-golden/MaxuVX8VUInt8VUSU_TA.c new file mode 100644 index 0000000..e4045b8 --- /dev/null +++ b/test/codegen-golden/MaxuVX8VUInt8VUSU_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r MaxuVX8VUInt8VUSU_TA -n 1 -l 7 --has-ta --has-ma -c MaxuVX8VUInt8VUSU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vmaxu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vmaxu_vx_u8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmaxu_vx_operator_0() { +uint8_t tmp[] = {39,255,78,255,63,255,39,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmaxu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmaxu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmaxu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxuVX8VUInt8VUVUSU_TU.c b/test/codegen-golden/MaxuVX8VUInt8VUVUSU_TU.c new file mode 100644 index 0000000..6f147e2 --- /dev/null +++ b/test/codegen-golden/MaxuVX8VUInt8VUVUSU_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r MaxuVX8VUInt8VUVUSU_TU -n 1 -l 7 --has-ta --has-ma -c MaxuVX8VUInt8VUVUSU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmaxu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vmaxu_vx_u8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmaxu_vx_operator_0() { +uint8_t tmp[] = {75,90,56,43,39,14,65,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmaxu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmaxu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmaxu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MaxuVX8VUInt8_m.c b/test/codegen-golden/MaxuVX8VUInt8_m.c new file mode 100644 index 0000000..0a88aa0 --- /dev/null +++ b/test/codegen-golden/MaxuVX8VUInt8_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r MaxuVX8VUInt8_m -n 1 -l 7 --has-ta --has-ma -c MaxuVX8VUInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmaxu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vmaxu_vx_u8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmaxu_vx_operator_0() { +uint8_t tmp[] = {75,60,59,58,39,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmaxu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmaxu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmaxu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MclrMVBool.c b/test/codegen-golden/MclrMVBool.c new file mode 100644 index 0000000..8499347 --- /dev/null +++ b/test/codegen-golden/MclrMVBool.c @@ -0,0 +1,50 @@ +// COMMAND: random_gen -r MclrMVBool -n 1 -l 7 --has-ta --has-ma -c MclrMVBool.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +void vmclr_m_operator_0() { +int8_t *placeholder0 = value_0; + +int placeholder1 = 7; + +for (size_t vl; placeholder1 > 0; placeholder1 -= vl) { +vl = vsetvl_e8m1(placeholder1); + +vbool8_t vec_value_0_0= vmclr_m_b8(vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_0_0, zero, 1, vl); +vse8_v_i8m1(placeholder0, vec_store, vl); +} + +placeholder0 += vl; +} +} +int golden_vmclr_m_operator_0() { +int8_t tmp[] = {0,0,0,0,0,0,0,}; +for (int i=0; i<7;++i) +if(value_0[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vmclr_m_operator_0(); +printf("operator_0 : %s\n", golden_vmclr_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vmclr_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MergeVVM8VInt8VBVIVI.c b/test/codegen-golden/MergeVVM8VInt8VBVIVI.c new file mode 100644 index 0000000..3a48fcb --- /dev/null +++ b/test/codegen-golden/MergeVVM8VInt8VBVIVI.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r MergeVVM8VInt8VBVIVI -n 1 -l 7 --has-ta --has-ma -c MergeVVM8VInt8VBVIVI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmerge_vvm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmerge_vvm_i8m1(mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmerge_vvm_operator_0() { +int8_t tmp[] = {29,50,-15,19,16,-74,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmerge_vvm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmerge_vvm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmerge_vvm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MergeVVM8VInt8VBVIVIVI_TU.c b/test/codegen-golden/MergeVVM8VInt8VBVIVIVI_TU.c new file mode 100644 index 0000000..27e41d8 --- /dev/null +++ b/test/codegen-golden/MergeVVM8VInt8VBVIVIVI_TU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MergeVVM8VInt8VBVIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c MergeVVM8VInt8VBVIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmerge_vvm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmerge_vvm_i8m1_tu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmerge_vvm_operator_0() { +int8_t tmp[] = {70,84,-15,19,16,-74,-40,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmerge_vvm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmerge_vvm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmerge_vvm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MergeVVM8VInt8VBVIVI_TA.c b/test/codegen-golden/MergeVVM8VInt8VBVIVI_TA.c new file mode 100644 index 0000000..57d98d2 --- /dev/null +++ b/test/codegen-golden/MergeVVM8VInt8VBVIVI_TA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r MergeVVM8VInt8VBVIVI_TA -n 1 -l 7 --has-ta --has-ma -c MergeVVM8VInt8VBVIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmerge_vvm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmerge_vvm_i8m1_ta(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmerge_vvm_operator_0() { +int8_t tmp[] = {29,-1,-15,-1,16,-1,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmerge_vvm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmerge_vvm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmerge_vvm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MergeVXM8VInt8VBVISI.c b/test/codegen-golden/MergeVXM8VInt8VBVISI.c new file mode 100644 index 0000000..8400f7c --- /dev/null +++ b/test/codegen-golden/MergeVXM8VInt8VBVISI.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r MergeVXM8VInt8VBVISI -n 1 -l 7 --has-ta --has-ma -c MergeVXM8VInt8VBVISI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmerge_vxm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vmerge_vxm_i8m1(mask_value_0_0, vec_value_1_0, placeholder2, vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmerge_vxm_operator_0() { +int8_t tmp[] = {50,-22,-22,16,-22,-26,29,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmerge_vxm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmerge_vxm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmerge_vxm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MergeVXM8VInt8VBVISI_TA.c b/test/codegen-golden/MergeVXM8VInt8VBVISI_TA.c new file mode 100644 index 0000000..ec2c6a6 --- /dev/null +++ b/test/codegen-golden/MergeVXM8VInt8VBVISI_TA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r MergeVXM8VInt8VBVISI_TA -n 1 -l 7 --has-ta --has-ma -c MergeVXM8VInt8VBVISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmerge_vxm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vmerge_vxm_i8m1_ta(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmerge_vxm_operator_0() { +int8_t tmp[] = {50,-1,-22,-1,-22,-1,29,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmerge_vxm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmerge_vxm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmerge_vxm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MergeVXM8VInt8VBVIVISI_TU.c b/test/codegen-golden/MergeVXM8VInt8VBVIVISI_TU.c new file mode 100644 index 0000000..8f02fd6 --- /dev/null +++ b/test/codegen-golden/MergeVXM8VInt8VBVIVISI_TU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MergeVXM8VInt8VBVIVISI_TU -n 1 -l 7 --has-ta --has-ma -c MergeVXM8VInt8VBVIVISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmerge_vxm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vmerge_vxm_i8m1_tu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmerge_vxm_operator_0() { +int8_t tmp[] = {84,-15,-22,16,-22,-26,70,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmerge_vxm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmerge_vxm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmerge_vxm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfeqVF16VBoolVBVBVFSF_MU.c b/test/codegen-golden/MfeqVF16VBoolVBVBVFSF_MU.c new file mode 100644 index 0000000..c497808 --- /dev/null +++ b/test/codegen-golden/MfeqVF16VBoolVBVBVFSF_MU.c @@ -0,0 +1,113 @@ +// COMMAND: random_gen -r MfeqVF16VBoolVBVBVFSF_MU -n 1 -l 7 --has-ta --has-ma -c MfeqVF16VBoolVBVBVFSF_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,0,1,1,0,0,1,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmfeq_vf_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vbool16_t vec_value_4_0= vmfeq_vf_f16m1_b16_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, placeholder3, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmfeq_vf_operator_0() { +int8_t tmp[] = {1,0,0,1,0,0,1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmfeq_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfeq_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmfeq_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfeqVF16VBoolVBVBVFSF_m.c b/test/codegen-golden/MfeqVF16VBoolVBVBVFSF_m.c new file mode 100644 index 0000000..026b6f4 --- /dev/null +++ b/test/codegen-golden/MfeqVF16VBoolVBVBVFSF_m.c @@ -0,0 +1,113 @@ +// COMMAND: random_gen -r MfeqVF16VBoolVBVBVFSF_m -n 1 -l 7 --has-ta --has-ma -c MfeqVF16VBoolVBVBVFSF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,0,1,1,0,0,1,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmfeq_vf_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vbool16_t vec_value_4_0= vmfeq_vf_f16m1_b16_m (mask_value_0_0, mask_value_1_0, vec_value_2_0, placeholder3, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmfeq_vf_operator_0() { +int8_t tmp[] = {1,0,0,1,0,0,1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmfeq_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfeq_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmfeq_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfeqVF16VBoolVBVFSF_MA.c b/test/codegen-golden/MfeqVF16VBoolVBVFSF_MA.c new file mode 100644 index 0000000..d1f64ad --- /dev/null +++ b/test/codegen-golden/MfeqVF16VBoolVBVFSF_MA.c @@ -0,0 +1,97 @@ +// COMMAND: random_gen -r MfeqVF16VBoolVBVFSF_MA -n 1 -l 7 --has-ta --has-ma -c MfeqVF16VBoolVBVFSF_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vmfeq_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vbool16_t vec_value_3_0= vmfeq_vf_f16m1_b16_ma(mask_value_0_0, vec_value_1_0, placeholder2, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_3_0, zero, 1, vl); +vse8_v_i8mf2(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmfeq_vf_operator_0() { +int8_t tmp[] = {1,0,0,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmfeq_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfeq_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmfeq_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfeqVF16VBoolVFSF.c b/test/codegen-golden/MfeqVF16VBoolVFSF.c new file mode 100644 index 0000000..68ec05b --- /dev/null +++ b/test/codegen-golden/MfeqVF16VBoolVFSF.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r MfeqVF16VBoolVFSF -n 1 -l 7 --has-ta --has-ma -c MfeqVF16VBoolVFSF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vmfeq_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vbool16_t vec_value_2_0= vmfeq_vf_f16m1_b16(vec_value_0_0, placeholder1, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_2_0, zero, 1, vl); +vse8_v_i8mf2(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmfeq_vf_operator_0() { +int8_t tmp[] = {0,0,0,0,0,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmfeq_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfeq_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmfeq_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfeqVV16VBoolVBVBVFVF_MU.c b/test/codegen-golden/MfeqVV16VBoolVBVBVFVF_MU.c new file mode 100644 index 0000000..2c4d0e0 --- /dev/null +++ b/test/codegen-golden/MfeqVV16VBoolVBVBVFVF_MU.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r MfeqVV16VBoolVBVBVFVF_MU -n 1 -l 7 --has-ta --has-ma -c MfeqVV16VBoolVBVBVFVF_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmfeq_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vbool16_t vec_value_4_0= vmfeq_vv_f16m1_b16_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmfeq_vv_operator_0() { +int8_t tmp[] = {1,0,0,1,0,0,0,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmfeq_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfeq_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmfeq_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfeqVV16VBoolVBVBVFVF_m.c b/test/codegen-golden/MfeqVV16VBoolVBVBVFVF_m.c new file mode 100644 index 0000000..e9dd409 --- /dev/null +++ b/test/codegen-golden/MfeqVV16VBoolVBVBVFVF_m.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r MfeqVV16VBoolVBVBVFVF_m -n 1 -l 7 --has-ta --has-ma -c MfeqVV16VBoolVBVBVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmfeq_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vbool16_t vec_value_4_0= vmfeq_vv_f16m1_b16_m (mask_value_0_0, mask_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmfeq_vv_operator_0() { +int8_t tmp[] = {1,0,0,1,0,0,0,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmfeq_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfeq_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmfeq_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfeqVV16VBoolVBVFVF_MA.c b/test/codegen-golden/MfeqVV16VBoolVBVFVF_MA.c new file mode 100644 index 0000000..0b72ffa --- /dev/null +++ b/test/codegen-golden/MfeqVV16VBoolVBVFVF_MA.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r MfeqVV16VBoolVBVFVF_MA -n 1 -l 7 --has-ta --has-ma -c MfeqVV16VBoolVBVFVF_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vmfeq_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vbool16_t vec_value_3_0= vmfeq_vv_f16m1_b16_ma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_3_0, zero, 1, vl); +vse8_v_i8mf2(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmfeq_vv_operator_0() { +int8_t tmp[] = {1,0,0,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmfeq_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfeq_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmfeq_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfeqVV16VBoolVFVF.c b/test/codegen-golden/MfeqVV16VBoolVFVF.c new file mode 100644 index 0000000..88dd180 --- /dev/null +++ b/test/codegen-golden/MfeqVV16VBoolVFVF.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r MfeqVV16VBoolVFVF -n 1 -l 7 --has-ta --has-ma -c MfeqVV16VBoolVFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vmfeq_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vbool16_t vec_value_2_0= vmfeq_vv_f16m1_b16(vec_value_0_0, vec_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_2_0, zero, 1, vl); +vse8_v_i8mf2(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmfeq_vv_operator_0() { +int8_t tmp[] = {0,0,0,0,0,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmfeq_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfeq_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmfeq_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfgeVF16VBoolVBVBVFSF_MU.c b/test/codegen-golden/MfgeVF16VBoolVBVBVFSF_MU.c new file mode 100644 index 0000000..aee48a7 --- /dev/null +++ b/test/codegen-golden/MfgeVF16VBoolVBVBVFSF_MU.c @@ -0,0 +1,113 @@ +// COMMAND: random_gen -r MfgeVF16VBoolVBVBVFSF_MU -n 1 -l 7 --has-ta --has-ma -c MfgeVF16VBoolVBVBVFSF_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,0,1,1,0,0,1,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmfge_vf_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vbool16_t vec_value_4_0= vmfge_vf_f16m1_b16_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, placeholder3, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmfge_vf_operator_0() { +int8_t tmp[] = {1,1,1,1,0,0,1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmfge_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfge_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmfge_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfgeVF16VBoolVBVBVFSF_m.c b/test/codegen-golden/MfgeVF16VBoolVBVBVFSF_m.c new file mode 100644 index 0000000..8dcbea8 --- /dev/null +++ b/test/codegen-golden/MfgeVF16VBoolVBVBVFSF_m.c @@ -0,0 +1,113 @@ +// COMMAND: random_gen -r MfgeVF16VBoolVBVBVFSF_m -n 1 -l 7 --has-ta --has-ma -c MfgeVF16VBoolVBVBVFSF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,0,1,1,0,0,1,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmfge_vf_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vbool16_t vec_value_4_0= vmfge_vf_f16m1_b16_m (mask_value_0_0, mask_value_1_0, vec_value_2_0, placeholder3, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmfge_vf_operator_0() { +int8_t tmp[] = {1,1,1,1,0,0,1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmfge_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfge_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmfge_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfgeVF16VBoolVBVFSF_MA.c b/test/codegen-golden/MfgeVF16VBoolVBVFSF_MA.c new file mode 100644 index 0000000..5296e0b --- /dev/null +++ b/test/codegen-golden/MfgeVF16VBoolVBVFSF_MA.c @@ -0,0 +1,97 @@ +// COMMAND: random_gen -r MfgeVF16VBoolVBVFSF_MA -n 1 -l 7 --has-ta --has-ma -c MfgeVF16VBoolVBVFSF_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vmfge_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vbool16_t vec_value_3_0= vmfge_vf_f16m1_b16_ma(mask_value_0_0, vec_value_1_0, placeholder2, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_3_0, zero, 1, vl); +vse8_v_i8mf2(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmfge_vf_operator_0() { +int8_t tmp[] = {1,1,1,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmfge_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfge_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmfge_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfgeVF16VBoolVFSF.c b/test/codegen-golden/MfgeVF16VBoolVFSF.c new file mode 100644 index 0000000..0422b21 --- /dev/null +++ b/test/codegen-golden/MfgeVF16VBoolVFSF.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r MfgeVF16VBoolVFSF -n 1 -l 7 --has-ta --has-ma -c MfgeVF16VBoolVFSF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vmfge_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vbool16_t vec_value_2_0= vmfge_vf_f16m1_b16(vec_value_0_0, placeholder1, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_2_0, zero, 1, vl); +vse8_v_i8mf2(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmfge_vf_operator_0() { +int8_t tmp[] = {0,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmfge_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfge_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmfge_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfgeVV16VBoolVBVBVFVF_MU.c b/test/codegen-golden/MfgeVV16VBoolVBVBVFVF_MU.c new file mode 100644 index 0000000..101bc7b --- /dev/null +++ b/test/codegen-golden/MfgeVV16VBoolVBVBVFVF_MU.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r MfgeVV16VBoolVBVBVFVF_MU -n 1 -l 7 --has-ta --has-ma -c MfgeVV16VBoolVBVBVFVF_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmfge_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vbool16_t vec_value_4_0= vmfge_vv_f16m1_b16_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmfge_vv_operator_0() { +int8_t tmp[] = {1,0,1,1,0,0,0,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmfge_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfge_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmfge_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfgeVV16VBoolVBVBVFVF_m.c b/test/codegen-golden/MfgeVV16VBoolVBVBVFVF_m.c new file mode 100644 index 0000000..b98eb2f --- /dev/null +++ b/test/codegen-golden/MfgeVV16VBoolVBVBVFVF_m.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r MfgeVV16VBoolVBVBVFVF_m -n 1 -l 7 --has-ta --has-ma -c MfgeVV16VBoolVBVBVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmfge_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vbool16_t vec_value_4_0= vmfge_vv_f16m1_b16_m (mask_value_0_0, mask_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmfge_vv_operator_0() { +int8_t tmp[] = {1,0,1,1,0,0,0,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmfge_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfge_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmfge_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfgeVV16VBoolVBVFVF_MA.c b/test/codegen-golden/MfgeVV16VBoolVBVFVF_MA.c new file mode 100644 index 0000000..b8f6ead --- /dev/null +++ b/test/codegen-golden/MfgeVV16VBoolVBVFVF_MA.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r MfgeVV16VBoolVBVFVF_MA -n 1 -l 7 --has-ta --has-ma -c MfgeVV16VBoolVBVFVF_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vmfge_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vbool16_t vec_value_3_0= vmfge_vv_f16m1_b16_ma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_3_0, zero, 1, vl); +vse8_v_i8mf2(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmfge_vv_operator_0() { +int8_t tmp[] = {1,1,1,1,1,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmfge_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfge_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmfge_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfgeVV16VBoolVFVF.c b/test/codegen-golden/MfgeVV16VBoolVFVF.c new file mode 100644 index 0000000..5a42bce --- /dev/null +++ b/test/codegen-golden/MfgeVV16VBoolVFVF.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r MfgeVV16VBoolVFVF -n 1 -l 7 --has-ta --has-ma -c MfgeVV16VBoolVFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vmfge_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vbool16_t vec_value_2_0= vmfge_vv_f16m1_b16(vec_value_0_0, vec_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_2_0, zero, 1, vl); +vse8_v_i8mf2(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmfge_vv_operator_0() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmfge_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfge_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmfge_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfgtVF16VBoolVBVBVFSF_MU.c b/test/codegen-golden/MfgtVF16VBoolVBVBVFSF_MU.c new file mode 100644 index 0000000..fbeb6d9 --- /dev/null +++ b/test/codegen-golden/MfgtVF16VBoolVBVBVFSF_MU.c @@ -0,0 +1,113 @@ +// COMMAND: random_gen -r MfgtVF16VBoolVBVBVFSF_MU -n 1 -l 7 --has-ta --has-ma -c MfgtVF16VBoolVBVBVFSF_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,0,1,1,0,0,1,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmfgt_vf_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vbool16_t vec_value_4_0= vmfgt_vf_f16m1_b16_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, placeholder3, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmfgt_vf_operator_0() { +int8_t tmp[] = {1,1,1,1,0,0,1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmfgt_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfgt_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmfgt_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfgtVF16VBoolVBVBVFSF_m.c b/test/codegen-golden/MfgtVF16VBoolVBVBVFSF_m.c new file mode 100644 index 0000000..00c353e --- /dev/null +++ b/test/codegen-golden/MfgtVF16VBoolVBVBVFSF_m.c @@ -0,0 +1,113 @@ +// COMMAND: random_gen -r MfgtVF16VBoolVBVBVFSF_m -n 1 -l 7 --has-ta --has-ma -c MfgtVF16VBoolVBVBVFSF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,0,1,1,0,0,1,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmfgt_vf_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vbool16_t vec_value_4_0= vmfgt_vf_f16m1_b16_m (mask_value_0_0, mask_value_1_0, vec_value_2_0, placeholder3, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmfgt_vf_operator_0() { +int8_t tmp[] = {1,1,1,1,0,0,1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmfgt_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfgt_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmfgt_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfgtVF16VBoolVBVFSF_MA.c b/test/codegen-golden/MfgtVF16VBoolVBVFSF_MA.c new file mode 100644 index 0000000..9f6f8a9 --- /dev/null +++ b/test/codegen-golden/MfgtVF16VBoolVBVFSF_MA.c @@ -0,0 +1,97 @@ +// COMMAND: random_gen -r MfgtVF16VBoolVBVFSF_MA -n 1 -l 7 --has-ta --has-ma -c MfgtVF16VBoolVBVFSF_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vmfgt_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vbool16_t vec_value_3_0= vmfgt_vf_f16m1_b16_ma(mask_value_0_0, vec_value_1_0, placeholder2, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_3_0, zero, 1, vl); +vse8_v_i8mf2(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmfgt_vf_operator_0() { +int8_t tmp[] = {1,1,1,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmfgt_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfgt_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmfgt_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfgtVF16VBoolVFSF.c b/test/codegen-golden/MfgtVF16VBoolVFSF.c new file mode 100644 index 0000000..34ff6db --- /dev/null +++ b/test/codegen-golden/MfgtVF16VBoolVFSF.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r MfgtVF16VBoolVFSF -n 1 -l 7 --has-ta --has-ma -c MfgtVF16VBoolVFSF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vmfgt_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vbool16_t vec_value_2_0= vmfgt_vf_f16m1_b16(vec_value_0_0, placeholder1, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_2_0, zero, 1, vl); +vse8_v_i8mf2(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmfgt_vf_operator_0() { +int8_t tmp[] = {0,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmfgt_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfgt_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmfgt_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfgtVV16VBoolVBVBVFVF_MU.c b/test/codegen-golden/MfgtVV16VBoolVBVBVFVF_MU.c new file mode 100644 index 0000000..0d8a35b --- /dev/null +++ b/test/codegen-golden/MfgtVV16VBoolVBVBVFVF_MU.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r MfgtVV16VBoolVBVBVFVF_MU -n 1 -l 7 --has-ta --has-ma -c MfgtVV16VBoolVBVBVFVF_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmfgt_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vbool16_t vec_value_4_0= vmfgt_vv_f16m1_b16_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmfgt_vv_operator_0() { +int8_t tmp[] = {1,0,1,1,0,0,0,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmfgt_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfgt_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmfgt_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfgtVV16VBoolVBVBVFVF_m.c b/test/codegen-golden/MfgtVV16VBoolVBVBVFVF_m.c new file mode 100644 index 0000000..7d0bb42 --- /dev/null +++ b/test/codegen-golden/MfgtVV16VBoolVBVBVFVF_m.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r MfgtVV16VBoolVBVBVFVF_m -n 1 -l 7 --has-ta --has-ma -c MfgtVV16VBoolVBVBVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmfgt_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vbool16_t vec_value_4_0= vmfgt_vv_f16m1_b16_m (mask_value_0_0, mask_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmfgt_vv_operator_0() { +int8_t tmp[] = {1,0,1,1,0,0,0,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmfgt_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfgt_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmfgt_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfgtVV16VBoolVBVFVF_MA.c b/test/codegen-golden/MfgtVV16VBoolVBVFVF_MA.c new file mode 100644 index 0000000..bdf28c3 --- /dev/null +++ b/test/codegen-golden/MfgtVV16VBoolVBVFVF_MA.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r MfgtVV16VBoolVBVFVF_MA -n 1 -l 7 --has-ta --has-ma -c MfgtVV16VBoolVBVFVF_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vmfgt_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vbool16_t vec_value_3_0= vmfgt_vv_f16m1_b16_ma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_3_0, zero, 1, vl); +vse8_v_i8mf2(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmfgt_vv_operator_0() { +int8_t tmp[] = {1,1,1,1,1,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmfgt_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfgt_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmfgt_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfgtVV16VBoolVFVF.c b/test/codegen-golden/MfgtVV16VBoolVFVF.c new file mode 100644 index 0000000..a680c68 --- /dev/null +++ b/test/codegen-golden/MfgtVV16VBoolVFVF.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r MfgtVV16VBoolVFVF -n 1 -l 7 --has-ta --has-ma -c MfgtVV16VBoolVFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vmfgt_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vbool16_t vec_value_2_0= vmfgt_vv_f16m1_b16(vec_value_0_0, vec_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_2_0, zero, 1, vl); +vse8_v_i8mf2(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmfgt_vv_operator_0() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmfgt_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfgt_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmfgt_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfleVF16VBoolVBVBVFSF_MU.c b/test/codegen-golden/MfleVF16VBoolVBVBVFSF_MU.c new file mode 100644 index 0000000..8077934 --- /dev/null +++ b/test/codegen-golden/MfleVF16VBoolVBVBVFSF_MU.c @@ -0,0 +1,113 @@ +// COMMAND: random_gen -r MfleVF16VBoolVBVBVFSF_MU -n 1 -l 7 --has-ta --has-ma -c MfleVF16VBoolVBVBVFSF_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,0,1,1,0,0,1,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmfle_vf_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vbool16_t vec_value_4_0= vmfle_vf_f16m1_b16_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, placeholder3, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmfle_vf_operator_0() { +int8_t tmp[] = {1,0,0,1,1,0,1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmfle_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfle_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmfle_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfleVF16VBoolVBVBVFSF_m.c b/test/codegen-golden/MfleVF16VBoolVBVBVFSF_m.c new file mode 100644 index 0000000..a628145 --- /dev/null +++ b/test/codegen-golden/MfleVF16VBoolVBVBVFSF_m.c @@ -0,0 +1,113 @@ +// COMMAND: random_gen -r MfleVF16VBoolVBVBVFSF_m -n 1 -l 7 --has-ta --has-ma -c MfleVF16VBoolVBVBVFSF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,0,1,1,0,0,1,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmfle_vf_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vbool16_t vec_value_4_0= vmfle_vf_f16m1_b16_m (mask_value_0_0, mask_value_1_0, vec_value_2_0, placeholder3, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmfle_vf_operator_0() { +int8_t tmp[] = {1,0,0,1,1,0,1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmfle_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfle_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmfle_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfleVF16VBoolVBVFSF_MA.c b/test/codegen-golden/MfleVF16VBoolVBVFSF_MA.c new file mode 100644 index 0000000..b2aa2fa --- /dev/null +++ b/test/codegen-golden/MfleVF16VBoolVBVFSF_MA.c @@ -0,0 +1,97 @@ +// COMMAND: random_gen -r MfleVF16VBoolVBVFSF_MA -n 1 -l 7 --has-ta --has-ma -c MfleVF16VBoolVBVFSF_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vmfle_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vbool16_t vec_value_3_0= vmfle_vf_f16m1_b16_ma(mask_value_0_0, vec_value_1_0, placeholder2, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_3_0, zero, 1, vl); +vse8_v_i8mf2(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmfle_vf_operator_0() { +int8_t tmp[] = {1,0,0,1,1,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmfle_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfle_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmfle_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfleVF16VBoolVFSF.c b/test/codegen-golden/MfleVF16VBoolVFSF.c new file mode 100644 index 0000000..80bb67b --- /dev/null +++ b/test/codegen-golden/MfleVF16VBoolVFSF.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r MfleVF16VBoolVFSF -n 1 -l 7 --has-ta --has-ma -c MfleVF16VBoolVFSF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vmfle_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vbool16_t vec_value_2_0= vmfle_vf_f16m1_b16(vec_value_0_0, placeholder1, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_2_0, zero, 1, vl); +vse8_v_i8mf2(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmfle_vf_operator_0() { +int8_t tmp[] = {1,0,0,0,0,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmfle_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfle_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmfle_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfleVV16VBoolVBVBVFVF_MU.c b/test/codegen-golden/MfleVV16VBoolVBVBVFVF_MU.c new file mode 100644 index 0000000..de31337 --- /dev/null +++ b/test/codegen-golden/MfleVV16VBoolVBVBVFVF_MU.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r MfleVV16VBoolVBVBVFVF_MU -n 1 -l 7 --has-ta --has-ma -c MfleVV16VBoolVBVBVFVF_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmfle_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vbool16_t vec_value_4_0= vmfle_vv_f16m1_b16_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmfle_vv_operator_0() { +int8_t tmp[] = {1,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmfle_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfle_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmfle_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfleVV16VBoolVBVBVFVF_m.c b/test/codegen-golden/MfleVV16VBoolVBVBVFVF_m.c new file mode 100644 index 0000000..983f94d --- /dev/null +++ b/test/codegen-golden/MfleVV16VBoolVBVBVFVF_m.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r MfleVV16VBoolVBVBVFVF_m -n 1 -l 7 --has-ta --has-ma -c MfleVV16VBoolVBVBVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmfle_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vbool16_t vec_value_4_0= vmfle_vv_f16m1_b16_m (mask_value_0_0, mask_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmfle_vv_operator_0() { +int8_t tmp[] = {1,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmfle_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfle_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmfle_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfleVV16VBoolVBVFVF_MA.c b/test/codegen-golden/MfleVV16VBoolVBVFVF_MA.c new file mode 100644 index 0000000..7c2a306 --- /dev/null +++ b/test/codegen-golden/MfleVV16VBoolVBVFVF_MA.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r MfleVV16VBoolVBVFVF_MA -n 1 -l 7 --has-ta --has-ma -c MfleVV16VBoolVBVFVF_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vmfle_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vbool16_t vec_value_3_0= vmfle_vv_f16m1_b16_ma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_3_0, zero, 1, vl); +vse8_v_i8mf2(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmfle_vv_operator_0() { +int8_t tmp[] = {1,0,0,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmfle_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfle_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmfle_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfleVV16VBoolVFVF.c b/test/codegen-golden/MfleVV16VBoolVFVF.c new file mode 100644 index 0000000..67ce728 --- /dev/null +++ b/test/codegen-golden/MfleVV16VBoolVFVF.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r MfleVV16VBoolVFVF -n 1 -l 7 --has-ta --has-ma -c MfleVV16VBoolVFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vmfle_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vbool16_t vec_value_2_0= vmfle_vv_f16m1_b16(vec_value_0_0, vec_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_2_0, zero, 1, vl); +vse8_v_i8mf2(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmfle_vv_operator_0() { +int8_t tmp[] = {1,0,0,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmfle_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfle_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmfle_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfltVF16VBoolVBVBVFSF_MU.c b/test/codegen-golden/MfltVF16VBoolVBVBVFSF_MU.c new file mode 100644 index 0000000..35f56b5 --- /dev/null +++ b/test/codegen-golden/MfltVF16VBoolVBVBVFSF_MU.c @@ -0,0 +1,113 @@ +// COMMAND: random_gen -r MfltVF16VBoolVBVBVFSF_MU -n 1 -l 7 --has-ta --has-ma -c MfltVF16VBoolVBVBVFSF_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,0,1,1,0,0,1,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmflt_vf_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vbool16_t vec_value_4_0= vmflt_vf_f16m1_b16_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, placeholder3, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmflt_vf_operator_0() { +int8_t tmp[] = {1,0,0,1,1,0,1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmflt_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmflt_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmflt_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfltVF16VBoolVBVBVFSF_m.c b/test/codegen-golden/MfltVF16VBoolVBVBVFSF_m.c new file mode 100644 index 0000000..5f9cf9b --- /dev/null +++ b/test/codegen-golden/MfltVF16VBoolVBVBVFSF_m.c @@ -0,0 +1,113 @@ +// COMMAND: random_gen -r MfltVF16VBoolVBVBVFSF_m -n 1 -l 7 --has-ta --has-ma -c MfltVF16VBoolVBVBVFSF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,0,1,1,0,0,1,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmflt_vf_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vbool16_t vec_value_4_0= vmflt_vf_f16m1_b16_m (mask_value_0_0, mask_value_1_0, vec_value_2_0, placeholder3, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmflt_vf_operator_0() { +int8_t tmp[] = {1,0,0,1,1,0,1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmflt_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmflt_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmflt_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfltVF16VBoolVBVFSF_MA.c b/test/codegen-golden/MfltVF16VBoolVBVFSF_MA.c new file mode 100644 index 0000000..fc92659 --- /dev/null +++ b/test/codegen-golden/MfltVF16VBoolVBVFSF_MA.c @@ -0,0 +1,97 @@ +// COMMAND: random_gen -r MfltVF16VBoolVBVFSF_MA -n 1 -l 7 --has-ta --has-ma -c MfltVF16VBoolVBVFSF_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vmflt_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vbool16_t vec_value_3_0= vmflt_vf_f16m1_b16_ma(mask_value_0_0, vec_value_1_0, placeholder2, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_3_0, zero, 1, vl); +vse8_v_i8mf2(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmflt_vf_operator_0() { +int8_t tmp[] = {1,0,0,1,1,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmflt_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmflt_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmflt_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfltVF16VBoolVFSF.c b/test/codegen-golden/MfltVF16VBoolVFSF.c new file mode 100644 index 0000000..780c0a0 --- /dev/null +++ b/test/codegen-golden/MfltVF16VBoolVFSF.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r MfltVF16VBoolVFSF -n 1 -l 7 --has-ta --has-ma -c MfltVF16VBoolVFSF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vmflt_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vbool16_t vec_value_2_0= vmflt_vf_f16m1_b16(vec_value_0_0, placeholder1, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_2_0, zero, 1, vl); +vse8_v_i8mf2(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmflt_vf_operator_0() { +int8_t tmp[] = {1,0,0,0,0,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmflt_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmflt_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmflt_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfltVV16VBoolVBVBVFVF_MU.c b/test/codegen-golden/MfltVV16VBoolVBVBVFVF_MU.c new file mode 100644 index 0000000..fa5d80c --- /dev/null +++ b/test/codegen-golden/MfltVV16VBoolVBVBVFVF_MU.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r MfltVV16VBoolVBVBVFVF_MU -n 1 -l 7 --has-ta --has-ma -c MfltVV16VBoolVBVBVFVF_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmflt_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vbool16_t vec_value_4_0= vmflt_vv_f16m1_b16_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmflt_vv_operator_0() { +int8_t tmp[] = {1,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmflt_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmflt_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmflt_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfltVV16VBoolVBVBVFVF_m.c b/test/codegen-golden/MfltVV16VBoolVBVBVFVF_m.c new file mode 100644 index 0000000..3a301e5 --- /dev/null +++ b/test/codegen-golden/MfltVV16VBoolVBVBVFVF_m.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r MfltVV16VBoolVBVBVFVF_m -n 1 -l 7 --has-ta --has-ma -c MfltVV16VBoolVBVBVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmflt_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vbool16_t vec_value_4_0= vmflt_vv_f16m1_b16_m (mask_value_0_0, mask_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmflt_vv_operator_0() { +int8_t tmp[] = {1,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmflt_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmflt_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmflt_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfltVV16VBoolVBVFVF_MA.c b/test/codegen-golden/MfltVV16VBoolVBVFVF_MA.c new file mode 100644 index 0000000..545af7f --- /dev/null +++ b/test/codegen-golden/MfltVV16VBoolVBVFVF_MA.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r MfltVV16VBoolVBVFVF_MA -n 1 -l 7 --has-ta --has-ma -c MfltVV16VBoolVBVFVF_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vmflt_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vbool16_t vec_value_3_0= vmflt_vv_f16m1_b16_ma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_3_0, zero, 1, vl); +vse8_v_i8mf2(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmflt_vv_operator_0() { +int8_t tmp[] = {1,0,0,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmflt_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmflt_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmflt_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfltVV16VBoolVFVF.c b/test/codegen-golden/MfltVV16VBoolVFVF.c new file mode 100644 index 0000000..f7fd9fe --- /dev/null +++ b/test/codegen-golden/MfltVV16VBoolVFVF.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r MfltVV16VBoolVFVF -n 1 -l 7 --has-ta --has-ma -c MfltVV16VBoolVFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vmflt_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vbool16_t vec_value_2_0= vmflt_vv_f16m1_b16(vec_value_0_0, vec_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_2_0, zero, 1, vl); +vse8_v_i8mf2(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmflt_vv_operator_0() { +int8_t tmp[] = {1,0,0,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmflt_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmflt_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmflt_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfneVF16VBoolVBVBVFSF_MU.c b/test/codegen-golden/MfneVF16VBoolVBVBVFSF_MU.c new file mode 100644 index 0000000..a98a312 --- /dev/null +++ b/test/codegen-golden/MfneVF16VBoolVBVBVFSF_MU.c @@ -0,0 +1,113 @@ +// COMMAND: random_gen -r MfneVF16VBoolVBVBVFSF_MU -n 1 -l 7 --has-ta --has-ma -c MfneVF16VBoolVBVBVFSF_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,0,1,1,0,0,1,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmfne_vf_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vbool16_t vec_value_4_0= vmfne_vf_f16m1_b16_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, placeholder3, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmfne_vf_operator_0() { +int8_t tmp[] = {1,1,1,1,1,0,1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmfne_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfne_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmfne_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfneVF16VBoolVBVBVFSF_m.c b/test/codegen-golden/MfneVF16VBoolVBVBVFSF_m.c new file mode 100644 index 0000000..08d43c2 --- /dev/null +++ b/test/codegen-golden/MfneVF16VBoolVBVBVFSF_m.c @@ -0,0 +1,113 @@ +// COMMAND: random_gen -r MfneVF16VBoolVBVBVFSF_m -n 1 -l 7 --has-ta --has-ma -c MfneVF16VBoolVBVBVFSF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_3 = converter.f; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,0,1,1,0,0,1,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29822,29143,29133,29186,26923,28806,29733,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmfne_vf_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vbool16_t vec_value_4_0= vmfne_vf_f16m1_b16_m (mask_value_0_0, mask_value_1_0, vec_value_2_0, placeholder3, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmfne_vf_operator_0() { +int8_t tmp[] = {1,1,1,1,1,0,1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmfne_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfne_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmfne_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfneVF16VBoolVBVFSF_MA.c b/test/codegen-golden/MfneVF16VBoolVBVFSF_MA.c new file mode 100644 index 0000000..386507d --- /dev/null +++ b/test/codegen-golden/MfneVF16VBoolVBVFSF_MA.c @@ -0,0 +1,97 @@ +// COMMAND: random_gen -r MfneVF16VBoolVBVFSF_MA -n 1 -l 7 --has-ta --has-ma -c MfneVF16VBoolVBVFSF_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_2 = converter.f; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29523,28707,29046,29100,27386,28475,29258,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vmfne_vf_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vbool16_t vec_value_3_0= vmfne_vf_f16m1_b16_ma(mask_value_0_0, vec_value_1_0, placeholder2, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_3_0, zero, 1, vl); +vse8_v_i8mf2(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmfne_vf_operator_0() { +int8_t tmp[] = {1,1,1,1,1,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmfne_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfne_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmfne_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfneVF16VBoolVFSF.c b/test/codegen-golden/MfneVF16VBoolVFSF.c new file mode 100644 index 0000000..e2f9e87 --- /dev/null +++ b/test/codegen-golden/MfneVF16VBoolVFSF.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r MfneVF16VBoolVFSF -n 1 -l 7 --has-ta --has-ma -c MfneVF16VBoolVFSF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp = 28575; +union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp; +value_1 = converter.f; +} +void vmfne_vf_operator_0() { +float16_t *placeholder0 = value_0; +float16_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); + +vbool16_t vec_value_2_0= vmfne_vf_f16m1_b16(vec_value_0_0, placeholder1, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_2_0, zero, 1, vl); +vse8_v_i8mf2(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmfne_vf_operator_0() { +int8_t tmp[] = {1,1,1,1,1,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmfne_vf_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfne_vf_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmfne_vf_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfneVV16VBoolVBVBVFVF_MU.c b/test/codegen-golden/MfneVV16VBoolVBVBVFVF_MU.c new file mode 100644 index 0000000..73086fd --- /dev/null +++ b/test/codegen-golden/MfneVV16VBoolVBVBVFVF_MU.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r MfneVV16VBoolVBVBVFVF_MU -n 1 -l 7 --has-ta --has-ma -c MfneVV16VBoolVBVBVFVF_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmfne_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vbool16_t vec_value_4_0= vmfne_vv_f16m1_b16_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmfne_vv_operator_0() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmfne_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfne_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmfne_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfneVV16VBoolVBVBVFVF_m.c b/test/codegen-golden/MfneVV16VBoolVBVBVFVF_m.c new file mode 100644 index 0000000..9d50c38 --- /dev/null +++ b/test/codegen-golden/MfneVV16VBoolVBVBVFVF_m.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r MfneVV16VBoolVBVBVFVF_m -n 1 -l 7 --has-ta --has-ma -c MfneVV16VBoolVBVBVFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +float16_t value_2[7]; +float16_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_3[i] = converter.f; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {29733,28416,29383,29871,28160,27799,28128,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vmfne_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +float16_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1= vle8_v_i8mf2(placeholder1, vl); +vbool16_t mask_value_1_0= vmseq_vx_i8mf2_b16(vec_value_1, 1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); +vfloat16m1_t vec_value_3_0= vle16_v_f16m1(placeholder3, vl); + +vbool16_t vec_value_4_0= vmfne_vv_f16m1_b16_m (mask_value_0_0, mask_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_4_0, zero, 1, vl); +vse8_v_i8mf2(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmfne_vv_operator_0() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmfne_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfne_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmfne_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfneVV16VBoolVBVFVF_MA.c b/test/codegen-golden/MfneVV16VBoolVBVFVF_MA.c new file mode 100644 index 0000000..31fb3e3 --- /dev/null +++ b/test/codegen-golden/MfneVV16VBoolVBVFVF_MA.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r MfneVV16VBoolVBVFVF_MA -n 1 -l 7 --has-ta --has-ma -c MfneVV16VBoolVBVFVF_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float16_t value_1[7]; +float16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {29258,29822,29143,29133,29186,26923,28806,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vmfne_vv_operator_0() { +int8_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +float16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); +vfloat16m1_t vec_value_2_0= vle16_v_f16m1(placeholder2, vl); + +vbool16_t vec_value_3_0= vmfne_vv_f16m1_b16_ma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_3_0, zero, 1, vl); +vse8_v_i8mf2(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmfne_vv_operator_0() { +int8_t tmp[] = {1,1,1,1,1,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmfne_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfne_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmfne_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MfneVV16VBoolVFVF.c b/test/codegen-golden/MfneVV16VBoolVFVF.c new file mode 100644 index 0000000..5baf7a5 --- /dev/null +++ b/test/codegen-golden/MfneVV16VBoolVFVF.c @@ -0,0 +1,84 @@ +// COMMAND: random_gen -r MfneVV16VBoolVFVF -n 1 -l 7 --has-ta --has-ma -c MfneVV16VBoolVFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float16_t value_0[7]; +float16_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {27738,29790,29580,28721,29222,26987,27716,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {28575,29523,28707,29046,29100,27386,28475,}; +for (int i=0; i<7;++i) {union { uint16_t u16; float16_t f; } converter; +converter.u16 = tmp[i]; +value_1[i] = converter.f; +} +} +void vmfne_vv_operator_0() { +float16_t *placeholder0 = value_0; +float16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m1(placeholder3); +vfloat16m1_t vec_value_0_0= vle16_v_f16m1(placeholder0, vl); +vfloat16m1_t vec_value_1_0= vle16_v_f16m1(placeholder1, vl); + +vbool16_t vec_value_2_0= vmfne_vv_f16m1_b16(vec_value_0_0, vec_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8mf2(); +vint8mf2_t zero = vmv_v_x_i8mf2(0, vlmax); +vint8mf2_t vec_store = vmerge_vxm_i8mf2(vec_value_2_0, zero, 1, vl); +vse8_v_i8mf2(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmfne_vv_operator_0() { +int8_t tmp[] = {1,1,1,1,1,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmfne_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmfne_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmfne_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinVV8VInt8.c b/test/codegen-golden/MinVV8VInt8.c new file mode 100644 index 0000000..5c0b2b1 --- /dev/null +++ b/test/codegen-golden/MinVV8VInt8.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r MinVV8VInt8 -n 1 -l 7 --has-ta --has-ma -c MinVV8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmin_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vmin_vv_i8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmin_vv_operator_0() { +int8_t tmp[] = {-56,50,-15,-14,16,-73,-57,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmin_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmin_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmin_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinVV8VInt8VBVIVIVI_TAMU.c b/test/codegen-golden/MinVV8VInt8VBVIVIVI_TAMU.c new file mode 100644 index 0000000..a0f2c7b --- /dev/null +++ b/test/codegen-golden/MinVV8VInt8VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MinVV8VInt8VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c MinVV8VInt8VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmin_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmin_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmin_vv_operator_0() { +int8_t tmp[] = {29,-1,-15,-1,-39,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmin_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmin_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmin_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinVV8VInt8VBVIVIVI_TUMA.c b/test/codegen-golden/MinVV8VInt8VBVIVIVI_TUMA.c new file mode 100644 index 0000000..69345ef --- /dev/null +++ b/test/codegen-golden/MinVV8VInt8VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MinVV8VInt8VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c MinVV8VInt8VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmin_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmin_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmin_vv_operator_0() { +int8_t tmp[] = {-1,84,-15,19,-39,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmin_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmin_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmin_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinVV8VInt8VBVIVIVI_TUMU.c b/test/codegen-golden/MinVV8VInt8VBVIVIVI_TUMU.c new file mode 100644 index 0000000..2270b6b --- /dev/null +++ b/test/codegen-golden/MinVV8VInt8VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MinVV8VInt8VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c MinVV8VInt8VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmin_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmin_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmin_vv_operator_0() { +int8_t tmp[] = {29,84,-15,19,-39,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmin_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmin_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmin_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinVV8VInt8VBVIVI_TAMA.c b/test/codegen-golden/MinVV8VInt8VBVIVI_TAMA.c new file mode 100644 index 0000000..51d89f3 --- /dev/null +++ b/test/codegen-golden/MinVV8VInt8VBVIVI_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r MinVV8VInt8VBVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c MinVV8VInt8VBVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmin_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmin_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmin_vv_operator_0() { +int8_t tmp[] = {-1,-1,-15,-1,16,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmin_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmin_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmin_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinVV8VInt8VIVIVI_TU.c b/test/codegen-golden/MinVV8VInt8VIVIVI_TU.c new file mode 100644 index 0000000..70f897f --- /dev/null +++ b/test/codegen-golden/MinVV8VInt8VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r MinVV8VInt8VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c MinVV8VInt8VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmin_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmin_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmin_vv_operator_0() { +int8_t tmp[] = {-22,79,-15,-14,16,-73,-26,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmin_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmin_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmin_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinVV8VInt8VIVI_TA.c b/test/codegen-golden/MinVV8VInt8VIVI_TA.c new file mode 100644 index 0000000..b22bd11 --- /dev/null +++ b/test/codegen-golden/MinVV8VInt8VIVI_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r MinVV8VInt8VIVI_TA -n 1 -l 7 --has-ta --has-ma -c MinVV8VInt8VIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmin_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vmin_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmin_vv_operator_0() { +int8_t tmp[] = {-56,-1,-15,-1,16,-1,-57,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmin_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmin_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmin_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinVV8VInt8_m.c b/test/codegen-golden/MinVV8VInt8_m.c new file mode 100644 index 0000000..476da0a --- /dev/null +++ b/test/codegen-golden/MinVV8VInt8_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r MinVV8VInt8_m -n 1 -l 7 --has-ta --has-ma -c MinVV8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmin_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmin_vv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmin_vv_operator_0() { +int8_t tmp[] = {29,-28,-15,19,-39,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmin_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmin_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmin_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinVX8VInt8.c b/test/codegen-golden/MinVX8VInt8.c new file mode 100644 index 0000000..c07b868 --- /dev/null +++ b/test/codegen-golden/MinVX8VInt8.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r MinVX8VInt8 -n 1 -l 7 --has-ta --has-ma -c MinVX8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vmin_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vmin_vx_i8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmin_vx_operator_0() { +int8_t tmp[] = {-56,-22,-22,-22,-22,-73,-57,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmin_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmin_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmin_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinVX8VInt8VBVISI_TAMA.c b/test/codegen-golden/MinVX8VInt8VBVISI_TAMA.c new file mode 100644 index 0000000..fbf9c5c --- /dev/null +++ b/test/codegen-golden/MinVX8VInt8VBVISI_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r MinVX8VInt8VBVISI_TAMA -n 1 -l 7 --has-ta --has-ma -c MinVX8VInt8VBVISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmin_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vmin_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmin_vx_operator_0() { +int8_t tmp[] = {-1,-1,-22,-1,-65,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmin_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmin_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmin_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinVX8VInt8VBVIVISI_TAMU.c b/test/codegen-golden/MinVX8VInt8VBVIVISI_TAMU.c new file mode 100644 index 0000000..571df5c --- /dev/null +++ b/test/codegen-golden/MinVX8VInt8VBVIVISI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MinVX8VInt8VBVIVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c MinVX8VInt8VBVIVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmin_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vmin_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmin_vx_operator_0() { +int8_t tmp[] = {50,-1,-22,-1,-74,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmin_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmin_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmin_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinVX8VInt8VBVIVISI_TUMA.c b/test/codegen-golden/MinVX8VInt8VBVIVISI_TUMA.c new file mode 100644 index 0000000..74b32aa --- /dev/null +++ b/test/codegen-golden/MinVX8VInt8VBVIVISI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MinVX8VInt8VBVIVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c MinVX8VInt8VBVIVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmin_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vmin_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmin_vx_operator_0() { +int8_t tmp[] = {-1,-15,-22,16,-74,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmin_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmin_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmin_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinVX8VInt8VBVIVISI_TUMU.c b/test/codegen-golden/MinVX8VInt8VBVIVISI_TUMU.c new file mode 100644 index 0000000..156434e --- /dev/null +++ b/test/codegen-golden/MinVX8VInt8VBVIVISI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MinVX8VInt8VBVIVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c MinVX8VInt8VBVIVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmin_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vmin_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmin_vx_operator_0() { +int8_t tmp[] = {50,-15,-22,16,-74,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmin_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmin_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmin_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinVX8VInt8VISI_TA.c b/test/codegen-golden/MinVX8VInt8VISI_TA.c new file mode 100644 index 0000000..e0bb15e --- /dev/null +++ b/test/codegen-golden/MinVX8VInt8VISI_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r MinVX8VInt8VISI_TA -n 1 -l 7 --has-ta --has-ma -c MinVX8VInt8VISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vmin_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vmin_vx_i8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmin_vx_operator_0() { +int8_t tmp[] = {-56,-1,-22,-1,-22,-1,-57,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmin_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmin_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmin_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinVX8VInt8VIVISI_TU.c b/test/codegen-golden/MinVX8VInt8VIVISI_TU.c new file mode 100644 index 0000000..6509bed --- /dev/null +++ b/test/codegen-golden/MinVX8VInt8VIVISI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r MinVX8VInt8VIVISI_TU -n 1 -l 7 --has-ta --has-ma -c MinVX8VInt8VIVISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmin_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vmin_vx_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmin_vx_operator_0() { +int8_t tmp[] = {-22,79,-22,-14,-65,-73,-22,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmin_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmin_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmin_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinVX8VInt8_m.c b/test/codegen-golden/MinVX8VInt8_m.c new file mode 100644 index 0000000..8992263 --- /dev/null +++ b/test/codegen-golden/MinVX8VInt8_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r MinVX8VInt8_m -n 1 -l 7 --has-ta --has-ma -c MinVX8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmin_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vmin_vx_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmin_vx_operator_0() { +int8_t tmp[] = {50,-22,-22,16,-74,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmin_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmin_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmin_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinuVV8VUInt8.c b/test/codegen-golden/MinuVV8VUInt8.c new file mode 100644 index 0000000..763331f --- /dev/null +++ b/test/codegen-golden/MinuVV8VUInt8.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r MinuVV8VUInt8 -n 1 -l 7 --has-ta --has-ma -c MinuVV8VUInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vminu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vminu_vv_u8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vminu_vv_operator_0() { +uint8_t tmp[] = {22,75,42,43,58,14,22,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vminu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vminu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vminu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinuVV8VUInt8VBVUVUVU_TAMU.c b/test/codegen-golden/MinuVV8VUInt8VBVUVUVU_TAMU.c new file mode 100644 index 0000000..5ba0097 --- /dev/null +++ b/test/codegen-golden/MinuVV8VUInt8VBVUVUVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MinuVV8VUInt8VBVUVUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c MinuVV8VUInt8VBVUVUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vminu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vminu_vv_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vminu_vv_operator_0() { +uint8_t tmp[] = {65,255,42,255,31,255,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vminu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vminu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vminu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinuVV8VUInt8VBVUVUVU_TUMA.c b/test/codegen-golden/MinuVV8VUInt8VBVUVUVU_TUMA.c new file mode 100644 index 0000000..a80e9c2 --- /dev/null +++ b/test/codegen-golden/MinuVV8VUInt8VBVUVUVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MinuVV8VUInt8VBVUVUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c MinuVV8VUInt8VBVUVUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vminu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vminu_vv_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vminu_vv_operator_0() { +uint8_t tmp[] = {255,92,42,59,31,13,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vminu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vminu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vminu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinuVV8VUInt8VBVUVUVU_TUMU.c b/test/codegen-golden/MinuVV8VUInt8VBVUVUVU_TUMU.c new file mode 100644 index 0000000..48d40af --- /dev/null +++ b/test/codegen-golden/MinuVV8VUInt8VBVUVUVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MinuVV8VUInt8VBVUVUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c MinuVV8VUInt8VBVUVUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vminu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vminu_vv_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vminu_vv_operator_0() { +uint8_t tmp[] = {65,92,42,59,31,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vminu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vminu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vminu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinuVV8VUInt8VBVUVU_TAMA.c b/test/codegen-golden/MinuVV8VUInt8VBVUVU_TAMA.c new file mode 100644 index 0000000..0e0525c --- /dev/null +++ b/test/codegen-golden/MinuVV8VUInt8VBVUVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r MinuVV8VUInt8VBVUVU_TAMA -n 1 -l 7 --has-ta --has-ma -c MinuVV8VUInt8VBVUVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vminu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vminu_vv_u8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vminu_vv_operator_0() { +uint8_t tmp[] = {255,255,42,255,58,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vminu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vminu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vminu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinuVV8VUInt8VUVUVU_TU.c b/test/codegen-golden/MinuVV8VUInt8VUVUVU_TU.c new file mode 100644 index 0000000..ad0e75a --- /dev/null +++ b/test/codegen-golden/MinuVV8VUInt8VUVUVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r MinuVV8VUInt8VUVUVU_TU -n 1 -l 7 --has-ta --has-ma -c MinuVV8VUInt8VUVUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vminu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vminu_vv_u8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vminu_vv_operator_0() { +uint8_t tmp[] = {39,90,42,43,58,14,37,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vminu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vminu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vminu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinuVV8VUInt8VUVU_TA.c b/test/codegen-golden/MinuVV8VUInt8VUVU_TA.c new file mode 100644 index 0000000..0221398 --- /dev/null +++ b/test/codegen-golden/MinuVV8VUInt8VUVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r MinuVV8VUInt8VUVU_TA -n 1 -l 7 --has-ta --has-ma -c MinuVV8VUInt8VUVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vminu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vminu_vv_u8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vminu_vv_operator_0() { +uint8_t tmp[] = {22,255,42,255,58,255,22,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vminu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vminu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vminu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinuVV8VUInt8_m.c b/test/codegen-golden/MinuVV8VUInt8_m.c new file mode 100644 index 0000000..5817d88 --- /dev/null +++ b/test/codegen-golden/MinuVV8VUInt8_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r MinuVV8VUInt8_m -n 1 -l 7 --has-ta --has-ma -c MinuVV8VUInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vminu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vminu_vv_u8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vminu_vv_operator_0() { +uint8_t tmp[] = {65,36,42,59,31,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vminu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vminu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vminu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinuVX8VUInt8.c b/test/codegen-golden/MinuVX8VUInt8.c new file mode 100644 index 0000000..9345b8f --- /dev/null +++ b/test/codegen-golden/MinuVX8VUInt8.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r MinuVX8VUInt8 -n 1 -l 7 --has-ta --has-ma -c MinuVX8VUInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vminu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vminu_vx_u8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vminu_vx_operator_0() { +uint8_t tmp[] = {22,39,39,39,39,14,22,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vminu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vminu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vminu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinuVX8VUInt8VBVUSU_TAMA.c b/test/codegen-golden/MinuVX8VUInt8VBVUSU_TAMA.c new file mode 100644 index 0000000..ca1e2dc --- /dev/null +++ b/test/codegen-golden/MinuVX8VUInt8VBVUSU_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r MinuVX8VUInt8VBVUSU_TAMA -n 1 -l 7 --has-ta --has-ma -c MinuVX8VUInt8VBVUSU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vminu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vminu_vx_u8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vminu_vx_operator_0() { +uint8_t tmp[] = {255,255,39,255,18,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vminu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vminu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vminu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinuVX8VUInt8VBVUVUSU_TAMU.c b/test/codegen-golden/MinuVX8VUInt8VBVUVUSU_TAMU.c new file mode 100644 index 0000000..e0a2c1e --- /dev/null +++ b/test/codegen-golden/MinuVX8VUInt8VBVUVUSU_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MinuVX8VUInt8VBVUVUSU_TAMU -n 1 -l 7 --has-ta --has-ma -c MinuVX8VUInt8VBVUVUSU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vminu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vminu_vx_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vminu_vx_operator_0() { +uint8_t tmp[] = {75,255,39,255,13,255,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vminu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vminu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vminu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinuVX8VUInt8VBVUVUSU_TUMA.c b/test/codegen-golden/MinuVX8VUInt8VBVUVUSU_TUMA.c new file mode 100644 index 0000000..f9ead59 --- /dev/null +++ b/test/codegen-golden/MinuVX8VUInt8VBVUVUSU_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MinuVX8VUInt8VBVUVUSU_TUMA -n 1 -l 7 --has-ta --has-ma -c MinuVX8VUInt8VBVUVUSU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vminu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vminu_vx_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vminu_vx_operator_0() { +uint8_t tmp[] = {255,42,39,58,13,37,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vminu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vminu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vminu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinuVX8VUInt8VBVUVUSU_TUMU.c b/test/codegen-golden/MinuVX8VUInt8VBVUVUSU_TUMU.c new file mode 100644 index 0000000..acfc631 --- /dev/null +++ b/test/codegen-golden/MinuVX8VUInt8VBVUVUSU_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MinuVX8VUInt8VBVUVUSU_TUMU -n 1 -l 7 --has-ta --has-ma -c MinuVX8VUInt8VBVUVUSU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vminu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vminu_vx_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vminu_vx_operator_0() { +uint8_t tmp[] = {75,42,39,58,13,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vminu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vminu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vminu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinuVX8VUInt8VUSU_TA.c b/test/codegen-golden/MinuVX8VUInt8VUSU_TA.c new file mode 100644 index 0000000..dafd97a --- /dev/null +++ b/test/codegen-golden/MinuVX8VUInt8VUSU_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r MinuVX8VUInt8VUSU_TA -n 1 -l 7 --has-ta --has-ma -c MinuVX8VUInt8VUSU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vminu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vminu_vx_u8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vminu_vx_operator_0() { +uint8_t tmp[] = {22,255,39,255,39,255,22,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vminu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vminu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vminu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinuVX8VUInt8VUVUSU_TU.c b/test/codegen-golden/MinuVX8VUInt8VUVUSU_TU.c new file mode 100644 index 0000000..9e041b8 --- /dev/null +++ b/test/codegen-golden/MinuVX8VUInt8VUVUSU_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r MinuVX8VUInt8VUVUSU_TU -n 1 -l 7 --has-ta --has-ma -c MinuVX8VUInt8VUVUSU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vminu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vminu_vx_u8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vminu_vx_operator_0() { +uint8_t tmp[] = {39,90,39,43,18,14,39,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vminu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vminu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vminu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MinuVX8VUInt8_m.c b/test/codegen-golden/MinuVX8VUInt8_m.c new file mode 100644 index 0000000..9ef4dc1 --- /dev/null +++ b/test/codegen-golden/MinuVX8VUInt8_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r MinuVX8VUInt8_m -n 1 -l 7 --has-ta --has-ma -c MinuVX8VUInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vminu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vminu_vx_u8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vminu_vx_operator_0() { +uint8_t tmp[] = {75,39,39,58,13,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vminu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vminu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vminu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MmvMVBoolVB.c b/test/codegen-golden/MmvMVBoolVB.c new file mode 100644 index 0000000..0cb6961 --- /dev/null +++ b/test/codegen-golden/MmvMVBoolVB.c @@ -0,0 +1,66 @@ +// COMMAND: random_gen -r MmvMVBoolVB -n 1 -l 7 --has-ta --has-ma -c MmvMVBoolVB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vmmv_m_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); + +vbool8_t vec_value_1_0= vmmv_m_b8(mask_value_0_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_1_0, zero, 1, vl); +vse8_v_i8m1(placeholder1, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vmmv_m_operator_0() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vmmv_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmmv_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vmmv_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MnandMMVBoolVBVB.c b/test/codegen-golden/MnandMMVBoolVBVB.c new file mode 100644 index 0000000..a9d3cc8 --- /dev/null +++ b/test/codegen-golden/MnandMMVBoolVBVB.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r MnandMMVBoolVBVB -n 1 -l 7 --has-ta --has-ma -c MnandMMVBoolVBVB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmnand_mm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); + +vbool8_t vec_value_2_0= vmnand_mm_b8(mask_value_0_0, mask_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmnand_mm_operator_0() { +int8_t tmp[] = {1,0,1,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmnand_mm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmnand_mm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmnand_mm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MnorMMVBoolVBVB.c b/test/codegen-golden/MnorMMVBoolVBVB.c new file mode 100644 index 0000000..6970e69 --- /dev/null +++ b/test/codegen-golden/MnorMMVBoolVBVB.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r MnorMMVBoolVBVB -n 1 -l 7 --has-ta --has-ma -c MnorMMVBoolVBVB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmnor_mm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); + +vbool8_t vec_value_2_0= vmnor_mm_b8(mask_value_0_0, mask_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmnor_mm_operator_0() { +int8_t tmp[] = {1,0,0,0,0,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmnor_mm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmnor_mm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmnor_mm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MnotMVBoolVB.c b/test/codegen-golden/MnotMVBoolVB.c new file mode 100644 index 0000000..517a884 --- /dev/null +++ b/test/codegen-golden/MnotMVBoolVB.c @@ -0,0 +1,66 @@ +// COMMAND: random_gen -r MnotMVBoolVB -n 1 -l 7 --has-ta --has-ma -c MnotMVBoolVB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vmnot_m_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); + +vbool8_t vec_value_1_0= vmnot_m_b8(mask_value_0_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_1_0, zero, 1, vl); +vse8_v_i8m1(placeholder1, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vmnot_m_operator_0() { +int8_t tmp[] = {1,0,0,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vmnot_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmnot_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vmnot_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MorMMVBoolVBVB.c b/test/codegen-golden/MorMMVBoolVBVB.c new file mode 100644 index 0000000..c9d274c --- /dev/null +++ b/test/codegen-golden/MorMMVBoolVBVB.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r MorMMVBoolVBVB -n 1 -l 7 --has-ta --has-ma -c MorMMVBoolVBVB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmor_mm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); + +vbool8_t vec_value_2_0= vmor_mm_b8(mask_value_0_0, mask_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmor_mm_operator_0() { +int8_t tmp[] = {0,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmor_mm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmor_mm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmor_mm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MornMMVBoolVBVB.c b/test/codegen-golden/MornMMVBoolVBVB.c new file mode 100644 index 0000000..ef53489 --- /dev/null +++ b/test/codegen-golden/MornMMVBoolVBVB.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r MornMMVBoolVBVB -n 1 -l 7 --has-ta --has-ma -c MornMMVBoolVBVB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmorn_mm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); + +vbool8_t vec_value_2_0= vmorn_mm_b8(mask_value_0_0, mask_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmorn_mm_operator_0() { +int8_t tmp[] = {1,1,1,0,1,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmorn_mm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmorn_mm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmorn_mm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsbcVV8VBoolVIVI.c b/test/codegen-golden/MsbcVV8VBoolVIVI.c new file mode 100644 index 0000000..8cfb535 --- /dev/null +++ b/test/codegen-golden/MsbcVV8VBoolVIVI.c @@ -0,0 +1,80 @@ +// COMMAND: random_gen -r MsbcVV8VBoolVIVI -n 1 -l 7 --has-ta --has-ma -c MsbcVV8VBoolVIVI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsbc_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vbool8_t vec_value_2_0= vmsbc_vv_i8m1_b8(vec_value_0_0, vec_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsbc_vv_operator_0() { +int8_t tmp[] = {1,0,1,0,0,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmsbc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsbc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsbc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsbcVVM8VBoolVIVIVB.c b/test/codegen-golden/MsbcVVM8VBoolVIVIVB.c new file mode 100644 index 0000000..715265b --- /dev/null +++ b/test/codegen-golden/MsbcVVM8VBoolVIVIVB.c @@ -0,0 +1,96 @@ +// COMMAND: random_gen -r MsbcVVM8VBoolVIVIVB -n 1 -l 7 --has-ta --has-ma -c MsbcVVM8VBoolVIVIVB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsbc_vvm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_0= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); + +vbool8_t vec_value_3_0= vmsbc_vvm_i8m1_b8(vec_value_0_0, vec_value_1_0, mask_value_2_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsbc_vvm_operator_0() { +int8_t tmp[] = {0,1,0,0,0,0,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsbc_vvm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsbc_vvm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsbc_vvm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsbcVX8VBoolVISI.c b/test/codegen-golden/MsbcVX8VBoolVISI.c new file mode 100644 index 0000000..a7040f2 --- /dev/null +++ b/test/codegen-golden/MsbcVX8VBoolVISI.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r MsbcVX8VBoolVISI -n 1 -l 7 --has-ta --has-ma -c MsbcVX8VBoolVISI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vmsbc_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vbool8_t vec_value_2_0= vmsbc_vx_i8m1_b8(vec_value_0_0, placeholder1, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsbc_vx_operator_0() { +int8_t tmp[] = {1,1,1,0,1,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmsbc_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsbc_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsbc_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsbcVXM8VBoolVISIVB.c b/test/codegen-golden/MsbcVXM8VBoolVISIVB.c new file mode 100644 index 0000000..e849ca5 --- /dev/null +++ b/test/codegen-golden/MsbcVXM8VBoolVISIVB.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r MsbcVXM8VBoolVISIVB -n 1 -l 7 --has-ta --has-ma -c MsbcVXM8VBoolVISIVB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vmsbc_vxm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_0= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); + +vbool8_t vec_value_3_0= vmsbc_vxm_i8m1_b8(vec_value_0_0, placeholder1, mask_value_2_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsbc_vxm_operator_0() { +int8_t tmp[] = {0,0,0,0,1,0,0,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsbc_vxm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsbc_vxm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsbc_vxm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsbfM0VBool8VBVBVB_MU.c b/test/codegen-golden/MsbfM0VBool8VBVBVB_MU.c new file mode 100644 index 0000000..1bdf8cc --- /dev/null +++ b/test/codegen-golden/MsbfM0VBool8VBVBVB_MU.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r MsbfM0VBool8VBVBVB_MU -n 1 -l 7 --has-ta --has-ma -c MsbfM0VBool8VBVBVB_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsbf_m_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +int32_t placeholder5 = -1; +for (size_t vl = 0; placeholder4 > 0 && placeholder5 == -1; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_0= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); +vbool8_t vec_value_3_0= vmsbf_m_b8_mu(mask_value_0_0, mask_value_1_0, mask_value_2_0, vl); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder5 = vfirst_m_b8_m(mask_value_0_0, mask_value_2_0, vl); +} +for (size_t vl;placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_1= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_1= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_1= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); +vbool8_t placeholder6 = vmandn_mm_b8(mask_value_1_1, mask_value_0_1, vl); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(placeholder6, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsbf_m_operator_0() { +int8_t tmp[] = {1,0,0,1,0,0,0,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsbf_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsbf_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsbf_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsbfM0VBool8VBVB_MA.c b/test/codegen-golden/MsbfM0VBool8VBVB_MA.c new file mode 100644 index 0000000..19d1aef --- /dev/null +++ b/test/codegen-golden/MsbfM0VBool8VBVB_MA.c @@ -0,0 +1,97 @@ +// COMMAND: random_gen -r MsbfM0VBool8VBVB_MA -n 1 -l 7 --has-ta --has-ma -c MsbfM0VBool8VBVB_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsbf_m_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +int32_t placeholder4 = -1; +for (size_t vl = 0; placeholder3 > 0 && placeholder4 == -1; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vbool8_t vec_value_2_0= vmsbf_m_b8_ma(mask_value_0_0, mask_value_1_0, vl); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 = vfirst_m_b8_m(mask_value_0_0, mask_value_1_0, vl); +} +for (size_t vl;placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_1= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_1= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vbool8_t placeholder5 = vmnot_m_b8(mask_value_0_1, vl); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(placeholder5, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsbf_m_operator_0() { +int8_t tmp[] = {1,0,0,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmsbf_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsbf_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsbf_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsbfMVBoolVB.c b/test/codegen-golden/MsbfMVBoolVB.c new file mode 100644 index 0000000..54daa23 --- /dev/null +++ b/test/codegen-golden/MsbfMVBoolVB.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r MsbfMVBoolVB -n 1 -l 7 --has-ta --has-ma -c MsbfMVBoolVB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vmsbf_m_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int placeholder2 = 7; + +int32_t placeholder3 = -1; +for (size_t vl = 0; placeholder2 > 0 && placeholder3 == -1; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vbool8_t vec_value_1_0= vmsbf_m_b8(mask_value_0_0, vl); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_1_0, zero, 1, vl); +vse8_v_i8m1(placeholder1, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +placeholder3 = vfirst_m_b8(mask_value_0_0, vl); +} +for (size_t vl;placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vbool8_t placeholder4 = vmclr_m_b8(vsetvlmax_e8m1()); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(placeholder4, zero, 1, vl); +vse8_v_i8m1(placeholder1, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vmsbf_m_operator_0() { +int8_t tmp[] = {1,0,0,0,0,0,0,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vmsbf_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsbf_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vmsbf_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsbfMVBoolVBVBVB_m.c b/test/codegen-golden/MsbfMVBoolVBVBVB_m.c new file mode 100644 index 0000000..7ebe4d4 --- /dev/null +++ b/test/codegen-golden/MsbfMVBoolVBVBVB_m.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r MsbfMVBoolVBVBVB_m -n 1 -l 7 --has-ta --has-ma -c MsbfMVBoolVBVBVB_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsbf_m_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +int32_t placeholder5 = -1; +for (size_t vl = 0; placeholder4 > 0 && placeholder5 == -1; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_0= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); +vbool8_t vec_value_3_0= vmsbf_m_b8_m (mask_value_0_0, mask_value_1_0, mask_value_2_0, vl); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder5 = vfirst_m_b8_m(mask_value_0_0, mask_value_2_0, vl); +} +for (size_t vl;placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_1= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_1= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_1= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); +vbool8_t placeholder6 = vmandn_mm_b8(mask_value_1_1, mask_value_0_1, vl); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(placeholder6, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsbf_m_operator_0() { +int8_t tmp[] = {1,0,0,1,0,0,0,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsbf_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsbf_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsbf_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MseqVV8VBool.c b/test/codegen-golden/MseqVV8VBool.c new file mode 100644 index 0000000..5b4c5b5 --- /dev/null +++ b/test/codegen-golden/MseqVV8VBool.c @@ -0,0 +1,80 @@ +// COMMAND: random_gen -r MseqVV8VBool -n 1 -l 7 --has-ta --has-ma -c MseqVV8VBool.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmseq_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vbool8_t vec_value_2_0= vmseq_vv_i8m1_b8(vec_value_0_0, vec_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmseq_vv_operator_0() { +int8_t tmp[] = {0,0,0,0,0,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmseq_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmseq_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmseq_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MseqVV8VBoolVBVBVIVI_MU.c b/test/codegen-golden/MseqVV8VBoolVBVBVIVI_MU.c new file mode 100644 index 0000000..33f9404 --- /dev/null +++ b/test/codegen-golden/MseqVV8VBoolVBVBVIVI_MU.c @@ -0,0 +1,112 @@ +// COMMAND: random_gen -r MseqVV8VBoolVBVBVIVI_MU -n 1 -l 7 --has-ta --has-ma -c MseqVV8VBoolVBVBVIVI_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmseq_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vbool8_t vec_value_4_0= vmseq_vv_i8m1_b8_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_4_0, zero, 1, vl); +vse8_v_i8m1(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmseq_vv_operator_0() { +int8_t tmp[] = {1,0,0,1,0,0,0,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmseq_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmseq_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmseq_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MseqVV8VBoolVBVIVI_MA.c b/test/codegen-golden/MseqVV8VBoolVBVIVI_MA.c new file mode 100644 index 0000000..39d8782 --- /dev/null +++ b/test/codegen-golden/MseqVV8VBoolVBVIVI_MA.c @@ -0,0 +1,96 @@ +// COMMAND: random_gen -r MseqVV8VBoolVBVIVI_MA -n 1 -l 7 --has-ta --has-ma -c MseqVV8VBoolVBVIVI_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmseq_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vbool8_t vec_value_3_0= vmseq_vv_i8m1_b8_ma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmseq_vv_operator_0() { +int8_t tmp[] = {1,0,0,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmseq_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmseq_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmseq_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MseqVX8VBool.c b/test/codegen-golden/MseqVX8VBool.c new file mode 100644 index 0000000..b0626a0 --- /dev/null +++ b/test/codegen-golden/MseqVX8VBool.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r MseqVX8VBool -n 1 -l 7 --has-ta --has-ma -c MseqVX8VBool.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vmseq_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vbool8_t vec_value_2_0= vmseq_vx_i8m1_b8(vec_value_0_0, placeholder1, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmseq_vx_operator_0() { +int8_t tmp[] = {0,0,0,0,0,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmseq_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmseq_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmseq_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MseqVX8VBoolVBVBVISI_MU.c b/test/codegen-golden/MseqVX8VBoolVBVBVISI_MU.c new file mode 100644 index 0000000..b958e0b --- /dev/null +++ b/test/codegen-golden/MseqVX8VBoolVBVBVISI_MU.c @@ -0,0 +1,109 @@ +// COMMAND: random_gen -r MseqVX8VBoolVBVBVISI_MU -n 1 -l 7 --has-ta --has-ma -c MseqVX8VBoolVBVBVISI_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,0,1,1,0,0,1,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmseq_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vbool8_t vec_value_4_0= vmseq_vx_i8m1_b8_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, placeholder3, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_4_0, zero, 1, vl); +vse8_v_i8m1(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmseq_vx_operator_0() { +int8_t tmp[] = {1,0,0,1,0,0,1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmseq_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmseq_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmseq_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MseqVX8VBoolVBVISI_MA.c b/test/codegen-golden/MseqVX8VBoolVBVISI_MA.c new file mode 100644 index 0000000..a726405 --- /dev/null +++ b/test/codegen-golden/MseqVX8VBoolVBVISI_MA.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r MseqVX8VBoolVBVISI_MA -n 1 -l 7 --has-ta --has-ma -c MseqVX8VBoolVBVISI_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmseq_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vbool8_t vec_value_3_0= vmseq_vx_i8m1_b8_ma(mask_value_0_0, vec_value_1_0, placeholder2, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmseq_vx_operator_0() { +int8_t tmp[] = {1,0,0,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmseq_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmseq_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmseq_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsetMVBool.c b/test/codegen-golden/MsetMVBool.c new file mode 100644 index 0000000..f787a57 --- /dev/null +++ b/test/codegen-golden/MsetMVBool.c @@ -0,0 +1,50 @@ +// COMMAND: random_gen -r MsetMVBool -n 1 -l 7 --has-ta --has-ma -c MsetMVBool.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +void vmset_m_operator_0() { +int8_t *placeholder0 = value_0; + +int placeholder1 = 7; + +for (size_t vl; placeholder1 > 0; placeholder1 -= vl) { +vl = vsetvl_e8m1(placeholder1); + +vbool8_t vec_value_0_0= vmset_m_b8(vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_0_0, zero, 1, vl); +vse8_v_i8m1(placeholder0, vec_store, vl); +} + +placeholder0 += vl; +} +} +int golden_vmset_m_operator_0() { +int8_t tmp[] = {1,1,1,1,1,1,1,}; +for (int i=0; i<7;++i) +if(value_0[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vmset_m_operator_0(); +printf("operator_0 : %s\n", golden_vmset_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vmset_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgeVV8VBool.c b/test/codegen-golden/MsgeVV8VBool.c new file mode 100644 index 0000000..34639b1 --- /dev/null +++ b/test/codegen-golden/MsgeVV8VBool.c @@ -0,0 +1,80 @@ +// COMMAND: random_gen -r MsgeVV8VBool -n 1 -l 7 --has-ta --has-ma -c MsgeVV8VBool.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsge_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vbool8_t vec_value_2_0= vmsge_vv_i8m1_b8(vec_value_0_0, vec_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsge_vv_operator_0() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmsge_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsge_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsge_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgeVV8VBoolVBVBVIVI_MU.c b/test/codegen-golden/MsgeVV8VBoolVBVBVIVI_MU.c new file mode 100644 index 0000000..9c4c2d4 --- /dev/null +++ b/test/codegen-golden/MsgeVV8VBoolVBVBVIVI_MU.c @@ -0,0 +1,112 @@ +// COMMAND: random_gen -r MsgeVV8VBoolVBVBVIVI_MU -n 1 -l 7 --has-ta --has-ma -c MsgeVV8VBoolVBVBVIVI_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmsge_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vbool8_t vec_value_4_0= vmsge_vv_i8m1_b8_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_4_0, zero, 1, vl); +vse8_v_i8m1(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmsge_vv_operator_0() { +int8_t tmp[] = {1,0,1,1,0,0,0,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmsge_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsge_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmsge_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgeVV8VBoolVBVIVI_MA.c b/test/codegen-golden/MsgeVV8VBoolVBVIVI_MA.c new file mode 100644 index 0000000..d93df5f --- /dev/null +++ b/test/codegen-golden/MsgeVV8VBoolVBVIVI_MA.c @@ -0,0 +1,96 @@ +// COMMAND: random_gen -r MsgeVV8VBoolVBVIVI_MA -n 1 -l 7 --has-ta --has-ma -c MsgeVV8VBoolVBVIVI_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsge_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vbool8_t vec_value_3_0= vmsge_vv_i8m1_b8_ma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsge_vv_operator_0() { +int8_t tmp[] = {1,1,1,1,1,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsge_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsge_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsge_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgeVX8VBool.c b/test/codegen-golden/MsgeVX8VBool.c new file mode 100644 index 0000000..720e9c3 --- /dev/null +++ b/test/codegen-golden/MsgeVX8VBool.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r MsgeVX8VBool -n 1 -l 7 --has-ta --has-ma -c MsgeVX8VBool.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vmsge_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vbool8_t vec_value_2_0= vmsge_vx_i8m1_b8(vec_value_0_0, placeholder1, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsge_vx_operator_0() { +int8_t tmp[] = {0,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmsge_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsge_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsge_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgeVX8VBoolVBVBVISI_MU.c b/test/codegen-golden/MsgeVX8VBoolVBVBVISI_MU.c new file mode 100644 index 0000000..583335d --- /dev/null +++ b/test/codegen-golden/MsgeVX8VBoolVBVBVISI_MU.c @@ -0,0 +1,109 @@ +// COMMAND: random_gen -r MsgeVX8VBoolVBVBVISI_MU -n 1 -l 7 --has-ta --has-ma -c MsgeVX8VBoolVBVBVISI_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,0,1,1,0,0,1,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmsge_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vbool8_t vec_value_4_0= vmsge_vx_i8m1_b8_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, placeholder3, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_4_0, zero, 1, vl); +vse8_v_i8m1(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmsge_vx_operator_0() { +int8_t tmp[] = {1,1,1,1,0,0,1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmsge_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsge_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmsge_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgeVX8VBoolVBVISI_MA.c b/test/codegen-golden/MsgeVX8VBoolVBVISI_MA.c new file mode 100644 index 0000000..0070f20 --- /dev/null +++ b/test/codegen-golden/MsgeVX8VBoolVBVISI_MA.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r MsgeVX8VBoolVBVISI_MA -n 1 -l 7 --has-ta --has-ma -c MsgeVX8VBoolVBVISI_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsge_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vbool8_t vec_value_3_0= vmsge_vx_i8m1_b8_ma(mask_value_0_0, vec_value_1_0, placeholder2, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsge_vx_operator_0() { +int8_t tmp[] = {1,1,1,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsge_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsge_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsge_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgeuVV8VBool.c b/test/codegen-golden/MsgeuVV8VBool.c new file mode 100644 index 0000000..e2828d3 --- /dev/null +++ b/test/codegen-golden/MsgeuVV8VBool.c @@ -0,0 +1,80 @@ +// COMMAND: random_gen -r MsgeuVV8VBool -n 1 -l 7 --has-ta --has-ma -c MsgeuVV8VBool.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsgeu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vbool8_t vec_value_2_0= vmsgeu_vv_u8m1_b8(vec_value_0_0, vec_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsgeu_vv_operator_0() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmsgeu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsgeu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsgeu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgeuVV8VBoolVBVBVUVU_MU.c b/test/codegen-golden/MsgeuVV8VBoolVBVBVUVU_MU.c new file mode 100644 index 0000000..80cab9c --- /dev/null +++ b/test/codegen-golden/MsgeuVV8VBoolVBVBVUVU_MU.c @@ -0,0 +1,112 @@ +// COMMAND: random_gen -r MsgeuVV8VBoolVBVBVUVU_MU -n 1 -l 7 --has-ta --has-ma -c MsgeuVV8VBoolVBVBVUVU_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmsgeu_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vbool8_t vec_value_4_0= vmsgeu_vv_u8m1_b8_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_4_0, zero, 1, vl); +vse8_v_i8m1(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmsgeu_vv_operator_0() { +int8_t tmp[] = {1,0,1,1,0,0,0,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmsgeu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsgeu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmsgeu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgeuVV8VBoolVBVUVU_MA.c b/test/codegen-golden/MsgeuVV8VBoolVBVUVU_MA.c new file mode 100644 index 0000000..9309885 --- /dev/null +++ b/test/codegen-golden/MsgeuVV8VBoolVBVUVU_MA.c @@ -0,0 +1,96 @@ +// COMMAND: random_gen -r MsgeuVV8VBoolVBVUVU_MA -n 1 -l 7 --has-ta --has-ma -c MsgeuVV8VBoolVBVUVU_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsgeu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vbool8_t vec_value_3_0= vmsgeu_vv_u8m1_b8_ma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsgeu_vv_operator_0() { +int8_t tmp[] = {1,1,1,1,1,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsgeu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsgeu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsgeu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgeuVX8VBool.c b/test/codegen-golden/MsgeuVX8VBool.c new file mode 100644 index 0000000..73f52ec --- /dev/null +++ b/test/codegen-golden/MsgeuVX8VBool.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r MsgeuVX8VBool -n 1 -l 7 --has-ta --has-ma -c MsgeuVX8VBool.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vmsgeu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vbool8_t vec_value_2_0= vmsgeu_vx_u8m1_b8(vec_value_0_0, placeholder1, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsgeu_vx_operator_0() { +int8_t tmp[] = {0,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmsgeu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsgeu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsgeu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgeuVX8VBoolVBVBVUSU_MU.c b/test/codegen-golden/MsgeuVX8VBoolVBVBVUSU_MU.c new file mode 100644 index 0000000..1ce5fe8 --- /dev/null +++ b/test/codegen-golden/MsgeuVX8VBoolVBVBVUSU_MU.c @@ -0,0 +1,109 @@ +// COMMAND: random_gen -r MsgeuVX8VBoolVBVBVUSU_MU -n 1 -l 7 --has-ta --has-ma -c MsgeuVX8VBoolVBVBVUSU_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,0,1,1,0,0,1,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmsgeu_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vbool8_t vec_value_4_0= vmsgeu_vx_u8m1_b8_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, placeholder3, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_4_0, zero, 1, vl); +vse8_v_i8m1(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmsgeu_vx_operator_0() { +int8_t tmp[] = {1,1,1,1,0,0,1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmsgeu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsgeu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmsgeu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgeuVX8VBoolVBVUSU_MA.c b/test/codegen-golden/MsgeuVX8VBoolVBVUSU_MA.c new file mode 100644 index 0000000..71c4258 --- /dev/null +++ b/test/codegen-golden/MsgeuVX8VBoolVBVUSU_MA.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r MsgeuVX8VBoolVBVUSU_MA -n 1 -l 7 --has-ta --has-ma -c MsgeuVX8VBoolVBVUSU_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsgeu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vbool8_t vec_value_3_0= vmsgeu_vx_u8m1_b8_ma(mask_value_0_0, vec_value_1_0, placeholder2, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsgeu_vx_operator_0() { +int8_t tmp[] = {1,1,1,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsgeu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsgeu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsgeu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgtVV8VBool.c b/test/codegen-golden/MsgtVV8VBool.c new file mode 100644 index 0000000..7f08a32 --- /dev/null +++ b/test/codegen-golden/MsgtVV8VBool.c @@ -0,0 +1,80 @@ +// COMMAND: random_gen -r MsgtVV8VBool -n 1 -l 7 --has-ta --has-ma -c MsgtVV8VBool.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsgt_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vbool8_t vec_value_2_0= vmsgt_vv_i8m1_b8(vec_value_0_0, vec_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsgt_vv_operator_0() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmsgt_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsgt_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsgt_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgtVV8VBoolVBVBVIVI_MU.c b/test/codegen-golden/MsgtVV8VBoolVBVBVIVI_MU.c new file mode 100644 index 0000000..51742ef --- /dev/null +++ b/test/codegen-golden/MsgtVV8VBoolVBVBVIVI_MU.c @@ -0,0 +1,112 @@ +// COMMAND: random_gen -r MsgtVV8VBoolVBVBVIVI_MU -n 1 -l 7 --has-ta --has-ma -c MsgtVV8VBoolVBVBVIVI_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmsgt_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vbool8_t vec_value_4_0= vmsgt_vv_i8m1_b8_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_4_0, zero, 1, vl); +vse8_v_i8m1(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmsgt_vv_operator_0() { +int8_t tmp[] = {1,0,1,1,0,0,0,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmsgt_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsgt_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmsgt_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgtVV8VBoolVBVIVI_MA.c b/test/codegen-golden/MsgtVV8VBoolVBVIVI_MA.c new file mode 100644 index 0000000..f42a31e --- /dev/null +++ b/test/codegen-golden/MsgtVV8VBoolVBVIVI_MA.c @@ -0,0 +1,96 @@ +// COMMAND: random_gen -r MsgtVV8VBoolVBVIVI_MA -n 1 -l 7 --has-ta --has-ma -c MsgtVV8VBoolVBVIVI_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsgt_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vbool8_t vec_value_3_0= vmsgt_vv_i8m1_b8_ma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsgt_vv_operator_0() { +int8_t tmp[] = {1,1,1,1,1,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsgt_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsgt_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsgt_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgtVX8VBool.c b/test/codegen-golden/MsgtVX8VBool.c new file mode 100644 index 0000000..c32cc5f --- /dev/null +++ b/test/codegen-golden/MsgtVX8VBool.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r MsgtVX8VBool -n 1 -l 7 --has-ta --has-ma -c MsgtVX8VBool.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vmsgt_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vbool8_t vec_value_2_0= vmsgt_vx_i8m1_b8(vec_value_0_0, placeholder1, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsgt_vx_operator_0() { +int8_t tmp[] = {0,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmsgt_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsgt_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsgt_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgtVX8VBoolVBVBVISI_MU.c b/test/codegen-golden/MsgtVX8VBoolVBVBVISI_MU.c new file mode 100644 index 0000000..47c608a --- /dev/null +++ b/test/codegen-golden/MsgtVX8VBoolVBVBVISI_MU.c @@ -0,0 +1,109 @@ +// COMMAND: random_gen -r MsgtVX8VBoolVBVBVISI_MU -n 1 -l 7 --has-ta --has-ma -c MsgtVX8VBoolVBVBVISI_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,0,1,1,0,0,1,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmsgt_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vbool8_t vec_value_4_0= vmsgt_vx_i8m1_b8_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, placeholder3, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_4_0, zero, 1, vl); +vse8_v_i8m1(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmsgt_vx_operator_0() { +int8_t tmp[] = {1,1,1,1,0,0,1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmsgt_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsgt_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmsgt_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgtVX8VBoolVBVISI_MA.c b/test/codegen-golden/MsgtVX8VBoolVBVISI_MA.c new file mode 100644 index 0000000..afb0a06 --- /dev/null +++ b/test/codegen-golden/MsgtVX8VBoolVBVISI_MA.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r MsgtVX8VBoolVBVISI_MA -n 1 -l 7 --has-ta --has-ma -c MsgtVX8VBoolVBVISI_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsgt_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vbool8_t vec_value_3_0= vmsgt_vx_i8m1_b8_ma(mask_value_0_0, vec_value_1_0, placeholder2, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsgt_vx_operator_0() { +int8_t tmp[] = {1,1,1,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsgt_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsgt_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsgt_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgtuVV8VBool.c b/test/codegen-golden/MsgtuVV8VBool.c new file mode 100644 index 0000000..8ccd0f4 --- /dev/null +++ b/test/codegen-golden/MsgtuVV8VBool.c @@ -0,0 +1,80 @@ +// COMMAND: random_gen -r MsgtuVV8VBool -n 1 -l 7 --has-ta --has-ma -c MsgtuVV8VBool.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsgtu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vbool8_t vec_value_2_0= vmsgtu_vv_u8m1_b8(vec_value_0_0, vec_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsgtu_vv_operator_0() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmsgtu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsgtu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsgtu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgtuVV8VBoolVBVBVUVU_MU.c b/test/codegen-golden/MsgtuVV8VBoolVBVBVUVU_MU.c new file mode 100644 index 0000000..32cb5fa --- /dev/null +++ b/test/codegen-golden/MsgtuVV8VBoolVBVBVUVU_MU.c @@ -0,0 +1,112 @@ +// COMMAND: random_gen -r MsgtuVV8VBoolVBVBVUVU_MU -n 1 -l 7 --has-ta --has-ma -c MsgtuVV8VBoolVBVBVUVU_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmsgtu_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vbool8_t vec_value_4_0= vmsgtu_vv_u8m1_b8_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_4_0, zero, 1, vl); +vse8_v_i8m1(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmsgtu_vv_operator_0() { +int8_t tmp[] = {1,0,1,1,0,0,0,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmsgtu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsgtu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmsgtu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgtuVV8VBoolVBVUVU_MA.c b/test/codegen-golden/MsgtuVV8VBoolVBVUVU_MA.c new file mode 100644 index 0000000..6824e63 --- /dev/null +++ b/test/codegen-golden/MsgtuVV8VBoolVBVUVU_MA.c @@ -0,0 +1,96 @@ +// COMMAND: random_gen -r MsgtuVV8VBoolVBVUVU_MA -n 1 -l 7 --has-ta --has-ma -c MsgtuVV8VBoolVBVUVU_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsgtu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vbool8_t vec_value_3_0= vmsgtu_vv_u8m1_b8_ma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsgtu_vv_operator_0() { +int8_t tmp[] = {1,1,1,1,1,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsgtu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsgtu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsgtu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgtuVX8VBool.c b/test/codegen-golden/MsgtuVX8VBool.c new file mode 100644 index 0000000..d2158db --- /dev/null +++ b/test/codegen-golden/MsgtuVX8VBool.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r MsgtuVX8VBool -n 1 -l 7 --has-ta --has-ma -c MsgtuVX8VBool.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vmsgtu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vbool8_t vec_value_2_0= vmsgtu_vx_u8m1_b8(vec_value_0_0, placeholder1, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsgtu_vx_operator_0() { +int8_t tmp[] = {0,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmsgtu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsgtu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsgtu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgtuVX8VBoolVBVBVUSU_MU.c b/test/codegen-golden/MsgtuVX8VBoolVBVBVUSU_MU.c new file mode 100644 index 0000000..b07df2b --- /dev/null +++ b/test/codegen-golden/MsgtuVX8VBoolVBVBVUSU_MU.c @@ -0,0 +1,109 @@ +// COMMAND: random_gen -r MsgtuVX8VBoolVBVBVUSU_MU -n 1 -l 7 --has-ta --has-ma -c MsgtuVX8VBoolVBVBVUSU_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,0,1,1,0,0,1,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmsgtu_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vbool8_t vec_value_4_0= vmsgtu_vx_u8m1_b8_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, placeholder3, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_4_0, zero, 1, vl); +vse8_v_i8m1(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmsgtu_vx_operator_0() { +int8_t tmp[] = {1,1,1,1,0,0,1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmsgtu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsgtu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmsgtu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsgtuVX8VBoolVBVUSU_MA.c b/test/codegen-golden/MsgtuVX8VBoolVBVUSU_MA.c new file mode 100644 index 0000000..60970fa --- /dev/null +++ b/test/codegen-golden/MsgtuVX8VBoolVBVUSU_MA.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r MsgtuVX8VBoolVBVUSU_MA -n 1 -l 7 --has-ta --has-ma -c MsgtuVX8VBoolVBVUSU_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsgtu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vbool8_t vec_value_3_0= vmsgtu_vx_u8m1_b8_ma(mask_value_0_0, vec_value_1_0, placeholder2, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsgtu_vx_operator_0() { +int8_t tmp[] = {1,1,1,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsgtu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsgtu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsgtu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsifM0VBool8VBVBVB_MU.c b/test/codegen-golden/MsifM0VBool8VBVBVB_MU.c new file mode 100644 index 0000000..b67dfd5 --- /dev/null +++ b/test/codegen-golden/MsifM0VBool8VBVBVB_MU.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r MsifM0VBool8VBVBVB_MU -n 1 -l 7 --has-ta --has-ma -c MsifM0VBool8VBVBVB_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsif_m_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +int32_t placeholder5 = -1; +for (size_t vl = 0; placeholder4 > 0 && placeholder5 == -1; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_0= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); +vbool8_t vec_value_3_0= vmsif_m_b8_mu(mask_value_0_0, mask_value_1_0, mask_value_2_0, vl); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder5 = vfirst_m_b8_m(mask_value_0_0, mask_value_2_0, vl); +} +for (size_t vl;placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_1= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_1= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_1= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); +vbool8_t placeholder6 = vmandn_mm_b8(mask_value_1_1, mask_value_0_1, vl); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(placeholder6, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsif_m_operator_0() { +int8_t tmp[] = {1,1,0,1,0,0,0,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsif_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsif_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsif_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsifM0VBool8VBVB_MA.c b/test/codegen-golden/MsifM0VBool8VBVB_MA.c new file mode 100644 index 0000000..b4b10d0 --- /dev/null +++ b/test/codegen-golden/MsifM0VBool8VBVB_MA.c @@ -0,0 +1,97 @@ +// COMMAND: random_gen -r MsifM0VBool8VBVB_MA -n 1 -l 7 --has-ta --has-ma -c MsifM0VBool8VBVB_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsif_m_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +int32_t placeholder4 = -1; +for (size_t vl = 0; placeholder3 > 0 && placeholder4 == -1; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vbool8_t vec_value_2_0= vmsif_m_b8_ma(mask_value_0_0, mask_value_1_0, vl); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 = vfirst_m_b8_m(mask_value_0_0, mask_value_1_0, vl); +} +for (size_t vl;placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_1= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_1= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vbool8_t placeholder5 = vmnot_m_b8(mask_value_0_1, vl); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(placeholder5, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsif_m_operator_0() { +int8_t tmp[] = {1,1,0,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmsif_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsif_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsif_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsifMVBoolVB.c b/test/codegen-golden/MsifMVBoolVB.c new file mode 100644 index 0000000..9ad3efe --- /dev/null +++ b/test/codegen-golden/MsifMVBoolVB.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r MsifMVBoolVB -n 1 -l 7 --has-ta --has-ma -c MsifMVBoolVB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vmsif_m_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int placeholder2 = 7; + +int32_t placeholder3 = -1; +for (size_t vl = 0; placeholder2 > 0 && placeholder3 == -1; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vbool8_t vec_value_1_0= vmsif_m_b8(mask_value_0_0, vl); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_1_0, zero, 1, vl); +vse8_v_i8m1(placeholder1, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +placeholder3 = vfirst_m_b8(mask_value_0_0, vl); +} +for (size_t vl;placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vbool8_t placeholder4 = vmclr_m_b8(vsetvlmax_e8m1()); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(placeholder4, zero, 1, vl); +vse8_v_i8m1(placeholder1, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vmsif_m_operator_0() { +int8_t tmp[] = {1,1,0,0,0,0,0,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vmsif_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsif_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vmsif_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsifMVBoolVBVBVB_m.c b/test/codegen-golden/MsifMVBoolVBVBVB_m.c new file mode 100644 index 0000000..9c342cc --- /dev/null +++ b/test/codegen-golden/MsifMVBoolVBVBVB_m.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r MsifMVBoolVBVBVB_m -n 1 -l 7 --has-ta --has-ma -c MsifMVBoolVBVBVB_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsif_m_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +int32_t placeholder5 = -1; +for (size_t vl = 0; placeholder4 > 0 && placeholder5 == -1; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_0= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); +vbool8_t vec_value_3_0= vmsif_m_b8_m (mask_value_0_0, mask_value_1_0, mask_value_2_0, vl); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder5 = vfirst_m_b8_m(mask_value_0_0, mask_value_2_0, vl); +} +for (size_t vl;placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_1= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_1= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_1= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); +vbool8_t placeholder6 = vmandn_mm_b8(mask_value_1_1, mask_value_0_1, vl); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(placeholder6, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsif_m_operator_0() { +int8_t tmp[] = {1,1,0,1,0,0,0,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsif_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsif_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsif_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsleVV8VBool.c b/test/codegen-golden/MsleVV8VBool.c new file mode 100644 index 0000000..67dfc72 --- /dev/null +++ b/test/codegen-golden/MsleVV8VBool.c @@ -0,0 +1,80 @@ +// COMMAND: random_gen -r MsleVV8VBool -n 1 -l 7 --has-ta --has-ma -c MsleVV8VBool.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsle_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vbool8_t vec_value_2_0= vmsle_vv_i8m1_b8(vec_value_0_0, vec_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsle_vv_operator_0() { +int8_t tmp[] = {1,0,0,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmsle_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsle_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsle_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsleVV8VBoolVBVBVIVI_MU.c b/test/codegen-golden/MsleVV8VBoolVBVBVIVI_MU.c new file mode 100644 index 0000000..fc79fb3 --- /dev/null +++ b/test/codegen-golden/MsleVV8VBoolVBVBVIVI_MU.c @@ -0,0 +1,112 @@ +// COMMAND: random_gen -r MsleVV8VBoolVBVBVIVI_MU -n 1 -l 7 --has-ta --has-ma -c MsleVV8VBoolVBVBVIVI_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmsle_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vbool8_t vec_value_4_0= vmsle_vv_i8m1_b8_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_4_0, zero, 1, vl); +vse8_v_i8m1(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmsle_vv_operator_0() { +int8_t tmp[] = {1,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmsle_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsle_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmsle_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsleVV8VBoolVBVIVI_MA.c b/test/codegen-golden/MsleVV8VBoolVBVIVI_MA.c new file mode 100644 index 0000000..094ef05 --- /dev/null +++ b/test/codegen-golden/MsleVV8VBoolVBVIVI_MA.c @@ -0,0 +1,96 @@ +// COMMAND: random_gen -r MsleVV8VBoolVBVIVI_MA -n 1 -l 7 --has-ta --has-ma -c MsleVV8VBoolVBVIVI_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsle_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vbool8_t vec_value_3_0= vmsle_vv_i8m1_b8_ma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsle_vv_operator_0() { +int8_t tmp[] = {1,0,0,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsle_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsle_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsle_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsleVX8VBool.c b/test/codegen-golden/MsleVX8VBool.c new file mode 100644 index 0000000..6181fd7 --- /dev/null +++ b/test/codegen-golden/MsleVX8VBool.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r MsleVX8VBool -n 1 -l 7 --has-ta --has-ma -c MsleVX8VBool.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vmsle_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vbool8_t vec_value_2_0= vmsle_vx_i8m1_b8(vec_value_0_0, placeholder1, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsle_vx_operator_0() { +int8_t tmp[] = {1,0,0,0,0,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmsle_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsle_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsle_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsleVX8VBoolVBVBVISI_MU.c b/test/codegen-golden/MsleVX8VBoolVBVBVISI_MU.c new file mode 100644 index 0000000..7ff226c --- /dev/null +++ b/test/codegen-golden/MsleVX8VBoolVBVBVISI_MU.c @@ -0,0 +1,109 @@ +// COMMAND: random_gen -r MsleVX8VBoolVBVBVISI_MU -n 1 -l 7 --has-ta --has-ma -c MsleVX8VBoolVBVBVISI_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,0,1,1,0,0,1,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmsle_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vbool8_t vec_value_4_0= vmsle_vx_i8m1_b8_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, placeholder3, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_4_0, zero, 1, vl); +vse8_v_i8m1(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmsle_vx_operator_0() { +int8_t tmp[] = {1,0,0,1,1,0,1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmsle_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsle_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmsle_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsleVX8VBoolVBVISI_MA.c b/test/codegen-golden/MsleVX8VBoolVBVISI_MA.c new file mode 100644 index 0000000..a8d8892 --- /dev/null +++ b/test/codegen-golden/MsleVX8VBoolVBVISI_MA.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r MsleVX8VBoolVBVISI_MA -n 1 -l 7 --has-ta --has-ma -c MsleVX8VBoolVBVISI_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsle_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vbool8_t vec_value_3_0= vmsle_vx_i8m1_b8_ma(mask_value_0_0, vec_value_1_0, placeholder2, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsle_vx_operator_0() { +int8_t tmp[] = {1,0,0,1,1,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsle_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsle_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsle_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsleuVV8VBool.c b/test/codegen-golden/MsleuVV8VBool.c new file mode 100644 index 0000000..6050e4a --- /dev/null +++ b/test/codegen-golden/MsleuVV8VBool.c @@ -0,0 +1,80 @@ +// COMMAND: random_gen -r MsleuVV8VBool -n 1 -l 7 --has-ta --has-ma -c MsleuVV8VBool.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsleu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vbool8_t vec_value_2_0= vmsleu_vv_u8m1_b8(vec_value_0_0, vec_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsleu_vv_operator_0() { +int8_t tmp[] = {1,0,0,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmsleu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsleu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsleu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsleuVV8VBoolVBVBVUVU_MU.c b/test/codegen-golden/MsleuVV8VBoolVBVBVUVU_MU.c new file mode 100644 index 0000000..ccaa176 --- /dev/null +++ b/test/codegen-golden/MsleuVV8VBoolVBVBVUVU_MU.c @@ -0,0 +1,112 @@ +// COMMAND: random_gen -r MsleuVV8VBoolVBVBVUVU_MU -n 1 -l 7 --has-ta --has-ma -c MsleuVV8VBoolVBVBVUVU_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmsleu_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vbool8_t vec_value_4_0= vmsleu_vv_u8m1_b8_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_4_0, zero, 1, vl); +vse8_v_i8m1(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmsleu_vv_operator_0() { +int8_t tmp[] = {1,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmsleu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsleu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmsleu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsleuVV8VBoolVBVUVU_MA.c b/test/codegen-golden/MsleuVV8VBoolVBVUVU_MA.c new file mode 100644 index 0000000..6a326d4 --- /dev/null +++ b/test/codegen-golden/MsleuVV8VBoolVBVUVU_MA.c @@ -0,0 +1,96 @@ +// COMMAND: random_gen -r MsleuVV8VBoolVBVUVU_MA -n 1 -l 7 --has-ta --has-ma -c MsleuVV8VBoolVBVUVU_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsleu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vbool8_t vec_value_3_0= vmsleu_vv_u8m1_b8_ma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsleu_vv_operator_0() { +int8_t tmp[] = {1,0,0,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsleu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsleu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsleu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsleuVX8VBool.c b/test/codegen-golden/MsleuVX8VBool.c new file mode 100644 index 0000000..09482d0 --- /dev/null +++ b/test/codegen-golden/MsleuVX8VBool.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r MsleuVX8VBool -n 1 -l 7 --has-ta --has-ma -c MsleuVX8VBool.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vmsleu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vbool8_t vec_value_2_0= vmsleu_vx_u8m1_b8(vec_value_0_0, placeholder1, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsleu_vx_operator_0() { +int8_t tmp[] = {1,0,0,0,0,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmsleu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsleu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsleu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsleuVX8VBoolVBVBVUSU_MU.c b/test/codegen-golden/MsleuVX8VBoolVBVBVUSU_MU.c new file mode 100644 index 0000000..fec1487 --- /dev/null +++ b/test/codegen-golden/MsleuVX8VBoolVBVBVUSU_MU.c @@ -0,0 +1,109 @@ +// COMMAND: random_gen -r MsleuVX8VBoolVBVBVUSU_MU -n 1 -l 7 --has-ta --has-ma -c MsleuVX8VBoolVBVBVUSU_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,0,1,1,0,0,1,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmsleu_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vbool8_t vec_value_4_0= vmsleu_vx_u8m1_b8_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, placeholder3, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_4_0, zero, 1, vl); +vse8_v_i8m1(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmsleu_vx_operator_0() { +int8_t tmp[] = {1,0,0,1,1,0,1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmsleu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsleu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmsleu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsleuVX8VBoolVBVUSU_MA.c b/test/codegen-golden/MsleuVX8VBoolVBVUSU_MA.c new file mode 100644 index 0000000..bb8d630 --- /dev/null +++ b/test/codegen-golden/MsleuVX8VBoolVBVUSU_MA.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r MsleuVX8VBoolVBVUSU_MA -n 1 -l 7 --has-ta --has-ma -c MsleuVX8VBoolVBVUSU_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsleu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vbool8_t vec_value_3_0= vmsleu_vx_u8m1_b8_ma(mask_value_0_0, vec_value_1_0, placeholder2, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsleu_vx_operator_0() { +int8_t tmp[] = {1,0,0,1,1,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsleu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsleu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsleu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsltVV8VBool.c b/test/codegen-golden/MsltVV8VBool.c new file mode 100644 index 0000000..e72586e --- /dev/null +++ b/test/codegen-golden/MsltVV8VBool.c @@ -0,0 +1,80 @@ +// COMMAND: random_gen -r MsltVV8VBool -n 1 -l 7 --has-ta --has-ma -c MsltVV8VBool.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmslt_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vbool8_t vec_value_2_0= vmslt_vv_i8m1_b8(vec_value_0_0, vec_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmslt_vv_operator_0() { +int8_t tmp[] = {1,0,0,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmslt_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmslt_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmslt_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsltVV8VBoolVBVBVIVI_MU.c b/test/codegen-golden/MsltVV8VBoolVBVBVIVI_MU.c new file mode 100644 index 0000000..858ecf4 --- /dev/null +++ b/test/codegen-golden/MsltVV8VBoolVBVBVIVI_MU.c @@ -0,0 +1,112 @@ +// COMMAND: random_gen -r MsltVV8VBoolVBVBVIVI_MU -n 1 -l 7 --has-ta --has-ma -c MsltVV8VBoolVBVBVIVI_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmslt_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vbool8_t vec_value_4_0= vmslt_vv_i8m1_b8_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_4_0, zero, 1, vl); +vse8_v_i8m1(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmslt_vv_operator_0() { +int8_t tmp[] = {1,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmslt_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmslt_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmslt_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsltVV8VBoolVBVIVI_MA.c b/test/codegen-golden/MsltVV8VBoolVBVIVI_MA.c new file mode 100644 index 0000000..022a603 --- /dev/null +++ b/test/codegen-golden/MsltVV8VBoolVBVIVI_MA.c @@ -0,0 +1,96 @@ +// COMMAND: random_gen -r MsltVV8VBoolVBVIVI_MA -n 1 -l 7 --has-ta --has-ma -c MsltVV8VBoolVBVIVI_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmslt_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vbool8_t vec_value_3_0= vmslt_vv_i8m1_b8_ma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmslt_vv_operator_0() { +int8_t tmp[] = {1,0,0,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmslt_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmslt_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmslt_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsltVX8VBool.c b/test/codegen-golden/MsltVX8VBool.c new file mode 100644 index 0000000..4866f8d --- /dev/null +++ b/test/codegen-golden/MsltVX8VBool.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r MsltVX8VBool -n 1 -l 7 --has-ta --has-ma -c MsltVX8VBool.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vmslt_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vbool8_t vec_value_2_0= vmslt_vx_i8m1_b8(vec_value_0_0, placeholder1, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmslt_vx_operator_0() { +int8_t tmp[] = {1,0,0,0,0,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmslt_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmslt_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmslt_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsltVX8VBoolVBVBVISI_MU.c b/test/codegen-golden/MsltVX8VBoolVBVBVISI_MU.c new file mode 100644 index 0000000..07e593c --- /dev/null +++ b/test/codegen-golden/MsltVX8VBoolVBVBVISI_MU.c @@ -0,0 +1,109 @@ +// COMMAND: random_gen -r MsltVX8VBoolVBVBVISI_MU -n 1 -l 7 --has-ta --has-ma -c MsltVX8VBoolVBVBVISI_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,0,1,1,0,0,1,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmslt_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vbool8_t vec_value_4_0= vmslt_vx_i8m1_b8_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, placeholder3, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_4_0, zero, 1, vl); +vse8_v_i8m1(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmslt_vx_operator_0() { +int8_t tmp[] = {1,0,0,1,1,0,1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmslt_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmslt_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmslt_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsltVX8VBoolVBVISI_MA.c b/test/codegen-golden/MsltVX8VBoolVBVISI_MA.c new file mode 100644 index 0000000..4fbf0e5 --- /dev/null +++ b/test/codegen-golden/MsltVX8VBoolVBVISI_MA.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r MsltVX8VBoolVBVISI_MA -n 1 -l 7 --has-ta --has-ma -c MsltVX8VBoolVBVISI_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmslt_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vbool8_t vec_value_3_0= vmslt_vx_i8m1_b8_ma(mask_value_0_0, vec_value_1_0, placeholder2, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmslt_vx_operator_0() { +int8_t tmp[] = {1,0,0,1,1,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmslt_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmslt_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmslt_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsltuVV8VBool.c b/test/codegen-golden/MsltuVV8VBool.c new file mode 100644 index 0000000..bb21427 --- /dev/null +++ b/test/codegen-golden/MsltuVV8VBool.c @@ -0,0 +1,80 @@ +// COMMAND: random_gen -r MsltuVV8VBool -n 1 -l 7 --has-ta --has-ma -c MsltuVV8VBool.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsltu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vbool8_t vec_value_2_0= vmsltu_vv_u8m1_b8(vec_value_0_0, vec_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsltu_vv_operator_0() { +int8_t tmp[] = {1,0,0,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmsltu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsltu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsltu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsltuVV8VBoolVBVBVUVU_MU.c b/test/codegen-golden/MsltuVV8VBoolVBVBVUVU_MU.c new file mode 100644 index 0000000..932ff1e --- /dev/null +++ b/test/codegen-golden/MsltuVV8VBoolVBVBVUVU_MU.c @@ -0,0 +1,112 @@ +// COMMAND: random_gen -r MsltuVV8VBoolVBVBVUVU_MU -n 1 -l 7 --has-ta --has-ma -c MsltuVV8VBoolVBVBVUVU_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmsltu_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vbool8_t vec_value_4_0= vmsltu_vv_u8m1_b8_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_4_0, zero, 1, vl); +vse8_v_i8m1(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmsltu_vv_operator_0() { +int8_t tmp[] = {1,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmsltu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsltu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmsltu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsltuVV8VBoolVBVUVU_MA.c b/test/codegen-golden/MsltuVV8VBoolVBVUVU_MA.c new file mode 100644 index 0000000..f50e4b0 --- /dev/null +++ b/test/codegen-golden/MsltuVV8VBoolVBVUVU_MA.c @@ -0,0 +1,96 @@ +// COMMAND: random_gen -r MsltuVV8VBoolVBVUVU_MA -n 1 -l 7 --has-ta --has-ma -c MsltuVV8VBoolVBVUVU_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsltu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vbool8_t vec_value_3_0= vmsltu_vv_u8m1_b8_ma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsltu_vv_operator_0() { +int8_t tmp[] = {1,0,0,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsltu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsltu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsltu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsltuVX8VBool.c b/test/codegen-golden/MsltuVX8VBool.c new file mode 100644 index 0000000..7204f21 --- /dev/null +++ b/test/codegen-golden/MsltuVX8VBool.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r MsltuVX8VBool -n 1 -l 7 --has-ta --has-ma -c MsltuVX8VBool.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vmsltu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vbool8_t vec_value_2_0= vmsltu_vx_u8m1_b8(vec_value_0_0, placeholder1, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsltu_vx_operator_0() { +int8_t tmp[] = {1,0,0,0,0,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmsltu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsltu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsltu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsltuVX8VBoolVBVBVUSU_MU.c b/test/codegen-golden/MsltuVX8VBoolVBVBVUSU_MU.c new file mode 100644 index 0000000..502c913 --- /dev/null +++ b/test/codegen-golden/MsltuVX8VBoolVBVBVUSU_MU.c @@ -0,0 +1,109 @@ +// COMMAND: random_gen -r MsltuVX8VBoolVBVBVUSU_MU -n 1 -l 7 --has-ta --has-ma -c MsltuVX8VBoolVBVBVUSU_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,0,1,1,0,0,1,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmsltu_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vbool8_t vec_value_4_0= vmsltu_vx_u8m1_b8_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, placeholder3, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_4_0, zero, 1, vl); +vse8_v_i8m1(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmsltu_vx_operator_0() { +int8_t tmp[] = {1,0,0,1,1,0,1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmsltu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsltu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmsltu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsltuVX8VBoolVBVUSU_MA.c b/test/codegen-golden/MsltuVX8VBoolVBVUSU_MA.c new file mode 100644 index 0000000..2869c4e --- /dev/null +++ b/test/codegen-golden/MsltuVX8VBoolVBVUSU_MA.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r MsltuVX8VBoolVBVUSU_MA -n 1 -l 7 --has-ta --has-ma -c MsltuVX8VBoolVBVUSU_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsltu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vbool8_t vec_value_3_0= vmsltu_vx_u8m1_b8_ma(mask_value_0_0, vec_value_1_0, placeholder2, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsltu_vx_operator_0() { +int8_t tmp[] = {1,0,0,1,1,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsltu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsltu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsltu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsneVV8VBool.c b/test/codegen-golden/MsneVV8VBool.c new file mode 100644 index 0000000..9a458ab --- /dev/null +++ b/test/codegen-golden/MsneVV8VBool.c @@ -0,0 +1,80 @@ +// COMMAND: random_gen -r MsneVV8VBool -n 1 -l 7 --has-ta --has-ma -c MsneVV8VBool.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsne_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vbool8_t vec_value_2_0= vmsne_vv_i8m1_b8(vec_value_0_0, vec_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsne_vv_operator_0() { +int8_t tmp[] = {1,1,1,1,1,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmsne_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsne_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsne_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsneVV8VBoolVBVBVIVI_MU.c b/test/codegen-golden/MsneVV8VBoolVBVBVIVI_MU.c new file mode 100644 index 0000000..175f81c --- /dev/null +++ b/test/codegen-golden/MsneVV8VBoolVBVBVIVI_MU.c @@ -0,0 +1,112 @@ +// COMMAND: random_gen -r MsneVV8VBoolVBVBVIVI_MU -n 1 -l 7 --has-ta --has-ma -c MsneVV8VBoolVBVBVIVI_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmsne_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vbool8_t vec_value_4_0= vmsne_vv_i8m1_b8_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_4_0, zero, 1, vl); +vse8_v_i8m1(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmsne_vv_operator_0() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmsne_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsne_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmsne_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsneVV8VBoolVBVIVI_MA.c b/test/codegen-golden/MsneVV8VBoolVBVIVI_MA.c new file mode 100644 index 0000000..aa333b1 --- /dev/null +++ b/test/codegen-golden/MsneVV8VBoolVBVIVI_MA.c @@ -0,0 +1,96 @@ +// COMMAND: random_gen -r MsneVV8VBoolVBVIVI_MA -n 1 -l 7 --has-ta --has-ma -c MsneVV8VBoolVBVIVI_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsne_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vbool8_t vec_value_3_0= vmsne_vv_i8m1_b8_ma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsne_vv_operator_0() { +int8_t tmp[] = {1,1,1,1,1,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsne_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsne_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsne_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsneVX8VBool.c b/test/codegen-golden/MsneVX8VBool.c new file mode 100644 index 0000000..c27b2b5 --- /dev/null +++ b/test/codegen-golden/MsneVX8VBool.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r MsneVX8VBool -n 1 -l 7 --has-ta --has-ma -c MsneVX8VBool.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vmsne_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vbool8_t vec_value_2_0= vmsne_vx_i8m1_b8(vec_value_0_0, placeholder1, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsne_vx_operator_0() { +int8_t tmp[] = {1,1,1,1,1,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmsne_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsne_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsne_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsneVX8VBoolVBVBVISI_MU.c b/test/codegen-golden/MsneVX8VBoolVBVBVISI_MU.c new file mode 100644 index 0000000..508d721 --- /dev/null +++ b/test/codegen-golden/MsneVX8VBoolVBVBVISI_MU.c @@ -0,0 +1,109 @@ +// COMMAND: random_gen -r MsneVX8VBoolVBVBVISI_MU -n 1 -l 7 --has-ta --has-ma -c MsneVX8VBoolVBVBVISI_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,0,1,1,0,0,1,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmsne_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vbool8_t vec_value_4_0= vmsne_vx_i8m1_b8_mu(mask_value_0_0, mask_value_1_0, vec_value_2_0, placeholder3, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_4_0, zero, 1, vl); +vse8_v_i8m1(placeholder4, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmsne_vx_operator_0() { +int8_t tmp[] = {1,1,1,1,1,0,1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmsne_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsne_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmsne_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsneVX8VBoolVBVISI_MA.c b/test/codegen-golden/MsneVX8VBoolVBVISI_MA.c new file mode 100644 index 0000000..49e482f --- /dev/null +++ b/test/codegen-golden/MsneVX8VBoolVBVISI_MA.c @@ -0,0 +1,93 @@ +// COMMAND: random_gen -r MsneVX8VBoolVBVISI_MA -n 1 -l 7 --has-ta --has-ma -c MsneVX8VBoolVBVISI_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsne_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vbool8_t vec_value_3_0= vmsne_vx_i8m1_b8_ma(mask_value_0_0, vec_value_1_0, placeholder2, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsne_vx_operator_0() { +int8_t tmp[] = {1,1,1,1,1,1,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsne_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsne_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsne_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsofM0VBool8VBVBVB_MU.c b/test/codegen-golden/MsofM0VBool8VBVBVB_MU.c new file mode 100644 index 0000000..759baf0 --- /dev/null +++ b/test/codegen-golden/MsofM0VBool8VBVBVB_MU.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r MsofM0VBool8VBVBVB_MU -n 1 -l 7 --has-ta --has-ma -c MsofM0VBool8VBVBVB_MU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsof_m_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +int32_t placeholder5 = -1; +for (size_t vl = 0; placeholder4 > 0 && placeholder5 == -1; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_0= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); +vbool8_t vec_value_3_0= vmsof_m_b8_mu(mask_value_0_0, mask_value_1_0, mask_value_2_0, vl); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder5 = vfirst_m_b8_m(mask_value_0_0, mask_value_2_0, vl); +} +for (size_t vl;placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_1= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_1= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_1= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); +vbool8_t placeholder6 = vmandn_mm_b8(mask_value_1_1, mask_value_0_1, vl); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(placeholder6, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsof_m_operator_0() { +int8_t tmp[] = {1,1,0,1,0,0,0,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsof_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsof_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsof_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsofM0VBool8VBVB_MA.c b/test/codegen-golden/MsofM0VBool8VBVB_MA.c new file mode 100644 index 0000000..c037cde --- /dev/null +++ b/test/codegen-golden/MsofM0VBool8VBVB_MA.c @@ -0,0 +1,97 @@ +// COMMAND: random_gen -r MsofM0VBool8VBVB_MA -n 1 -l 7 --has-ta --has-ma -c MsofM0VBool8VBVB_MA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsof_m_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +int32_t placeholder4 = -1; +for (size_t vl = 0; placeholder3 > 0 && placeholder4 == -1; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vbool8_t vec_value_2_0= vmsof_m_b8_ma(mask_value_0_0, mask_value_1_0, vl); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 = vfirst_m_b8_m(mask_value_0_0, mask_value_1_0, vl); +} +for (size_t vl;placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_1= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_1= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vbool8_t placeholder5 = vmnot_m_b8(mask_value_0_1, vl); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(placeholder5, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsof_m_operator_0() { +int8_t tmp[] = {1,1,0,1,0,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmsof_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsof_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsof_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsofMVBoolVB.c b/test/codegen-golden/MsofMVBoolVB.c new file mode 100644 index 0000000..3e424d8 --- /dev/null +++ b/test/codegen-golden/MsofMVBoolVB.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r MsofMVBoolVB -n 1 -l 7 --has-ta --has-ma -c MsofMVBoolVB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vmsof_m_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int placeholder2 = 7; + +int32_t placeholder3 = -1; +for (size_t vl = 0; placeholder2 > 0 && placeholder3 == -1; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vbool8_t vec_value_1_0= vmsof_m_b8(mask_value_0_0, vl); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_1_0, zero, 1, vl); +vse8_v_i8m1(placeholder1, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +placeholder3 = vfirst_m_b8(mask_value_0_0, vl); +} +for (size_t vl;placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vbool8_t placeholder4 = vmclr_m_b8(vsetvlmax_e8m1()); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(placeholder4, zero, 1, vl); +vse8_v_i8m1(placeholder1, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vmsof_m_operator_0() { +int8_t tmp[] = {0,1,0,0,0,0,0,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vmsof_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsof_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vmsof_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MsofMVBoolVBVBVB_m.c b/test/codegen-golden/MsofMVBoolVBVBVB_m.c new file mode 100644 index 0000000..446d229 --- /dev/null +++ b/test/codegen-golden/MsofMVBoolVBVBVB_m.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r MsofMVBoolVBVBVB_m -n 1 -l 7 --has-ta --has-ma -c MsofMVBoolVBVBVB_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {1,1,1,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmsof_m_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +int32_t placeholder5 = -1; +for (size_t vl = 0; placeholder4 > 0 && placeholder5 == -1; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_0= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); +vbool8_t vec_value_3_0= vmsof_m_b8_m (mask_value_0_0, mask_value_1_0, mask_value_2_0, vl); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_3_0, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder5 = vfirst_m_b8_m(mask_value_0_0, mask_value_2_0, vl); +} +for (size_t vl;placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_1= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_1= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_1= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); +vbool8_t placeholder6 = vmandn_mm_b8(mask_value_1_1, mask_value_0_1, vl); +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(placeholder6, zero, 1, vl); +vse8_v_i8m1(placeholder3, vec_store, vl); +} +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmsof_m_operator_0() { +int8_t tmp[] = {1,1,0,1,0,0,0,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmsof_m_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmsof_m_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmsof_m_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulVV8VInt8.c b/test/codegen-golden/MulVV8VInt8.c new file mode 100644 index 0000000..3ed0e2e --- /dev/null +++ b/test/codegen-golden/MulVV8VInt8.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r MulVV8VInt8 -n 1 -l 7 --has-ta --has-ma -c MulVV8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vmul_vv_i8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmul_vv_operator_0() { +int8_t tmp[] = {-48,110,-57,88,-96,-119,-54,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulVV8VInt8VBVIVIVI_TAMU.c b/test/codegen-golden/MulVV8VInt8VBVIVIVI_TAMU.c new file mode 100644 index 0000000..8a1e671 --- /dev/null +++ b/test/codegen-golden/MulVV8VInt8VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MulVV8VInt8VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c MulVV8VInt8VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmul_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmul_vv_operator_0() { +int8_t tmp[] = {29,-1,-73,-1,-112,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulVV8VInt8VBVIVIVI_TUMA.c b/test/codegen-golden/MulVV8VInt8VBVIVIVI_TUMA.c new file mode 100644 index 0000000..71b45c0 --- /dev/null +++ b/test/codegen-golden/MulVV8VInt8VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MulVV8VInt8VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c MulVV8VInt8VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmul_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmul_vv_operator_0() { +int8_t tmp[] = {-1,84,-73,19,-112,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulVV8VInt8VBVIVIVI_TUMU.c b/test/codegen-golden/MulVV8VInt8VBVIVIVI_TUMU.c new file mode 100644 index 0000000..532f938 --- /dev/null +++ b/test/codegen-golden/MulVV8VInt8VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MulVV8VInt8VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c MulVV8VInt8VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmul_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmul_vv_operator_0() { +int8_t tmp[] = {29,84,-73,19,-112,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulVV8VInt8VBVIVI_TAMA.c b/test/codegen-golden/MulVV8VInt8VBVIVI_TAMA.c new file mode 100644 index 0000000..cdc8e08 --- /dev/null +++ b/test/codegen-golden/MulVV8VInt8VBVIVI_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r MulVV8VInt8VBVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c MulVV8VInt8VBVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmul_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmul_vv_operator_0() { +int8_t tmp[] = {-1,-1,-44,-1,112,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulVV8VInt8VIVIVI_TU.c b/test/codegen-golden/MulVV8VInt8VIVIVI_TU.c new file mode 100644 index 0000000..23802b8 --- /dev/null +++ b/test/codegen-golden/MulVV8VInt8VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r MulVV8VInt8VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c MulVV8VInt8VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmul_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmul_vv_operator_0() { +int8_t tmp[] = {-126,79,-44,-14,112,-73,-74,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulVV8VInt8VIVI_TA.c b/test/codegen-golden/MulVV8VInt8VIVI_TA.c new file mode 100644 index 0000000..19e0275 --- /dev/null +++ b/test/codegen-golden/MulVV8VInt8VIVI_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r MulVV8VInt8VIVI_TA -n 1 -l 7 --has-ta --has-ma -c MulVV8VInt8VIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vmul_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmul_vv_operator_0() { +int8_t tmp[] = {-48,-1,-57,-1,-96,-1,-54,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulVV8VInt8_m.c b/test/codegen-golden/MulVV8VInt8_m.c new file mode 100644 index 0000000..dc959b4 --- /dev/null +++ b/test/codegen-golden/MulVV8VInt8_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r MulVV8VInt8_m -n 1 -l 7 --has-ta --has-ma -c MulVV8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmul_vv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmul_vv_operator_0() { +int8_t tmp[] = {29,-120,-73,19,-112,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulVX8VInt8.c b/test/codegen-golden/MulVX8VInt8.c new file mode 100644 index 0000000..6fb9378 --- /dev/null +++ b/test/codegen-golden/MulVX8VInt8.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r MulVX8VInt8 -n 1 -l 7 --has-ta --has-ma -c MulVX8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vmul_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vmul_vx_i8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmul_vx_operator_0() { +int8_t tmp[] = {-48,54,70,52,-60,70,-26,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulVX8VInt8VBVISI_TAMA.c b/test/codegen-golden/MulVX8VInt8VBVISI_TAMA.c new file mode 100644 index 0000000..f66f8c9 --- /dev/null +++ b/test/codegen-golden/MulVX8VInt8VBVISI_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r MulVX8VInt8VBVISI_TAMA -n 1 -l 7 --has-ta --has-ma -c MulVX8VInt8VBVISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmul_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vmul_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmul_vx_operator_0() { +int8_t tmp[] = {-1,-1,-8,-1,-106,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulVX8VInt8VBVIVISI_TAMU.c b/test/codegen-golden/MulVX8VInt8VBVIVISI_TAMU.c new file mode 100644 index 0000000..757fb46 --- /dev/null +++ b/test/codegen-golden/MulVX8VInt8VBVIVISI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MulVX8VInt8VBVIVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c MulVX8VInt8VBVIVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmul_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vmul_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmul_vx_operator_0() { +int8_t tmp[] = {50,-1,94,-1,92,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulVX8VInt8VBVIVISI_TUMA.c b/test/codegen-golden/MulVX8VInt8VBVIVISI_TUMA.c new file mode 100644 index 0000000..d4b3ce5 --- /dev/null +++ b/test/codegen-golden/MulVX8VInt8VBVIVISI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MulVX8VInt8VBVIVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c MulVX8VInt8VBVIVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmul_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vmul_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmul_vx_operator_0() { +int8_t tmp[] = {-1,-15,94,16,92,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulVX8VInt8VBVIVISI_TUMU.c b/test/codegen-golden/MulVX8VInt8VBVIVISI_TUMU.c new file mode 100644 index 0000000..4dc5439 --- /dev/null +++ b/test/codegen-golden/MulVX8VInt8VBVIVISI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MulVX8VInt8VBVIVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c MulVX8VInt8VBVIVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmul_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vmul_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmul_vx_operator_0() { +int8_t tmp[] = {50,-15,94,16,92,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulVX8VInt8VISI_TA.c b/test/codegen-golden/MulVX8VInt8VISI_TA.c new file mode 100644 index 0000000..82f5096 --- /dev/null +++ b/test/codegen-golden/MulVX8VInt8VISI_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r MulVX8VInt8VISI_TA -n 1 -l 7 --has-ta --has-ma -c MulVX8VInt8VISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vmul_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vmul_vx_i8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmul_vx_operator_0() { +int8_t tmp[] = {-48,-1,70,-1,-60,-1,-26,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulVX8VInt8VIVISI_TU.c b/test/codegen-golden/MulVX8VInt8VIVISI_TU.c new file mode 100644 index 0000000..370c5f3 --- /dev/null +++ b/test/codegen-golden/MulVX8VInt8VIVISI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r MulVX8VInt8VIVISI_TU -n 1 -l 7 --has-ta --has-ma -c MulVX8VInt8VIVISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmul_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vmul_vx_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmul_vx_operator_0() { +int8_t tmp[] = {-76,79,-8,-14,-106,-73,-126,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulVX8VInt8_m.c b/test/codegen-golden/MulVX8VInt8_m.c new file mode 100644 index 0000000..683ddf1 --- /dev/null +++ b/test/codegen-golden/MulVX8VInt8_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r MulVX8VInt8_m -n 1 -l 7 --has-ta --has-ma -c MulVX8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmul_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vmul_vx_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmul_vx_operator_0() { +int8_t tmp[] = {50,72,94,16,92,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhVV8VInt8.c b/test/codegen-golden/MulhVV8VInt8.c new file mode 100644 index 0000000..3bb11d5 --- /dev/null +++ b/test/codegen-golden/MulhVV8VInt8.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r MulhVV8VInt8 -n 1 -l 7 --has-ta --has-ma -c MulhVV8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmulh_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vmulh_vv_i8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulh_vv_operator_0() { +int8_t tmp[] = {4,15,-4,-1,1,18,5,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmulh_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulh_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulh_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhVV8VInt8VBVIVIVI_TAMU.c b/test/codegen-golden/MulhVV8VInt8VBVIVIVI_TAMU.c new file mode 100644 index 0000000..2391c49 --- /dev/null +++ b/test/codegen-golden/MulhVV8VInt8VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MulhVV8VInt8VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c MulhVV8VInt8VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulh_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmulh_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulh_vv_operator_0() { +int8_t tmp[] = {29,-1,-3,-1,-3,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulh_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulh_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulh_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhVV8VInt8VBVIVIVI_TUMA.c b/test/codegen-golden/MulhVV8VInt8VBVIVIVI_TUMA.c new file mode 100644 index 0000000..49685d3 --- /dev/null +++ b/test/codegen-golden/MulhVV8VInt8VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MulhVV8VInt8VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c MulhVV8VInt8VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulh_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmulh_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulh_vv_operator_0() { +int8_t tmp[] = {-1,84,-3,19,-3,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulh_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulh_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulh_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhVV8VInt8VBVIVIVI_TUMU.c b/test/codegen-golden/MulhVV8VInt8VBVIVIVI_TUMU.c new file mode 100644 index 0000000..002613e --- /dev/null +++ b/test/codegen-golden/MulhVV8VInt8VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MulhVV8VInt8VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c MulhVV8VInt8VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulh_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmulh_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulh_vv_operator_0() { +int8_t tmp[] = {29,84,-3,19,-3,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulh_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulh_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulh_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhVV8VInt8VBVIVI_TAMA.c b/test/codegen-golden/MulhVV8VInt8VBVIVI_TAMA.c new file mode 100644 index 0000000..ff326a8 --- /dev/null +++ b/test/codegen-golden/MulhVV8VInt8VBVIVI_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r MulhVV8VInt8VBVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c MulhVV8VInt8VBVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmulh_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmulh_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulh_vv_operator_0() { +int8_t tmp[] = {-1,-1,-2,-1,1,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmulh_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulh_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulh_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhVV8VInt8VIVIVI_TU.c b/test/codegen-golden/MulhVV8VInt8VIVIVI_TU.c new file mode 100644 index 0000000..bb9eba2 --- /dev/null +++ b/test/codegen-golden/MulhVV8VInt8VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r MulhVV8VInt8VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c MulhVV8VInt8VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmulh_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmulh_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulh_vv_operator_0() { +int8_t tmp[] = {-3,79,-2,-14,1,-73,0,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmulh_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulh_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulh_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhVV8VInt8VIVI_TA.c b/test/codegen-golden/MulhVV8VInt8VIVI_TA.c new file mode 100644 index 0000000..24474db --- /dev/null +++ b/test/codegen-golden/MulhVV8VInt8VIVI_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r MulhVV8VInt8VIVI_TA -n 1 -l 7 --has-ta --has-ma -c MulhVV8VInt8VIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmulh_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vmulh_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulh_vv_operator_0() { +int8_t tmp[] = {4,-1,-4,-1,1,-1,5,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmulh_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulh_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulh_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhVV8VInt8_m.c b/test/codegen-golden/MulhVV8VInt8_m.c new file mode 100644 index 0000000..ff2409a --- /dev/null +++ b/test/codegen-golden/MulhVV8VInt8_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r MulhVV8VInt8_m -n 1 -l 7 --has-ta --has-ma -c MulhVV8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulh_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmulh_vv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulh_vv_operator_0() { +int8_t tmp[] = {29,-6,-3,19,-3,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulh_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulh_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulh_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhVX8VInt8.c b/test/codegen-golden/MulhVX8VInt8.c new file mode 100644 index 0000000..495444b --- /dev/null +++ b/test/codegen-golden/MulhVX8VInt8.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r MulhVX8VInt8 -n 1 -l 7 --has-ta --has-ma -c MulhVX8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vmulh_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vmulh_vx_i8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulh_vx_operator_0() { +int8_t tmp[] = {4,-7,-5,1,-3,6,4,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmulh_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulh_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulh_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhVX8VInt8VBVISI_TAMA.c b/test/codegen-golden/MulhVX8VInt8VBVISI_TAMA.c new file mode 100644 index 0000000..86cccbd --- /dev/null +++ b/test/codegen-golden/MulhVX8VInt8VBVISI_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r MulhVX8VInt8VBVISI_TAMA -n 1 -l 7 --has-ta --has-ma -c MulhVX8VInt8VBVISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmulh_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vmulh_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulh_vx_operator_0() { +int8_t tmp[] = {-1,-1,-2,-1,5,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmulh_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulh_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulh_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhVX8VInt8VBVIVISI_TAMU.c b/test/codegen-golden/MulhVX8VInt8VBVIVISI_TAMU.c new file mode 100644 index 0000000..daf8eb7 --- /dev/null +++ b/test/codegen-golden/MulhVX8VInt8VBVIVISI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MulhVX8VInt8VBVIVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c MulhVX8VInt8VBVIVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulh_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vmulh_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulh_vx_operator_0() { +int8_t tmp[] = {50,-1,-2,-1,6,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulh_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulh_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulh_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhVX8VInt8VBVIVISI_TUMA.c b/test/codegen-golden/MulhVX8VInt8VBVIVISI_TUMA.c new file mode 100644 index 0000000..db996ca --- /dev/null +++ b/test/codegen-golden/MulhVX8VInt8VBVIVISI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MulhVX8VInt8VBVIVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c MulhVX8VInt8VBVIVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulh_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vmulh_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulh_vx_operator_0() { +int8_t tmp[] = {-1,-15,-2,16,6,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulh_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulh_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulh_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhVX8VInt8VBVIVISI_TUMU.c b/test/codegen-golden/MulhVX8VInt8VBVIVISI_TUMU.c new file mode 100644 index 0000000..3f3bd36 --- /dev/null +++ b/test/codegen-golden/MulhVX8VInt8VBVIVISI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MulhVX8VInt8VBVIVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c MulhVX8VInt8VBVIVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulh_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vmulh_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulh_vx_operator_0() { +int8_t tmp[] = {50,-15,-2,16,6,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulh_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulh_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulh_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhVX8VInt8VISI_TA.c b/test/codegen-golden/MulhVX8VInt8VISI_TA.c new file mode 100644 index 0000000..c403967 --- /dev/null +++ b/test/codegen-golden/MulhVX8VInt8VISI_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r MulhVX8VInt8VISI_TA -n 1 -l 7 --has-ta --has-ma -c MulhVX8VInt8VISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vmulh_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vmulh_vx_i8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulh_vx_operator_0() { +int8_t tmp[] = {4,-1,-5,-1,-3,-1,4,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmulh_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulh_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulh_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhVX8VInt8VIVISI_TU.c b/test/codegen-golden/MulhVX8VInt8VIVISI_TU.c new file mode 100644 index 0000000..1f169ae --- /dev/null +++ b/test/codegen-golden/MulhVX8VInt8VIVISI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r MulhVX8VInt8VIVISI_TU -n 1 -l 7 --has-ta --has-ma -c MulhVX8VInt8VIVISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmulh_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vmulh_vx_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulh_vx_operator_0() { +int8_t tmp[] = {-5,79,-2,-14,5,-73,-3,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmulh_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulh_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulh_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhVX8VInt8_m.c b/test/codegen-golden/MulhVX8VInt8_m.c new file mode 100644 index 0000000..0462f6b --- /dev/null +++ b/test/codegen-golden/MulhVX8VInt8_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r MulhVX8VInt8_m -n 1 -l 7 --has-ta --has-ma -c MulhVX8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulh_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vmulh_vx_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulh_vx_operator_0() { +int8_t tmp[] = {50,-2,-2,16,6,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulh_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulh_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulh_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhsuVV8VInt8.c b/test/codegen-golden/MulhsuVV8VInt8.c new file mode 100644 index 0000000..4ed6a48 --- /dev/null +++ b/test/codegen-golden/MulhsuVV8VInt8.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r MulhsuVV8VInt8 -n 1 -l 7 --has-ta --has-ma -c MulhsuVV8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmulhsu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vmulhsu_vv_i8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulhsu_vv_operator_0() { +int8_t tmp[] = {-9,23,9,-4,5,-6,-9,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmulhsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulhsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhsuVV8VInt8VBVIVIVU_TAMU.c b/test/codegen-golden/MulhsuVV8VInt8VBVIVIVU_TAMU.c new file mode 100644 index 0000000..9cb5776 --- /dev/null +++ b/test/codegen-golden/MulhsuVV8VInt8VBVIVIVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MulhsuVV8VInt8VBVIVIVU_TAMU -n 1 -l 7 --has-ta --has-ma -c MulhsuVV8VInt8VBVIVIVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulhsu_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmulhsu_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulhsu_vv_operator_0() { +int8_t tmp[] = {29,-1,6,-1,-9,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulhsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulhsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhsuVV8VInt8VBVIVIVU_TUMA.c b/test/codegen-golden/MulhsuVV8VInt8VBVIVIVU_TUMA.c new file mode 100644 index 0000000..9f0ed1e --- /dev/null +++ b/test/codegen-golden/MulhsuVV8VInt8VBVIVIVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MulhsuVV8VInt8VBVIVIVU_TUMA -n 1 -l 7 --has-ta --has-ma -c MulhsuVV8VInt8VBVIVIVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulhsu_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmulhsu_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulhsu_vv_operator_0() { +int8_t tmp[] = {-1,84,6,19,-9,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulhsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulhsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhsuVV8VInt8VBVIVIVU_TUMU.c b/test/codegen-golden/MulhsuVV8VInt8VBVIVIVU_TUMU.c new file mode 100644 index 0000000..59062d0 --- /dev/null +++ b/test/codegen-golden/MulhsuVV8VInt8VBVIVIVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MulhsuVV8VInt8VBVIVIVU_TUMU -n 1 -l 7 --has-ta --has-ma -c MulhsuVV8VInt8VBVIVIVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulhsu_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmulhsu_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulhsu_vv_operator_0() { +int8_t tmp[] = {29,84,6,19,-9,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulhsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulhsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhsuVV8VInt8VBVIVU_TAMA.c b/test/codegen-golden/MulhsuVV8VInt8VBVIVU_TAMA.c new file mode 100644 index 0000000..7dd5c2e --- /dev/null +++ b/test/codegen-golden/MulhsuVV8VInt8VBVIVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r MulhsuVV8VInt8VBVIVU_TAMA -n 1 -l 7 --has-ta --has-ma -c MulhsuVV8VInt8VBVIVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmulhsu_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmulhsu_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulhsu_vv_operator_0() { +int8_t tmp[] = {-1,-1,3,-1,5,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmulhsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulhsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhsuVV8VInt8VIVIVU_TU.c b/test/codegen-golden/MulhsuVV8VInt8VIVIVU_TU.c new file mode 100644 index 0000000..ef65c94 --- /dev/null +++ b/test/codegen-golden/MulhsuVV8VInt8VIVIVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r MulhsuVV8VInt8VIVIVU_TU -n 1 -l 7 --has-ta --has-ma -c MulhsuVV8VInt8VIVIVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmulhsu_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vmulhsu_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulhsu_vv_operator_0() { +int8_t tmp[] = {4,79,3,-14,5,-73,-2,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmulhsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulhsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhsuVV8VInt8VIVU_TA.c b/test/codegen-golden/MulhsuVV8VInt8VIVU_TA.c new file mode 100644 index 0000000..5e885a6 --- /dev/null +++ b/test/codegen-golden/MulhsuVV8VInt8VIVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r MulhsuVV8VInt8VIVU_TA -n 1 -l 7 --has-ta --has-ma -c MulhsuVV8VInt8VIVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmulhsu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vmulhsu_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulhsu_vv_operator_0() { +int8_t tmp[] = {-9,-1,9,-1,5,-1,-9,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmulhsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulhsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhsuVV8VInt8_m.c b/test/codegen-golden/MulhsuVV8VInt8_m.c new file mode 100644 index 0000000..5fc076d --- /dev/null +++ b/test/codegen-golden/MulhsuVV8VInt8_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r MulhsuVV8VInt8_m -n 1 -l 7 --has-ta --has-ma -c MulhsuVV8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulhsu_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vmulhsu_vv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulhsu_vv_operator_0() { +int8_t tmp[] = {29,-9,6,19,-9,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulhsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulhsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhsuVX8VInt8.c b/test/codegen-golden/MulhsuVX8VInt8.c new file mode 100644 index 0000000..4608f7d --- /dev/null +++ b/test/codegen-golden/MulhsuVX8VInt8.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r MulhsuVX8VInt8 -n 1 -l 7 --has-ta --has-ma -c MulhsuVX8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vmulhsu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vmulhsu_vx_i8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulhsu_vx_operator_0() { +int8_t tmp[] = {-9,12,8,-3,3,-12,-9,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmulhsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulhsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhsuVX8VInt8VBVISU_TAMA.c b/test/codegen-golden/MulhsuVX8VInt8VBVISU_TAMA.c new file mode 100644 index 0000000..ee8f9de --- /dev/null +++ b/test/codegen-golden/MulhsuVX8VInt8VBVISU_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r MulhsuVX8VInt8VBVISU_TAMA -n 1 -l 7 --has-ta --has-ma -c MulhsuVX8VInt8VBVISU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmulhsu_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vmulhsu_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulhsu_vx_operator_0() { +int8_t tmp[] = {-1,-1,1,-1,-10,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmulhsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulhsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhsuVX8VInt8VBVIVISU_TAMU.c b/test/codegen-golden/MulhsuVX8VInt8VBVIVISU_TAMU.c new file mode 100644 index 0000000..ac034b9 --- /dev/null +++ b/test/codegen-golden/MulhsuVX8VInt8VBVIVISU_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MulhsuVX8VInt8VBVIVISU_TAMU -n 1 -l 7 --has-ta --has-ma -c MulhsuVX8VInt8VBVIVISU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulhsu_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vmulhsu_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulhsu_vx_operator_0() { +int8_t tmp[] = {50,-1,2,-1,-12,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulhsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulhsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhsuVX8VInt8VBVIVISU_TUMA.c b/test/codegen-golden/MulhsuVX8VInt8VBVIVISU_TUMA.c new file mode 100644 index 0000000..878cb3c --- /dev/null +++ b/test/codegen-golden/MulhsuVX8VInt8VBVIVISU_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MulhsuVX8VInt8VBVIVISU_TUMA -n 1 -l 7 --has-ta --has-ma -c MulhsuVX8VInt8VBVIVISU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulhsu_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vmulhsu_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulhsu_vx_operator_0() { +int8_t tmp[] = {-1,-15,2,16,-12,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulhsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulhsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhsuVX8VInt8VBVIVISU_TUMU.c b/test/codegen-golden/MulhsuVX8VInt8VBVIVISU_TUMU.c new file mode 100644 index 0000000..6447a29 --- /dev/null +++ b/test/codegen-golden/MulhsuVX8VInt8VBVIVISU_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MulhsuVX8VInt8VBVIVISU_TUMU -n 1 -l 7 --has-ta --has-ma -c MulhsuVX8VInt8VBVIVISU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulhsu_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vmulhsu_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulhsu_vx_operator_0() { +int8_t tmp[] = {50,-15,2,16,-12,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulhsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulhsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhsuVX8VInt8VISU_TA.c b/test/codegen-golden/MulhsuVX8VInt8VISU_TA.c new file mode 100644 index 0000000..05a2b85 --- /dev/null +++ b/test/codegen-golden/MulhsuVX8VInt8VISU_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r MulhsuVX8VInt8VISU_TA -n 1 -l 7 --has-ta --has-ma -c MulhsuVX8VInt8VISU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vmulhsu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vmulhsu_vx_i8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulhsu_vx_operator_0() { +int8_t tmp[] = {-9,-1,8,-1,3,-1,-9,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmulhsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulhsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhsuVX8VInt8VIVISU_TU.c b/test/codegen-golden/MulhsuVX8VInt8VIVISU_TU.c new file mode 100644 index 0000000..4de9bf4 --- /dev/null +++ b/test/codegen-golden/MulhsuVX8VInt8VIVISU_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r MulhsuVX8VInt8VIVISU_TU -n 1 -l 7 --has-ta --has-ma -c MulhsuVX8VInt8VIVISU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmulhsu_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vmulhsu_vx_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulhsu_vx_operator_0() { +int8_t tmp[] = {7,79,1,-14,-10,-73,4,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmulhsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulhsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhsuVX8VInt8_m.c b/test/codegen-golden/MulhsuVX8VInt8_m.c new file mode 100644 index 0000000..7bece0f --- /dev/null +++ b/test/codegen-golden/MulhsuVX8VInt8_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r MulhsuVX8VInt8_m -n 1 -l 7 --has-ta --has-ma -c MulhsuVX8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulhsu_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vmulhsu_vx_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulhsu_vx_operator_0() { +int8_t tmp[] = {50,3,2,16,-12,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulhsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulhsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhuVV8VUInt8.c b/test/codegen-golden/MulhuVV8VUInt8.c new file mode 100644 index 0000000..dad5b58 --- /dev/null +++ b/test/codegen-golden/MulhuVV8VUInt8.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r MulhuVV8VUInt8 -n 1 -l 7 --has-ta --has-ma -c MulhuVV8VUInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmulhu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vmulhu_vv_u8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulhu_vv_operator_0() { +uint8_t tmp[] = {3,26,12,9,14,0,3,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmulhu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulhu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhuVV8VUInt8VBVUVUVU_TAMU.c b/test/codegen-golden/MulhuVV8VUInt8VBVUVUVU_TAMU.c new file mode 100644 index 0000000..c098590 --- /dev/null +++ b/test/codegen-golden/MulhuVV8VUInt8VBVUVUVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MulhuVV8VUInt8VBVUVUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c MulhuVV8VUInt8VBVUVUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulhu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vmulhu_vv_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulhu_vv_operator_0() { +uint8_t tmp[] = {65,255,11,255,7,255,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulhu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulhu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhuVV8VUInt8VBVUVUVU_TUMA.c b/test/codegen-golden/MulhuVV8VUInt8VBVUVUVU_TUMA.c new file mode 100644 index 0000000..18c1f8a --- /dev/null +++ b/test/codegen-golden/MulhuVV8VUInt8VBVUVUVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MulhuVV8VUInt8VBVUVUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c MulhuVV8VUInt8VBVUVUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulhu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vmulhu_vv_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulhu_vv_operator_0() { +uint8_t tmp[] = {255,92,11,59,7,13,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulhu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulhu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhuVV8VUInt8VBVUVUVU_TUMU.c b/test/codegen-golden/MulhuVV8VUInt8VBVUVUVU_TUMU.c new file mode 100644 index 0000000..0df4bef --- /dev/null +++ b/test/codegen-golden/MulhuVV8VUInt8VBVUVUVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r MulhuVV8VUInt8VBVUVUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c MulhuVV8VUInt8VBVUVUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulhu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vmulhu_vv_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulhu_vv_operator_0() { +uint8_t tmp[] = {65,92,11,59,7,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulhu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulhu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhuVV8VUInt8VBVUVU_TAMA.c b/test/codegen-golden/MulhuVV8VUInt8VBVUVU_TAMA.c new file mode 100644 index 0000000..ad6c39b --- /dev/null +++ b/test/codegen-golden/MulhuVV8VUInt8VBVUVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r MulhuVV8VUInt8VBVUVU_TAMA -n 1 -l 7 --has-ta --has-ma -c MulhuVV8VUInt8VBVUVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmulhu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vmulhu_vv_u8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulhu_vv_operator_0() { +uint8_t tmp[] = {255,255,9,255,14,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmulhu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulhu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhuVV8VUInt8VUVUVU_TU.c b/test/codegen-golden/MulhuVV8VUInt8VUVUVU_TU.c new file mode 100644 index 0000000..fa44b9d --- /dev/null +++ b/test/codegen-golden/MulhuVV8VUInt8VUVUVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r MulhuVV8VUInt8VUVUVU_TU -n 1 -l 7 --has-ta --has-ma -c MulhuVV8VUInt8VUVUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmulhu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vmulhu_vv_u8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulhu_vv_operator_0() { +uint8_t tmp[] = {9,90,9,43,14,14,6,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmulhu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulhu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhuVV8VUInt8VUVU_TA.c b/test/codegen-golden/MulhuVV8VUInt8VUVU_TA.c new file mode 100644 index 0000000..dd2b1e0 --- /dev/null +++ b/test/codegen-golden/MulhuVV8VUInt8VUVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r MulhuVV8VUInt8VUVU_TA -n 1 -l 7 --has-ta --has-ma -c MulhuVV8VUInt8VUVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmulhu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vmulhu_vv_u8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulhu_vv_operator_0() { +uint8_t tmp[] = {3,255,12,255,14,255,3,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmulhu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulhu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhuVV8VUInt8_m.c b/test/codegen-golden/MulhuVV8VUInt8_m.c new file mode 100644 index 0000000..dda0ecc --- /dev/null +++ b/test/codegen-golden/MulhuVV8VUInt8_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r MulhuVV8VUInt8_m -n 1 -l 7 --has-ta --has-ma -c MulhuVV8VUInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulhu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vmulhu_vv_u8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulhu_vv_operator_0() { +uint8_t tmp[] = {65,10,11,59,7,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulhu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulhu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhuVX8VUInt8.c b/test/codegen-golden/MulhuVX8VUInt8.c new file mode 100644 index 0000000..f753355 --- /dev/null +++ b/test/codegen-golden/MulhuVX8VUInt8.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r MulhuVX8VUInt8 -n 1 -l 7 --has-ta --has-ma -c MulhuVX8VUInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vmulhu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vmulhu_vx_u8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulhu_vx_operator_0() { +uint8_t tmp[] = {3,13,11,6,9,2,3,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmulhu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulhu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhuVX8VUInt8VBVUSU_TAMA.c b/test/codegen-golden/MulhuVX8VUInt8VBVUSU_TAMA.c new file mode 100644 index 0000000..e2d6741 --- /dev/null +++ b/test/codegen-golden/MulhuVX8VUInt8VBVUSU_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r MulhuVX8VUInt8VBVUSU_TAMA -n 1 -l 7 --has-ta --has-ma -c MulhuVX8VUInt8VBVUSU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmulhu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vmulhu_vx_u8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulhu_vx_operator_0() { +uint8_t tmp[] = {255,255,8,255,2,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmulhu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulhu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhuVX8VUInt8VBVUVUSU_TAMU.c b/test/codegen-golden/MulhuVX8VUInt8VBVUVUSU_TAMU.c new file mode 100644 index 0000000..0c19daf --- /dev/null +++ b/test/codegen-golden/MulhuVX8VUInt8VBVUVUSU_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MulhuVX8VUInt8VBVUVUSU_TAMU -n 1 -l 7 --has-ta --has-ma -c MulhuVX8VUInt8VBVUVUSU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulhu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vmulhu_vx_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulhu_vx_operator_0() { +uint8_t tmp[] = {75,255,8,255,1,255,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulhu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulhu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhuVX8VUInt8VBVUVUSU_TUMA.c b/test/codegen-golden/MulhuVX8VUInt8VBVUVUSU_TUMA.c new file mode 100644 index 0000000..ada9f86 --- /dev/null +++ b/test/codegen-golden/MulhuVX8VUInt8VBVUVUSU_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MulhuVX8VUInt8VBVUVUSU_TUMA -n 1 -l 7 --has-ta --has-ma -c MulhuVX8VUInt8VBVUVUSU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulhu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vmulhu_vx_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulhu_vx_operator_0() { +uint8_t tmp[] = {255,42,8,58,1,37,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulhu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulhu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhuVX8VUInt8VBVUVUSU_TUMU.c b/test/codegen-golden/MulhuVX8VUInt8VBVUVUSU_TUMU.c new file mode 100644 index 0000000..608b5fb --- /dev/null +++ b/test/codegen-golden/MulhuVX8VUInt8VBVUVUSU_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r MulhuVX8VUInt8VBVUVUSU_TUMU -n 1 -l 7 --has-ta --has-ma -c MulhuVX8VUInt8VBVUVUSU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulhu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vmulhu_vx_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulhu_vx_operator_0() { +uint8_t tmp[] = {75,42,8,58,1,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulhu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulhu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhuVX8VUInt8VUSU_TA.c b/test/codegen-golden/MulhuVX8VUInt8VUSU_TA.c new file mode 100644 index 0000000..f7d33ec --- /dev/null +++ b/test/codegen-golden/MulhuVX8VUInt8VUSU_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r MulhuVX8VUInt8VUSU_TA -n 1 -l 7 --has-ta --has-ma -c MulhuVX8VUInt8VUSU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vmulhu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vmulhu_vx_u8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulhu_vx_operator_0() { +uint8_t tmp[] = {3,255,11,255,9,255,3,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmulhu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulhu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhuVX8VUInt8VUVUSU_TU.c b/test/codegen-golden/MulhuVX8VUInt8VUVUSU_TU.c new file mode 100644 index 0000000..819dd8d --- /dev/null +++ b/test/codegen-golden/MulhuVX8VUInt8VUVUSU_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r MulhuVX8VUInt8VUVUSU_TU -n 1 -l 7 --has-ta --has-ma -c MulhuVX8VUInt8VUVUSU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmulhu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vmulhu_vx_u8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmulhu_vx_operator_0() { +uint8_t tmp[] = {11,90,8,43,2,14,9,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vmulhu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmulhu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MulhuVX8VUInt8_m.c b/test/codegen-golden/MulhuVX8VUInt8_m.c new file mode 100644 index 0000000..ba3d3e6 --- /dev/null +++ b/test/codegen-golden/MulhuVX8VUInt8_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r MulhuVX8VUInt8_m -n 1 -l 7 --has-ta --has-ma -c MulhuVX8VUInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vmulhu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vmulhu_vx_u8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vmulhu_vx_operator_0() { +uint8_t tmp[] = {75,9,8,58,1,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vmulhu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmulhu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vmulhu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MvV8VInt8.c b/test/codegen-golden/MvV8VInt8.c new file mode 100644 index 0000000..cd4a863 --- /dev/null +++ b/test/codegen-golden/MvV8VInt8.c @@ -0,0 +1,60 @@ +// COMMAND: random_gen -r MvV8VInt8 -n 1 -l 7 --has-ta --has-ma -c MvV8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vmv_v_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_1_0= vmv_v_v_i8m1(vec_value_0_0, vl); + +vse8_v_i8m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vmv_v_v_operator_0() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vmv_v_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmv_v_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vmv_v_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MvV8VInt8VIVI_TU.c b/test/codegen-golden/MvV8VInt8VIVI_TU.c new file mode 100644 index 0000000..d0b6257 --- /dev/null +++ b/test/codegen-golden/MvV8VInt8VIVI_TU.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r MvV8VInt8VIVI_TU -n 1 -l 7 --has-ta --has-ma -c MvV8VInt8VIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmv_v_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vmv_v_v_i8m1_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmv_v_v_operator_0() { +int8_t tmp[] = {-22,79,-15,-14,16,-73,-26,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmv_v_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmv_v_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmv_v_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MvV8VInt8VI_TA.c b/test/codegen-golden/MvV8VInt8VI_TA.c new file mode 100644 index 0000000..8fa6439 --- /dev/null +++ b/test/codegen-golden/MvV8VInt8VI_TA.c @@ -0,0 +1,61 @@ +// COMMAND: random_gen -r MvV8VInt8VI_TA -n 1 -l 7 --has-ta --has-ma -c MvV8VInt8VI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vmv_v_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_1_0= vmv_v_v_i8m1_ta(vec_value_0_0, tail_vl); + +vse8_v_i8m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vmv_v_v_operator_0() { +int8_t tmp[] = {-56,-1,55,-1,26,-1,-57,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vmv_v_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmv_v_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vmv_v_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MvX8VInt8.c b/test/codegen-golden/MvX8VInt8.c new file mode 100644 index 0000000..e229779 --- /dev/null +++ b/test/codegen-golden/MvX8VInt8.c @@ -0,0 +1,57 @@ +// COMMAND: random_gen -r MvX8VInt8 -n 1 -l 7 --has-ta --has-ma -c MvX8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0; +int8_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp = -56; +value_0 = tmp; +} +void vmv_v_x_operator_0() { +int8_t placeholder0 = value_0; +int8_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); + +vint8m1_t vec_value_1_0= vmv_v_x_i8m1(placeholder0, vl); + +vse8_v_i8m1(placeholder1, vec_value_1_0, vl); + +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vmv_v_x_operator_0() { +int8_t tmp[] = {-56,-56,-56,-56,-56,-56,-56,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vmv_v_x_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmv_v_x_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vmv_v_x_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MvX8VInt8SI_TA.c b/test/codegen-golden/MvX8VInt8SI_TA.c new file mode 100644 index 0000000..f942c6f --- /dev/null +++ b/test/codegen-golden/MvX8VInt8SI_TA.c @@ -0,0 +1,58 @@ +// COMMAND: random_gen -r MvX8VInt8SI_TA -n 1 -l 7 --has-ta --has-ma -c MvX8VInt8SI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0; +int8_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp = -56; +value_0 = tmp; +} +void vmv_v_x_operator_0() { +int8_t placeholder0 = value_0; +int8_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; + +vint8m1_t vec_value_1_0= vmv_v_x_i8m1_ta(placeholder0, tail_vl); + +vse8_v_i8m1(placeholder1, vec_value_1_0, vl); + +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vmv_v_x_operator_0() { +int8_t tmp[] = {-56,-1,-56,-1,-56,-1,-56,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vmv_v_x_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmv_v_x_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vmv_v_x_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MvX8VInt8VISI_TU.c b/test/codegen-golden/MvX8VInt8VISI_TU.c new file mode 100644 index 0000000..a5a0911 --- /dev/null +++ b/test/codegen-golden/MvX8VInt8VISI_TU.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r MvX8VInt8VISI_TU -n 1 -l 7 --has-ta --has-ma -c MvX8VInt8VISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vmv_v_x_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vmv_v_x_i8m1_tu(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmv_v_x_operator_0() { +int8_t tmp[] = {-22,79,-22,-14,-22,-73,-22,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmv_v_x_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmv_v_x_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmv_v_x_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MxnorMMVBoolVBVB.c b/test/codegen-golden/MxnorMMVBoolVBVB.c new file mode 100644 index 0000000..0f5abbd --- /dev/null +++ b/test/codegen-golden/MxnorMMVBoolVBVB.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r MxnorMMVBoolVBVB -n 1 -l 7 --has-ta --has-ma -c MxnorMMVBoolVBVB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmxnor_mm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); + +vbool8_t vec_value_2_0= vmxnor_mm_b8(mask_value_0_0, mask_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmxnor_mm_operator_0() { +int8_t tmp[] = {1,1,0,0,1,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmxnor_mm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmxnor_mm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmxnor_mm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/MxorMMVBoolVBVB.c b/test/codegen-golden/MxorMMVBoolVBVB.c new file mode 100644 index 0000000..84fe363 --- /dev/null +++ b/test/codegen-golden/MxorMMVBoolVBVB.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r MxorMMVBoolVBVB -n 1 -l 7 --has-ta --has-ma -c MxorMMVBoolVBVB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vmxor_mm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1= vle8_v_i8m1(placeholder1, vl); +vbool8_t mask_value_1_0= vmseq_vx_i8m1_b8(vec_value_1, 1, vl); + +vbool8_t vec_value_2_0= vmxor_mm_b8(mask_value_0_0, mask_value_1_0, vl); + +{ +size_t vlmax = vsetvlmax_e8m1(); +vint8m1_t zero = vmv_v_x_i8m1(0, vlmax); +vint8m1_t vec_store = vmerge_vxm_i8m1(vec_value_2_0, zero, 1, vl); +vse8_v_i8m1(placeholder2, vec_store, vl); +} + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vmxor_mm_operator_0() { +int8_t tmp[] = {0,0,1,1,0,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vmxor_mm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vmxor_mm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vmxor_mm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipWV8VInt8VBVIVIVU_TAMU.c b/test/codegen-golden/NclipWV8VInt8VBVIVIVU_TAMU.c new file mode 100644 index 0000000..27e10fb --- /dev/null +++ b/test/codegen-golden/NclipWV8VInt8VBVIVIVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r NclipWV8VInt8VBVIVIVU_TAMU -n 1 -l 7 --has-ta --has-ma -c NclipWV8VInt8VBVIVIVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {6976,-2834,3879,9191,-3858,-5299,-3986,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnclip_wv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnclip_wv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnclip_wv_operator_0() { +int8_t tmp[] = {29,-1,4,-1,-4,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnclip_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclip_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnclip_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipWV8VInt8VBVIVIVU_TUMA.c b/test/codegen-golden/NclipWV8VInt8VBVIVIVU_TUMA.c new file mode 100644 index 0000000..8c39e1f --- /dev/null +++ b/test/codegen-golden/NclipWV8VInt8VBVIVIVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r NclipWV8VInt8VBVIVIVU_TUMA -n 1 -l 7 --has-ta --has-ma -c NclipWV8VInt8VBVIVIVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {6976,-2834,3879,9191,-3858,-5299,-3986,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnclip_wv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnclip_wv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnclip_wv_operator_0() { +int8_t tmp[] = {-1,84,4,19,-4,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnclip_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclip_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnclip_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipWV8VInt8VBVIVIVU_TUMU.c b/test/codegen-golden/NclipWV8VInt8VBVIVIVU_TUMU.c new file mode 100644 index 0000000..222b593 --- /dev/null +++ b/test/codegen-golden/NclipWV8VInt8VBVIVIVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r NclipWV8VInt8VBVIVIVU_TUMU -n 1 -l 7 --has-ta --has-ma -c NclipWV8VInt8VBVIVIVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {6976,-2834,3879,9191,-3858,-5299,-3986,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnclip_wv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnclip_wv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnclip_wv_operator_0() { +int8_t tmp[] = {29,84,4,19,-4,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnclip_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclip_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnclip_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipWV8VInt8VBVIVIVU_m.c b/test/codegen-golden/NclipWV8VInt8VBVIVIVU_m.c new file mode 100644 index 0000000..fa506cc --- /dev/null +++ b/test/codegen-golden/NclipWV8VInt8VBVIVIVU_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r NclipWV8VInt8VBVIVIVU_m -n 1 -l 7 --has-ta --has-ma -c NclipWV8VInt8VBVIVIVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {6976,-2834,3879,9191,-3858,-5299,-3986,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnclip_wv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m2(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnclip_wv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnclip_wv_operator_0() { +int8_t tmp[] = {29,-1,4,19,-4,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnclip_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclip_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnclip_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipWV8VInt8VBVIVU_TAMA.c b/test/codegen-golden/NclipWV8VInt8VBVIVU_TAMA.c new file mode 100644 index 0000000..370fadf --- /dev/null +++ b/test/codegen-golden/NclipWV8VInt8VBVIVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r NclipWV8VInt8VBVIVU_TAMA -n 1 -l 7 --has-ta --has-ma -c NclipWV8VInt8VBVIVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +uint8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnclip_wv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vnclip_wv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnclip_wv_operator_0() { +int8_t tmp[] = {-1,-1,2,-1,2,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnclip_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclip_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnclip_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipWV8VInt8VIVIVU_TU.c b/test/codegen-golden/NclipWV8VInt8VIVIVU_TU.c new file mode 100644 index 0000000..1c808b8 --- /dev/null +++ b/test/codegen-golden/NclipWV8VInt8VIVIVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r NclipWV8VInt8VIVIVU_TU -n 1 -l 7 --has-ta --has-ma -c NclipWV8VInt8VIVIVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +uint8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnclip_wv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vnclip_wv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnclip_wv_operator_0() { +int8_t tmp[] = {23,79,2,-14,2,-73,-23,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnclip_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclip_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnclip_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipWV8VInt8VIVU.c b/test/codegen-golden/NclipWV8VInt8VIVU.c new file mode 100644 index 0000000..de3b1fe --- /dev/null +++ b/test/codegen-golden/NclipWV8VInt8VIVU.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r NclipWV8VInt8VIVU -n 1 -l 7 --has-ta --has-ma -c NclipWV8VInt8VIVU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +uint8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnclip_wv_operator_0() { +int16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m2(placeholder3); +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vnclip_wv_i8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnclip_wv_operator_0() { +int8_t tmp[] = {-43,4,5,-6,3,-128,-128,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vnclip_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclip_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnclip_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipWV8VInt8VIVU_TA.c b/test/codegen-golden/NclipWV8VInt8VIVU_TA.c new file mode 100644 index 0000000..b9ac33e --- /dev/null +++ b/test/codegen-golden/NclipWV8VInt8VIVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r NclipWV8VInt8VIVU_TA -n 1 -l 7 --has-ta --has-ma -c NclipWV8VInt8VIVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +uint8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnclip_wv_operator_0() { +int16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vnclip_wv_i8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnclip_wv_operator_0() { +int8_t tmp[] = {-43,-1,5,-1,3,-1,-128,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vnclip_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclip_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnclip_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipWX8VInt8VBVISL_TAMA.c b/test/codegen-golden/NclipWX8VInt8VBVISL_TAMA.c new file mode 100644 index 0000000..854be0c --- /dev/null +++ b/test/codegen-golden/NclipWX8VInt8VBVISL_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r NclipWX8VInt8VBVISL_TAMA -n 1 -l 7 --has-ta --has-ma -c NclipWX8VInt8VBVISL_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +size_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +size_t tmp = 3902764ull; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnclip_wx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +size_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); + +vint8m1_t vec_value_3_0= vnclip_wx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnclip_wx_operator_0() { +int8_t tmp[] = {-1,-1,0,-1,-2,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnclip_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclip_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnclip_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipWX8VInt8VBVIVISL_TAMU.c b/test/codegen-golden/NclipWX8VInt8VBVIVISL_TAMU.c new file mode 100644 index 0000000..e4d2180 --- /dev/null +++ b/test/codegen-golden/NclipWX8VInt8VBVIVISL_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r NclipWX8VInt8VBVIVISL_TAMU -n 1 -l 7 --has-ta --has-ma -c NclipWX8VInt8VBVIVISL_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +size_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {8399,1958,1879,2303,-7354,-734,6976,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnclip_wx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); + +vint8m1_t vec_value_4_0= vnclip_wx_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnclip_wx_operator_0() { +int8_t tmp[] = {50,-1,0,-1,-2,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnclip_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclip_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnclip_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipWX8VInt8VBVIVISL_TUMA.c b/test/codegen-golden/NclipWX8VInt8VBVIVISL_TUMA.c new file mode 100644 index 0000000..b79d500 --- /dev/null +++ b/test/codegen-golden/NclipWX8VInt8VBVIVISL_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r NclipWX8VInt8VBVIVISL_TUMA -n 1 -l 7 --has-ta --has-ma -c NclipWX8VInt8VBVIVISL_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +size_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {8399,1958,1879,2303,-7354,-734,6976,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnclip_wx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); + +vint8m1_t vec_value_4_0= vnclip_wx_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnclip_wx_operator_0() { +int8_t tmp[] = {-1,-15,0,16,-2,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnclip_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclip_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnclip_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipWX8VInt8VBVIVISL_TUMU.c b/test/codegen-golden/NclipWX8VInt8VBVIVISL_TUMU.c new file mode 100644 index 0000000..4bb3769 --- /dev/null +++ b/test/codegen-golden/NclipWX8VInt8VBVIVISL_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r NclipWX8VInt8VBVIVISL_TUMU -n 1 -l 7 --has-ta --has-ma -c NclipWX8VInt8VBVIVISL_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +size_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {8399,1958,1879,2303,-7354,-734,6976,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnclip_wx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); + +vint8m1_t vec_value_4_0= vnclip_wx_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnclip_wx_operator_0() { +int8_t tmp[] = {50,-15,0,16,-2,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnclip_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclip_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnclip_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipWX8VInt8VBVIVISU_m.c b/test/codegen-golden/NclipWX8VInt8VBVIVISU_m.c new file mode 100644 index 0000000..9f48899 --- /dev/null +++ b/test/codegen-golden/NclipWX8VInt8VBVIVISU_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r NclipWX8VInt8VBVIVISU_m -n 1 -l 7 --has-ta --has-ma -c NclipWX8VInt8VBVIVISU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +uint32_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp = 3902764u; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {8399,1958,1879,2303,-7354,-734,6976,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnclip_wx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +uint32_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m2(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); + +vint8m1_t vec_value_4_0= vnclip_wx_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnclip_wx_operator_0() { +int8_t tmp[] = {50,0,0,16,-2,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnclip_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclip_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnclip_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipWX8VInt8VISL_TA.c b/test/codegen-golden/NclipWX8VInt8VISL_TA.c new file mode 100644 index 0000000..07f396c --- /dev/null +++ b/test/codegen-golden/NclipWX8VInt8VISL_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r NclipWX8VInt8VISL_TA -n 1 -l 7 --has-ta --has-ma -c NclipWX8VInt8VISL_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +size_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +size_t tmp = 3902764ull; +value_1 = tmp; +} +void vnclip_wx_operator_0() { +int16_t *placeholder0 = value_0; +size_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); + +vint8m1_t vec_value_2_0= vnclip_wx_i8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnclip_wx_operator_0() { +int8_t tmp[] = {-1,-1,1,-1,1,-1,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vnclip_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclip_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnclip_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipWX8VInt8VISU.c b/test/codegen-golden/NclipWX8VInt8VISU.c new file mode 100644 index 0000000..e4fb485 --- /dev/null +++ b/test/codegen-golden/NclipWX8VInt8VISU.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r NclipWX8VInt8VISU -n 1 -l 7 --has-ta --has-ma -c NclipWX8VInt8VISU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +uint32_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp = 3902764u; +value_1 = tmp; +} +void vnclip_wx_operator_0() { +int16_t *placeholder0 = value_0; +uint32_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m2(placeholder3); +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); + +vint8m1_t vec_value_2_0= vnclip_wx_i8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnclip_wx_operator_0() { +int8_t tmp[] = {-1,2,1,0,1,-2,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vnclip_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclip_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnclip_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipWX8VInt8VIVISL_TU.c b/test/codegen-golden/NclipWX8VInt8VIVISL_TU.c new file mode 100644 index 0000000..a341d44 --- /dev/null +++ b/test/codegen-golden/NclipWX8VInt8VIVISL_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r NclipWX8VInt8VIVISL_TU -n 1 -l 7 --has-ta --has-ma -c NclipWX8VInt8VIVISL_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +size_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +size_t tmp = 3902764ull; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnclip_wx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +size_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); + +vint8m1_t vec_value_3_0= vnclip_wx_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnclip_wx_operator_0() { +int8_t tmp[] = {1,79,0,-14,-2,-73,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnclip_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclip_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnclip_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipuWV8VUInt8VBVUVUVU_TAMU.c b/test/codegen-golden/NclipuWV8VUInt8VBVUVUVU_TAMU.c new file mode 100644 index 0000000..ec08f36 --- /dev/null +++ b/test/codegen-golden/NclipuWV8VUInt8VBVUVUVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r NclipuWV8VUInt8VBVUVUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c NclipuWV8VUInt8VBVUVUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {8488,3583,6940,9596,3071,2350,3007,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnclipu_wv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vnclipu_wv_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnclipu_wv_operator_0() { +uint8_t tmp[] = {65,255,7,255,3,255,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnclipu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclipu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnclipu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipuWV8VUInt8VBVUVUVU_TUMA.c b/test/codegen-golden/NclipuWV8VUInt8VBVUVUVU_TUMA.c new file mode 100644 index 0000000..40749d6 --- /dev/null +++ b/test/codegen-golden/NclipuWV8VUInt8VBVUVUVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r NclipuWV8VUInt8VBVUVUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c NclipuWV8VUInt8VBVUVUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {8488,3583,6940,9596,3071,2350,3007,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnclipu_wv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vnclipu_wv_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnclipu_wv_operator_0() { +uint8_t tmp[] = {255,92,7,59,3,13,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnclipu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclipu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnclipu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipuWV8VUInt8VBVUVUVU_TUMU.c b/test/codegen-golden/NclipuWV8VUInt8VBVUVUVU_TUMU.c new file mode 100644 index 0000000..0e652aa --- /dev/null +++ b/test/codegen-golden/NclipuWV8VUInt8VBVUVUVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r NclipuWV8VUInt8VBVUVUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c NclipuWV8VUInt8VBVUVUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {8488,3583,6940,9596,3071,2350,3007,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnclipu_wv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vnclipu_wv_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnclipu_wv_operator_0() { +uint8_t tmp[] = {65,92,7,59,3,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnclipu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclipu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnclipu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipuWV8VUInt8VBVUVUVU_m.c b/test/codegen-golden/NclipuWV8VUInt8VBVUVUVU_m.c new file mode 100644 index 0000000..f16a178 --- /dev/null +++ b/test/codegen-golden/NclipuWV8VUInt8VBVUVUVU_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r NclipuWV8VUInt8VBVUVUVU_m -n 1 -l 7 --has-ta --has-ma -c NclipuWV8VUInt8VBVUVUVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {8488,3583,6940,9596,3071,2350,3007,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnclipu_wv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m2(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vnclipu_wv_u8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnclipu_wv_operator_0() { +uint8_t tmp[] = {65,2,7,59,3,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnclipu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclipu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnclipu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipuWV8VUInt8VBVUVU_TAMA.c b/test/codegen-golden/NclipuWV8VUInt8VBVUVU_TAMA.c new file mode 100644 index 0000000..51b7a59 --- /dev/null +++ b/test/codegen-golden/NclipuWV8VUInt8VBVUVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r NclipuWV8VUInt8VBVUVU_TAMA -n 1 -l 7 --has-ta --has-ma -c NclipuWV8VUInt8VBVUVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnclipu_wv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vnclipu_wv_u8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnclipu_wv_operator_0() { +uint8_t tmp[] = {255,255,6,255,6,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnclipu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclipu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnclipu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipuWV8VUInt8VUVU.c b/test/codegen-golden/NclipuWV8VUInt8VUVU.c new file mode 100644 index 0000000..e40732d --- /dev/null +++ b/test/codegen-golden/NclipuWV8VUInt8VUVU.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r NclipuWV8VUInt8VUVU -n 1 -l 7 --has-ta --has-ma -c NclipuWV8VUInt8VUVU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnclipu_wv_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m2(placeholder3); +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vnclipu_wv_u8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnclipu_wv_operator_0() { +uint8_t tmp[] = {17,4,8,17,6,255,68,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vnclipu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclipu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnclipu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipuWV8VUInt8VUVUVU_TU.c b/test/codegen-golden/NclipuWV8VUInt8VUVUVU_TU.c new file mode 100644 index 0000000..e481e99 --- /dev/null +++ b/test/codegen-golden/NclipuWV8VUInt8VUVUVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r NclipuWV8VUInt8VUVUVU_TU -n 1 -l 7 --has-ta --has-ma -c NclipuWV8VUInt8VUVUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnclipu_wv_operator_0() { +uint8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vnclipu_wv_u8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnclipu_wv_operator_0() { +uint8_t tmp[] = {50,90,6,43,6,14,145,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnclipu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclipu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnclipu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipuWV8VUInt8VUVU_TA.c b/test/codegen-golden/NclipuWV8VUInt8VUVU_TA.c new file mode 100644 index 0000000..b00f1b6 --- /dev/null +++ b/test/codegen-golden/NclipuWV8VUInt8VUVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r NclipuWV8VUInt8VUVU_TA -n 1 -l 7 --has-ta --has-ma -c NclipuWV8VUInt8VUVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnclipu_wv_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vnclipu_wv_u8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnclipu_wv_operator_0() { +uint8_t tmp[] = {17,255,8,255,6,255,68,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vnclipu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclipu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnclipu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipuWX8VUInt8VBVUSL_TAMA.c b/test/codegen-golden/NclipuWX8VUInt8VBVUSL_TAMA.c new file mode 100644 index 0000000..88ef302 --- /dev/null +++ b/test/codegen-golden/NclipuWX8VUInt8VBVUSL_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r NclipuWX8VUInt8VBVUSL_TAMA -n 1 -l 7 --has-ta --has-ma -c NclipuWX8VUInt8VBVUSL_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +size_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +size_t tmp = 3902764ull; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnclipu_wx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +size_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vnclipu_wx_u8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnclipu_wx_operator_0() { +uint8_t tmp[] = {255,255,1,255,0,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnclipu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclipu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnclipu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipuWX8VUInt8VBVUVUSL_TAMU.c b/test/codegen-golden/NclipuWX8VUInt8VBVUVUSL_TAMU.c new file mode 100644 index 0000000..116826c --- /dev/null +++ b/test/codegen-golden/NclipuWX8VUInt8VBVUVUSL_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r NclipuWX8VUInt8VBVUVUSL_TAMU -n 1 -l 7 --has-ta --has-ma -c NclipuWX8VUInt8VBVUVUSL_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +size_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {9200,5979,5940,6152,1323,4633,8488,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnclipu_wx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vnclipu_wx_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnclipu_wx_operator_0() { +uint8_t tmp[] = {75,255,1,255,0,255,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnclipu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclipu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnclipu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipuWX8VUInt8VBVUVUSL_TUMA.c b/test/codegen-golden/NclipuWX8VUInt8VBVUVUSL_TUMA.c new file mode 100644 index 0000000..e0a838f --- /dev/null +++ b/test/codegen-golden/NclipuWX8VUInt8VBVUVUSL_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r NclipuWX8VUInt8VBVUVUSL_TUMA -n 1 -l 7 --has-ta --has-ma -c NclipuWX8VUInt8VBVUVUSL_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +size_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {9200,5979,5940,6152,1323,4633,8488,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnclipu_wx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vnclipu_wx_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnclipu_wx_operator_0() { +uint8_t tmp[] = {255,42,1,58,0,37,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnclipu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclipu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnclipu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipuWX8VUInt8VBVUVUSL_TUMU.c b/test/codegen-golden/NclipuWX8VUInt8VBVUVUSL_TUMU.c new file mode 100644 index 0000000..048ce12 --- /dev/null +++ b/test/codegen-golden/NclipuWX8VUInt8VBVUVUSL_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r NclipuWX8VUInt8VBVUVUSL_TUMU -n 1 -l 7 --has-ta --has-ma -c NclipuWX8VUInt8VBVUVUSL_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +size_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {9200,5979,5940,6152,1323,4633,8488,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnclipu_wx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vnclipu_wx_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnclipu_wx_operator_0() { +uint8_t tmp[] = {75,42,1,58,0,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnclipu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclipu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnclipu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipuWX8VUInt8VBVUVUSU_m.c b/test/codegen-golden/NclipuWX8VUInt8VBVUVUSU_m.c new file mode 100644 index 0000000..b7ed2d0 --- /dev/null +++ b/test/codegen-golden/NclipuWX8VUInt8VBVUVUSU_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r NclipuWX8VUInt8VBVUVUSU_m -n 1 -l 7 --has-ta --has-ma -c NclipuWX8VUInt8VBVUVUSU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +uint32_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp = 3902764u; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {9200,5979,5940,6152,1323,4633,8488,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnclipu_wx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint32_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m2(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vnclipu_wx_u8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnclipu_wx_operator_0() { +uint8_t tmp[] = {75,1,1,58,0,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnclipu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclipu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnclipu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipuWX8VUInt8VUSL_TA.c b/test/codegen-golden/NclipuWX8VUInt8VUSL_TA.c new file mode 100644 index 0000000..342d457 --- /dev/null +++ b/test/codegen-golden/NclipuWX8VUInt8VUSL_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r NclipuWX8VUInt8VUSL_TA -n 1 -l 7 --has-ta --has-ma -c NclipuWX8VUInt8VUSL_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +size_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +size_t tmp = 3902764ull; +value_1 = tmp; +} +void vnclipu_wx_operator_0() { +uint16_t *placeholder0 = value_0; +size_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vnclipu_wx_u8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnclipu_wx_operator_0() { +uint8_t tmp[] = {1,255,2,255,2,255,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vnclipu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclipu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnclipu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipuWX8VUInt8VUSU.c b/test/codegen-golden/NclipuWX8VUInt8VUSU.c new file mode 100644 index 0000000..1403719 --- /dev/null +++ b/test/codegen-golden/NclipuWX8VUInt8VUSU.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r NclipuWX8VUInt8VUSU -n 1 -l 7 --has-ta --has-ma -c NclipuWX8VUInt8VUSU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint32_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp = 3902764u; +value_1 = tmp; +} +void vnclipu_wx_operator_0() { +uint16_t *placeholder0 = value_0; +uint32_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m2(placeholder3); +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vnclipu_wx_u8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnclipu_wx_operator_0() { +uint8_t tmp[] = {1,2,2,1,2,0,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vnclipu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclipu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnclipu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NclipuWX8VUInt8VUVUSL_TU.c b/test/codegen-golden/NclipuWX8VUInt8VUVUSL_TU.c new file mode 100644 index 0000000..d5f438e --- /dev/null +++ b/test/codegen-golden/NclipuWX8VUInt8VUVUSL_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r NclipuWX8VUInt8VUVUSL_TU -n 1 -l 7 --has-ta --has-ma -c NclipuWX8VUInt8VUVUSL_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint16_t value_1[7]; +size_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +size_t tmp = 3902764ull; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnclipu_wx_operator_0() { +uint8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +size_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vnclipu_wx_u8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnclipu_wx_operator_0() { +uint8_t tmp[] = {2,90,1,43,0,14,2,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnclipu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnclipu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnclipu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NcvtV16VInt8VBVIVI_TAMU.c b/test/codegen-golden/NcvtV16VInt8VBVIVI_TAMU.c new file mode 100644 index 0000000..a12221a --- /dev/null +++ b/test/codegen-golden/NcvtV16VInt8VBVIVI_TAMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r NcvtV16VInt8VBVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c NcvtV16VInt8VBVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {-2195,5001,-1530,1184,1614,-6427,-2596,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vncvt_x_x_w_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1_0= vle8_v_i8mf2(placeholder1, vl); +vint16m1_t vec_value_2_0= vle16_v_i16m1(placeholder2, vl); + +vint8mf2_t vec_value_3_0= vncvt_x_x_w_i8mf2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vncvt_x_x_w_operator_0() { +int8_t tmp[] = {29,-1,6,-1,78,-1,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vncvt_x_x_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vncvt_x_x_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vncvt_x_x_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NcvtV16VInt8VBVIVI_TUMA.c b/test/codegen-golden/NcvtV16VInt8VBVIVI_TUMA.c new file mode 100644 index 0000000..07aa1d4 --- /dev/null +++ b/test/codegen-golden/NcvtV16VInt8VBVIVI_TUMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r NcvtV16VInt8VBVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c NcvtV16VInt8VBVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {-2195,5001,-1530,1184,1614,-6427,-2596,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vncvt_x_x_w_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1_0= vle8_v_i8mf2(placeholder1, vl); +vint16m1_t vec_value_2_0= vle16_v_i16m1(placeholder2, vl); + +vint8mf2_t vec_value_3_0= vncvt_x_x_w_i8mf2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vncvt_x_x_w_operator_0() { +int8_t tmp[] = {-1,84,6,19,78,-74,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vncvt_x_x_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vncvt_x_x_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vncvt_x_x_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NcvtV16VInt8VBVIVI_TUMU.c b/test/codegen-golden/NcvtV16VInt8VBVIVI_TUMU.c new file mode 100644 index 0000000..9630d80 --- /dev/null +++ b/test/codegen-golden/NcvtV16VInt8VBVIVI_TUMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r NcvtV16VInt8VBVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c NcvtV16VInt8VBVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {-2195,5001,-1530,1184,1614,-6427,-2596,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vncvt_x_x_w_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1_0= vle8_v_i8mf2(placeholder1, vl); +vint16m1_t vec_value_2_0= vle16_v_i16m1(placeholder2, vl); + +vint8mf2_t vec_value_3_0= vncvt_x_x_w_i8mf2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vncvt_x_x_w_operator_0() { +int8_t tmp[] = {29,84,6,19,78,-74,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vncvt_x_x_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vncvt_x_x_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vncvt_x_x_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NcvtV16VInt8VBVIVI_m.c b/test/codegen-golden/NcvtV16VInt8VBVIVI_m.c new file mode 100644 index 0000000..8950fc5 --- /dev/null +++ b/test/codegen-golden/NcvtV16VInt8VBVIVI_m.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r NcvtV16VInt8VBVIVI_m -n 1 -l 7 --has-ta --has-ma -c NcvtV16VInt8VBVIVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {-2195,5001,-1530,1184,1614,-6427,-2596,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vncvt_x_x_w_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1_0= vle8_v_i8mf2(placeholder1, vl); +vint16m1_t vec_value_2_0= vle16_v_i16m1(placeholder2, vl); + +vint8mf2_t vec_value_3_0= vncvt_x_x_w_i8mf2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse8_v_i8mf2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vncvt_x_x_w_operator_0() { +int8_t tmp[] = {29,-119,6,19,78,-74,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vncvt_x_x_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vncvt_x_x_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vncvt_x_x_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NcvtV16VInt8VBVI_TAMA.c b/test/codegen-golden/NcvtV16VInt8VBVI_TAMA.c new file mode 100644 index 0000000..0b679ae --- /dev/null +++ b/test/codegen-golden/NcvtV16VInt8VBVI_TAMA.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r NcvtV16VInt8VBVI_TAMA -n 1 -l 7 --has-ta --has-ma -c NcvtV16VInt8VBVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {-2195,5001,-1530,1184,1614,-6427,-2596,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vncvt_x_x_w_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); + +vint8mf2_t vec_value_2_0= vncvt_x_x_w_i8mf2_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8mf2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vncvt_x_x_w_operator_0() { +int8_t tmp[] = {-1,-1,6,-1,78,-1,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vncvt_x_x_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vncvt_x_x_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vncvt_x_x_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NcvtV16VInt8VI.c b/test/codegen-golden/NcvtV16VInt8VI.c new file mode 100644 index 0000000..8f237b2 --- /dev/null +++ b/test/codegen-golden/NcvtV16VInt8VI.c @@ -0,0 +1,60 @@ +// COMMAND: random_gen -r NcvtV16VInt8VI -n 1 -l 7 --has-ta --has-ma -c NcvtV16VInt8VI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vncvt_x_x_w_operator_0() { +int16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vint16m1_t vec_value_0_0= vle16_v_i16m1(placeholder0, vl); + +vint8mf2_t vec_value_1_0= vncvt_x_x_w_i8mf2(vec_value_0_0, vl); + +vse8_v_i8mf2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vncvt_x_x_w_operator_0() { +int8_t tmp[] = {86,-43,82,119,36,-58,2,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vncvt_x_x_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vncvt_x_x_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vncvt_x_x_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NcvtV16VInt8VIVI_TU.c b/test/codegen-golden/NcvtV16VInt8VIVI_TU.c new file mode 100644 index 0000000..c725ca8 --- /dev/null +++ b/test/codegen-golden/NcvtV16VInt8VIVI_TU.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r NcvtV16VInt8VIVI_TU -n 1 -l 7 --has-ta --has-ma -c NcvtV16VInt8VIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {-2195,5001,-1530,1184,1614,-6427,-2596,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vncvt_x_x_w_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0_0= vle8_v_i8mf2(placeholder0, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); + +vint8mf2_t vec_value_2_0= vncvt_x_x_w_i8mf2_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8mf2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vncvt_x_x_w_operator_0() { +int8_t tmp[] = {109,79,6,-14,78,-73,-36,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vncvt_x_x_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vncvt_x_x_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vncvt_x_x_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NcvtV16VInt8VI_TA.c b/test/codegen-golden/NcvtV16VInt8VI_TA.c new file mode 100644 index 0000000..bb8ce0f --- /dev/null +++ b/test/codegen-golden/NcvtV16VInt8VI_TA.c @@ -0,0 +1,61 @@ +// COMMAND: random_gen -r NcvtV16VInt8VI_TA -n 1 -l 7 --has-ta --has-ma -c NcvtV16VInt8VI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vncvt_x_x_w_operator_0() { +int16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m1_t vec_value_0_0= vle16_v_i16m1(placeholder0, vl); + +vint8mf2_t vec_value_1_0= vncvt_x_x_w_i8mf2_ta(vec_value_0_0, tail_vl); + +vse8_v_i8mf2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vncvt_x_x_w_operator_0() { +int8_t tmp[] = {86,-1,82,-1,36,-1,2,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vncvt_x_x_w_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vncvt_x_x_w_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vncvt_x_x_w_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NegV8VInt8VBVIVI_TAMU.c b/test/codegen-golden/NegV8VInt8VBVIVI_TAMU.c new file mode 100644 index 0000000..df45783 --- /dev/null +++ b/test/codegen-golden/NegV8VInt8VBVIVI_TAMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r NegV8VInt8VBVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c NegV8VInt8VBVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vneg_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vneg_v_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vneg_v_operator_0() { +int8_t tmp[] = {29,-1,15,-1,-16,-1,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vneg_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vneg_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vneg_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NegV8VInt8VBVIVI_TUMA.c b/test/codegen-golden/NegV8VInt8VBVIVI_TUMA.c new file mode 100644 index 0000000..5a4052e --- /dev/null +++ b/test/codegen-golden/NegV8VInt8VBVIVI_TUMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r NegV8VInt8VBVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c NegV8VInt8VBVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vneg_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vneg_v_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vneg_v_operator_0() { +int8_t tmp[] = {-1,84,15,19,-16,-74,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vneg_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vneg_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vneg_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NegV8VInt8VBVIVI_TUMU.c b/test/codegen-golden/NegV8VInt8VBVIVI_TUMU.c new file mode 100644 index 0000000..154fd73 --- /dev/null +++ b/test/codegen-golden/NegV8VInt8VBVIVI_TUMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r NegV8VInt8VBVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c NegV8VInt8VBVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vneg_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vneg_v_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vneg_v_operator_0() { +int8_t tmp[] = {29,84,15,19,-16,-74,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vneg_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vneg_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vneg_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NegV8VInt8VBVIVI_m.c b/test/codegen-golden/NegV8VInt8VBVIVI_m.c new file mode 100644 index 0000000..e358147 --- /dev/null +++ b/test/codegen-golden/NegV8VInt8VBVIVI_m.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r NegV8VInt8VBVIVI_m -n 1 -l 7 --has-ta --has-ma -c NegV8VInt8VBVIVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vneg_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vneg_v_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vneg_v_operator_0() { +int8_t tmp[] = {29,-50,15,19,-16,-74,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vneg_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vneg_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vneg_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NegV8VInt8VBVI_TAMA.c b/test/codegen-golden/NegV8VInt8VBVI_TAMA.c new file mode 100644 index 0000000..016666c --- /dev/null +++ b/test/codegen-golden/NegV8VInt8VBVI_TAMA.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r NegV8VInt8VBVI_TAMA -n 1 -l 7 --has-ta --has-ma -c NegV8VInt8VBVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vneg_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vneg_v_i8m1_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vneg_v_operator_0() { +int8_t tmp[] = {-1,-1,15,-1,-16,-1,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vneg_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vneg_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vneg_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NegV8VInt8VI.c b/test/codegen-golden/NegV8VInt8VI.c new file mode 100644 index 0000000..2cfff3a --- /dev/null +++ b/test/codegen-golden/NegV8VInt8VI.c @@ -0,0 +1,60 @@ +// COMMAND: random_gen -r NegV8VInt8VI -n 1 -l 7 --has-ta --has-ma -c NegV8VInt8VI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vneg_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_1_0= vneg_v_i8m1(vec_value_0_0, vl); + +vse8_v_i8m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vneg_v_operator_0() { +int8_t tmp[] = {56,-79,-55,14,-26,73,57,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vneg_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vneg_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vneg_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NegV8VInt8VIVI_TU.c b/test/codegen-golden/NegV8VInt8VIVI_TU.c new file mode 100644 index 0000000..eabcf49 --- /dev/null +++ b/test/codegen-golden/NegV8VInt8VIVI_TU.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r NegV8VInt8VIVI_TU -n 1 -l 7 --has-ta --has-ma -c NegV8VInt8VIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vneg_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vneg_v_i8m1_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vneg_v_operator_0() { +int8_t tmp[] = {22,79,15,-14,-16,-73,26,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vneg_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vneg_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vneg_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NegV8VInt8VI_TA.c b/test/codegen-golden/NegV8VInt8VI_TA.c new file mode 100644 index 0000000..d46cb7c --- /dev/null +++ b/test/codegen-golden/NegV8VInt8VI_TA.c @@ -0,0 +1,61 @@ +// COMMAND: random_gen -r NegV8VInt8VI_TA -n 1 -l 7 --has-ta --has-ma -c NegV8VInt8VI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vneg_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_1_0= vneg_v_i8m1_ta(vec_value_0_0, tail_vl); + +vse8_v_i8m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vneg_v_operator_0() { +int8_t tmp[] = {56,-1,-55,-1,-26,-1,57,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vneg_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vneg_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vneg_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsacVV8VInt8.c b/test/codegen-golden/NmsacVV8VInt8.c new file mode 100644 index 0000000..76cad81 --- /dev/null +++ b/test/codegen-golden/NmsacVV8VInt8.c @@ -0,0 +1,90 @@ +// COMMAND: random_gen -r NmsacVV8VInt8 -n 1 -l 7 --has-ta --has-ma -c NmsacVV8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vnmsac_vv_i8m1(vec_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnmsac_vv_operator_0() { +int8_t tmp[] = {70,-25,99,14,-86,-19,17,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsacVV8VInt8VBVIVIVI_TAMA.c b/test/codegen-golden/NmsacVV8VInt8VBVIVIVI_TAMA.c new file mode 100644 index 0000000..e152669 --- /dev/null +++ b/test/codegen-golden/NmsacVV8VInt8VBVIVIVI_TAMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r NmsacVV8VInt8VBVIVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c NmsacVV8VInt8VBVIVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnmsac_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnmsac_vv_operator_0() { +int8_t tmp[] = {-1,-1,93,-1,-121,-1,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsacVV8VInt8VBVIVIVI_TAMU.c b/test/codegen-golden/NmsacVV8VInt8VBVIVIVI_TAMU.c new file mode 100644 index 0000000..d673fd3 --- /dev/null +++ b/test/codegen-golden/NmsacVV8VInt8VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r NmsacVV8VInt8VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c NmsacVV8VInt8VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnmsac_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnmsac_vv_operator_0() { +int8_t tmp[] = {29,-1,93,-1,-121,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsacVV8VInt8VBVIVIVI_TUMA.c b/test/codegen-golden/NmsacVV8VInt8VBVIVIVI_TUMA.c new file mode 100644 index 0000000..044abe1 --- /dev/null +++ b/test/codegen-golden/NmsacVV8VInt8VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r NmsacVV8VInt8VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c NmsacVV8VInt8VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnmsac_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnmsac_vv_operator_0() { +int8_t tmp[] = {-1,84,93,19,-121,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsacVV8VInt8VBVIVIVI_TUMU.c b/test/codegen-golden/NmsacVV8VInt8VBVIVIVI_TUMU.c new file mode 100644 index 0000000..6c3c23b --- /dev/null +++ b/test/codegen-golden/NmsacVV8VInt8VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r NmsacVV8VInt8VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c NmsacVV8VInt8VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnmsac_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnmsac_vv_operator_0() { +int8_t tmp[] = {29,84,93,19,-121,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsacVV8VInt8VIVIVI_TA.c b/test/codegen-golden/NmsacVV8VInt8VIVIVI_TA.c new file mode 100644 index 0000000..de9939e --- /dev/null +++ b/test/codegen-golden/NmsacVV8VInt8VIVIVI_TA.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r NmsacVV8VInt8VIVIVI_TA -n 1 -l 7 --has-ta --has-ma -c NmsacVV8VInt8VIVIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vnmsac_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnmsac_vv_operator_0() { +int8_t tmp[] = {70,-1,99,-1,-86,-1,17,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsacVV8VInt8VIVIVI_TU.c b/test/codegen-golden/NmsacVV8VInt8VIVIVI_TU.c new file mode 100644 index 0000000..3b39937 --- /dev/null +++ b/test/codegen-golden/NmsacVV8VInt8VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r NmsacVV8VInt8VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c NmsacVV8VInt8VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vnmsac_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnmsac_vv_operator_0() { +int8_t tmp[] = {70,79,99,-14,-86,-73,17,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsacVV8VInt8_m.c b/test/codegen-golden/NmsacVV8VInt8_m.c new file mode 100644 index 0000000..1038416 --- /dev/null +++ b/test/codegen-golden/NmsacVV8VInt8_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r NmsacVV8VInt8_m -n 1 -l 7 --has-ta --has-ma -c NmsacVV8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnmsac_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnmsac_vv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnmsac_vv_operator_0() { +int8_t tmp[] = {29,-52,93,19,-121,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnmsac_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsac_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnmsac_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsacVX8VInt8.c b/test/codegen-golden/NmsacVX8VInt8.c new file mode 100644 index 0000000..448327a --- /dev/null +++ b/test/codegen-golden/NmsacVX8VInt8.c @@ -0,0 +1,87 @@ +// COMMAND: random_gen -r NmsacVX8VInt8 -n 1 -l 7 --has-ta --has-ma -c NmsacVX8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vnmsac_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vnmsac_vx_i8m1(vec_value_0_0, placeholder1, vec_value_2_0, vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnmsac_vx_operator_0() { +int8_t tmp[] = {70,-91,-22,-106,74,20,-71,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnmsac_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsac_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnmsac_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsacVX8VInt8VBVISIVI_TAMA.c b/test/codegen-golden/NmsacVX8VInt8VBVISIVI_TAMA.c new file mode 100644 index 0000000..f85725e --- /dev/null +++ b/test/codegen-golden/NmsacVX8VInt8VBVISIVI_TAMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r NmsacVX8VInt8VBVISIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c NmsacVX8VInt8VBVISIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vnmsac_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnmsac_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnmsac_vx_operator_0() { +int8_t tmp[] = {-1,-1,46,-1,-73,-1,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnmsac_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsac_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnmsac_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsacVX8VInt8VBVISIVI_TAMU.c b/test/codegen-golden/NmsacVX8VInt8VBVISIVI_TAMU.c new file mode 100644 index 0000000..2262a6b --- /dev/null +++ b/test/codegen-golden/NmsacVX8VInt8VBVISIVI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r NmsacVX8VInt8VBVISIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c NmsacVX8VInt8VBVISIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vnmsac_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnmsac_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnmsac_vx_operator_0() { +int8_t tmp[] = {29,-1,46,-1,-73,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnmsac_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsac_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnmsac_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsacVX8VInt8VBVISIVI_TUMA.c b/test/codegen-golden/NmsacVX8VInt8VBVISIVI_TUMA.c new file mode 100644 index 0000000..5722e25 --- /dev/null +++ b/test/codegen-golden/NmsacVX8VInt8VBVISIVI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r NmsacVX8VInt8VBVISIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c NmsacVX8VInt8VBVISIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vnmsac_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnmsac_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnmsac_vx_operator_0() { +int8_t tmp[] = {-1,84,46,19,-73,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnmsac_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsac_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnmsac_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsacVX8VInt8VBVISIVI_TUMU.c b/test/codegen-golden/NmsacVX8VInt8VBVISIVI_TUMU.c new file mode 100644 index 0000000..96a9616 --- /dev/null +++ b/test/codegen-golden/NmsacVX8VInt8VBVISIVI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r NmsacVX8VInt8VBVISIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c NmsacVX8VInt8VBVISIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vnmsac_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnmsac_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnmsac_vx_operator_0() { +int8_t tmp[] = {29,84,46,19,-73,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnmsac_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsac_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnmsac_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsacVX8VInt8VISIVI_TA.c b/test/codegen-golden/NmsacVX8VInt8VISIVI_TA.c new file mode 100644 index 0000000..a7c98fc --- /dev/null +++ b/test/codegen-golden/NmsacVX8VInt8VISIVI_TA.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r NmsacVX8VInt8VISIVI_TA -n 1 -l 7 --has-ta --has-ma -c NmsacVX8VInt8VISIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vnmsac_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vnmsac_vx_i8m1_ta(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnmsac_vx_operator_0() { +int8_t tmp[] = {70,-1,-22,-1,74,-1,-71,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnmsac_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsac_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnmsac_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsacVX8VInt8VISIVI_TU.c b/test/codegen-golden/NmsacVX8VInt8VISIVI_TU.c new file mode 100644 index 0000000..39e941a --- /dev/null +++ b/test/codegen-golden/NmsacVX8VInt8VISIVI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r NmsacVX8VInt8VISIVI_TU -n 1 -l 7 --has-ta --has-ma -c NmsacVX8VInt8VISIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vnmsac_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vnmsac_vx_i8m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnmsac_vx_operator_0() { +int8_t tmp[] = {70,79,-22,-14,74,-73,-71,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnmsac_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsac_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnmsac_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsacVX8VInt8_m.c b/test/codegen-golden/NmsacVX8VInt8_m.c new file mode 100644 index 0000000..dbe38e6 --- /dev/null +++ b/test/codegen-golden/NmsacVX8VInt8_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r NmsacVX8VInt8_m -n 1 -l 7 --has-ta --has-ma -c NmsacVX8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vnmsac_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnmsac_vx_i8m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnmsac_vx_operator_0() { +int8_t tmp[] = {29,-88,46,19,-73,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnmsac_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsac_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnmsac_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsubVV8VInt8.c b/test/codegen-golden/NmsubVV8VInt8.c new file mode 100644 index 0000000..b5ddf29 --- /dev/null +++ b/test/codegen-golden/NmsubVV8VInt8.c @@ -0,0 +1,90 @@ +// COMMAND: random_gen -r NmsubVV8VInt8 -n 1 -l 7 --has-ta --has-ma -c NmsubVV8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnmsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vnmsub_vv_i8m1(vec_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnmsub_vv_operator_0() { +int8_t tmp[] = {66,70,-91,22,-70,-91,87,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsubVV8VInt8VBVIVIVI_TAMA.c b/test/codegen-golden/NmsubVV8VInt8VBVIVIVI_TAMA.c new file mode 100644 index 0000000..bd999be --- /dev/null +++ b/test/codegen-golden/NmsubVV8VInt8VBVIVIVI_TAMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r NmsubVV8VInt8VBVIVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c NmsubVV8VInt8VBVIVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnmsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnmsub_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnmsub_vv_operator_0() { +int8_t tmp[] = {-1,-1,-27,-1,-111,-1,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsubVV8VInt8VBVIVIVI_TAMU.c b/test/codegen-golden/NmsubVV8VInt8VBVIVIVI_TAMU.c new file mode 100644 index 0000000..ae53bf9 --- /dev/null +++ b/test/codegen-golden/NmsubVV8VInt8VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r NmsubVV8VInt8VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c NmsubVV8VInt8VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnmsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnmsub_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnmsub_vv_operator_0() { +int8_t tmp[] = {29,-1,-27,-1,-111,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsubVV8VInt8VBVIVIVI_TUMA.c b/test/codegen-golden/NmsubVV8VInt8VBVIVIVI_TUMA.c new file mode 100644 index 0000000..a562e77 --- /dev/null +++ b/test/codegen-golden/NmsubVV8VInt8VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r NmsubVV8VInt8VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c NmsubVV8VInt8VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnmsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnmsub_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnmsub_vv_operator_0() { +int8_t tmp[] = {-1,84,-27,19,-111,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsubVV8VInt8VBVIVIVI_TUMU.c b/test/codegen-golden/NmsubVV8VInt8VBVIVIVI_TUMU.c new file mode 100644 index 0000000..ad940fc --- /dev/null +++ b/test/codegen-golden/NmsubVV8VInt8VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r NmsubVV8VInt8VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c NmsubVV8VInt8VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnmsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnmsub_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnmsub_vv_operator_0() { +int8_t tmp[] = {29,84,-27,19,-111,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsubVV8VInt8VIVIVI_TA.c b/test/codegen-golden/NmsubVV8VInt8VIVIVI_TA.c new file mode 100644 index 0000000..aaa1e0c --- /dev/null +++ b/test/codegen-golden/NmsubVV8VInt8VIVIVI_TA.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r NmsubVV8VInt8VIVIVI_TA -n 1 -l 7 --has-ta --has-ma -c NmsubVV8VInt8VIVIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnmsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vnmsub_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnmsub_vv_operator_0() { +int8_t tmp[] = {66,-1,-91,-1,-70,-1,87,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsubVV8VInt8VIVIVI_TU.c b/test/codegen-golden/NmsubVV8VInt8VIVIVI_TU.c new file mode 100644 index 0000000..7705633 --- /dev/null +++ b/test/codegen-golden/NmsubVV8VInt8VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r NmsubVV8VInt8VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c NmsubVV8VInt8VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnmsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vnmsub_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnmsub_vv_operator_0() { +int8_t tmp[] = {66,79,-91,-14,-70,-73,87,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsubVV8VInt8_m.c b/test/codegen-golden/NmsubVV8VInt8_m.c new file mode 100644 index 0000000..9139e1a --- /dev/null +++ b/test/codegen-golden/NmsubVV8VInt8_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r NmsubVV8VInt8_m -n 1 -l 7 --has-ta --has-ma -c NmsubVV8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnmsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnmsub_vv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnmsub_vv_operator_0() { +int8_t tmp[] = {29,98,-27,19,-111,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnmsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnmsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsubVX8VInt8.c b/test/codegen-golden/NmsubVX8VInt8.c new file mode 100644 index 0000000..bf4a753 --- /dev/null +++ b/test/codegen-golden/NmsubVX8VInt8.c @@ -0,0 +1,87 @@ +// COMMAND: random_gen -r NmsubVX8VInt8 -n 1 -l 7 --has-ta --has-ma -c NmsubVX8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vnmsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vnmsub_vx_i8m1(vec_value_0_0, placeholder1, vec_value_2_0, vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnmsub_vx_operator_0() { +int8_t tmp[] = {66,63,-74,-94,30,4,91,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnmsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnmsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsubVX8VInt8VBVISIVI_TAMA.c b/test/codegen-golden/NmsubVX8VInt8VBVISIVI_TAMA.c new file mode 100644 index 0000000..76941af --- /dev/null +++ b/test/codegen-golden/NmsubVX8VInt8VBVISIVI_TAMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r NmsubVX8VInt8VBVISIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c NmsubVX8VInt8VBVISIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vnmsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnmsub_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnmsub_vx_operator_0() { +int8_t tmp[] = {-1,-1,121,-1,-58,-1,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnmsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnmsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsubVX8VInt8VBVISIVI_TAMU.c b/test/codegen-golden/NmsubVX8VInt8VBVISIVI_TAMU.c new file mode 100644 index 0000000..5f63455 --- /dev/null +++ b/test/codegen-golden/NmsubVX8VInt8VBVISIVI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r NmsubVX8VInt8VBVISIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c NmsubVX8VInt8VBVISIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vnmsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnmsub_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnmsub_vx_operator_0() { +int8_t tmp[] = {29,-1,121,-1,-58,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnmsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnmsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsubVX8VInt8VBVISIVI_TUMA.c b/test/codegen-golden/NmsubVX8VInt8VBVISIVI_TUMA.c new file mode 100644 index 0000000..cb70401 --- /dev/null +++ b/test/codegen-golden/NmsubVX8VInt8VBVISIVI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r NmsubVX8VInt8VBVISIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c NmsubVX8VInt8VBVISIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vnmsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnmsub_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnmsub_vx_operator_0() { +int8_t tmp[] = {-1,84,121,19,-58,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnmsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnmsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsubVX8VInt8VBVISIVI_TUMU.c b/test/codegen-golden/NmsubVX8VInt8VBVISIVI_TUMU.c new file mode 100644 index 0000000..a239183 --- /dev/null +++ b/test/codegen-golden/NmsubVX8VInt8VBVISIVI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r NmsubVX8VInt8VBVISIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c NmsubVX8VInt8VBVISIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vnmsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnmsub_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnmsub_vx_operator_0() { +int8_t tmp[] = {29,84,121,19,-58,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnmsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnmsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsubVX8VInt8VISIVI_TA.c b/test/codegen-golden/NmsubVX8VInt8VISIVI_TA.c new file mode 100644 index 0000000..9c1a27d --- /dev/null +++ b/test/codegen-golden/NmsubVX8VInt8VISIVI_TA.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r NmsubVX8VInt8VISIVI_TA -n 1 -l 7 --has-ta --has-ma -c NmsubVX8VInt8VISIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vnmsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vnmsub_vx_i8m1_ta(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnmsub_vx_operator_0() { +int8_t tmp[] = {66,-1,-74,-1,30,-1,91,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnmsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnmsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsubVX8VInt8VISIVI_TU.c b/test/codegen-golden/NmsubVX8VInt8VISIVI_TU.c new file mode 100644 index 0000000..f8fad3f --- /dev/null +++ b/test/codegen-golden/NmsubVX8VInt8VISIVI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r NmsubVX8VInt8VISIVI_TU -n 1 -l 7 --has-ta --has-ma -c NmsubVX8VInt8VISIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vnmsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vnmsub_vx_i8m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnmsub_vx_operator_0() { +int8_t tmp[] = {66,79,-74,-14,30,-73,91,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnmsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnmsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NmsubVX8VInt8_m.c b/test/codegen-golden/NmsubVX8VInt8_m.c new file mode 100644 index 0000000..80095ca --- /dev/null +++ b/test/codegen-golden/NmsubVX8VInt8_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r NmsubVX8VInt8_m -n 1 -l 7 --has-ta --has-ma -c NmsubVX8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vnmsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnmsub_vx_i8m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnmsub_vx_operator_0() { +int8_t tmp[] = {29,58,121,19,-58,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnmsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnmsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnmsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NotV8VInt8VBVIVI_TAMU.c b/test/codegen-golden/NotV8VInt8VBVIVI_TAMU.c new file mode 100644 index 0000000..6a7ff99 --- /dev/null +++ b/test/codegen-golden/NotV8VInt8VBVIVI_TAMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r NotV8VInt8VBVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c NotV8VInt8VBVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnot_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vnot_v_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnot_v_operator_0() { +int8_t tmp[] = {29,-1,14,-1,-17,-1,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnot_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnot_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnot_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NotV8VInt8VBVIVI_TUMA.c b/test/codegen-golden/NotV8VInt8VBVIVI_TUMA.c new file mode 100644 index 0000000..b18a69a --- /dev/null +++ b/test/codegen-golden/NotV8VInt8VBVIVI_TUMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r NotV8VInt8VBVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c NotV8VInt8VBVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnot_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vnot_v_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnot_v_operator_0() { +int8_t tmp[] = {-1,84,14,19,-17,-74,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnot_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnot_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnot_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NotV8VInt8VBVIVI_TUMU.c b/test/codegen-golden/NotV8VInt8VBVIVI_TUMU.c new file mode 100644 index 0000000..a16d7bf --- /dev/null +++ b/test/codegen-golden/NotV8VInt8VBVIVI_TUMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r NotV8VInt8VBVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c NotV8VInt8VBVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnot_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vnot_v_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnot_v_operator_0() { +int8_t tmp[] = {29,84,14,19,-17,-74,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnot_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnot_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnot_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NotV8VInt8VBVIVI_m.c b/test/codegen-golden/NotV8VInt8VBVIVI_m.c new file mode 100644 index 0000000..22a9385 --- /dev/null +++ b/test/codegen-golden/NotV8VInt8VBVIVI_m.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r NotV8VInt8VBVIVI_m -n 1 -l 7 --has-ta --has-ma -c NotV8VInt8VBVIVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnot_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vnot_v_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnot_v_operator_0() { +int8_t tmp[] = {29,-51,14,19,-17,-74,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnot_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnot_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnot_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NotV8VInt8VBVI_TAMA.c b/test/codegen-golden/NotV8VInt8VBVI_TAMA.c new file mode 100644 index 0000000..3d32b75 --- /dev/null +++ b/test/codegen-golden/NotV8VInt8VBVI_TAMA.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r NotV8VInt8VBVI_TAMA -n 1 -l 7 --has-ta --has-ma -c NotV8VInt8VBVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnot_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vnot_v_i8m1_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnot_v_operator_0() { +int8_t tmp[] = {-1,-1,14,-1,-17,-1,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vnot_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnot_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnot_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NotV8VInt8VI.c b/test/codegen-golden/NotV8VInt8VI.c new file mode 100644 index 0000000..f53282b --- /dev/null +++ b/test/codegen-golden/NotV8VInt8VI.c @@ -0,0 +1,60 @@ +// COMMAND: random_gen -r NotV8VInt8VI -n 1 -l 7 --has-ta --has-ma -c NotV8VInt8VI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vnot_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_1_0= vnot_v_i8m1(vec_value_0_0, vl); + +vse8_v_i8m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vnot_v_operator_0() { +int8_t tmp[] = {55,-80,-56,13,-27,72,56,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vnot_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnot_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vnot_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NotV8VInt8VIVI_TU.c b/test/codegen-golden/NotV8VInt8VIVI_TU.c new file mode 100644 index 0000000..6be88fc --- /dev/null +++ b/test/codegen-golden/NotV8VInt8VIVI_TU.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r NotV8VInt8VIVI_TU -n 1 -l 7 --has-ta --has-ma -c NotV8VInt8VIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnot_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vnot_v_i8m1_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnot_v_operator_0() { +int8_t tmp[] = {21,79,14,-14,-17,-73,25,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vnot_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnot_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnot_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NotV8VInt8VI_TA.c b/test/codegen-golden/NotV8VInt8VI_TA.c new file mode 100644 index 0000000..0a20c8f --- /dev/null +++ b/test/codegen-golden/NotV8VInt8VI_TA.c @@ -0,0 +1,61 @@ +// COMMAND: random_gen -r NotV8VInt8VI_TA -n 1 -l 7 --has-ta --has-ma -c NotV8VInt8VI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vnot_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_1_0= vnot_v_i8m1_ta(vec_value_0_0, tail_vl); + +vse8_v_i8m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vnot_v_operator_0() { +int8_t tmp[] = {55,-1,-56,-1,-27,-1,56,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vnot_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnot_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vnot_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsraWV8VInt8.c b/test/codegen-golden/NsraWV8VInt8.c new file mode 100644 index 0000000..90c53be --- /dev/null +++ b/test/codegen-golden/NsraWV8VInt8.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r NsraWV8VInt8 -n 1 -l 7 --has-ta --has-ma -c NsraWV8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +uint8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnsra_wv_operator_0() { +int16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m2(placeholder3); +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vnsra_wv_i8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnsra_wv_operator_0() { +int8_t tmp[] = {-44,3,5,-6,2,-15,80,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vnsra_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsra_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnsra_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsraWV8VInt8VBVIVIVU_TAMU.c b/test/codegen-golden/NsraWV8VInt8VBVIVIVU_TAMU.c new file mode 100644 index 0000000..a91d71d --- /dev/null +++ b/test/codegen-golden/NsraWV8VInt8VBVIVIVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r NsraWV8VInt8VBVIVIVU_TAMU -n 1 -l 7 --has-ta --has-ma -c NsraWV8VInt8VBVIVIVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {6976,-2834,3879,9191,-3858,-5299,-3986,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnsra_wv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnsra_wv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnsra_wv_operator_0() { +int8_t tmp[] = {29,-1,3,-1,-4,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnsra_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsra_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnsra_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsraWV8VInt8VBVIVIVU_TUMA.c b/test/codegen-golden/NsraWV8VInt8VBVIVIVU_TUMA.c new file mode 100644 index 0000000..79bcf73 --- /dev/null +++ b/test/codegen-golden/NsraWV8VInt8VBVIVIVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r NsraWV8VInt8VBVIVIVU_TUMA -n 1 -l 7 --has-ta --has-ma -c NsraWV8VInt8VBVIVIVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {6976,-2834,3879,9191,-3858,-5299,-3986,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnsra_wv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnsra_wv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnsra_wv_operator_0() { +int8_t tmp[] = {-1,84,3,19,-4,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnsra_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsra_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnsra_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsraWV8VInt8VBVIVIVU_TUMU.c b/test/codegen-golden/NsraWV8VInt8VBVIVIVU_TUMU.c new file mode 100644 index 0000000..62a7915 --- /dev/null +++ b/test/codegen-golden/NsraWV8VInt8VBVIVIVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r NsraWV8VInt8VBVIVIVU_TUMU -n 1 -l 7 --has-ta --has-ma -c NsraWV8VInt8VBVIVIVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {6976,-2834,3879,9191,-3858,-5299,-3986,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnsra_wv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnsra_wv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnsra_wv_operator_0() { +int8_t tmp[] = {29,84,3,19,-4,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnsra_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsra_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnsra_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsraWV8VInt8VBVIVU_TAMA.c b/test/codegen-golden/NsraWV8VInt8VBVIVU_TAMA.c new file mode 100644 index 0000000..b92259d --- /dev/null +++ b/test/codegen-golden/NsraWV8VInt8VBVIVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r NsraWV8VInt8VBVIVU_TAMA -n 1 -l 7 --has-ta --has-ma -c NsraWV8VInt8VBVIVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +uint8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnsra_wv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vnsra_wv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnsra_wv_operator_0() { +int8_t tmp[] = {-1,-1,1,-1,2,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnsra_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsra_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnsra_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsraWV8VInt8VIVIVU_TU.c b/test/codegen-golden/NsraWV8VInt8VIVIVU_TU.c new file mode 100644 index 0000000..14c997f --- /dev/null +++ b/test/codegen-golden/NsraWV8VInt8VIVIVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r NsraWV8VInt8VIVIVU_TU -n 1 -l 7 --has-ta --has-ma -c NsraWV8VInt8VIVIVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +uint8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnsra_wv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vnsra_wv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnsra_wv_operator_0() { +int8_t tmp[] = {22,79,1,-14,2,-73,-23,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnsra_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsra_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnsra_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsraWV8VInt8VIVU_TA.c b/test/codegen-golden/NsraWV8VInt8VIVU_TA.c new file mode 100644 index 0000000..07cac0c --- /dev/null +++ b/test/codegen-golden/NsraWV8VInt8VIVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r NsraWV8VInt8VIVU_TA -n 1 -l 7 --has-ta --has-ma -c NsraWV8VInt8VIVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +uint8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnsra_wv_operator_0() { +int16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vnsra_wv_i8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnsra_wv_operator_0() { +int8_t tmp[] = {-44,-1,5,-1,2,-1,80,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vnsra_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsra_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnsra_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsraWV8VInt8_m.c b/test/codegen-golden/NsraWV8VInt8_m.c new file mode 100644 index 0000000..f6df5df --- /dev/null +++ b/test/codegen-golden/NsraWV8VInt8_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r NsraWV8VInt8_m -n 1 -l 7 --has-ta --has-ma -c NsraWV8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {6976,-2834,3879,9191,-3858,-5299,-3986,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnsra_wv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m2(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vnsra_wv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnsra_wv_operator_0() { +int8_t tmp[] = {29,-2,3,19,-4,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnsra_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsra_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnsra_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsraWX8VInt8.c b/test/codegen-golden/NsraWX8VInt8.c new file mode 100644 index 0000000..15bb97c --- /dev/null +++ b/test/codegen-golden/NsraWX8VInt8.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r NsraWX8VInt8 -n 1 -l 7 --has-ta --has-ma -c NsraWX8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +uint32_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp = 3902764u; +value_1 = tmp; +} +void vnsra_wx_operator_0() { +int16_t *placeholder0 = value_0; +uint32_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m2(placeholder3); +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); + +vint8m1_t vec_value_2_0= vnsra_wx_i8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnsra_wx_operator_0() { +int8_t tmp[] = {-2,1,1,-1,0,-2,-2,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vnsra_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsra_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnsra_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsraWX8VInt8VBVISL_TAMA.c b/test/codegen-golden/NsraWX8VInt8VBVISL_TAMA.c new file mode 100644 index 0000000..42ce959 --- /dev/null +++ b/test/codegen-golden/NsraWX8VInt8VBVISL_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r NsraWX8VInt8VBVISL_TAMA -n 1 -l 7 --has-ta --has-ma -c NsraWX8VInt8VBVISL_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +size_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +size_t tmp = 3902764ull; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnsra_wx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +size_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); + +vint8m1_t vec_value_3_0= vnsra_wx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnsra_wx_operator_0() { +int8_t tmp[] = {-1,-1,0,-1,-2,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnsra_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsra_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnsra_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsraWX8VInt8VBVIVISL_TAMU.c b/test/codegen-golden/NsraWX8VInt8VBVIVISL_TAMU.c new file mode 100644 index 0000000..7c7dd49 --- /dev/null +++ b/test/codegen-golden/NsraWX8VInt8VBVIVISL_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r NsraWX8VInt8VBVIVISL_TAMU -n 1 -l 7 --has-ta --has-ma -c NsraWX8VInt8VBVIVISL_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +size_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {8399,1958,1879,2303,-7354,-734,6976,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnsra_wx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); + +vint8m1_t vec_value_4_0= vnsra_wx_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnsra_wx_operator_0() { +int8_t tmp[] = {50,-1,0,-1,-2,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnsra_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsra_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnsra_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsraWX8VInt8VBVIVISL_TUMA.c b/test/codegen-golden/NsraWX8VInt8VBVIVISL_TUMA.c new file mode 100644 index 0000000..abaa238 --- /dev/null +++ b/test/codegen-golden/NsraWX8VInt8VBVIVISL_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r NsraWX8VInt8VBVIVISL_TUMA -n 1 -l 7 --has-ta --has-ma -c NsraWX8VInt8VBVIVISL_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +size_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {8399,1958,1879,2303,-7354,-734,6976,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnsra_wx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); + +vint8m1_t vec_value_4_0= vnsra_wx_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnsra_wx_operator_0() { +int8_t tmp[] = {-1,-15,0,16,-2,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnsra_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsra_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnsra_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsraWX8VInt8VBVIVISL_TUMU.c b/test/codegen-golden/NsraWX8VInt8VBVIVISL_TUMU.c new file mode 100644 index 0000000..6627c11 --- /dev/null +++ b/test/codegen-golden/NsraWX8VInt8VBVIVISL_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r NsraWX8VInt8VBVIVISL_TUMU -n 1 -l 7 --has-ta --has-ma -c NsraWX8VInt8VBVIVISL_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +size_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {8399,1958,1879,2303,-7354,-734,6976,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnsra_wx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); + +vint8m1_t vec_value_4_0= vnsra_wx_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnsra_wx_operator_0() { +int8_t tmp[] = {50,-15,0,16,-2,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnsra_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsra_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnsra_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsraWX8VInt8VISL_TA.c b/test/codegen-golden/NsraWX8VInt8VISL_TA.c new file mode 100644 index 0000000..04ac3d3 --- /dev/null +++ b/test/codegen-golden/NsraWX8VInt8VISL_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r NsraWX8VInt8VISL_TA -n 1 -l 7 --has-ta --has-ma -c NsraWX8VInt8VISL_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +size_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +size_t tmp = 3902764ull; +value_1 = tmp; +} +void vnsra_wx_operator_0() { +int16_t *placeholder0 = value_0; +size_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); + +vint8m1_t vec_value_2_0= vnsra_wx_i8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnsra_wx_operator_0() { +int8_t tmp[] = {-2,-1,1,-1,0,-1,-2,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vnsra_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsra_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnsra_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsraWX8VInt8VIVISL_TU.c b/test/codegen-golden/NsraWX8VInt8VIVISL_TU.c new file mode 100644 index 0000000..99e8da7 --- /dev/null +++ b/test/codegen-golden/NsraWX8VInt8VIVISL_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r NsraWX8VInt8VIVISL_TU -n 1 -l 7 --has-ta --has-ma -c NsraWX8VInt8VIVISL_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +size_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +size_t tmp = 3902764ull; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnsra_wx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +size_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); + +vint8m1_t vec_value_3_0= vnsra_wx_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnsra_wx_operator_0() { +int8_t tmp[] = {1,79,0,-14,-2,-73,0,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnsra_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsra_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnsra_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsraWX8VInt8_m.c b/test/codegen-golden/NsraWX8VInt8_m.c new file mode 100644 index 0000000..84ad227 --- /dev/null +++ b/test/codegen-golden/NsraWX8VInt8_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r NsraWX8VInt8_m -n 1 -l 7 --has-ta --has-ma -c NsraWX8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +uint32_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp = 3902764u; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {8399,1958,1879,2303,-7354,-734,6976,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnsra_wx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +uint32_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m2(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); + +vint8m1_t vec_value_4_0= vnsra_wx_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnsra_wx_operator_0() { +int8_t tmp[] = {50,0,0,16,-2,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnsra_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsra_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnsra_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsrlWV8VUInt8.c b/test/codegen-golden/NsrlWV8VUInt8.c new file mode 100644 index 0000000..d54f4e9 --- /dev/null +++ b/test/codegen-golden/NsrlWV8VUInt8.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r NsrlWV8VUInt8 -n 1 -l 7 --has-ta --has-ma -c NsrlWV8VUInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnsrl_wv_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m2(placeholder3); +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vnsrl_wv_u8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnsrl_wv_operator_0() { +uint8_t tmp[] = {17,4,7,16,6,90,68,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vnsrl_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsrl_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnsrl_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsrlWV8VUInt8VBVUVUVU_TAMU.c b/test/codegen-golden/NsrlWV8VUInt8VBVUVUVU_TAMU.c new file mode 100644 index 0000000..ad09fd3 --- /dev/null +++ b/test/codegen-golden/NsrlWV8VUInt8VBVUVUVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r NsrlWV8VUInt8VBVUVUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c NsrlWV8VUInt8VBVUVUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {8488,3583,6940,9596,3071,2350,3007,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnsrl_wv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vnsrl_wv_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnsrl_wv_operator_0() { +uint8_t tmp[] = {65,255,6,255,2,255,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnsrl_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsrl_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnsrl_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsrlWV8VUInt8VBVUVUVU_TUMA.c b/test/codegen-golden/NsrlWV8VUInt8VBVUVUVU_TUMA.c new file mode 100644 index 0000000..62b56b8 --- /dev/null +++ b/test/codegen-golden/NsrlWV8VUInt8VBVUVUVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r NsrlWV8VUInt8VBVUVUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c NsrlWV8VUInt8VBVUVUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {8488,3583,6940,9596,3071,2350,3007,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnsrl_wv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vnsrl_wv_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnsrl_wv_operator_0() { +uint8_t tmp[] = {255,92,6,59,2,13,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnsrl_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsrl_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnsrl_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsrlWV8VUInt8VBVUVUVU_TUMU.c b/test/codegen-golden/NsrlWV8VUInt8VBVUVUVU_TUMU.c new file mode 100644 index 0000000..077229e --- /dev/null +++ b/test/codegen-golden/NsrlWV8VUInt8VBVUVUVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r NsrlWV8VUInt8VBVUVUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c NsrlWV8VUInt8VBVUVUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {8488,3583,6940,9596,3071,2350,3007,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnsrl_wv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vnsrl_wv_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnsrl_wv_operator_0() { +uint8_t tmp[] = {65,92,6,59,2,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnsrl_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsrl_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnsrl_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsrlWV8VUInt8VBVUVU_TAMA.c b/test/codegen-golden/NsrlWV8VUInt8VBVUVU_TAMA.c new file mode 100644 index 0000000..4c84e91 --- /dev/null +++ b/test/codegen-golden/NsrlWV8VUInt8VBVUVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r NsrlWV8VUInt8VBVUVU_TAMA -n 1 -l 7 --has-ta --has-ma -c NsrlWV8VUInt8VBVUVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnsrl_wv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vnsrl_wv_u8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnsrl_wv_operator_0() { +uint8_t tmp[] = {255,255,5,255,6,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnsrl_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsrl_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnsrl_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsrlWV8VUInt8VUVUVU_TU.c b/test/codegen-golden/NsrlWV8VUInt8VUVUVU_TU.c new file mode 100644 index 0000000..6727df2 --- /dev/null +++ b/test/codegen-golden/NsrlWV8VUInt8VUVUVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r NsrlWV8VUInt8VUVUVU_TU -n 1 -l 7 --has-ta --has-ma -c NsrlWV8VUInt8VUVUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnsrl_wv_operator_0() { +uint8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vnsrl_wv_u8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnsrl_wv_operator_0() { +uint8_t tmp[] = {50,90,5,43,6,14,144,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnsrl_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsrl_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnsrl_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsrlWV8VUInt8VUVU_TA.c b/test/codegen-golden/NsrlWV8VUInt8VUVU_TA.c new file mode 100644 index 0000000..ba861c0 --- /dev/null +++ b/test/codegen-golden/NsrlWV8VUInt8VUVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r NsrlWV8VUInt8VUVU_TA -n 1 -l 7 --has-ta --has-ma -c NsrlWV8VUInt8VUVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnsrl_wv_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vnsrl_wv_u8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnsrl_wv_operator_0() { +uint8_t tmp[] = {17,255,7,255,6,255,68,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vnsrl_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsrl_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnsrl_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsrlWV8VUInt8_m.c b/test/codegen-golden/NsrlWV8VUInt8_m.c new file mode 100644 index 0000000..80e558d --- /dev/null +++ b/test/codegen-golden/NsrlWV8VUInt8_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r NsrlWV8VUInt8_m -n 1 -l 7 --has-ta --has-ma -c NsrlWV8VUInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {8488,3583,6940,9596,3071,2350,3007,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnsrl_wv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m2(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vnsrl_wv_u8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnsrl_wv_operator_0() { +uint8_t tmp[] = {65,1,6,59,2,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnsrl_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsrl_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnsrl_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsrlWX8VUInt8.c b/test/codegen-golden/NsrlWX8VUInt8.c new file mode 100644 index 0000000..cbf0cff --- /dev/null +++ b/test/codegen-golden/NsrlWX8VUInt8.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r NsrlWX8VUInt8 -n 1 -l 7 --has-ta --has-ma -c NsrlWX8VUInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint32_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp = 3902764u; +value_1 = tmp; +} +void vnsrl_wx_operator_0() { +uint16_t *placeholder0 = value_0; +uint32_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m2(placeholder3); +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vnsrl_wx_u8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnsrl_wx_operator_0() { +uint8_t tmp[] = {0,2,1,1,1,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vnsrl_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsrl_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnsrl_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsrlWX8VUInt8VBVUSL_TAMA.c b/test/codegen-golden/NsrlWX8VUInt8VBVUSL_TAMA.c new file mode 100644 index 0000000..a923594 --- /dev/null +++ b/test/codegen-golden/NsrlWX8VUInt8VBVUSL_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r NsrlWX8VUInt8VBVUSL_TAMA -n 1 -l 7 --has-ta --has-ma -c NsrlWX8VUInt8VBVUSL_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +size_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +size_t tmp = 3902764ull; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnsrl_wx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +size_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vnsrl_wx_u8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnsrl_wx_operator_0() { +uint8_t tmp[] = {255,255,1,255,0,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnsrl_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsrl_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnsrl_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsrlWX8VUInt8VBVUVUSL_TAMU.c b/test/codegen-golden/NsrlWX8VUInt8VBVUVUSL_TAMU.c new file mode 100644 index 0000000..b824885 --- /dev/null +++ b/test/codegen-golden/NsrlWX8VUInt8VBVUVUSL_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r NsrlWX8VUInt8VBVUVUSL_TAMU -n 1 -l 7 --has-ta --has-ma -c NsrlWX8VUInt8VBVUVUSL_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +size_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {9200,5979,5940,6152,1323,4633,8488,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnsrl_wx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vnsrl_wx_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnsrl_wx_operator_0() { +uint8_t tmp[] = {75,255,1,255,0,255,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnsrl_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsrl_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnsrl_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsrlWX8VUInt8VBVUVUSL_TUMA.c b/test/codegen-golden/NsrlWX8VUInt8VBVUVUSL_TUMA.c new file mode 100644 index 0000000..84495d4 --- /dev/null +++ b/test/codegen-golden/NsrlWX8VUInt8VBVUVUSL_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r NsrlWX8VUInt8VBVUVUSL_TUMA -n 1 -l 7 --has-ta --has-ma -c NsrlWX8VUInt8VBVUVUSL_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +size_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {9200,5979,5940,6152,1323,4633,8488,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnsrl_wx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vnsrl_wx_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnsrl_wx_operator_0() { +uint8_t tmp[] = {255,42,1,58,0,37,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnsrl_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsrl_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnsrl_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsrlWX8VUInt8VBVUVUSL_TUMU.c b/test/codegen-golden/NsrlWX8VUInt8VBVUVUSL_TUMU.c new file mode 100644 index 0000000..26b8421 --- /dev/null +++ b/test/codegen-golden/NsrlWX8VUInt8VBVUVUSL_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r NsrlWX8VUInt8VBVUVUSL_TUMU -n 1 -l 7 --has-ta --has-ma -c NsrlWX8VUInt8VBVUVUSL_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +size_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {9200,5979,5940,6152,1323,4633,8488,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnsrl_wx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vnsrl_wx_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnsrl_wx_operator_0() { +uint8_t tmp[] = {75,42,1,58,0,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnsrl_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsrl_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnsrl_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsrlWX8VUInt8VUSL_TA.c b/test/codegen-golden/NsrlWX8VUInt8VUSL_TA.c new file mode 100644 index 0000000..7f3c79d --- /dev/null +++ b/test/codegen-golden/NsrlWX8VUInt8VUSL_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r NsrlWX8VUInt8VUSL_TA -n 1 -l 7 --has-ta --has-ma -c NsrlWX8VUInt8VUSL_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +size_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +size_t tmp = 3902764ull; +value_1 = tmp; +} +void vnsrl_wx_operator_0() { +uint16_t *placeholder0 = value_0; +size_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vnsrl_wx_u8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnsrl_wx_operator_0() { +uint8_t tmp[] = {0,255,1,255,1,255,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vnsrl_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsrl_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnsrl_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsrlWX8VUInt8VUVUSL_TU.c b/test/codegen-golden/NsrlWX8VUInt8VUVUSL_TU.c new file mode 100644 index 0000000..ad00e1b --- /dev/null +++ b/test/codegen-golden/NsrlWX8VUInt8VUVUSL_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r NsrlWX8VUInt8VUVUSL_TU -n 1 -l 7 --has-ta --has-ma -c NsrlWX8VUInt8VUVUSL_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint16_t value_1[7]; +size_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +size_t tmp = 3902764ull; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vnsrl_wx_operator_0() { +uint8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +size_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vnsrl_wx_u8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vnsrl_wx_operator_0() { +uint8_t tmp[] = {1,90,1,43,0,14,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vnsrl_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsrl_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vnsrl_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/NsrlWX8VUInt8_m.c b/test/codegen-golden/NsrlWX8VUInt8_m.c new file mode 100644 index 0000000..90f18ac --- /dev/null +++ b/test/codegen-golden/NsrlWX8VUInt8_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r NsrlWX8VUInt8_m -n 1 -l 7 --has-ta --has-ma -c NsrlWX8VUInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +uint32_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp = 3902764u; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {9200,5979,5940,6152,1323,4633,8488,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vnsrl_wx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint32_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m2(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vnsrl_wx_u8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vnsrl_wx_operator_0() { +uint8_t tmp[] = {75,1,1,58,0,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vnsrl_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vnsrl_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vnsrl_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/OrVV8VInt8.c b/test/codegen-golden/OrVV8VInt8.c new file mode 100644 index 0000000..db773b3 --- /dev/null +++ b/test/codegen-golden/OrVV8VInt8.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r OrVV8VInt8 -n 1 -l 7 --has-ta --has-ma -c OrVV8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vor_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vor_vv_i8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vor_vv_operator_0() { +int8_t tmp[] = {-22,127,-9,-2,26,-65,-25,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vor_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vor_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vor_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/OrVV8VInt8VBVIVIVI_TAMU.c b/test/codegen-golden/OrVV8VInt8VBVIVIVI_TAMU.c new file mode 100644 index 0000000..2ebdb74 --- /dev/null +++ b/test/codegen-golden/OrVV8VInt8VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r OrVV8VInt8VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c OrVV8VInt8VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vor_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vor_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vor_vv_operator_0() { +int8_t tmp[] = {29,-1,-9,-1,-39,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vor_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vor_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vor_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/OrVV8VInt8VBVIVIVI_TUMA.c b/test/codegen-golden/OrVV8VInt8VBVIVIVI_TUMA.c new file mode 100644 index 0000000..6c81c55 --- /dev/null +++ b/test/codegen-golden/OrVV8VInt8VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r OrVV8VInt8VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c OrVV8VInt8VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vor_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vor_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vor_vv_operator_0() { +int8_t tmp[] = {-1,84,-9,19,-39,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vor_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vor_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vor_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/OrVV8VInt8VBVIVIVI_TUMU.c b/test/codegen-golden/OrVV8VInt8VBVIVIVI_TUMU.c new file mode 100644 index 0000000..1a738e4 --- /dev/null +++ b/test/codegen-golden/OrVV8VInt8VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r OrVV8VInt8VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c OrVV8VInt8VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vor_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vor_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vor_vv_operator_0() { +int8_t tmp[] = {29,84,-9,19,-39,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vor_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vor_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vor_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/OrVV8VInt8VBVIVI_TAMA.c b/test/codegen-golden/OrVV8VInt8VBVIVI_TAMA.c new file mode 100644 index 0000000..4c53ea8 --- /dev/null +++ b/test/codegen-golden/OrVV8VInt8VBVIVI_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r OrVV8VInt8VBVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c OrVV8VInt8VBVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vor_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vor_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vor_vv_operator_0() { +int8_t tmp[] = {-1,-1,-11,-1,23,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vor_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vor_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vor_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/OrVV8VInt8VIVIVI_TU.c b/test/codegen-golden/OrVV8VInt8VIVIVI_TU.c new file mode 100644 index 0000000..79ba9df --- /dev/null +++ b/test/codegen-golden/OrVV8VInt8VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r OrVV8VInt8VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c OrVV8VInt8VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vor_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vor_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vor_vv_operator_0() { +int8_t tmp[] = {-1,79,-11,-14,23,-73,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vor_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vor_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vor_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/OrVV8VInt8VIVI_TA.c b/test/codegen-golden/OrVV8VInt8VIVI_TA.c new file mode 100644 index 0000000..d6b97e4 --- /dev/null +++ b/test/codegen-golden/OrVV8VInt8VIVI_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r OrVV8VInt8VIVI_TA -n 1 -l 7 --has-ta --has-ma -c OrVV8VInt8VIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vor_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vor_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vor_vv_operator_0() { +int8_t tmp[] = {-22,-1,-9,-1,26,-1,-25,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vor_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vor_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vor_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/OrVV8VInt8_m.c b/test/codegen-golden/OrVV8VInt8_m.c new file mode 100644 index 0000000..6d50f4e --- /dev/null +++ b/test/codegen-golden/OrVV8VInt8_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r OrVV8VInt8_m -n 1 -l 7 --has-ta --has-ma -c OrVV8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vor_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vor_vv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vor_vv_operator_0() { +int8_t tmp[] = {29,-10,-9,19,-39,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vor_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vor_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vor_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/OrVX8VInt8.c b/test/codegen-golden/OrVX8VInt8.c new file mode 100644 index 0000000..95a2911 --- /dev/null +++ b/test/codegen-golden/OrVX8VInt8.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r OrVX8VInt8 -n 1 -l 7 --has-ta --has-ma -c OrVX8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vor_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vor_vx_i8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vor_vx_operator_0() { +int8_t tmp[] = {-22,-17,-1,-6,-6,-1,-17,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vor_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vor_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vor_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/OrVX8VInt8VBVISI_TAMA.c b/test/codegen-golden/OrVX8VInt8VBVISI_TAMA.c new file mode 100644 index 0000000..e9a725b --- /dev/null +++ b/test/codegen-golden/OrVX8VInt8VBVISI_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r OrVX8VInt8VBVISI_TAMA -n 1 -l 7 --has-ta --has-ma -c OrVX8VInt8VBVISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vor_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vor_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vor_vx_operator_0() { +int8_t tmp[] = {-1,-1,-18,-1,-1,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vor_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vor_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vor_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/OrVX8VInt8VBVIVISI_TAMU.c b/test/codegen-golden/OrVX8VInt8VBVIVISI_TAMU.c new file mode 100644 index 0000000..4e877ad --- /dev/null +++ b/test/codegen-golden/OrVX8VInt8VBVIVISI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r OrVX8VInt8VBVIVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c OrVX8VInt8VBVIVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vor_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vor_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vor_vx_operator_0() { +int8_t tmp[] = {50,-1,-5,-1,-2,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vor_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vor_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vor_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/OrVX8VInt8VBVIVISI_TUMA.c b/test/codegen-golden/OrVX8VInt8VBVIVISI_TUMA.c new file mode 100644 index 0000000..e68b050 --- /dev/null +++ b/test/codegen-golden/OrVX8VInt8VBVIVISI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r OrVX8VInt8VBVIVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c OrVX8VInt8VBVIVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vor_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vor_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vor_vx_operator_0() { +int8_t tmp[] = {-1,-15,-5,16,-2,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vor_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vor_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vor_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/OrVX8VInt8VBVIVISI_TUMU.c b/test/codegen-golden/OrVX8VInt8VBVIVISI_TUMU.c new file mode 100644 index 0000000..63d5261 --- /dev/null +++ b/test/codegen-golden/OrVX8VInt8VBVIVISI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r OrVX8VInt8VBVIVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c OrVX8VInt8VBVIVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vor_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vor_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vor_vx_operator_0() { +int8_t tmp[] = {50,-15,-5,16,-2,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vor_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vor_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vor_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/OrVX8VInt8VISI_TA.c b/test/codegen-golden/OrVX8VInt8VISI_TA.c new file mode 100644 index 0000000..f466f8d --- /dev/null +++ b/test/codegen-golden/OrVX8VInt8VISI_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r OrVX8VInt8VISI_TA -n 1 -l 7 --has-ta --has-ma -c OrVX8VInt8VISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vor_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vor_vx_i8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vor_vx_operator_0() { +int8_t tmp[] = {-22,-1,-1,-1,-6,-1,-17,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vor_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vor_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vor_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/OrVX8VInt8VIVISI_TU.c b/test/codegen-golden/OrVX8VInt8VIVISI_TU.c new file mode 100644 index 0000000..7ad9c50 --- /dev/null +++ b/test/codegen-golden/OrVX8VInt8VIVISI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r OrVX8VInt8VIVISI_TU -n 1 -l 7 --has-ta --has-ma -c OrVX8VInt8VIVISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vor_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vor_vx_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vor_vx_operator_0() { +int8_t tmp[] = {-6,79,-18,-14,-1,-73,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vor_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vor_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vor_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/OrVX8VInt8_m.c b/test/codegen-golden/OrVX8VInt8_m.c new file mode 100644 index 0000000..e4b7b1f --- /dev/null +++ b/test/codegen-golden/OrVX8VInt8_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r OrVX8VInt8_m -n 1 -l 7 --has-ta --has-ma -c OrVX8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vor_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vor_vx_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vor_vx_operator_0() { +int8_t tmp[] = {50,-2,-5,16,-2,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vor_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vor_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vor_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedandVS8SInt8VBVIVI_TUM.c b/test/codegen-golden/RedandVS8SInt8VBVIVI_TUM.c new file mode 100644 index 0000000..831907a --- /dev/null +++ b/test/codegen-golden/RedandVS8SInt8VBVIVI_TUM.c @@ -0,0 +1,112 @@ +// COMMAND: random_gen -r RedandVS8SInt8VBVIVI_TUM -n 1 -l 7 --has-ta --has-ma -c RedandVS8SInt8VBVIVI_TUM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredand_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +vint8m1_t placeholder5= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder6= vmv_v_v_i8m1(placeholder5, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_3, value_1, sizeof(value_3)); +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +placeholder6 = vredand_vs_i8m1_i8m1_tum(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder6, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +int8_t *placeholder7 = value_3; +*placeholder7= vmv_x_s_i8m1_i8(placeholder6); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredand_vs_operator_0() { +int8_t tmp[] = {0,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vredand_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredand_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredand_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedandVS8SInt8VBVI_TAM.c b/test/codegen-golden/RedandVS8SInt8VBVI_TAM.c new file mode 100644 index 0000000..4f378a4 --- /dev/null +++ b/test/codegen-golden/RedandVS8SInt8VBVI_TAM.c @@ -0,0 +1,97 @@ +// COMMAND: random_gen -r RedandVS8SInt8VBVI_TAM -n 1 -l 7 --has-ta --has-ma -c RedandVS8SInt8VBVI_TAM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredand_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +vint8m1_t placeholder4= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder5= vmv_v_v_i8m1(placeholder4, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_2, 0xff, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +placeholder5 = vredand_vs_i8m1_i8m1_tam(mask_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +int8_t *placeholder6 = value_2; +*placeholder6= vmv_x_s_i8m1_i8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredand_vs_operator_0() { +int8_t tmp[] = {0,-1,-1,-1,-1,-1,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredand_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredand_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredand_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedandVS8SInt8VBVI_m.c b/test/codegen-golden/RedandVS8SInt8VBVI_m.c new file mode 100644 index 0000000..40c9494 --- /dev/null +++ b/test/codegen-golden/RedandVS8SInt8VBVI_m.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r RedandVS8SInt8VBVI_m -n 1 -l 7 --has-ta --has-ma -c RedandVS8SInt8VBVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredand_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = &value_2; +int placeholder3 = 7; + +vint8m1_t placeholder4= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder5= vmv_v_v_i8m1(placeholder4, vsetvlmax_e8m1()); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +placeholder5 = vredand_vs_i8m1_i8m1_m (mask_value_0_0, placeholder5, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +} +int8_t *placeholder6 = &value_2; +*placeholder6= vmv_x_s_i8m1_i8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredand_vs_operator_0() { +int8_t tmp = 0; +if(value_2 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredand_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredand_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredand_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedandVS8SInt8VI.c b/test/codegen-golden/RedandVS8SInt8VI.c new file mode 100644 index 0000000..2cad20c --- /dev/null +++ b/test/codegen-golden/RedandVS8SInt8VI.c @@ -0,0 +1,57 @@ +// COMMAND: random_gen -r RedandVS8SInt8VI -n 1 -l 7 --has-ta --has-ma -c RedandVS8SInt8VI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vredand_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = &value_1; +int placeholder2 = 7; + +vint8m1_t placeholder3= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder4= vmv_v_v_i8m1(placeholder3, vsetvlmax_e8m1()); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +placeholder4 = vredand_vs_i8m1_i8m1(placeholder4, vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +} +int8_t *placeholder5 = &value_1; +*placeholder5= vmv_x_s_i8m1_i8(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vredand_vs_operator_0() { +int8_t tmp = 0; +if(value_1 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vredand_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredand_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vredand_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedandVS8SInt8VIVI_TU.c b/test/codegen-golden/RedandVS8SInt8VIVI_TU.c new file mode 100644 index 0000000..0355dab --- /dev/null +++ b/test/codegen-golden/RedandVS8SInt8VIVI_TU.c @@ -0,0 +1,96 @@ +// COMMAND: random_gen -r RedandVS8SInt8VIVI_TU -n 1 -l 7 --has-ta --has-ma -c RedandVS8SInt8VIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredand_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +vint8m1_t placeholder4= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder5= vmv_v_v_i8m1(placeholder4, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_2, value_0, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +placeholder5 = vredand_vs_i8m1_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +int8_t *placeholder6 = value_2; +*placeholder6= vmv_x_s_i8m1_i8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredand_vs_operator_0() { +int8_t tmp[] = {0,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredand_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredand_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredand_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedandVS8SInt8VI_TA.c b/test/codegen-golden/RedandVS8SInt8VI_TA.c new file mode 100644 index 0000000..f2c84e3 --- /dev/null +++ b/test/codegen-golden/RedandVS8SInt8VI_TA.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r RedandVS8SInt8VI_TA -n 1 -l 7 --has-ta --has-ma -c RedandVS8SInt8VI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vredand_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int placeholder2 = 7; + +vint8m1_t placeholder3= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder4= vmv_v_v_i8m1(placeholder3, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_1, 0xff, sizeof(value_1)); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +placeholder4 = vredand_vs_i8m1_i8m1_ta(vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +placeholder1 += vl; +} +int8_t *placeholder5 = value_1; +*placeholder5= vmv_x_s_i8m1_i8(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vredand_vs_operator_0() { +int8_t tmp[] = {0,-1,-1,-1,-1,-1,-1,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vredand_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredand_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vredand_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedmaxVS8SInt8VBVIVI_TUM.c b/test/codegen-golden/RedmaxVS8SInt8VBVIVI_TUM.c new file mode 100644 index 0000000..bc845ec --- /dev/null +++ b/test/codegen-golden/RedmaxVS8SInt8VBVIVI_TUM.c @@ -0,0 +1,112 @@ +// COMMAND: random_gen -r RedmaxVS8SInt8VBVIVI_TUM -n 1 -l 7 --has-ta --has-ma -c RedmaxVS8SInt8VBVIVI_TUM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredmax_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +vint8m1_t placeholder5= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder6= vmv_v_v_i8m1(placeholder5, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_3, value_1, sizeof(value_3)); +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +placeholder6 = vredmax_vs_i8m1_i8m1_tum(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder6, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +int8_t *placeholder7 = value_3; +*placeholder7= vmv_x_s_i8m1_i8(placeholder6); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredmax_vs_operator_0() { +int8_t tmp[] = {50,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vredmax_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredmax_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredmax_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedmaxVS8SInt8VBVI_TAM.c b/test/codegen-golden/RedmaxVS8SInt8VBVI_TAM.c new file mode 100644 index 0000000..80492c9 --- /dev/null +++ b/test/codegen-golden/RedmaxVS8SInt8VBVI_TAM.c @@ -0,0 +1,97 @@ +// COMMAND: random_gen -r RedmaxVS8SInt8VBVI_TAM -n 1 -l 7 --has-ta --has-ma -c RedmaxVS8SInt8VBVI_TAM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredmax_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +vint8m1_t placeholder4= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder5= vmv_v_v_i8m1(placeholder4, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_2, 0xff, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +placeholder5 = vredmax_vs_i8m1_i8m1_tam(mask_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +int8_t *placeholder6 = value_2; +*placeholder6= vmv_x_s_i8m1_i8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredmax_vs_operator_0() { +int8_t tmp[] = {50,-1,-1,-1,-1,-1,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredmax_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredmax_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredmax_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedmaxVS8SInt8VBVI_m.c b/test/codegen-golden/RedmaxVS8SInt8VBVI_m.c new file mode 100644 index 0000000..5ca6e00 --- /dev/null +++ b/test/codegen-golden/RedmaxVS8SInt8VBVI_m.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r RedmaxVS8SInt8VBVI_m -n 1 -l 7 --has-ta --has-ma -c RedmaxVS8SInt8VBVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredmax_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = &value_2; +int placeholder3 = 7; + +vint8m1_t placeholder4= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder5= vmv_v_v_i8m1(placeholder4, vsetvlmax_e8m1()); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +placeholder5 = vredmax_vs_i8m1_i8m1_m (mask_value_0_0, placeholder5, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +} +int8_t *placeholder6 = &value_2; +*placeholder6= vmv_x_s_i8m1_i8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredmax_vs_operator_0() { +int8_t tmp = 50; +if(value_2 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredmax_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredmax_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredmax_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedmaxVS8SInt8VI.c b/test/codegen-golden/RedmaxVS8SInt8VI.c new file mode 100644 index 0000000..0e745d5 --- /dev/null +++ b/test/codegen-golden/RedmaxVS8SInt8VI.c @@ -0,0 +1,57 @@ +// COMMAND: random_gen -r RedmaxVS8SInt8VI -n 1 -l 7 --has-ta --has-ma -c RedmaxVS8SInt8VI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vredmax_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = &value_1; +int placeholder2 = 7; + +vint8m1_t placeholder3= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder4= vmv_v_v_i8m1(placeholder3, vsetvlmax_e8m1()); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +placeholder4 = vredmax_vs_i8m1_i8m1(placeholder4, vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +} +int8_t *placeholder5 = &value_1; +*placeholder5= vmv_x_s_i8m1_i8(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vredmax_vs_operator_0() { +int8_t tmp = 79; +if(value_1 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vredmax_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredmax_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vredmax_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedmaxVS8SInt8VIVI_TU.c b/test/codegen-golden/RedmaxVS8SInt8VIVI_TU.c new file mode 100644 index 0000000..9da81eb --- /dev/null +++ b/test/codegen-golden/RedmaxVS8SInt8VIVI_TU.c @@ -0,0 +1,96 @@ +// COMMAND: random_gen -r RedmaxVS8SInt8VIVI_TU -n 1 -l 7 --has-ta --has-ma -c RedmaxVS8SInt8VIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredmax_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +vint8m1_t placeholder4= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder5= vmv_v_v_i8m1(placeholder4, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_2, value_0, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +placeholder5 = vredmax_vs_i8m1_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +int8_t *placeholder6 = value_2; +*placeholder6= vmv_x_s_i8m1_i8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredmax_vs_operator_0() { +int8_t tmp[] = {50,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredmax_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredmax_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredmax_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedmaxVS8SInt8VI_TA.c b/test/codegen-golden/RedmaxVS8SInt8VI_TA.c new file mode 100644 index 0000000..b2a11d5 --- /dev/null +++ b/test/codegen-golden/RedmaxVS8SInt8VI_TA.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r RedmaxVS8SInt8VI_TA -n 1 -l 7 --has-ta --has-ma -c RedmaxVS8SInt8VI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vredmax_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int placeholder2 = 7; + +vint8m1_t placeholder3= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder4= vmv_v_v_i8m1(placeholder3, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_1, 0xff, sizeof(value_1)); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +placeholder4 = vredmax_vs_i8m1_i8m1_ta(vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +placeholder1 += vl; +} +int8_t *placeholder5 = value_1; +*placeholder5= vmv_x_s_i8m1_i8(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vredmax_vs_operator_0() { +int8_t tmp[] = {79,-1,-1,-1,-1,-1,-1,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vredmax_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredmax_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vredmax_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedmaxuVS8SUInt8VBVUVU_TUM.c b/test/codegen-golden/RedmaxuVS8SUInt8VBVUVU_TUM.c new file mode 100644 index 0000000..b63e50c --- /dev/null +++ b/test/codegen-golden/RedmaxuVS8SUInt8VBVUVU_TUM.c @@ -0,0 +1,112 @@ +// COMMAND: random_gen -r RedmaxuVS8SUInt8VBVUVU_TUM -n 1 -l 7 --has-ta --has-ma -c RedmaxuVS8SUInt8VBVUVU_TUM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredmaxu_vs_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int placeholder4 = 7; + +vuint8m1_t placeholder5= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vuint8m1_t placeholder6= vmv_v_v_u8m1(placeholder5, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_3, value_1, sizeof(value_3)); +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +placeholder6 = vredmaxu_vs_u8m1_u8m1_tum(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder6, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +uint8_t *placeholder7 = value_3; +*placeholder7= vmv_x_s_u8m1_u8(placeholder6); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredmaxu_vs_operator_0() { +uint8_t tmp[] = {75,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vredmaxu_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredmaxu_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredmaxu_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedmaxuVS8SUInt8VBVU_TAM.c b/test/codegen-golden/RedmaxuVS8SUInt8VBVU_TAM.c new file mode 100644 index 0000000..7113553 --- /dev/null +++ b/test/codegen-golden/RedmaxuVS8SUInt8VBVU_TAM.c @@ -0,0 +1,97 @@ +// COMMAND: random_gen -r RedmaxuVS8SUInt8VBVU_TAM -n 1 -l 7 --has-ta --has-ma -c RedmaxuVS8SUInt8VBVU_TAM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredmaxu_vs_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int placeholder3 = 7; + +vuint8m1_t placeholder4= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vuint8m1_t placeholder5= vmv_v_v_u8m1(placeholder4, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_2, 0xff, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +placeholder5 = vredmaxu_vs_u8m1_u8m1_tam(mask_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +uint8_t *placeholder6 = value_2; +*placeholder6= vmv_x_s_u8m1_u8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredmaxu_vs_operator_0() { +uint8_t tmp[] = {75,255,255,255,255,255,255,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredmaxu_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredmaxu_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredmaxu_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedmaxuVS8SUInt8VBVU_m.c b/test/codegen-golden/RedmaxuVS8SUInt8VBVU_m.c new file mode 100644 index 0000000..8d860c5 --- /dev/null +++ b/test/codegen-golden/RedmaxuVS8SUInt8VBVU_m.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r RedmaxuVS8SUInt8VBVU_m -n 1 -l 7 --has-ta --has-ma -c RedmaxuVS8SUInt8VBVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredmaxu_vs_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = &value_2; +int placeholder3 = 7; + +vuint8m1_t placeholder4= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vuint8m1_t placeholder5= vmv_v_v_u8m1(placeholder4, vsetvlmax_e8m1()); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +placeholder5 = vredmaxu_vs_u8m1_u8m1_m (mask_value_0_0, placeholder5, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +} +uint8_t *placeholder6 = &value_2; +*placeholder6= vmv_x_s_u8m1_u8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredmaxu_vs_operator_0() { +uint8_t tmp = 75; +if(value_2 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredmaxu_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredmaxu_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredmaxu_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedmaxuVS8SUInt8VU.c b/test/codegen-golden/RedmaxuVS8SUInt8VU.c new file mode 100644 index 0000000..db609c0 --- /dev/null +++ b/test/codegen-golden/RedmaxuVS8SUInt8VU.c @@ -0,0 +1,57 @@ +// COMMAND: random_gen -r RedmaxuVS8SUInt8VU -n 1 -l 7 --has-ta --has-ma -c RedmaxuVS8SUInt8VU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vredmaxu_vs_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = &value_1; +int placeholder2 = 7; + +vuint8m1_t placeholder3= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vuint8m1_t placeholder4= vmv_v_v_u8m1(placeholder3, vsetvlmax_e8m1()); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +placeholder4 = vredmaxu_vs_u8m1_u8m1(placeholder4, vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +} +uint8_t *placeholder5 = &value_1; +*placeholder5= vmv_x_s_u8m1_u8(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vredmaxu_vs_operator_0() { +uint8_t tmp = 90; +if(value_1 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vredmaxu_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredmaxu_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vredmaxu_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedmaxuVS8SUInt8VUVU_TU.c b/test/codegen-golden/RedmaxuVS8SUInt8VUVU_TU.c new file mode 100644 index 0000000..26004c1 --- /dev/null +++ b/test/codegen-golden/RedmaxuVS8SUInt8VUVU_TU.c @@ -0,0 +1,96 @@ +// COMMAND: random_gen -r RedmaxuVS8SUInt8VUVU_TU -n 1 -l 7 --has-ta --has-ma -c RedmaxuVS8SUInt8VUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredmaxu_vs_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int placeholder3 = 7; + +vuint8m1_t placeholder4= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vuint8m1_t placeholder5= vmv_v_v_u8m1(placeholder4, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_2, value_0, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +placeholder5 = vredmaxu_vs_u8m1_u8m1_tu(vec_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +uint8_t *placeholder6 = value_2; +*placeholder6= vmv_x_s_u8m1_u8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredmaxu_vs_operator_0() { +uint8_t tmp[] = {75,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredmaxu_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredmaxu_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredmaxu_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedmaxuVS8SUInt8VU_TA.c b/test/codegen-golden/RedmaxuVS8SUInt8VU_TA.c new file mode 100644 index 0000000..1f71035 --- /dev/null +++ b/test/codegen-golden/RedmaxuVS8SUInt8VU_TA.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r RedmaxuVS8SUInt8VU_TA -n 1 -l 7 --has-ta --has-ma -c RedmaxuVS8SUInt8VU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vredmaxu_vs_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int placeholder2 = 7; + +vuint8m1_t placeholder3= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vuint8m1_t placeholder4= vmv_v_v_u8m1(placeholder3, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_1, 0xff, sizeof(value_1)); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +placeholder4 = vredmaxu_vs_u8m1_u8m1_ta(vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +placeholder1 += vl; +} +uint8_t *placeholder5 = value_1; +*placeholder5= vmv_x_s_u8m1_u8(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vredmaxu_vs_operator_0() { +uint8_t tmp[] = {90,255,255,255,255,255,255,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vredmaxu_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredmaxu_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vredmaxu_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedminVS8SInt8VBVIVI_TUM.c b/test/codegen-golden/RedminVS8SInt8VBVIVI_TUM.c new file mode 100644 index 0000000..07b3d79 --- /dev/null +++ b/test/codegen-golden/RedminVS8SInt8VBVIVI_TUM.c @@ -0,0 +1,112 @@ +// COMMAND: random_gen -r RedminVS8SInt8VBVIVI_TUM -n 1 -l 7 --has-ta --has-ma -c RedminVS8SInt8VBVIVI_TUM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredmin_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +vint8m1_t placeholder5= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder6= vmv_v_v_i8m1(placeholder5, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_3, value_1, sizeof(value_3)); +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +placeholder6 = vredmin_vs_i8m1_i8m1_tum(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder6, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +int8_t *placeholder7 = value_3; +*placeholder7= vmv_x_s_i8m1_i8(placeholder6); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredmin_vs_operator_0() { +int8_t tmp[] = {-15,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vredmin_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredmin_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredmin_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedminVS8SInt8VBVI_TAM.c b/test/codegen-golden/RedminVS8SInt8VBVI_TAM.c new file mode 100644 index 0000000..d33f597 --- /dev/null +++ b/test/codegen-golden/RedminVS8SInt8VBVI_TAM.c @@ -0,0 +1,97 @@ +// COMMAND: random_gen -r RedminVS8SInt8VBVI_TAM -n 1 -l 7 --has-ta --has-ma -c RedminVS8SInt8VBVI_TAM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredmin_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +vint8m1_t placeholder4= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder5= vmv_v_v_i8m1(placeholder4, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_2, 0xff, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +placeholder5 = vredmin_vs_i8m1_i8m1_tam(mask_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +int8_t *placeholder6 = value_2; +*placeholder6= vmv_x_s_i8m1_i8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredmin_vs_operator_0() { +int8_t tmp[] = {-15,-1,-1,-1,-1,-1,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredmin_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredmin_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredmin_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedminVS8SInt8VBVI_m.c b/test/codegen-golden/RedminVS8SInt8VBVI_m.c new file mode 100644 index 0000000..e830afe --- /dev/null +++ b/test/codegen-golden/RedminVS8SInt8VBVI_m.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r RedminVS8SInt8VBVI_m -n 1 -l 7 --has-ta --has-ma -c RedminVS8SInt8VBVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredmin_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = &value_2; +int placeholder3 = 7; + +vint8m1_t placeholder4= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder5= vmv_v_v_i8m1(placeholder4, vsetvlmax_e8m1()); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +placeholder5 = vredmin_vs_i8m1_i8m1_m (mask_value_0_0, placeholder5, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +} +int8_t *placeholder6 = &value_2; +*placeholder6= vmv_x_s_i8m1_i8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredmin_vs_operator_0() { +int8_t tmp = -15; +if(value_2 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredmin_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredmin_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredmin_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedminVS8SInt8VI.c b/test/codegen-golden/RedminVS8SInt8VI.c new file mode 100644 index 0000000..24d181e --- /dev/null +++ b/test/codegen-golden/RedminVS8SInt8VI.c @@ -0,0 +1,57 @@ +// COMMAND: random_gen -r RedminVS8SInt8VI -n 1 -l 7 --has-ta --has-ma -c RedminVS8SInt8VI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vredmin_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = &value_1; +int placeholder2 = 7; + +vint8m1_t placeholder3= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder4= vmv_v_v_i8m1(placeholder3, vsetvlmax_e8m1()); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +placeholder4 = vredmin_vs_i8m1_i8m1(placeholder4, vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +} +int8_t *placeholder5 = &value_1; +*placeholder5= vmv_x_s_i8m1_i8(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vredmin_vs_operator_0() { +int8_t tmp = -73; +if(value_1 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vredmin_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredmin_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vredmin_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedminVS8SInt8VIVI_TU.c b/test/codegen-golden/RedminVS8SInt8VIVI_TU.c new file mode 100644 index 0000000..c6f5b2f --- /dev/null +++ b/test/codegen-golden/RedminVS8SInt8VIVI_TU.c @@ -0,0 +1,96 @@ +// COMMAND: random_gen -r RedminVS8SInt8VIVI_TU -n 1 -l 7 --has-ta --has-ma -c RedminVS8SInt8VIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredmin_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +vint8m1_t placeholder4= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder5= vmv_v_v_i8m1(placeholder4, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_2, value_0, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +placeholder5 = vredmin_vs_i8m1_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +int8_t *placeholder6 = value_2; +*placeholder6= vmv_x_s_i8m1_i8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredmin_vs_operator_0() { +int8_t tmp[] = {-65,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredmin_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredmin_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredmin_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedminVS8SInt8VI_TA.c b/test/codegen-golden/RedminVS8SInt8VI_TA.c new file mode 100644 index 0000000..a66f2bd --- /dev/null +++ b/test/codegen-golden/RedminVS8SInt8VI_TA.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r RedminVS8SInt8VI_TA -n 1 -l 7 --has-ta --has-ma -c RedminVS8SInt8VI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vredmin_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int placeholder2 = 7; + +vint8m1_t placeholder3= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder4= vmv_v_v_i8m1(placeholder3, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_1, 0xff, sizeof(value_1)); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +placeholder4 = vredmin_vs_i8m1_i8m1_ta(vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +placeholder1 += vl; +} +int8_t *placeholder5 = value_1; +*placeholder5= vmv_x_s_i8m1_i8(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vredmin_vs_operator_0() { +int8_t tmp[] = {-73,-1,-1,-1,-1,-1,-1,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vredmin_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredmin_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vredmin_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedminuVS8SUInt8VBVUVU_TUM.c b/test/codegen-golden/RedminuVS8SUInt8VBVUVU_TUM.c new file mode 100644 index 0000000..130fcbc --- /dev/null +++ b/test/codegen-golden/RedminuVS8SUInt8VBVUVU_TUM.c @@ -0,0 +1,112 @@ +// COMMAND: random_gen -r RedminuVS8SUInt8VBVUVU_TUM -n 1 -l 7 --has-ta --has-ma -c RedminuVS8SUInt8VBVUVU_TUM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredminu_vs_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int placeholder4 = 7; + +vuint8m1_t placeholder5= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vuint8m1_t placeholder6= vmv_v_v_u8m1(placeholder5, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_3, value_1, sizeof(value_3)); +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +placeholder6 = vredminu_vs_u8m1_u8m1_tum(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder6, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +uint8_t *placeholder7 = value_3; +*placeholder7= vmv_x_s_u8m1_u8(placeholder6); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredminu_vs_operator_0() { +uint8_t tmp[] = {0,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vredminu_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredminu_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredminu_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedminuVS8SUInt8VBVU_TAM.c b/test/codegen-golden/RedminuVS8SUInt8VBVU_TAM.c new file mode 100644 index 0000000..41e31e5 --- /dev/null +++ b/test/codegen-golden/RedminuVS8SUInt8VBVU_TAM.c @@ -0,0 +1,97 @@ +// COMMAND: random_gen -r RedminuVS8SUInt8VBVU_TAM -n 1 -l 7 --has-ta --has-ma -c RedminuVS8SUInt8VBVU_TAM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredminu_vs_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int placeholder3 = 7; + +vuint8m1_t placeholder4= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vuint8m1_t placeholder5= vmv_v_v_u8m1(placeholder4, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_2, 0xff, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +placeholder5 = vredminu_vs_u8m1_u8m1_tam(mask_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +uint8_t *placeholder6 = value_2; +*placeholder6= vmv_x_s_u8m1_u8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredminu_vs_operator_0() { +uint8_t tmp[] = {0,255,255,255,255,255,255,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredminu_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredminu_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredminu_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedminuVS8SUInt8VBVU_m.c b/test/codegen-golden/RedminuVS8SUInt8VBVU_m.c new file mode 100644 index 0000000..91abd08 --- /dev/null +++ b/test/codegen-golden/RedminuVS8SUInt8VBVU_m.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r RedminuVS8SUInt8VBVU_m -n 1 -l 7 --has-ta --has-ma -c RedminuVS8SUInt8VBVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredminu_vs_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = &value_2; +int placeholder3 = 7; + +vuint8m1_t placeholder4= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vuint8m1_t placeholder5= vmv_v_v_u8m1(placeholder4, vsetvlmax_e8m1()); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +placeholder5 = vredminu_vs_u8m1_u8m1_m (mask_value_0_0, placeholder5, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +} +uint8_t *placeholder6 = &value_2; +*placeholder6= vmv_x_s_u8m1_u8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredminu_vs_operator_0() { +uint8_t tmp = 0; +if(value_2 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredminu_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredminu_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredminu_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedminuVS8SUInt8VU.c b/test/codegen-golden/RedminuVS8SUInt8VU.c new file mode 100644 index 0000000..b183b9a --- /dev/null +++ b/test/codegen-golden/RedminuVS8SUInt8VU.c @@ -0,0 +1,57 @@ +// COMMAND: random_gen -r RedminuVS8SUInt8VU -n 1 -l 7 --has-ta --has-ma -c RedminuVS8SUInt8VU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vredminu_vs_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = &value_1; +int placeholder2 = 7; + +vuint8m1_t placeholder3= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vuint8m1_t placeholder4= vmv_v_v_u8m1(placeholder3, vsetvlmax_e8m1()); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +placeholder4 = vredminu_vs_u8m1_u8m1(placeholder4, vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +} +uint8_t *placeholder5 = &value_1; +*placeholder5= vmv_x_s_u8m1_u8(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vredminu_vs_operator_0() { +uint8_t tmp = 0; +if(value_1 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vredminu_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredminu_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vredminu_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedminuVS8SUInt8VUVU_TU.c b/test/codegen-golden/RedminuVS8SUInt8VUVU_TU.c new file mode 100644 index 0000000..3727ce8 --- /dev/null +++ b/test/codegen-golden/RedminuVS8SUInt8VUVU_TU.c @@ -0,0 +1,96 @@ +// COMMAND: random_gen -r RedminuVS8SUInt8VUVU_TU -n 1 -l 7 --has-ta --has-ma -c RedminuVS8SUInt8VUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredminu_vs_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int placeholder3 = 7; + +vuint8m1_t placeholder4= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vuint8m1_t placeholder5= vmv_v_v_u8m1(placeholder4, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_2, value_0, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +placeholder5 = vredminu_vs_u8m1_u8m1_tu(vec_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +uint8_t *placeholder6 = value_2; +*placeholder6= vmv_x_s_u8m1_u8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredminu_vs_operator_0() { +uint8_t tmp[] = {0,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredminu_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredminu_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredminu_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedminuVS8SUInt8VU_TA.c b/test/codegen-golden/RedminuVS8SUInt8VU_TA.c new file mode 100644 index 0000000..9d43d14 --- /dev/null +++ b/test/codegen-golden/RedminuVS8SUInt8VU_TA.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r RedminuVS8SUInt8VU_TA -n 1 -l 7 --has-ta --has-ma -c RedminuVS8SUInt8VU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vredminu_vs_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int placeholder2 = 7; + +vuint8m1_t placeholder3= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vuint8m1_t placeholder4= vmv_v_v_u8m1(placeholder3, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_1, 0xff, sizeof(value_1)); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +placeholder4 = vredminu_vs_u8m1_u8m1_ta(vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +placeholder1 += vl; +} +uint8_t *placeholder5 = value_1; +*placeholder5= vmv_x_s_u8m1_u8(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vredminu_vs_operator_0() { +uint8_t tmp[] = {0,255,255,255,255,255,255,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vredminu_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredminu_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vredminu_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedorVS8SInt8VBVIVI_TUM.c b/test/codegen-golden/RedorVS8SInt8VBVIVI_TUM.c new file mode 100644 index 0000000..4a831a2 --- /dev/null +++ b/test/codegen-golden/RedorVS8SInt8VBVIVI_TUM.c @@ -0,0 +1,112 @@ +// COMMAND: random_gen -r RedorVS8SInt8VBVIVI_TUM -n 1 -l 7 --has-ta --has-ma -c RedorVS8SInt8VBVIVI_TUM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredor_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +vint8m1_t placeholder5= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder6= vmv_v_v_i8m1(placeholder5, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_3, value_1, sizeof(value_3)); +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +placeholder6 = vredor_vs_i8m1_i8m1_tum(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder6, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +int8_t *placeholder7 = value_3; +*placeholder7= vmv_x_s_i8m1_i8(placeholder6); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredor_vs_operator_0() { +int8_t tmp[] = {-13,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vredor_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredor_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredor_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedorVS8SInt8VBVI_TAM.c b/test/codegen-golden/RedorVS8SInt8VBVI_TAM.c new file mode 100644 index 0000000..c7df22d --- /dev/null +++ b/test/codegen-golden/RedorVS8SInt8VBVI_TAM.c @@ -0,0 +1,97 @@ +// COMMAND: random_gen -r RedorVS8SInt8VBVI_TAM -n 1 -l 7 --has-ta --has-ma -c RedorVS8SInt8VBVI_TAM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredor_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +vint8m1_t placeholder4= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder5= vmv_v_v_i8m1(placeholder4, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_2, 0xff, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +placeholder5 = vredor_vs_i8m1_i8m1_tam(mask_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +int8_t *placeholder6 = value_2; +*placeholder6= vmv_x_s_i8m1_i8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredor_vs_operator_0() { +int8_t tmp[] = {-13,-1,-1,-1,-1,-1,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredor_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredor_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredor_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedorVS8SInt8VBVI_m.c b/test/codegen-golden/RedorVS8SInt8VBVI_m.c new file mode 100644 index 0000000..3070356 --- /dev/null +++ b/test/codegen-golden/RedorVS8SInt8VBVI_m.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r RedorVS8SInt8VBVI_m -n 1 -l 7 --has-ta --has-ma -c RedorVS8SInt8VBVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredor_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = &value_2; +int placeholder3 = 7; + +vint8m1_t placeholder4= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder5= vmv_v_v_i8m1(placeholder4, vsetvlmax_e8m1()); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +placeholder5 = vredor_vs_i8m1_i8m1_m (mask_value_0_0, placeholder5, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +} +int8_t *placeholder6 = &value_2; +*placeholder6= vmv_x_s_i8m1_i8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredor_vs_operator_0() { +int8_t tmp = -13; +if(value_2 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredor_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredor_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredor_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedorVS8SInt8VI.c b/test/codegen-golden/RedorVS8SInt8VI.c new file mode 100644 index 0000000..80bac9e --- /dev/null +++ b/test/codegen-golden/RedorVS8SInt8VI.c @@ -0,0 +1,57 @@ +// COMMAND: random_gen -r RedorVS8SInt8VI -n 1 -l 7 --has-ta --has-ma -c RedorVS8SInt8VI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vredor_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = &value_1; +int placeholder2 = 7; + +vint8m1_t placeholder3= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder4= vmv_v_v_i8m1(placeholder3, vsetvlmax_e8m1()); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +placeholder4 = vredor_vs_i8m1_i8m1(placeholder4, vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +} +int8_t *placeholder5 = &value_1; +*placeholder5= vmv_x_s_i8m1_i8(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vredor_vs_operator_0() { +int8_t tmp = -1; +if(value_1 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vredor_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredor_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vredor_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedorVS8SInt8VIVI_TU.c b/test/codegen-golden/RedorVS8SInt8VIVI_TU.c new file mode 100644 index 0000000..73d2c46 --- /dev/null +++ b/test/codegen-golden/RedorVS8SInt8VIVI_TU.c @@ -0,0 +1,96 @@ +// COMMAND: random_gen -r RedorVS8SInt8VIVI_TU -n 1 -l 7 --has-ta --has-ma -c RedorVS8SInt8VIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredor_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +vint8m1_t placeholder4= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder5= vmv_v_v_i8m1(placeholder4, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_2, value_0, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +placeholder5 = vredor_vs_i8m1_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +int8_t *placeholder6 = value_2; +*placeholder6= vmv_x_s_i8m1_i8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredor_vs_operator_0() { +int8_t tmp[] = {-1,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredor_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredor_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredor_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedorVS8SInt8VI_TA.c b/test/codegen-golden/RedorVS8SInt8VI_TA.c new file mode 100644 index 0000000..28a907e --- /dev/null +++ b/test/codegen-golden/RedorVS8SInt8VI_TA.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r RedorVS8SInt8VI_TA -n 1 -l 7 --has-ta --has-ma -c RedorVS8SInt8VI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vredor_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int placeholder2 = 7; + +vint8m1_t placeholder3= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder4= vmv_v_v_i8m1(placeholder3, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_1, 0xff, sizeof(value_1)); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +placeholder4 = vredor_vs_i8m1_i8m1_ta(vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +placeholder1 += vl; +} +int8_t *placeholder5 = value_1; +*placeholder5= vmv_x_s_i8m1_i8(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vredor_vs_operator_0() { +int8_t tmp[] = {-1,-1,-1,-1,-1,-1,-1,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vredor_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredor_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vredor_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedsumVS8SInt8VBVIVI_TUM.c b/test/codegen-golden/RedsumVS8SInt8VBVIVI_TUM.c new file mode 100644 index 0000000..f0aab07 --- /dev/null +++ b/test/codegen-golden/RedsumVS8SInt8VBVIVI_TUM.c @@ -0,0 +1,112 @@ +// COMMAND: random_gen -r RedsumVS8SInt8VBVIVI_TUM -n 1 -l 7 --has-ta --has-ma -c RedsumVS8SInt8VBVIVI_TUM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredsum_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +vint8m1_t placeholder5= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder6= vmv_v_v_i8m1(placeholder5, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_3, value_1, sizeof(value_3)); +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +placeholder6 = vredsum_vs_i8m1_i8m1_tum(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder6, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +int8_t *placeholder7 = value_3; +*placeholder7= vmv_x_s_i8m1_i8(placeholder6); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredsum_vs_operator_0() { +int8_t tmp[] = {51,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vredsum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredsum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredsum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedsumVS8SInt8VBVI_TAM.c b/test/codegen-golden/RedsumVS8SInt8VBVI_TAM.c new file mode 100644 index 0000000..c97e89b --- /dev/null +++ b/test/codegen-golden/RedsumVS8SInt8VBVI_TAM.c @@ -0,0 +1,97 @@ +// COMMAND: random_gen -r RedsumVS8SInt8VBVI_TAM -n 1 -l 7 --has-ta --has-ma -c RedsumVS8SInt8VBVI_TAM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredsum_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +vint8m1_t placeholder4= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder5= vmv_v_v_i8m1(placeholder4, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_2, 0xff, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +placeholder5 = vredsum_vs_i8m1_i8m1_tam(mask_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +int8_t *placeholder6 = value_2; +*placeholder6= vmv_x_s_i8m1_i8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredsum_vs_operator_0() { +int8_t tmp[] = {51,-1,-1,-1,-1,-1,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredsum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredsum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredsum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedsumVS8SInt8VBVI_m.c b/test/codegen-golden/RedsumVS8SInt8VBVI_m.c new file mode 100644 index 0000000..a4b94ca --- /dev/null +++ b/test/codegen-golden/RedsumVS8SInt8VBVI_m.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r RedsumVS8SInt8VBVI_m -n 1 -l 7 --has-ta --has-ma -c RedsumVS8SInt8VBVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredsum_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = &value_2; +int placeholder3 = 7; + +vint8m1_t placeholder4= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder5= vmv_v_v_i8m1(placeholder4, vsetvlmax_e8m1()); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +placeholder5 = vredsum_vs_i8m1_i8m1_m (mask_value_0_0, placeholder5, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +} +int8_t *placeholder6 = &value_2; +*placeholder6= vmv_x_s_i8m1_i8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredsum_vs_operator_0() { +int8_t tmp = 51; +if(value_2 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredsum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredsum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredsum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedsumVS8SInt8VI.c b/test/codegen-golden/RedsumVS8SInt8VI.c new file mode 100644 index 0000000..1ed7121 --- /dev/null +++ b/test/codegen-golden/RedsumVS8SInt8VI.c @@ -0,0 +1,57 @@ +// COMMAND: random_gen -r RedsumVS8SInt8VI -n 1 -l 7 --has-ta --has-ma -c RedsumVS8SInt8VI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vredsum_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = &value_1; +int placeholder2 = 7; + +vint8m1_t placeholder3= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder4= vmv_v_v_i8m1(placeholder3, vsetvlmax_e8m1()); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +placeholder4 = vredsum_vs_i8m1_i8m1(placeholder4, vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +} +int8_t *placeholder5 = &value_1; +*placeholder5= vmv_x_s_i8m1_i8(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vredsum_vs_operator_0() { +int8_t tmp = -40; +if(value_1 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vredsum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredsum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vredsum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedsumVS8SInt8VIVI_TU.c b/test/codegen-golden/RedsumVS8SInt8VIVI_TU.c new file mode 100644 index 0000000..69c2268 --- /dev/null +++ b/test/codegen-golden/RedsumVS8SInt8VIVI_TU.c @@ -0,0 +1,96 @@ +// COMMAND: random_gen -r RedsumVS8SInt8VIVI_TU -n 1 -l 7 --has-ta --has-ma -c RedsumVS8SInt8VIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredsum_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +vint8m1_t placeholder4= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder5= vmv_v_v_i8m1(placeholder4, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_2, value_0, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +placeholder5 = vredsum_vs_i8m1_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +int8_t *placeholder6 = value_2; +*placeholder6= vmv_x_s_i8m1_i8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredsum_vs_operator_0() { +int8_t tmp[] = {-50,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredsum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredsum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredsum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedsumVS8SInt8VI_TA.c b/test/codegen-golden/RedsumVS8SInt8VI_TA.c new file mode 100644 index 0000000..31d0a99 --- /dev/null +++ b/test/codegen-golden/RedsumVS8SInt8VI_TA.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r RedsumVS8SInt8VI_TA -n 1 -l 7 --has-ta --has-ma -c RedsumVS8SInt8VI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vredsum_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int placeholder2 = 7; + +vint8m1_t placeholder3= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder4= vmv_v_v_i8m1(placeholder3, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_1, 0xff, sizeof(value_1)); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +placeholder4 = vredsum_vs_i8m1_i8m1_ta(vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +placeholder1 += vl; +} +int8_t *placeholder5 = value_1; +*placeholder5= vmv_x_s_i8m1_i8(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vredsum_vs_operator_0() { +int8_t tmp[] = {-40,-1,-1,-1,-1,-1,-1,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vredsum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredsum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vredsum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedxorVS8SInt8VBVIVI_TUM.c b/test/codegen-golden/RedxorVS8SInt8VBVIVI_TUM.c new file mode 100644 index 0000000..435cdef --- /dev/null +++ b/test/codegen-golden/RedxorVS8SInt8VBVIVI_TUM.c @@ -0,0 +1,112 @@ +// COMMAND: random_gen -r RedxorVS8SInt8VBVIVI_TUM -n 1 -l 7 --has-ta --has-ma -c RedxorVS8SInt8VBVIVI_TUM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredxor_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +vint8m1_t placeholder5= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder6= vmv_v_v_i8m1(placeholder5, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_3, value_1, sizeof(value_3)); +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +placeholder6 = vredxor_vs_i8m1_i8m1_tum(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder6, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +int8_t *placeholder7 = value_3; +*placeholder7= vmv_x_s_i8m1_i8(placeholder6); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredxor_vs_operator_0() { +int8_t tmp[] = {-45,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vredxor_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredxor_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredxor_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedxorVS8SInt8VBVI_TAM.c b/test/codegen-golden/RedxorVS8SInt8VBVI_TAM.c new file mode 100644 index 0000000..dd3e6cf --- /dev/null +++ b/test/codegen-golden/RedxorVS8SInt8VBVI_TAM.c @@ -0,0 +1,97 @@ +// COMMAND: random_gen -r RedxorVS8SInt8VBVI_TAM -n 1 -l 7 --has-ta --has-ma -c RedxorVS8SInt8VBVI_TAM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredxor_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +vint8m1_t placeholder4= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder5= vmv_v_v_i8m1(placeholder4, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_2, 0xff, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +placeholder5 = vredxor_vs_i8m1_i8m1_tam(mask_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +int8_t *placeholder6 = value_2; +*placeholder6= vmv_x_s_i8m1_i8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredxor_vs_operator_0() { +int8_t tmp[] = {-45,-1,-1,-1,-1,-1,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredxor_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredxor_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredxor_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedxorVS8SInt8VBVI_m.c b/test/codegen-golden/RedxorVS8SInt8VBVI_m.c new file mode 100644 index 0000000..1ea88ff --- /dev/null +++ b/test/codegen-golden/RedxorVS8SInt8VBVI_m.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r RedxorVS8SInt8VBVI_m -n 1 -l 7 --has-ta --has-ma -c RedxorVS8SInt8VBVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredxor_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = &value_2; +int placeholder3 = 7; + +vint8m1_t placeholder4= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder5= vmv_v_v_i8m1(placeholder4, vsetvlmax_e8m1()); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +placeholder5 = vredxor_vs_i8m1_i8m1_m (mask_value_0_0, placeholder5, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +} +int8_t *placeholder6 = &value_2; +*placeholder6= vmv_x_s_i8m1_i8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredxor_vs_operator_0() { +int8_t tmp = -45; +if(value_2 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredxor_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredxor_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredxor_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedxorVS8SInt8VI.c b/test/codegen-golden/RedxorVS8SInt8VI.c new file mode 100644 index 0000000..ba44059 --- /dev/null +++ b/test/codegen-golden/RedxorVS8SInt8VI.c @@ -0,0 +1,57 @@ +// COMMAND: random_gen -r RedxorVS8SInt8VI -n 1 -l 7 --has-ta --has-ma -c RedxorVS8SInt8VI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vredxor_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = &value_1; +int placeholder2 = 7; + +vint8m1_t placeholder3= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder4= vmv_v_v_i8m1(placeholder3, vsetvlmax_e8m1()); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +placeholder4 = vredxor_vs_i8m1_i8m1(placeholder4, vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +} +int8_t *placeholder5 = &value_1; +*placeholder5= vmv_x_s_i8m1_i8(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vredxor_vs_operator_0() { +int8_t tmp = 40; +if(value_1 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vredxor_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredxor_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vredxor_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedxorVS8SInt8VIVI_TU.c b/test/codegen-golden/RedxorVS8SInt8VIVI_TU.c new file mode 100644 index 0000000..4efe759 --- /dev/null +++ b/test/codegen-golden/RedxorVS8SInt8VIVI_TU.c @@ -0,0 +1,96 @@ +// COMMAND: random_gen -r RedxorVS8SInt8VIVI_TU -n 1 -l 7 --has-ta --has-ma -c RedxorVS8SInt8VIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vredxor_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +vint8m1_t placeholder4= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder5= vmv_v_v_i8m1(placeholder4, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_2, value_0, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +placeholder5 = vredxor_vs_i8m1_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +int8_t *placeholder6 = value_2; +*placeholder6= vmv_x_s_i8m1_i8(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vredxor_vs_operator_0() { +int8_t tmp[] = {108,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vredxor_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredxor_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vredxor_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RedxorVS8SInt8VI_TA.c b/test/codegen-golden/RedxorVS8SInt8VI_TA.c new file mode 100644 index 0000000..cc9438e --- /dev/null +++ b/test/codegen-golden/RedxorVS8SInt8VI_TA.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r RedxorVS8SInt8VI_TA -n 1 -l 7 --has-ta --has-ma -c RedxorVS8SInt8VI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vredxor_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int placeholder2 = 7; + +vint8m1_t placeholder3= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vint8m1_t placeholder4= vmv_v_v_i8m1(placeholder3, vsetvlmax_e8m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_1, 0xff, sizeof(value_1)); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +placeholder4 = vredxor_vs_i8m1_i8m1_ta(vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +placeholder1 += vl; +} +int8_t *placeholder5 = value_1; +*placeholder5= vmv_x_s_i8m1_i8(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vredxor_vs_operator_0() { +int8_t tmp[] = {40,-1,-1,-1,-1,-1,-1,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vredxor_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vredxor_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vredxor_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemVV8VInt8VBVIVIVI_TAMU.c b/test/codegen-golden/RemVV8VInt8VBVIVIVI_TAMU.c new file mode 100644 index 0000000..a9f4846 --- /dev/null +++ b/test/codegen-golden/RemVV8VInt8VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r RemVV8VInt8VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c RemVV8VInt8VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vrem_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vrem_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vrem_vv_operator_0() { +int8_t tmp[] = {29,-1,9,-1,-7,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vrem_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vrem_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vrem_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemVV8VInt8VBVIVIVI_TUMA.c b/test/codegen-golden/RemVV8VInt8VBVIVIVI_TUMA.c new file mode 100644 index 0000000..e741b02 --- /dev/null +++ b/test/codegen-golden/RemVV8VInt8VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r RemVV8VInt8VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c RemVV8VInt8VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vrem_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vrem_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vrem_vv_operator_0() { +int8_t tmp[] = {-1,84,9,19,-7,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vrem_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vrem_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vrem_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemVV8VInt8VBVIVIVI_TUMU.c b/test/codegen-golden/RemVV8VInt8VBVIVIVI_TUMU.c new file mode 100644 index 0000000..8e4ed8b --- /dev/null +++ b/test/codegen-golden/RemVV8VInt8VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r RemVV8VInt8VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c RemVV8VInt8VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vrem_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vrem_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vrem_vv_operator_0() { +int8_t tmp[] = {29,84,9,19,-7,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vrem_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vrem_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vrem_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemVV8VInt8VBVIVI_TAMA.c b/test/codegen-golden/RemVV8VInt8VBVIVI_TAMA.c new file mode 100644 index 0000000..ad81d3c --- /dev/null +++ b/test/codegen-golden/RemVV8VInt8VBVIVI_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r RemVV8VInt8VBVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c RemVV8VInt8VBVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vrem_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vrem_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vrem_vv_operator_0() { +int8_t tmp[] = {-1,-1,5,-1,7,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vrem_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vrem_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vrem_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemVV8VInt8VIVIVI_TU.c b/test/codegen-golden/RemVV8VInt8VIVIVI_TU.c new file mode 100644 index 0000000..f1e995f --- /dev/null +++ b/test/codegen-golden/RemVV8VInt8VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r RemVV8VInt8VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c RemVV8VInt8VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vrem_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vrem_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vrem_vv_operator_0() { +int8_t tmp[] = {7,79,5,-14,7,-73,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vrem_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vrem_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vrem_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemVV8VInt8VIVI_TA.c b/test/codegen-golden/RemVV8VInt8VIVI_TA.c new file mode 100644 index 0000000..48bcec9 --- /dev/null +++ b/test/codegen-golden/RemVV8VInt8VIVI_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r RemVV8VInt8VIVI_TA -n 1 -l 7 --has-ta --has-ma -c RemVV8VInt8VIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vrem_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vrem_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vrem_vv_operator_0() { +int8_t tmp[] = {-12,-1,10,-1,10,-1,-5,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vrem_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vrem_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vrem_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemVX8VInt8VBVISI_TAMA.c b/test/codegen-golden/RemVX8VInt8VBVISI_TAMA.c new file mode 100644 index 0000000..8a604d3 --- /dev/null +++ b/test/codegen-golden/RemVX8VInt8VBVISI_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r RemVX8VInt8VBVISI_TAMA -n 1 -l 7 --has-ta --has-ma -c RemVX8VInt8VBVISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vrem_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vrem_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vrem_vx_operator_0() { +int8_t tmp[] = {-1,-1,12,-1,-21,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vrem_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vrem_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vrem_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemVX8VInt8VBVIVISI_TAMU.c b/test/codegen-golden/RemVX8VInt8VBVIVISI_TAMU.c new file mode 100644 index 0000000..280baf8 --- /dev/null +++ b/test/codegen-golden/RemVX8VInt8VBVIVISI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r RemVX8VInt8VBVIVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c RemVX8VInt8VBVIVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vrem_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vrem_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vrem_vx_operator_0() { +int8_t tmp[] = {50,-1,19,-1,-8,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vrem_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vrem_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vrem_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemVX8VInt8VBVIVISI_TUMA.c b/test/codegen-golden/RemVX8VInt8VBVIVISI_TUMA.c new file mode 100644 index 0000000..fd7ab41 --- /dev/null +++ b/test/codegen-golden/RemVX8VInt8VBVIVISI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r RemVX8VInt8VBVIVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c RemVX8VInt8VBVIVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vrem_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vrem_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vrem_vx_operator_0() { +int8_t tmp[] = {-1,-15,19,16,-8,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vrem_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vrem_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vrem_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemVX8VInt8VBVIVISI_TUMU.c b/test/codegen-golden/RemVX8VInt8VBVIVISI_TUMU.c new file mode 100644 index 0000000..9083c4e --- /dev/null +++ b/test/codegen-golden/RemVX8VInt8VBVIVISI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r RemVX8VInt8VBVIVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c RemVX8VInt8VBVIVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vrem_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vrem_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vrem_vx_operator_0() { +int8_t tmp[] = {50,-15,19,16,-8,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vrem_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vrem_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vrem_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemVX8VInt8VISI_TA.c b/test/codegen-golden/RemVX8VInt8VISI_TA.c new file mode 100644 index 0000000..70d2bdb --- /dev/null +++ b/test/codegen-golden/RemVX8VInt8VISI_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r RemVX8VInt8VISI_TA -n 1 -l 7 --has-ta --has-ma -c RemVX8VInt8VISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vrem_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vrem_vx_i8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vrem_vx_operator_0() { +int8_t tmp[] = {-12,-1,11,-1,4,-1,-13,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vrem_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vrem_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vrem_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemVX8VInt8VIVISI_TU.c b/test/codegen-golden/RemVX8VInt8VIVISI_TU.c new file mode 100644 index 0000000..7e06348 --- /dev/null +++ b/test/codegen-golden/RemVX8VInt8VIVISI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r RemVX8VInt8VIVISI_TU -n 1 -l 7 --has-ta --has-ma -c RemVX8VInt8VIVISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vrem_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vrem_vx_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vrem_vx_operator_0() { +int8_t tmp[] = {6,79,12,-14,-21,-73,7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vrem_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vrem_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vrem_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemuVV8VUInt8VBVUVUVU_TAMU.c b/test/codegen-golden/RemuVV8VUInt8VBVUVUVU_TAMU.c new file mode 100644 index 0000000..f2ba0b9 --- /dev/null +++ b/test/codegen-golden/RemuVV8VUInt8VBVUVUVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r RemuVV8VUInt8VBVUVUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c RemuVV8VUInt8VBVUVUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vremu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vremu_vv_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vremu_vv_operator_0() { +uint8_t tmp[] = {65,255,28,255,31,255,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vremu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vremu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vremu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemuVV8VUInt8VBVUVUVU_TUMA.c b/test/codegen-golden/RemuVV8VUInt8VBVUVUVU_TUMA.c new file mode 100644 index 0000000..6607c30 --- /dev/null +++ b/test/codegen-golden/RemuVV8VUInt8VBVUVUVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r RemuVV8VUInt8VBVUVUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c RemuVV8VUInt8VBVUVUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vremu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vremu_vv_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vremu_vv_operator_0() { +uint8_t tmp[] = {255,92,28,59,31,13,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vremu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vremu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vremu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemuVV8VUInt8VBVUVUVU_TUMU.c b/test/codegen-golden/RemuVV8VUInt8VBVUVUVU_TUMU.c new file mode 100644 index 0000000..963cefb --- /dev/null +++ b/test/codegen-golden/RemuVV8VUInt8VBVUVUVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r RemuVV8VUInt8VBVUVUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c RemuVV8VUInt8VBVUVUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vremu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vremu_vv_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vremu_vv_operator_0() { +uint8_t tmp[] = {65,92,28,59,31,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vremu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vremu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vremu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemuVV8VUInt8VBVUVU_TAMA.c b/test/codegen-golden/RemuVV8VUInt8VBVUVU_TAMA.c new file mode 100644 index 0000000..8215f20 --- /dev/null +++ b/test/codegen-golden/RemuVV8VUInt8VBVUVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r RemuVV8VUInt8VBVUVU_TAMA -n 1 -l 7 --has-ta --has-ma -c RemuVV8VUInt8VBVUVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vremu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vremu_vv_u8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vremu_vv_operator_0() { +uint8_t tmp[] = {255,255,18,255,4,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vremu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vremu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vremu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemuVV8VUInt8VUVUVU_TU.c b/test/codegen-golden/RemuVV8VUInt8VUVUVU_TU.c new file mode 100644 index 0000000..d2c18cc --- /dev/null +++ b/test/codegen-golden/RemuVV8VUInt8VUVUVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r RemuVV8VUInt8VUVUVU_TU -n 1 -l 7 --has-ta --has-ma -c RemuVV8VUInt8VUVUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vremu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vremu_vv_u8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vremu_vv_operator_0() { +uint8_t tmp[] = {26,90,18,43,4,14,9,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vremu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vremu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vremu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemuVV8VUInt8VUVU_TA.c b/test/codegen-golden/RemuVV8VUInt8VUVU_TA.c new file mode 100644 index 0000000..c89bef5 --- /dev/null +++ b/test/codegen-golden/RemuVV8VUInt8VUVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r RemuVV8VUInt8VUVU_TA -n 1 -l 7 --has-ta --has-ma -c RemuVV8VUInt8VUVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vremu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vremu_vv_u8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vremu_vv_operator_0() { +uint8_t tmp[] = {22,255,36,255,5,255,22,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vremu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vremu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vremu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemuVX8VUInt8VBVUSU_TAMA.c b/test/codegen-golden/RemuVX8VUInt8VBVUSU_TAMA.c new file mode 100644 index 0000000..01e9b35 --- /dev/null +++ b/test/codegen-golden/RemuVX8VUInt8VBVUSU_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r RemuVX8VUInt8VBVUSU_TAMA -n 1 -l 7 --has-ta --has-ma -c RemuVX8VUInt8VBVUSU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vremu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vremu_vx_u8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vremu_vx_operator_0() { +uint8_t tmp[] = {255,255,17,255,18,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vremu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vremu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vremu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemuVX8VUInt8VBVUVUSU_TAMU.c b/test/codegen-golden/RemuVX8VUInt8VBVUVUSU_TAMU.c new file mode 100644 index 0000000..afd1c1e --- /dev/null +++ b/test/codegen-golden/RemuVX8VUInt8VBVUVUSU_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r RemuVX8VUInt8VBVUVUSU_TAMU -n 1 -l 7 --has-ta --has-ma -c RemuVX8VUInt8VBVUVUSU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vremu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vremu_vx_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vremu_vx_operator_0() { +uint8_t tmp[] = {75,255,20,255,13,255,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vremu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vremu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vremu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemuVX8VUInt8VBVUVUSU_TUMA.c b/test/codegen-golden/RemuVX8VUInt8VBVUVUSU_TUMA.c new file mode 100644 index 0000000..371502f --- /dev/null +++ b/test/codegen-golden/RemuVX8VUInt8VBVUVUSU_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r RemuVX8VUInt8VBVUVUSU_TUMA -n 1 -l 7 --has-ta --has-ma -c RemuVX8VUInt8VBVUVUSU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vremu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vremu_vx_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vremu_vx_operator_0() { +uint8_t tmp[] = {255,42,20,58,13,37,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vremu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vremu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vremu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemuVX8VUInt8VBVUVUSU_TUMU.c b/test/codegen-golden/RemuVX8VUInt8VBVUVUSU_TUMU.c new file mode 100644 index 0000000..6da7a62 --- /dev/null +++ b/test/codegen-golden/RemuVX8VUInt8VBVUVUSU_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r RemuVX8VUInt8VBVUVUSU_TUMU -n 1 -l 7 --has-ta --has-ma -c RemuVX8VUInt8VBVUVUSU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vremu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vremu_vx_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vremu_vx_operator_0() { +uint8_t tmp[] = {75,42,20,58,13,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vremu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vremu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vremu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemuVX8VUInt8VUSU_TA.c b/test/codegen-golden/RemuVX8VUInt8VUSU_TA.c new file mode 100644 index 0000000..ef6a3a2 --- /dev/null +++ b/test/codegen-golden/RemuVX8VUInt8VUSU_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r RemuVX8VUInt8VUSU_TA -n 1 -l 7 --has-ta --has-ma -c RemuVX8VUInt8VUSU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vremu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vremu_vx_u8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vremu_vx_operator_0() { +uint8_t tmp[] = {22,255,0,255,24,255,22,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vremu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vremu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vremu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RemuVX8VUInt8VUVUSU_TU.c b/test/codegen-golden/RemuVX8VUInt8VUVUSU_TU.c new file mode 100644 index 0000000..00a1fd3 --- /dev/null +++ b/test/codegen-golden/RemuVX8VUInt8VUVUSU_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r RemuVX8VUInt8VUVUSU_TU -n 1 -l 7 --has-ta --has-ma -c RemuVX8VUInt8VUVUSU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vremu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vremu_vx_u8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vremu_vx_operator_0() { +uint8_t tmp[] = {36,90,17,43,18,14,26,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vremu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vremu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vremu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RsubVX8VInt8.c b/test/codegen-golden/RsubVX8VInt8.c new file mode 100644 index 0000000..235f680 --- /dev/null +++ b/test/codegen-golden/RsubVX8VInt8.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r RsubVX8VInt8 -n 1 -l 7 --has-ta --has-ma -c RsubVX8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vrsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vrsub_vx_i8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vrsub_vx_operator_0() { +int8_t tmp[] = {34,-101,-77,-8,-48,51,35,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vrsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vrsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vrsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RsubVX8VInt8VBVISI_TAMA.c b/test/codegen-golden/RsubVX8VInt8VBVISI_TAMA.c new file mode 100644 index 0000000..5cbd097 --- /dev/null +++ b/test/codegen-golden/RsubVX8VInt8VBVISI_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r RsubVX8VInt8VBVISI_TAMA -n 1 -l 7 --has-ta --has-ma -c RsubVX8VInt8VBVISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vrsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vrsub_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vrsub_vx_operator_0() { +int8_t tmp[] = {-1,-1,-34,-1,43,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vrsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vrsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vrsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RsubVX8VInt8VBVIVISI_TAMU.c b/test/codegen-golden/RsubVX8VInt8VBVIVISI_TAMU.c new file mode 100644 index 0000000..3869986 --- /dev/null +++ b/test/codegen-golden/RsubVX8VInt8VBVIVISI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r RsubVX8VInt8VBVIVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c RsubVX8VInt8VBVIVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vrsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vrsub_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vrsub_vx_operator_0() { +int8_t tmp[] = {50,-1,-41,-1,52,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vrsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vrsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vrsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RsubVX8VInt8VBVIVISI_TUMA.c b/test/codegen-golden/RsubVX8VInt8VBVIVISI_TUMA.c new file mode 100644 index 0000000..b3de2eb --- /dev/null +++ b/test/codegen-golden/RsubVX8VInt8VBVIVISI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r RsubVX8VInt8VBVIVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c RsubVX8VInt8VBVIVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vrsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vrsub_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vrsub_vx_operator_0() { +int8_t tmp[] = {-1,-15,-41,16,52,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vrsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vrsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vrsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RsubVX8VInt8VBVIVISI_TUMU.c b/test/codegen-golden/RsubVX8VInt8VBVIVISI_TUMU.c new file mode 100644 index 0000000..59fc028 --- /dev/null +++ b/test/codegen-golden/RsubVX8VInt8VBVIVISI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r RsubVX8VInt8VBVIVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c RsubVX8VInt8VBVIVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vrsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vrsub_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vrsub_vx_operator_0() { +int8_t tmp[] = {50,-15,-41,16,52,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vrsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vrsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vrsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RsubVX8VInt8VISI_TA.c b/test/codegen-golden/RsubVX8VInt8VISI_TA.c new file mode 100644 index 0000000..274ced5 --- /dev/null +++ b/test/codegen-golden/RsubVX8VInt8VISI_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r RsubVX8VInt8VISI_TA -n 1 -l 7 --has-ta --has-ma -c RsubVX8VInt8VISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vrsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vrsub_vx_i8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vrsub_vx_operator_0() { +int8_t tmp[] = {34,-1,-77,-1,-48,-1,35,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vrsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vrsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vrsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RsubVX8VInt8VIVISI_TU.c b/test/codegen-golden/RsubVX8VInt8VIVISI_TU.c new file mode 100644 index 0000000..74995c4 --- /dev/null +++ b/test/codegen-golden/RsubVX8VInt8VIVISI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r RsubVX8VInt8VIVISI_TU -n 1 -l 7 --has-ta --has-ma -c RsubVX8VInt8VIVISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vrsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vrsub_vx_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vrsub_vx_operator_0() { +int8_t tmp[] = {-72,79,-34,-14,43,-73,-51,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vrsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vrsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vrsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/RsubVX8VInt8_m.c b/test/codegen-golden/RsubVX8VInt8_m.c new file mode 100644 index 0000000..a7163bb --- /dev/null +++ b/test/codegen-golden/RsubVX8VInt8_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r RsubVX8VInt8_m -n 1 -l 7 --has-ta --has-ma -c RsubVX8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vrsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vrsub_vx_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vrsub_vx_operator_0() { +int8_t tmp[] = {50,-42,-41,16,52,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vrsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vrsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vrsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SaddVV8VInt8VBVIVIVI_TAMU.c b/test/codegen-golden/SaddVV8VInt8VBVIVIVI_TAMU.c new file mode 100644 index 0000000..a142092 --- /dev/null +++ b/test/codegen-golden/SaddVV8VInt8VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SaddVV8VInt8VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c SaddVV8VInt8VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vsadd_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsadd_vv_operator_0() { +int8_t tmp[] = {29,-1,24,-1,-23,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SaddVV8VInt8VBVIVIVI_TUMA.c b/test/codegen-golden/SaddVV8VInt8VBVIVIVI_TUMA.c new file mode 100644 index 0000000..cc792c5 --- /dev/null +++ b/test/codegen-golden/SaddVV8VInt8VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SaddVV8VInt8VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c SaddVV8VInt8VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vsadd_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsadd_vv_operator_0() { +int8_t tmp[] = {-1,84,24,19,-23,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SaddVV8VInt8VBVIVIVI_TUMU.c b/test/codegen-golden/SaddVV8VInt8VBVIVIVI_TUMU.c new file mode 100644 index 0000000..d8aa0f7 --- /dev/null +++ b/test/codegen-golden/SaddVV8VInt8VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SaddVV8VInt8VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c SaddVV8VInt8VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vsadd_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsadd_vv_operator_0() { +int8_t tmp[] = {29,84,24,19,-23,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SaddVV8VInt8VBVIVIVI_m.c b/test/codegen-golden/SaddVV8VInt8VBVIVIVI_m.c new file mode 100644 index 0000000..d143ec6 --- /dev/null +++ b/test/codegen-golden/SaddVV8VInt8VBVIVIVI_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r SaddVV8VInt8VBVIVIVI_m -n 1 -l 7 --has-ta --has-ma -c SaddVV8VInt8VBVIVIVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vsadd_vv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsadd_vv_operator_0() { +int8_t tmp[] = {29,22,24,19,-23,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SaddVV8VInt8VBVIVI_TAMA.c b/test/codegen-golden/SaddVV8VInt8VBVIVI_TAMA.c new file mode 100644 index 0000000..59f2355 --- /dev/null +++ b/test/codegen-golden/SaddVV8VInt8VBVIVI_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r SaddVV8VInt8VBVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c SaddVV8VInt8VBVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vsadd_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsadd_vv_operator_0() { +int8_t tmp[] = {-1,-1,5,-1,39,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SaddVV8VInt8VIVI.c b/test/codegen-golden/SaddVV8VInt8VIVI.c new file mode 100644 index 0000000..a61beb6 --- /dev/null +++ b/test/codegen-golden/SaddVV8VInt8VIVI.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r SaddVV8VInt8VIVI -n 1 -l 7 --has-ta --has-ma -c SaddVV8VInt8VIVI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vsadd_vv_i8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsadd_vv_operator_0() { +int8_t tmp[] = {-78,127,40,-2,42,-128,-83,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SaddVV8VInt8VIVIVI_TU.c b/test/codegen-golden/SaddVV8VInt8VIVIVI_TU.c new file mode 100644 index 0000000..682a9bd --- /dev/null +++ b/test/codegen-golden/SaddVV8VInt8VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r SaddVV8VInt8VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c SaddVV8VInt8VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vsadd_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsadd_vv_operator_0() { +int8_t tmp[] = {7,79,5,-14,39,-73,-33,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SaddVV8VInt8VIVI_TA.c b/test/codegen-golden/SaddVV8VInt8VIVI_TA.c new file mode 100644 index 0000000..7002aa9 --- /dev/null +++ b/test/codegen-golden/SaddVV8VInt8VIVI_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r SaddVV8VInt8VIVI_TA -n 1 -l 7 --has-ta --has-ma -c SaddVV8VInt8VIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vsadd_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsadd_vv_operator_0() { +int8_t tmp[] = {-78,-1,40,-1,42,-1,-83,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SaddVX8VInt8VBVISI_TAMA.c b/test/codegen-golden/SaddVX8VInt8VBVISI_TAMA.c new file mode 100644 index 0000000..5f31041 --- /dev/null +++ b/test/codegen-golden/SaddVX8VInt8VBVISI_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r SaddVX8VInt8VBVISI_TAMA -n 1 -l 7 --has-ta --has-ma -c SaddVX8VInt8VBVISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vsadd_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsadd_vx_operator_0() { +int8_t tmp[] = {-1,-1,-10,-1,-87,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SaddVX8VInt8VBVIVISI_TAMU.c b/test/codegen-golden/SaddVX8VInt8VBVIVISI_TAMU.c new file mode 100644 index 0000000..ae9d275 --- /dev/null +++ b/test/codegen-golden/SaddVX8VInt8VBVIVISI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SaddVX8VInt8VBVIVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c SaddVX8VInt8VBVIVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vsadd_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsadd_vx_operator_0() { +int8_t tmp[] = {50,-1,-3,-1,-96,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SaddVX8VInt8VBVIVISI_TUMA.c b/test/codegen-golden/SaddVX8VInt8VBVIVISI_TUMA.c new file mode 100644 index 0000000..8ec6a70 --- /dev/null +++ b/test/codegen-golden/SaddVX8VInt8VBVIVISI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SaddVX8VInt8VBVIVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c SaddVX8VInt8VBVIVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vsadd_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsadd_vx_operator_0() { +int8_t tmp[] = {-1,-15,-3,16,-96,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SaddVX8VInt8VBVIVISI_TUMU.c b/test/codegen-golden/SaddVX8VInt8VBVIVISI_TUMU.c new file mode 100644 index 0000000..0ed80b6 --- /dev/null +++ b/test/codegen-golden/SaddVX8VInt8VBVIVISI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SaddVX8VInt8VBVIVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c SaddVX8VInt8VBVIVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vsadd_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsadd_vx_operator_0() { +int8_t tmp[] = {50,-15,-3,16,-96,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SaddVX8VInt8VBVIVISI_m.c b/test/codegen-golden/SaddVX8VInt8VBVIVISI_m.c new file mode 100644 index 0000000..ab7d611 --- /dev/null +++ b/test/codegen-golden/SaddVX8VInt8VBVIVISI_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r SaddVX8VInt8VBVIVISI_m -n 1 -l 7 --has-ta --has-ma -c SaddVX8VInt8VBVIVISI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vsadd_vx_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsadd_vx_operator_0() { +int8_t tmp[] = {50,-2,-3,16,-96,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SaddVX8VInt8VISI.c b/test/codegen-golden/SaddVX8VInt8VISI.c new file mode 100644 index 0000000..fcfe652 --- /dev/null +++ b/test/codegen-golden/SaddVX8VInt8VISI.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r SaddVX8VInt8VISI -n 1 -l 7 --has-ta --has-ma -c SaddVX8VInt8VISI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vsadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vsadd_vx_i8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsadd_vx_operator_0() { +int8_t tmp[] = {-78,57,33,-36,4,-95,-79,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SaddVX8VInt8VISI_TA.c b/test/codegen-golden/SaddVX8VInt8VISI_TA.c new file mode 100644 index 0000000..eef03b3 --- /dev/null +++ b/test/codegen-golden/SaddVX8VInt8VISI_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r SaddVX8VInt8VISI_TA -n 1 -l 7 --has-ta --has-ma -c SaddVX8VInt8VISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vsadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vsadd_vx_i8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsadd_vx_operator_0() { +int8_t tmp[] = {-78,-1,33,-1,4,-1,-79,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SaddVX8VInt8VIVISI_TU.c b/test/codegen-golden/SaddVX8VInt8VIVISI_TU.c new file mode 100644 index 0000000..d58198e --- /dev/null +++ b/test/codegen-golden/SaddVX8VInt8VIVISI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r SaddVX8VInt8VIVISI_TU -n 1 -l 7 --has-ta --has-ma -c SaddVX8VInt8VIVISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vsadd_vx_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsadd_vx_operator_0() { +int8_t tmp[] = {28,79,-10,-14,-87,-73,7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SadduVV8VUInt8VBVUVUVU_TAMU.c b/test/codegen-golden/SadduVV8VUInt8VBVUVUVU_TAMU.c new file mode 100644 index 0000000..834ec95 --- /dev/null +++ b/test/codegen-golden/SadduVV8VUInt8VBVUVUVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SadduVV8VUInt8VBVUVUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c SadduVV8VUInt8VBVUVUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsaddu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vsaddu_vv_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsaddu_vv_operator_0() { +uint8_t tmp[] = {65,255,112,255,89,255,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SadduVV8VUInt8VBVUVUVU_TUMA.c b/test/codegen-golden/SadduVV8VUInt8VBVUVUVU_TUMA.c new file mode 100644 index 0000000..fcdc269 --- /dev/null +++ b/test/codegen-golden/SadduVV8VUInt8VBVUVUVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SadduVV8VUInt8VBVUVUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c SadduVV8VUInt8VBVUVUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsaddu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vsaddu_vv_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsaddu_vv_operator_0() { +uint8_t tmp[] = {255,92,112,59,89,13,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SadduVV8VUInt8VBVUVUVU_TUMU.c b/test/codegen-golden/SadduVV8VUInt8VBVUVUVU_TUMU.c new file mode 100644 index 0000000..38ca74c --- /dev/null +++ b/test/codegen-golden/SadduVV8VUInt8VBVUVUVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SadduVV8VUInt8VBVUVUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c SadduVV8VUInt8VBVUVUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsaddu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vsaddu_vv_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsaddu_vv_operator_0() { +uint8_t tmp[] = {65,92,112,59,89,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SadduVV8VUInt8VBVUVUVU_m.c b/test/codegen-golden/SadduVV8VUInt8VBVUVUVU_m.c new file mode 100644 index 0000000..42d695d --- /dev/null +++ b/test/codegen-golden/SadduVV8VUInt8VBVUVUVU_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r SadduVV8VUInt8VBVUVUVU_m -n 1 -l 7 --has-ta --has-ma -c SadduVV8VUInt8VBVUVUVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsaddu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vsaddu_vv_u8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsaddu_vv_operator_0() { +uint8_t tmp[] = {65,111,112,59,89,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SadduVV8VUInt8VBVUVU_TAMA.c b/test/codegen-golden/SadduVV8VUInt8VBVUVU_TAMA.c new file mode 100644 index 0000000..57b9a4f --- /dev/null +++ b/test/codegen-golden/SadduVV8VUInt8VBVUVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r SadduVV8VUInt8VBVUVU_TAMA -n 1 -l 7 --has-ta --has-ma -c SadduVV8VUInt8VBVUVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsaddu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vsaddu_vv_u8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsaddu_vv_operator_0() { +uint8_t tmp[] = {255,255,102,255,120,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SadduVV8VUInt8VUVU.c b/test/codegen-golden/SadduVV8VUInt8VUVU.c new file mode 100644 index 0000000..a38fbc1 --- /dev/null +++ b/test/codegen-golden/SadduVV8VUInt8VUVU.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r SadduVV8VUInt8VUVU -n 1 -l 7 --has-ta --has-ma -c SadduVV8VUInt8VUVU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsaddu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vsaddu_vv_u8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsaddu_vv_operator_0() { +uint8_t tmp[] = {61,165,120,99,121,32,59,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SadduVV8VUInt8VUVUVU_TU.c b/test/codegen-golden/SadduVV8VUInt8VUVUVU_TU.c new file mode 100644 index 0000000..18d3acb --- /dev/null +++ b/test/codegen-golden/SadduVV8VUInt8VUVUVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r SadduVV8VUInt8VUVUVU_TU -n 1 -l 7 --has-ta --has-ma -c SadduVV8VUInt8VUVUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsaddu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vsaddu_vv_u8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsaddu_vv_operator_0() { +uint8_t tmp[] = {104,90,102,43,120,14,83,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SadduVV8VUInt8VUVU_TA.c b/test/codegen-golden/SadduVV8VUInt8VUVU_TA.c new file mode 100644 index 0000000..fd7d29c --- /dev/null +++ b/test/codegen-golden/SadduVV8VUInt8VUVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r SadduVV8VUInt8VUVU_TA -n 1 -l 7 --has-ta --has-ma -c SadduVV8VUInt8VUVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsaddu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vsaddu_vv_u8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsaddu_vv_operator_0() { +uint8_t tmp[] = {61,255,120,255,121,255,59,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SadduVX8VUInt8VBVUSU_TAMA.c b/test/codegen-golden/SadduVX8VUInt8VBVUSU_TAMA.c new file mode 100644 index 0000000..f5a3e57 --- /dev/null +++ b/test/codegen-golden/SadduVX8VUInt8VBVUSU_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r SadduVX8VUInt8VBVUSU_TAMA -n 1 -l 7 --has-ta --has-ma -c SadduVX8VUInt8VBVUSU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsaddu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vsaddu_vx_u8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsaddu_vx_operator_0() { +uint8_t tmp[] = {255,255,95,255,57,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SadduVX8VUInt8VBVUVUSU_TAMU.c b/test/codegen-golden/SadduVX8VUInt8VBVUVUSU_TAMU.c new file mode 100644 index 0000000..7b4a846 --- /dev/null +++ b/test/codegen-golden/SadduVX8VUInt8VBVUVUSU_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SadduVX8VUInt8VBVUVUSU_TAMU -n 1 -l 7 --has-ta --has-ma -c SadduVX8VUInt8VBVUVUSU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsaddu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vsaddu_vx_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsaddu_vx_operator_0() { +uint8_t tmp[] = {75,255,98,255,52,255,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SadduVX8VUInt8VBVUVUSU_TUMA.c b/test/codegen-golden/SadduVX8VUInt8VBVUVUSU_TUMA.c new file mode 100644 index 0000000..963d273 --- /dev/null +++ b/test/codegen-golden/SadduVX8VUInt8VBVUVUSU_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SadduVX8VUInt8VBVUVUSU_TUMA -n 1 -l 7 --has-ta --has-ma -c SadduVX8VUInt8VBVUVUSU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsaddu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vsaddu_vx_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsaddu_vx_operator_0() { +uint8_t tmp[] = {255,42,98,58,52,37,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SadduVX8VUInt8VBVUVUSU_TUMU.c b/test/codegen-golden/SadduVX8VUInt8VBVUVUSU_TUMU.c new file mode 100644 index 0000000..98fe478 --- /dev/null +++ b/test/codegen-golden/SadduVX8VUInt8VBVUVUSU_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SadduVX8VUInt8VBVUVUSU_TUMU -n 1 -l 7 --has-ta --has-ma -c SadduVX8VUInt8VBVUVUSU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsaddu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vsaddu_vx_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsaddu_vx_operator_0() { +uint8_t tmp[] = {75,42,98,58,52,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SadduVX8VUInt8VBVUVUSU_m.c b/test/codegen-golden/SadduVX8VUInt8VBVUVUSU_m.c new file mode 100644 index 0000000..934592c --- /dev/null +++ b/test/codegen-golden/SadduVX8VUInt8VBVUVUSU_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r SadduVX8VUInt8VBVUVUSU_m -n 1 -l 7 --has-ta --has-ma -c SadduVX8VUInt8VBVUVUSU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsaddu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vsaddu_vx_u8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsaddu_vx_operator_0() { +uint8_t tmp[] = {75,99,98,58,52,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SadduVX8VUInt8VUSU.c b/test/codegen-golden/SadduVX8VUInt8VUSU.c new file mode 100644 index 0000000..7df623c --- /dev/null +++ b/test/codegen-golden/SadduVX8VUInt8VUSU.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r SadduVX8VUInt8VUSU -n 1 -l 7 --has-ta --has-ma -c SadduVX8VUInt8VUSU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vsaddu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vsaddu_vx_u8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsaddu_vx_operator_0() { +uint8_t tmp[] = {61,129,117,82,102,53,61,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SadduVX8VUInt8VUSU_TA.c b/test/codegen-golden/SadduVX8VUInt8VUSU_TA.c new file mode 100644 index 0000000..c42821d --- /dev/null +++ b/test/codegen-golden/SadduVX8VUInt8VUSU_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r SadduVX8VUInt8VUSU_TA -n 1 -l 7 --has-ta --has-ma -c SadduVX8VUInt8VUSU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vsaddu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vsaddu_vx_u8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsaddu_vx_operator_0() { +uint8_t tmp[] = {61,255,117,255,102,255,61,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SadduVX8VUInt8VUVUSU_TU.c b/test/codegen-golden/SadduVX8VUInt8VUVUSU_TU.c new file mode 100644 index 0000000..acacb5b --- /dev/null +++ b/test/codegen-golden/SadduVX8VUInt8VUVUSU_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r SadduVX8VUInt8VUVUSU_TU -n 1 -l 7 --has-ta --has-ma -c SadduVX8VUInt8VUVUSU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsaddu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vsaddu_vx_u8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsaddu_vx_operator_0() { +uint8_t tmp[] = {114,90,95,43,57,14,104,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SbcVVM8VInt8VIVIVB.c b/test/codegen-golden/SbcVVM8VInt8VIVIVB.c new file mode 100644 index 0000000..9ac1a2c --- /dev/null +++ b/test/codegen-golden/SbcVVM8VInt8VIVIVB.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r SbcVVM8VInt8VIVIVB -n 1 -l 7 --has-ta --has-ma -c SbcVVM8VInt8VIVIVB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsbc_vvm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_0= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); + +vint8m1_t vec_value_3_0= vsbc_vvm_i8m1(vec_value_0_0, vec_value_1_0, mask_value_2_0, vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsbc_vvm_operator_0() { +int8_t tmp[] = {-85,-6,35,-34,2,1,-50,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsbc_vvm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsbc_vvm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsbc_vvm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SbcVVM8VInt8VIVIVB_TA.c b/test/codegen-golden/SbcVVM8VInt8VIVIVB_TA.c new file mode 100644 index 0000000..dece65a --- /dev/null +++ b/test/codegen-golden/SbcVVM8VInt8VIVIVB_TA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r SbcVVM8VInt8VIVIVB_TA -n 1 -l 7 --has-ta --has-ma -c SbcVVM8VInt8VIVIVB_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsbc_vvm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_0= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); + +vint8m1_t vec_value_3_0= vsbc_vvm_i8m1_ta(vec_value_0_0, vec_value_1_0, mask_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsbc_vvm_operator_0() { +int8_t tmp[] = {-85,-1,35,-1,2,-1,-50,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsbc_vvm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsbc_vvm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsbc_vvm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SbcVVM8VInt8VIVIVIVB_TU.c b/test/codegen-golden/SbcVVM8VInt8VIVIVIVB_TU.c new file mode 100644 index 0000000..0707da4 --- /dev/null +++ b/test/codegen-golden/SbcVVM8VInt8VIVIVIVB_TU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SbcVVM8VInt8VIVIVIVB_TU -n 1 -l 7 --has-ta --has-ma -c SbcVVM8VInt8VIVIVIVB_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsbc_vvm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3= vle8_v_i8m1(placeholder3, vl); +vbool8_t mask_value_3_0= vmseq_vx_i8m1_b8(vec_value_3, 1, vl); + +vint8m1_t vec_value_4_0= vsbc_vvm_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, mask_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsbc_vvm_operator_0() { +int8_t tmp[] = {-41,79,-19,-14,61,-73,33,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsbc_vvm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsbc_vvm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsbc_vvm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SbcVXM8VInt8VISIVB.c b/test/codegen-golden/SbcVXM8VInt8VISIVB.c new file mode 100644 index 0000000..2ee0755 --- /dev/null +++ b/test/codegen-golden/SbcVXM8VInt8VISIVB.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r SbcVXM8VInt8VISIVB -n 1 -l 7 --has-ta --has-ma -c SbcVXM8VInt8VISIVB.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vsbc_vxm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_0= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); + +vint8m1_t vec_value_3_0= vsbc_vxm_i8m1(vec_value_0_0, placeholder1, mask_value_2_0, vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsbc_vxm_operator_0() { +int8_t tmp[] = {-85,49,26,-44,-4,-102,-86,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsbc_vxm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsbc_vxm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsbc_vxm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SbcVXM8VInt8VISIVB_TA.c b/test/codegen-golden/SbcVXM8VInt8VISIVB_TA.c new file mode 100644 index 0000000..12dd874 --- /dev/null +++ b/test/codegen-golden/SbcVXM8VInt8VISIVB_TA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r SbcVXM8VInt8VISIVB_TA -n 1 -l 7 --has-ta --has-ma -c SbcVXM8VInt8VISIVB_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vsbc_vxm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_2= vle8_v_i8m1(placeholder2, vl); +vbool8_t mask_value_2_0= vmseq_vx_i8m1_b8(vec_value_2, 1, vl); + +vint8m1_t vec_value_3_0= vsbc_vxm_i8m1_ta(vec_value_0_0, placeholder1, mask_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsbc_vxm_operator_0() { +int8_t tmp[] = {-85,-1,26,-1,-4,-1,-86,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsbc_vxm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsbc_vxm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsbc_vxm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SbcVXM8VInt8VIVISIVB_TU.c b/test/codegen-golden/SbcVXM8VInt8VIVISIVB_TU.c new file mode 100644 index 0000000..95ee3b6 --- /dev/null +++ b/test/codegen-golden/SbcVXM8VInt8VIVISIVB_TU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SbcVXM8VInt8VIVISIVB_TU -n 1 -l 7 --has-ta --has-ma -c SbcVXM8VInt8VIVISIVB_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {0,1,0,1,1,0,0,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vsbc_vxm_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3= vle8_v_i8m1(placeholder3, vl); +vbool8_t mask_value_3_0= vmseq_vx_i8m1_b8(vec_value_3, 1, vl); + +vint8m1_t vec_value_4_0= vsbc_vxm_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, mask_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsbc_vxm_operator_0() { +int8_t tmp[] = {-41,79,-50,-14,-48,-73,-77,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsbc_vxm_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsbc_vxm_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsbc_vxm_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Sext_vf2V16VInt16VBVIVI_TAMU.c b/test/codegen-golden/Sext_vf2V16VInt16VBVIVI_TAMU.c new file mode 100644 index 0000000..80e02fa --- /dev/null +++ b/test/codegen-golden/Sext_vf2V16VInt16VBVIVI_TAMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Sext_vf2V16VInt16VBVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c Sext_vf2V16VInt16VBVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsext_vf2_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); +vint8mf2_t vec_value_2_0= vle8_v_i8mf2(placeholder2, vl); + +vint16m1_t vec_value_3_0= vsext_vf2_i16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsext_vf2_operator_0() { +int16_t tmp[] = {2884,-1,-15,-1,16,-1,-734,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsext_vf2_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsext_vf2_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsext_vf2_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Sext_vf2V16VInt16VBVIVI_TUMA.c b/test/codegen-golden/Sext_vf2V16VInt16VBVIVI_TUMA.c new file mode 100644 index 0000000..c9e32b1 --- /dev/null +++ b/test/codegen-golden/Sext_vf2V16VInt16VBVIVI_TUMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Sext_vf2V16VInt16VBVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c Sext_vf2V16VInt16VBVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsext_vf2_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); +vint8mf2_t vec_value_2_0= vle8_v_i8mf2(placeholder2, vl); + +vint16m1_t vec_value_3_0= vsext_vf2_i16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsext_vf2_operator_0() { +int16_t tmp[] = {-1,8399,-15,1879,16,-7354,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsext_vf2_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsext_vf2_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsext_vf2_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Sext_vf2V16VInt16VBVIVI_TUMU.c b/test/codegen-golden/Sext_vf2V16VInt16VBVIVI_TUMU.c new file mode 100644 index 0000000..7848432 --- /dev/null +++ b/test/codegen-golden/Sext_vf2V16VInt16VBVIVI_TUMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Sext_vf2V16VInt16VBVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c Sext_vf2V16VInt16VBVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsext_vf2_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); +vint8mf2_t vec_value_2_0= vle8_v_i8mf2(placeholder2, vl); + +vint16m1_t vec_value_3_0= vsext_vf2_i16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsext_vf2_operator_0() { +int16_t tmp[] = {2884,8399,-15,1879,16,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsext_vf2_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsext_vf2_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsext_vf2_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Sext_vf2V16VInt16VBVI_TAMA.c b/test/codegen-golden/Sext_vf2V16VInt16VBVI_TAMA.c new file mode 100644 index 0000000..13d4bd8 --- /dev/null +++ b/test/codegen-golden/Sext_vf2V16VInt16VBVI_TAMA.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r Sext_vf2V16VInt16VBVI_TAMA -n 1 -l 7 --has-ta --has-ma -c Sext_vf2V16VInt16VBVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsext_vf2_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint8mf2_t vec_value_1_0= vle8_v_i8mf2(placeholder1, vl); + +vint16m1_t vec_value_2_0= vsext_vf2_i16m1_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_i16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsext_vf2_operator_0() { +int16_t tmp[] = {-1,-1,-15,-1,16,-1,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsext_vf2_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsext_vf2_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsext_vf2_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Sext_vf2V16VInt16VIVI_TU.c b/test/codegen-golden/Sext_vf2V16VInt16VIVI_TU.c new file mode 100644 index 0000000..8165dff --- /dev/null +++ b/test/codegen-golden/Sext_vf2V16VInt16VIVI_TU.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r Sext_vf2V16VInt16VIVI_TU -n 1 -l 7 --has-ta --has-ma -c Sext_vf2V16VInt16VIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsext_vf2_operator_0() { +int16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m1_t vec_value_0_0= vle16_v_i16m1(placeholder0, vl); +vint8mf2_t vec_value_1_0= vle8_v_i8mf2(placeholder1, vl); + +vint16m1_t vec_value_2_0= vsext_vf2_i16m1_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_i16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsext_vf2_operator_0() { +int16_t tmp[] = {-22,7893,-15,-1417,16,-7226,-26,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsext_vf2_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsext_vf2_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsext_vf2_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Sext_vf2V16VInt16VI_TA.c b/test/codegen-golden/Sext_vf2V16VInt16VI_TA.c new file mode 100644 index 0000000..7bae441 --- /dev/null +++ b/test/codegen-golden/Sext_vf2V16VInt16VI_TA.c @@ -0,0 +1,61 @@ +// COMMAND: random_gen -r Sext_vf2V16VInt16VI_TA -n 1 -l 7 --has-ta --has-ma -c Sext_vf2V16VInt16VI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vsext_vf2_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0_0= vle8_v_i8mf2(placeholder0, vl); + +vint16m1_t vec_value_1_0= vsext_vf2_i16m1_ta(vec_value_0_0, tail_vl); + +vse16_v_i16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vsext_vf2_operator_0() { +int16_t tmp[] = {-56,-1,55,-1,26,-1,-57,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vsext_vf2_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsext_vf2_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vsext_vf2_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Sext_vf4V32VInt32VBVIVI_TAMU.c b/test/codegen-golden/Sext_vf4V32VInt32VBVIVI_TAMU.c new file mode 100644 index 0000000..169350d --- /dev/null +++ b/test/codegen-golden/Sext_vf4V32VInt32VBVIVI_TAMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Sext_vf4V32VInt32VBVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c Sext_vf4V32VInt32VBVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +int8_t value_2[7]; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsext_vf4_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +vint8mf4_t vec_value_2_0= vle8_v_i8mf4(placeholder2, vl); + +vint32m1_t vec_value_3_0= vsext_vf4_i32m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_i32m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsext_vf4_operator_0() { +int32_t tmp[] = {2884331,-1,-15,-1,16,-1,-734314,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsext_vf4_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsext_vf4_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsext_vf4_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Sext_vf4V32VInt32VBVIVI_TUMA.c b/test/codegen-golden/Sext_vf4V32VInt32VBVIVI_TUMA.c new file mode 100644 index 0000000..4d3e0ca --- /dev/null +++ b/test/codegen-golden/Sext_vf4V32VInt32VBVIVI_TUMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Sext_vf4V32VInt32VBVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c Sext_vf4V32VInt32VBVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +int8_t value_2[7]; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsext_vf4_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +vint8mf4_t vec_value_2_0= vle8_v_i8mf4(placeholder2, vl); + +vint32m1_t vec_value_3_0= vsext_vf4_i32m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_i32m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsext_vf4_operator_0() { +int32_t tmp[] = {-1,8398813,-15,1879014,16,-7353883,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsext_vf4_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsext_vf4_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsext_vf4_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Sext_vf4V32VInt32VBVIVI_TUMU.c b/test/codegen-golden/Sext_vf4V32VInt32VBVIVI_TUMU.c new file mode 100644 index 0000000..95aa69a --- /dev/null +++ b/test/codegen-golden/Sext_vf4V32VInt32VBVIVI_TUMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Sext_vf4V32VInt32VBVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c Sext_vf4V32VInt32VBVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +int8_t value_2[7]; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsext_vf4_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +vint8mf4_t vec_value_2_0= vle8_v_i8mf4(placeholder2, vl); + +vint32m1_t vec_value_3_0= vsext_vf4_i32m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_i32m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsext_vf4_operator_0() { +int32_t tmp[] = {2884331,8398813,-15,1879014,16,-7353883,-734314,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsext_vf4_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsext_vf4_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsext_vf4_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Sext_vf4V32VInt32VBVI_TAMA.c b/test/codegen-golden/Sext_vf4V32VInt32VBVI_TAMA.c new file mode 100644 index 0000000..1e74d2e --- /dev/null +++ b/test/codegen-golden/Sext_vf4V32VInt32VBVI_TAMA.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r Sext_vf4V32VInt32VBVI_TAMA -n 1 -l 7 --has-ta --has-ma -c Sext_vf4V32VInt32VBVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int32_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsext_vf4_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint8mf4_t vec_value_1_0= vle8_v_i8mf4(placeholder1, vl); + +vint32m1_t vec_value_2_0= vsext_vf4_i32m1_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse32_v_i32m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsext_vf4_operator_0() { +int32_t tmp[] = {-1,-1,-15,-1,16,-1,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsext_vf4_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsext_vf4_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsext_vf4_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Sext_vf4V32VInt32VIVI_TU.c b/test/codegen-golden/Sext_vf4V32VInt32VIVI_TU.c new file mode 100644 index 0000000..8203a7e --- /dev/null +++ b/test/codegen-golden/Sext_vf4V32VInt32VIVI_TU.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r Sext_vf4V32VInt32VIVI_TU -n 1 -l 7 --has-ta --has-ma -c Sext_vf4V32VInt32VIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int32_t value_0[7]; +int8_t value_1[7]; +int32_t value_2[7]; +void vinit_rif_operator_1() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsext_vf4_operator_0() { +int32_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint32m1_t vec_value_0_0= vle32_v_i32m1(placeholder0, vl); +vint8mf4_t vec_value_1_0= vle8_v_i8mf4(placeholder1, vl); + +vint32m1_t vec_value_2_0= vsext_vf4_i32m1_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse32_v_i32m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsext_vf4_operator_0() { +int32_t tmp[] = {-22,7892207,-15,-1416993,16,-7225462,-26,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsext_vf4_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsext_vf4_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsext_vf4_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Sext_vf4V32VInt32VI_TA.c b/test/codegen-golden/Sext_vf4V32VInt32VI_TA.c new file mode 100644 index 0000000..88b5df7 --- /dev/null +++ b/test/codegen-golden/Sext_vf4V32VInt32VI_TA.c @@ -0,0 +1,61 @@ +// COMMAND: random_gen -r Sext_vf4V32VInt32VI_TA -n 1 -l 7 --has-ta --has-ma -c Sext_vf4V32VInt32VI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vsext_vf4_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0_0= vle8_v_i8mf4(placeholder0, vl); + +vint32m1_t vec_value_1_0= vsext_vf4_i32m1_ta(vec_value_0_0, tail_vl); + +vse32_v_i32m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vsext_vf4_operator_0() { +int32_t tmp[] = {-56,-1,55,-1,26,-1,-57,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vsext_vf4_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsext_vf4_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vsext_vf4_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Sext_vf8V64VInt64VBVIVI_TAMU.c b/test/codegen-golden/Sext_vf8V64VInt64VBVIVI_TAMU.c new file mode 100644 index 0000000..56d729b --- /dev/null +++ b/test/codegen-golden/Sext_vf8V64VInt64VBVIVI_TAMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Sext_vf8V64VInt64VBVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c Sext_vf8V64VInt64VBVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int64_t value_1[7]; +int8_t value_2[7]; +int64_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int64_t tmp[] = {2884331ll,8398813ll,1958398ll,1879014ll,2303187ll,-7353883ll,-734314ll,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsext_vf8_operator_0() { +int8_t *placeholder0 = value_0; +int64_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int64_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf8_t vec_value_0= vle8_v_i8mf8(placeholder0, vl); +vbool64_t mask_value_0_0= vmseq_vx_i8mf8_b64(vec_value_0, 1, vl); +vint64m1_t vec_value_1_0= vle64_v_i64m1(placeholder1, vl); +vint8mf8_t vec_value_2_0= vle8_v_i8mf8(placeholder2, vl); + +vint64m1_t vec_value_3_0= vsext_vf8_i64m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse64_v_i64m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsext_vf8_operator_0() { +int64_t tmp[] = {2884331ll,-1ll,-15ll,-1ll,16ll,-1ll,-734314ll,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsext_vf8_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsext_vf8_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsext_vf8_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Sext_vf8V64VInt64VBVIVI_TUMA.c b/test/codegen-golden/Sext_vf8V64VInt64VBVIVI_TUMA.c new file mode 100644 index 0000000..8ecbf55 --- /dev/null +++ b/test/codegen-golden/Sext_vf8V64VInt64VBVIVI_TUMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Sext_vf8V64VInt64VBVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c Sext_vf8V64VInt64VBVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int64_t value_1[7]; +int8_t value_2[7]; +int64_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int64_t tmp[] = {2884331ll,8398813ll,1958398ll,1879014ll,2303187ll,-7353883ll,-734314ll,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsext_vf8_operator_0() { +int8_t *placeholder0 = value_0; +int64_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int64_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf8_t vec_value_0= vle8_v_i8mf8(placeholder0, vl); +vbool64_t mask_value_0_0= vmseq_vx_i8mf8_b64(vec_value_0, 1, vl); +vint64m1_t vec_value_1_0= vle64_v_i64m1(placeholder1, vl); +vint8mf8_t vec_value_2_0= vle8_v_i8mf8(placeholder2, vl); + +vint64m1_t vec_value_3_0= vsext_vf8_i64m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse64_v_i64m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsext_vf8_operator_0() { +int64_t tmp[] = {-1ll,8398813ll,-15ll,1879014ll,16ll,-7353883ll,-1ll,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsext_vf8_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsext_vf8_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsext_vf8_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Sext_vf8V64VInt64VBVIVI_TUMU.c b/test/codegen-golden/Sext_vf8V64VInt64VBVIVI_TUMU.c new file mode 100644 index 0000000..1864090 --- /dev/null +++ b/test/codegen-golden/Sext_vf8V64VInt64VBVIVI_TUMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Sext_vf8V64VInt64VBVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c Sext_vf8V64VInt64VBVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int64_t value_1[7]; +int8_t value_2[7]; +int64_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int64_t tmp[] = {2884331ll,8398813ll,1958398ll,1879014ll,2303187ll,-7353883ll,-734314ll,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsext_vf8_operator_0() { +int8_t *placeholder0 = value_0; +int64_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int64_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf8_t vec_value_0= vle8_v_i8mf8(placeholder0, vl); +vbool64_t mask_value_0_0= vmseq_vx_i8mf8_b64(vec_value_0, 1, vl); +vint64m1_t vec_value_1_0= vle64_v_i64m1(placeholder1, vl); +vint8mf8_t vec_value_2_0= vle8_v_i8mf8(placeholder2, vl); + +vint64m1_t vec_value_3_0= vsext_vf8_i64m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse64_v_i64m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsext_vf8_operator_0() { +int64_t tmp[] = {2884331ll,8398813ll,-15ll,1879014ll,16ll,-7353883ll,-734314ll,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsext_vf8_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsext_vf8_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsext_vf8_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Sext_vf8V64VInt64VBVI_TAMA.c b/test/codegen-golden/Sext_vf8V64VInt64VBVI_TAMA.c new file mode 100644 index 0000000..ddb1891 --- /dev/null +++ b/test/codegen-golden/Sext_vf8V64VInt64VBVI_TAMA.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r Sext_vf8V64VInt64VBVI_TAMA -n 1 -l 7 --has-ta --has-ma -c Sext_vf8V64VInt64VBVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int64_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsext_vf8_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int64_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf8_t vec_value_0= vle8_v_i8mf8(placeholder0, vl); +vbool64_t mask_value_0_0= vmseq_vx_i8mf8_b64(vec_value_0, 1, vl); +vint8mf8_t vec_value_1_0= vle8_v_i8mf8(placeholder1, vl); + +vint64m1_t vec_value_2_0= vsext_vf8_i64m1_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse64_v_i64m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsext_vf8_operator_0() { +int64_t tmp[] = {-1ll,-1ll,-15ll,-1ll,16ll,-1ll,-1ll,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsext_vf8_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsext_vf8_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsext_vf8_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Sext_vf8V64VInt64VIVI_TU.c b/test/codegen-golden/Sext_vf8V64VInt64VIVI_TU.c new file mode 100644 index 0000000..c535073 --- /dev/null +++ b/test/codegen-golden/Sext_vf8V64VInt64VIVI_TU.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r Sext_vf8V64VInt64VIVI_TU -n 1 -l 7 --has-ta --has-ma -c Sext_vf8V64VInt64VIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int64_t value_0[7]; +int8_t value_1[7]; +int64_t value_2[7]; +void vinit_rif_operator_1() { +int64_t tmp[] = {-5545814ll,7892207ll,5457874ll,-1416993ll,2596108ll,-7225462ll,-5629682ll,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsext_vf8_operator_0() { +int64_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int64_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint64m1_t vec_value_0_0= vle64_v_i64m1(placeholder0, vl); +vint8mf8_t vec_value_1_0= vle8_v_i8mf8(placeholder1, vl); + +vint64m1_t vec_value_2_0= vsext_vf8_i64m1_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse64_v_i64m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsext_vf8_operator_0() { +int64_t tmp[] = {-22ll,7892207ll,-15ll,-1416993ll,16ll,-7225462ll,-26ll,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsext_vf8_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsext_vf8_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsext_vf8_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Sext_vf8V64VInt64VI_TA.c b/test/codegen-golden/Sext_vf8V64VInt64VI_TA.c new file mode 100644 index 0000000..481f118 --- /dev/null +++ b/test/codegen-golden/Sext_vf8V64VInt64VI_TA.c @@ -0,0 +1,61 @@ +// COMMAND: random_gen -r Sext_vf8V64VInt64VI_TA -n 1 -l 7 --has-ta --has-ma -c Sext_vf8V64VInt64VI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int64_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vsext_vf8_operator_0() { +int8_t *placeholder0 = value_0; +int64_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf8_t vec_value_0_0= vle8_v_i8mf8(placeholder0, vl); + +vint64m1_t vec_value_1_0= vsext_vf8_i64m1_ta(vec_value_0_0, tail_vl); + +vse64_v_i64m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vsext_vf8_operator_0() { +int64_t tmp[] = {-56ll,-1ll,55ll,-1ll,26ll,-1ll,-57ll,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vsext_vf8_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsext_vf8_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vsext_vf8_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SllVV8VInt8.c b/test/codegen-golden/SllVV8VInt8.c new file mode 100644 index 0000000..9f81361 --- /dev/null +++ b/test/codegen-golden/SllVV8VInt8.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r SllVV8VInt8 -n 1 -l 7 --has-ta --has-ma -c SllVV8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsll_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vsll_vv_i8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsll_vv_operator_0() { +int8_t tmp[] = {0,120,-36,-14,104,-36,-32,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsll_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsll_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsll_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SllVV8VInt8VBVIVIVU_TAMU.c b/test/codegen-golden/SllVV8VInt8VBVIVIVU_TAMU.c new file mode 100644 index 0000000..7e0d33e --- /dev/null +++ b/test/codegen-golden/SllVV8VInt8VBVIVIVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SllVV8VInt8VBVIVIVU_TAMU -n 1 -l 7 --has-ta --has-ma -c SllVV8VInt8VBVIVIVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsll_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vsll_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsll_vv_operator_0() { +int8_t tmp[] = {29,-1,-100,-1,100,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsll_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsll_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsll_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SllVV8VInt8VBVIVIVU_TUMA.c b/test/codegen-golden/SllVV8VInt8VBVIVIVU_TUMA.c new file mode 100644 index 0000000..65500c1 --- /dev/null +++ b/test/codegen-golden/SllVV8VInt8VBVIVIVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SllVV8VInt8VBVIVIVU_TUMA -n 1 -l 7 --has-ta --has-ma -c SllVV8VInt8VBVIVIVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsll_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vsll_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsll_vv_operator_0() { +int8_t tmp[] = {-1,84,-100,19,100,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsll_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsll_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsll_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SllVV8VInt8VBVIVIVU_TUMU.c b/test/codegen-golden/SllVV8VInt8VBVIVIVU_TUMU.c new file mode 100644 index 0000000..2cfc7b8 --- /dev/null +++ b/test/codegen-golden/SllVV8VInt8VBVIVIVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SllVV8VInt8VBVIVIVU_TUMU -n 1 -l 7 --has-ta --has-ma -c SllVV8VInt8VBVIVIVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsll_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vsll_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsll_vv_operator_0() { +int8_t tmp[] = {29,84,-100,19,100,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsll_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsll_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsll_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SllVV8VInt8VBVIVU_TAMA.c b/test/codegen-golden/SllVV8VInt8VBVIVU_TAMA.c new file mode 100644 index 0000000..42f70e3 --- /dev/null +++ b/test/codegen-golden/SllVV8VInt8VBVIVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r SllVV8VInt8VBVIVU_TAMA -n 1 -l 7 --has-ta --has-ma -c SllVV8VInt8VBVIVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsll_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vsll_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsll_vv_operator_0() { +int8_t tmp[] = {-1,-1,80,-1,92,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsll_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsll_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsll_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SllVV8VInt8VIVIVU_TU.c b/test/codegen-golden/SllVV8VInt8VIVIVU_TU.c new file mode 100644 index 0000000..613749c --- /dev/null +++ b/test/codegen-golden/SllVV8VInt8VIVIVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r SllVV8VInt8VIVIVU_TU -n 1 -l 7 --has-ta --has-ma -c SllVV8VInt8VIVIVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsll_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vsll_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsll_vv_operator_0() { +int8_t tmp[] = {-128,79,80,-14,92,-73,32,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsll_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsll_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsll_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SllVV8VInt8VIVU_TA.c b/test/codegen-golden/SllVV8VInt8VIVU_TA.c new file mode 100644 index 0000000..88e3119 --- /dev/null +++ b/test/codegen-golden/SllVV8VInt8VIVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r SllVV8VInt8VIVU_TA -n 1 -l 7 --has-ta --has-ma -c SllVV8VInt8VIVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsll_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vsll_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsll_vv_operator_0() { +int8_t tmp[] = {0,-1,-36,-1,104,-1,-32,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsll_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsll_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsll_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SllVV8VInt8_m.c b/test/codegen-golden/SllVV8VInt8_m.c new file mode 100644 index 0000000..531bbf8 --- /dev/null +++ b/test/codegen-golden/SllVV8VInt8_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r SllVV8VInt8_m -n 1 -l 7 --has-ta --has-ma -c SllVV8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsll_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vsll_vv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsll_vv_operator_0() { +int8_t tmp[] = {29,32,-100,19,100,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsll_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsll_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsll_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SllVX8VInt8.c b/test/codegen-golden/SllVX8VInt8.c new file mode 100644 index 0000000..7349697 --- /dev/null +++ b/test/codegen-golden/SllVX8VInt8.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r SllVX8VInt8 -n 1 -l 7 --has-ta --has-ma -c SllVX8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp = 3902764u; +value_1 = tmp; +} +void vsll_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vsll_vx_i8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsll_vx_operator_0() { +int8_t tmp[] = {-128,-16,112,32,-96,112,112,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsll_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsll_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsll_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SllVX8VInt8VBVISL_TAMA.c b/test/codegen-golden/SllVX8VInt8VBVISL_TAMA.c new file mode 100644 index 0000000..d4fc485 --- /dev/null +++ b/test/codegen-golden/SllVX8VInt8VBVISL_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r SllVX8VInt8VBVISL_TAMA -n 1 -l 7 --has-ta --has-ma -c SllVX8VInt8VBVISL_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +size_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +size_t tmp = 3902764ull; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsll_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +size_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vsll_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsll_vx_operator_0() { +int8_t tmp[] = {-1,-1,-64,-1,-16,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsll_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsll_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsll_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SllVX8VInt8VBVIVISL_TAMU.c b/test/codegen-golden/SllVX8VInt8VBVIVISL_TAMU.c new file mode 100644 index 0000000..4b549c0 --- /dev/null +++ b/test/codegen-golden/SllVX8VInt8VBVIVISL_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SllVX8VInt8VBVIVISL_TAMU -n 1 -l 7 --has-ta --has-ma -c SllVX8VInt8VBVIVISL_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +size_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsll_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vsll_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsll_vx_operator_0() { +int8_t tmp[] = {50,-1,48,-1,96,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsll_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsll_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsll_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SllVX8VInt8VBVIVISL_TUMA.c b/test/codegen-golden/SllVX8VInt8VBVIVISL_TUMA.c new file mode 100644 index 0000000..29157e9 --- /dev/null +++ b/test/codegen-golden/SllVX8VInt8VBVIVISL_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SllVX8VInt8VBVIVISL_TUMA -n 1 -l 7 --has-ta --has-ma -c SllVX8VInt8VBVIVISL_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +size_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsll_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vsll_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsll_vx_operator_0() { +int8_t tmp[] = {-1,-15,48,16,96,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsll_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsll_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsll_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SllVX8VInt8VBVIVISL_TUMU.c b/test/codegen-golden/SllVX8VInt8VBVIVISL_TUMU.c new file mode 100644 index 0000000..fc2c02f --- /dev/null +++ b/test/codegen-golden/SllVX8VInt8VBVIVISL_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SllVX8VInt8VBVIVISL_TUMU -n 1 -l 7 --has-ta --has-ma -c SllVX8VInt8VBVIVISL_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +size_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsll_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vsll_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsll_vx_operator_0() { +int8_t tmp[] = {50,-15,48,16,96,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsll_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsll_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsll_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SllVX8VInt8VISL_TA.c b/test/codegen-golden/SllVX8VInt8VISL_TA.c new file mode 100644 index 0000000..17b1e1a --- /dev/null +++ b/test/codegen-golden/SllVX8VInt8VISL_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r SllVX8VInt8VISL_TA -n 1 -l 7 --has-ta --has-ma -c SllVX8VInt8VISL_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +size_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +size_t tmp = 3902764ull; +value_1 = tmp; +} +void vsll_vx_operator_0() { +int8_t *placeholder0 = value_0; +size_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vsll_vx_i8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsll_vx_operator_0() { +int8_t tmp[] = {-128,-1,112,-1,-96,-1,112,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsll_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsll_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsll_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SllVX8VInt8VIVISL_TU.c b/test/codegen-golden/SllVX8VInt8VIVISL_TU.c new file mode 100644 index 0000000..aae4d60 --- /dev/null +++ b/test/codegen-golden/SllVX8VInt8VIVISL_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r SllVX8VInt8VIVISL_TU -n 1 -l 7 --has-ta --has-ma -c SllVX8VInt8VIVISL_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +size_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +size_t tmp = 3902764ull; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsll_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +size_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vsll_vx_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsll_vx_operator_0() { +int8_t tmp[] = {32,79,-64,-14,-16,-73,-48,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsll_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsll_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsll_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SllVX8VInt8_m.c b/test/codegen-golden/SllVX8VInt8_m.c new file mode 100644 index 0000000..6ea6dce --- /dev/null +++ b/test/codegen-golden/SllVX8VInt8_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r SllVX8VInt8_m -n 1 -l 7 --has-ta --has-ma -c SllVX8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint32_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp = 3902764u; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsll_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint32_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vsll_vx_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsll_vx_operator_0() { +int8_t tmp[] = {50,64,48,16,96,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsll_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsll_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsll_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SmulVV8VInt8VBVIVIVI_TAMU.c b/test/codegen-golden/SmulVV8VInt8VBVIVIVI_TAMU.c new file mode 100644 index 0000000..aa1e5dd --- /dev/null +++ b/test/codegen-golden/SmulVV8VInt8VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SmulVV8VInt8VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c SmulVV8VInt8VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vsmul_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsmul_vv_operator_0() { +int8_t tmp[] = {29,-1,-5,-1,-5,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SmulVV8VInt8VBVIVIVI_TUMA.c b/test/codegen-golden/SmulVV8VInt8VBVIVIVI_TUMA.c new file mode 100644 index 0000000..412bc70 --- /dev/null +++ b/test/codegen-golden/SmulVV8VInt8VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SmulVV8VInt8VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c SmulVV8VInt8VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vsmul_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsmul_vv_operator_0() { +int8_t tmp[] = {-1,84,-5,19,-5,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SmulVV8VInt8VBVIVIVI_TUMU.c b/test/codegen-golden/SmulVV8VInt8VBVIVIVI_TUMU.c new file mode 100644 index 0000000..f998a0a --- /dev/null +++ b/test/codegen-golden/SmulVV8VInt8VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SmulVV8VInt8VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c SmulVV8VInt8VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vsmul_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsmul_vv_operator_0() { +int8_t tmp[] = {29,84,-5,19,-5,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SmulVV8VInt8VBVIVIVI_m.c b/test/codegen-golden/SmulVV8VInt8VBVIVIVI_m.c new file mode 100644 index 0000000..4a392a8 --- /dev/null +++ b/test/codegen-golden/SmulVV8VInt8VBVIVIVI_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r SmulVV8VInt8VBVIVIVI_m -n 1 -l 7 --has-ta --has-ma -c SmulVV8VInt8VBVIVIVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vsmul_vv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsmul_vv_operator_0() { +int8_t tmp[] = {29,-11,-5,19,-5,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SmulVV8VInt8VBVIVI_TAMA.c b/test/codegen-golden/SmulVV8VInt8VBVIVI_TAMA.c new file mode 100644 index 0000000..19bf12b --- /dev/null +++ b/test/codegen-golden/SmulVV8VInt8VBVIVI_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r SmulVV8VInt8VBVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c SmulVV8VInt8VBVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vsmul_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsmul_vv_operator_0() { +int8_t tmp[] = {-1,-1,-2,-1,3,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SmulVV8VInt8VIVI.c b/test/codegen-golden/SmulVV8VInt8VIVI.c new file mode 100644 index 0000000..791cffd --- /dev/null +++ b/test/codegen-golden/SmulVV8VInt8VIVI.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r SmulVV8VInt8VIVI -n 1 -l 7 --has-ta --has-ma -c SmulVV8VInt8VIVI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vsmul_vv_i8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsmul_vv_operator_0() { +int8_t tmp[] = {10,31,-6,-1,3,37,12,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SmulVV8VInt8VIVIVI_TU.c b/test/codegen-golden/SmulVV8VInt8VIVIVI_TU.c new file mode 100644 index 0000000..ce43848 --- /dev/null +++ b/test/codegen-golden/SmulVV8VInt8VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r SmulVV8VInt8VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c SmulVV8VInt8VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vsmul_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsmul_vv_operator_0() { +int8_t tmp[] = {-5,79,-2,-14,3,-73,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SmulVV8VInt8VIVI_TA.c b/test/codegen-golden/SmulVV8VInt8VIVI_TA.c new file mode 100644 index 0000000..59fc53c --- /dev/null +++ b/test/codegen-golden/SmulVV8VInt8VIVI_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r SmulVV8VInt8VIVI_TA -n 1 -l 7 --has-ta --has-ma -c SmulVV8VInt8VIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vsmul_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsmul_vv_operator_0() { +int8_t tmp[] = {10,-1,-6,-1,3,-1,12,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SmulVX8VInt8VBVISI_TAMA.c b/test/codegen-golden/SmulVX8VInt8VBVISI_TAMA.c new file mode 100644 index 0000000..6100bff --- /dev/null +++ b/test/codegen-golden/SmulVX8VInt8VBVISI_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r SmulVX8VInt8VBVISI_TAMA -n 1 -l 7 --has-ta --has-ma -c SmulVX8VInt8VBVISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsmul_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vsmul_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsmul_vx_operator_0() { +int8_t tmp[] = {-1,-1,-2,-1,11,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SmulVX8VInt8VBVIVISI_TAMU.c b/test/codegen-golden/SmulVX8VInt8VBVIVISI_TAMU.c new file mode 100644 index 0000000..202a1ef --- /dev/null +++ b/test/codegen-golden/SmulVX8VInt8VBVIVISI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SmulVX8VInt8VBVIVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c SmulVX8VInt8VBVIVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsmul_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vsmul_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsmul_vx_operator_0() { +int8_t tmp[] = {50,-1,-3,-1,13,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SmulVX8VInt8VBVIVISI_TUMA.c b/test/codegen-golden/SmulVX8VInt8VBVIVISI_TUMA.c new file mode 100644 index 0000000..bb242c8 --- /dev/null +++ b/test/codegen-golden/SmulVX8VInt8VBVIVISI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SmulVX8VInt8VBVIVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c SmulVX8VInt8VBVIVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsmul_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vsmul_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsmul_vx_operator_0() { +int8_t tmp[] = {-1,-15,-3,16,13,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SmulVX8VInt8VBVIVISI_TUMU.c b/test/codegen-golden/SmulVX8VInt8VBVIVISI_TUMU.c new file mode 100644 index 0000000..4f0c9e7 --- /dev/null +++ b/test/codegen-golden/SmulVX8VInt8VBVIVISI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SmulVX8VInt8VBVIVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c SmulVX8VInt8VBVIVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsmul_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vsmul_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsmul_vx_operator_0() { +int8_t tmp[] = {50,-15,-3,16,13,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SmulVX8VInt8VBVIVISI_m.c b/test/codegen-golden/SmulVX8VInt8VBVIVISI_m.c new file mode 100644 index 0000000..aeee1ac --- /dev/null +++ b/test/codegen-golden/SmulVX8VInt8VBVIVISI_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r SmulVX8VInt8VBVIVISI_m -n 1 -l 7 --has-ta --has-ma -c SmulVX8VInt8VBVIVISI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsmul_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vsmul_vx_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsmul_vx_operator_0() { +int8_t tmp[] = {50,-3,-3,16,13,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SmulVX8VInt8VISI.c b/test/codegen-golden/SmulVX8VInt8VISI.c new file mode 100644 index 0000000..f53cc2c --- /dev/null +++ b/test/codegen-golden/SmulVX8VInt8VISI.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r SmulVX8VInt8VISI -n 1 -l 7 --has-ta --has-ma -c SmulVX8VInt8VISI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vsmul_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vsmul_vx_i8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsmul_vx_operator_0() { +int8_t tmp[] = {10,-14,-9,2,-4,13,10,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SmulVX8VInt8VISI_TA.c b/test/codegen-golden/SmulVX8VInt8VISI_TA.c new file mode 100644 index 0000000..8d93b46 --- /dev/null +++ b/test/codegen-golden/SmulVX8VInt8VISI_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r SmulVX8VInt8VISI_TA -n 1 -l 7 --has-ta --has-ma -c SmulVX8VInt8VISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vsmul_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vsmul_vx_i8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsmul_vx_operator_0() { +int8_t tmp[] = {10,-1,-9,-1,-4,-1,10,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SmulVX8VInt8VIVISI_TU.c b/test/codegen-golden/SmulVX8VInt8VIVISI_TU.c new file mode 100644 index 0000000..da4c821 --- /dev/null +++ b/test/codegen-golden/SmulVX8VInt8VIVISI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r SmulVX8VInt8VIVISI_TU -n 1 -l 7 --has-ta --has-ma -c SmulVX8VInt8VIVISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsmul_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vsmul_vx_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsmul_vx_operator_0() { +int8_t tmp[] = {-9,79,-2,-14,11,-73,-5,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SraVV8VInt8.c b/test/codegen-golden/SraVV8VInt8.c new file mode 100644 index 0000000..edd4ac5 --- /dev/null +++ b/test/codegen-golden/SraVV8VInt8.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r SraVV8VInt8 -n 1 -l 7 --has-ta --has-ma -c SraVV8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsra_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vsra_vv_i8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsra_vv_operator_0() { +int8_t tmp[] = {-1,9,13,-14,6,-19,-2,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsra_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsra_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsra_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SraVV8VInt8VBVIVIVU_TAMU.c b/test/codegen-golden/SraVV8VInt8VBVIVIVU_TAMU.c new file mode 100644 index 0000000..dcbecd8 --- /dev/null +++ b/test/codegen-golden/SraVV8VInt8VBVIVIVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SraVV8VInt8VBVIVIVU_TAMU -n 1 -l 7 --has-ta --has-ma -c SraVV8VInt8VBVIVIVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsra_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vsra_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsra_vv_operator_0() { +int8_t tmp[] = {29,-1,9,-1,-10,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsra_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsra_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsra_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SraVV8VInt8VBVIVIVU_TUMA.c b/test/codegen-golden/SraVV8VInt8VBVIVIVU_TUMA.c new file mode 100644 index 0000000..cfaad74 --- /dev/null +++ b/test/codegen-golden/SraVV8VInt8VBVIVIVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SraVV8VInt8VBVIVIVU_TUMA -n 1 -l 7 --has-ta --has-ma -c SraVV8VInt8VBVIVIVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsra_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vsra_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsra_vv_operator_0() { +int8_t tmp[] = {-1,84,9,19,-10,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsra_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsra_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsra_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SraVV8VInt8VBVIVIVU_TUMU.c b/test/codegen-golden/SraVV8VInt8VBVIVIVU_TUMU.c new file mode 100644 index 0000000..d78daaa --- /dev/null +++ b/test/codegen-golden/SraVV8VInt8VBVIVIVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SraVV8VInt8VBVIVIVU_TUMU -n 1 -l 7 --has-ta --has-ma -c SraVV8VInt8VBVIVIVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsra_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vsra_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsra_vv_operator_0() { +int8_t tmp[] = {29,84,9,19,-10,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsra_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsra_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsra_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SraVV8VInt8VBVIVU_TAMA.c b/test/codegen-golden/SraVV8VInt8VBVIVU_TAMA.c new file mode 100644 index 0000000..ba54595 --- /dev/null +++ b/test/codegen-golden/SraVV8VInt8VBVIVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r SraVV8VInt8VBVIVU_TAMA -n 1 -l 7 --has-ta --has-ma -c SraVV8VInt8VBVIVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsra_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vsra_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsra_vv_operator_0() { +int8_t tmp[] = {-1,-1,5,-1,5,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsra_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsra_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsra_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SraVV8VInt8VIVIVU_TU.c b/test/codegen-golden/SraVV8VInt8VIVIVU_TU.c new file mode 100644 index 0000000..e4582ad --- /dev/null +++ b/test/codegen-golden/SraVV8VInt8VIVIVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r SraVV8VInt8VIVIVU_TU -n 1 -l 7 --has-ta --has-ma -c SraVV8VInt8VIVIVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsra_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vsra_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsra_vv_operator_0() { +int8_t tmp[] = {0,79,5,-14,5,-73,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsra_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsra_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsra_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SraVV8VInt8VIVU_TA.c b/test/codegen-golden/SraVV8VInt8VIVU_TA.c new file mode 100644 index 0000000..93fddf6 --- /dev/null +++ b/test/codegen-golden/SraVV8VInt8VIVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r SraVV8VInt8VIVU_TA -n 1 -l 7 --has-ta --has-ma -c SraVV8VInt8VIVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsra_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vsra_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsra_vv_operator_0() { +int8_t tmp[] = {-1,-1,13,-1,6,-1,-2,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsra_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsra_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsra_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SraVV8VInt8_m.c b/test/codegen-golden/SraVV8VInt8_m.c new file mode 100644 index 0000000..ec70ccc --- /dev/null +++ b/test/codegen-golden/SraVV8VInt8_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r SraVV8VInt8_m -n 1 -l 7 --has-ta --has-ma -c SraVV8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsra_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vsra_vv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsra_vv_operator_0() { +int8_t tmp[] = {29,-4,9,19,-10,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsra_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsra_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsra_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SraVX8VInt8.c b/test/codegen-golden/SraVX8VInt8.c new file mode 100644 index 0000000..86d3aea --- /dev/null +++ b/test/codegen-golden/SraVX8VInt8.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r SraVX8VInt8 -n 1 -l 7 --has-ta --has-ma -c SraVX8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp = 3902764u; +value_1 = tmp; +} +void vsra_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vsra_vx_i8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsra_vx_operator_0() { +int8_t tmp[] = {-4,4,3,-1,1,-5,-4,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsra_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsra_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsra_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SraVX8VInt8VBVISL_TAMA.c b/test/codegen-golden/SraVX8VInt8VBVISL_TAMA.c new file mode 100644 index 0000000..fbb34f8 --- /dev/null +++ b/test/codegen-golden/SraVX8VInt8VBVISL_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r SraVX8VInt8VBVISL_TAMA -n 1 -l 7 --has-ta --has-ma -c SraVX8VInt8VBVISL_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +size_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +size_t tmp = 3902764ull; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsra_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +size_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vsra_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsra_vx_operator_0() { +int8_t tmp[] = {-1,-1,0,-1,-5,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsra_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsra_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsra_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SraVX8VInt8VBVIVISL_TAMU.c b/test/codegen-golden/SraVX8VInt8VBVIVISL_TAMU.c new file mode 100644 index 0000000..0384d5b --- /dev/null +++ b/test/codegen-golden/SraVX8VInt8VBVIVISL_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SraVX8VInt8VBVIVISL_TAMU -n 1 -l 7 --has-ta --has-ma -c SraVX8VInt8VBVIVISL_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +size_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsra_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vsra_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsra_vx_operator_0() { +int8_t tmp[] = {50,-1,1,-1,-5,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsra_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsra_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsra_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SraVX8VInt8VBVIVISL_TUMA.c b/test/codegen-golden/SraVX8VInt8VBVIVISL_TUMA.c new file mode 100644 index 0000000..7f05831 --- /dev/null +++ b/test/codegen-golden/SraVX8VInt8VBVIVISL_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SraVX8VInt8VBVIVISL_TUMA -n 1 -l 7 --has-ta --has-ma -c SraVX8VInt8VBVIVISL_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +size_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsra_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vsra_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsra_vx_operator_0() { +int8_t tmp[] = {-1,-15,1,16,-5,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsra_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsra_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsra_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SraVX8VInt8VBVIVISL_TUMU.c b/test/codegen-golden/SraVX8VInt8VBVIVISL_TUMU.c new file mode 100644 index 0000000..ff499db --- /dev/null +++ b/test/codegen-golden/SraVX8VInt8VBVIVISL_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SraVX8VInt8VBVIVISL_TUMU -n 1 -l 7 --has-ta --has-ma -c SraVX8VInt8VBVIVISL_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +size_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsra_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vsra_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsra_vx_operator_0() { +int8_t tmp[] = {50,-15,1,16,-5,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsra_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsra_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsra_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SraVX8VInt8VISL_TA.c b/test/codegen-golden/SraVX8VInt8VISL_TA.c new file mode 100644 index 0000000..b94e84d --- /dev/null +++ b/test/codegen-golden/SraVX8VInt8VISL_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r SraVX8VInt8VISL_TA -n 1 -l 7 --has-ta --has-ma -c SraVX8VInt8VISL_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +size_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +size_t tmp = 3902764ull; +value_1 = tmp; +} +void vsra_vx_operator_0() { +int8_t *placeholder0 = value_0; +size_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vsra_vx_i8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsra_vx_operator_0() { +int8_t tmp[] = {-4,-1,3,-1,1,-1,-4,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsra_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsra_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsra_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SraVX8VInt8VIVISL_TU.c b/test/codegen-golden/SraVX8VInt8VIVISL_TU.c new file mode 100644 index 0000000..0d58614 --- /dev/null +++ b/test/codegen-golden/SraVX8VInt8VIVISL_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r SraVX8VInt8VIVISL_TU -n 1 -l 7 --has-ta --has-ma -c SraVX8VInt8VIVISL_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +size_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +size_t tmp = 3902764ull; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsra_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +size_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vsra_vx_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsra_vx_operator_0() { +int8_t tmp[] = {3,79,0,-14,-5,-73,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsra_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsra_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsra_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SraVX8VInt8_m.c b/test/codegen-golden/SraVX8VInt8_m.c new file mode 100644 index 0000000..4ec1160 --- /dev/null +++ b/test/codegen-golden/SraVX8VInt8_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r SraVX8VInt8_m -n 1 -l 7 --has-ta --has-ma -c SraVX8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint32_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp = 3902764u; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsra_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint32_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vsra_vx_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsra_vx_operator_0() { +int8_t tmp[] = {50,1,1,16,-5,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsra_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsra_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsra_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SrlVV8VUInt8.c b/test/codegen-golden/SrlVV8VUInt8.c new file mode 100644 index 0000000..703bb84 --- /dev/null +++ b/test/codegen-golden/SrlVV8VUInt8.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r SrlVV8VUInt8 -n 1 -l 7 --has-ta --has-ma -c SrlVV8VUInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsrl_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vsrl_vv_u8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsrl_vv_operator_0() { +uint8_t tmp[] = {0,11,19,43,15,3,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsrl_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsrl_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsrl_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SrlVV8VUInt8VBVUVUVU_TAMU.c b/test/codegen-golden/SrlVV8VUInt8VBVUVUVU_TAMU.c new file mode 100644 index 0000000..78f1e5f --- /dev/null +++ b/test/codegen-golden/SrlVV8VUInt8VBVUVUVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SrlVV8VUInt8VBVUVUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c SrlVV8VUInt8VBVUVUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsrl_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vsrl_vv_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsrl_vv_operator_0() { +uint8_t tmp[] = {65,255,17,255,7,255,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsrl_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsrl_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsrl_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SrlVV8VUInt8VBVUVUVU_TUMA.c b/test/codegen-golden/SrlVV8VUInt8VBVUVUVU_TUMA.c new file mode 100644 index 0000000..582ff74 --- /dev/null +++ b/test/codegen-golden/SrlVV8VUInt8VBVUVUVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SrlVV8VUInt8VBVUVUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c SrlVV8VUInt8VBVUVUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsrl_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vsrl_vv_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsrl_vv_operator_0() { +uint8_t tmp[] = {255,92,17,59,7,13,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsrl_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsrl_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsrl_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SrlVV8VUInt8VBVUVUVU_TUMU.c b/test/codegen-golden/SrlVV8VUInt8VBVUVUVU_TUMU.c new file mode 100644 index 0000000..6f92a3e --- /dev/null +++ b/test/codegen-golden/SrlVV8VUInt8VBVUVUVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SrlVV8VUInt8VBVUVUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c SrlVV8VUInt8VBVUVUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsrl_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vsrl_vv_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsrl_vv_operator_0() { +uint8_t tmp[] = {65,92,17,59,7,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsrl_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsrl_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsrl_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SrlVV8VUInt8VBVUVU_TAMA.c b/test/codegen-golden/SrlVV8VUInt8VBVUVU_TAMA.c new file mode 100644 index 0000000..ecf3fca --- /dev/null +++ b/test/codegen-golden/SrlVV8VUInt8VBVUVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r SrlVV8VUInt8VBVUVU_TAMA -n 1 -l 7 --has-ta --has-ma -c SrlVV8VUInt8VBVUVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsrl_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vsrl_vv_u8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsrl_vv_operator_0() { +uint8_t tmp[] = {255,255,15,255,15,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsrl_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsrl_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsrl_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SrlVV8VUInt8VUVUVU_TU.c b/test/codegen-golden/SrlVV8VUInt8VUVUVU_TU.c new file mode 100644 index 0000000..fd5d649 --- /dev/null +++ b/test/codegen-golden/SrlVV8VUInt8VUVUVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r SrlVV8VUInt8VUVUVU_TU -n 1 -l 7 --has-ta --has-ma -c SrlVV8VUInt8VUVUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsrl_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vsrl_vv_u8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsrl_vv_operator_0() { +uint8_t tmp[] = {0,90,15,43,15,14,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsrl_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsrl_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsrl_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SrlVV8VUInt8VUVU_TA.c b/test/codegen-golden/SrlVV8VUInt8VUVU_TA.c new file mode 100644 index 0000000..9ca9367 --- /dev/null +++ b/test/codegen-golden/SrlVV8VUInt8VUVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r SrlVV8VUInt8VUVU_TA -n 1 -l 7 --has-ta --has-ma -c SrlVV8VUInt8VUVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsrl_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vsrl_vv_u8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsrl_vv_operator_0() { +uint8_t tmp[] = {0,255,19,255,15,255,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsrl_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsrl_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsrl_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SrlVV8VUInt8_m.c b/test/codegen-golden/SrlVV8VUInt8_m.c new file mode 100644 index 0000000..2cb0da3 --- /dev/null +++ b/test/codegen-golden/SrlVV8VUInt8_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r SrlVV8VUInt8_m -n 1 -l 7 --has-ta --has-ma -c SrlVV8VUInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsrl_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vsrl_vv_u8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsrl_vv_operator_0() { +uint8_t tmp[] = {65,4,17,59,7,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsrl_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsrl_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsrl_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SrlVX8VUInt8.c b/test/codegen-golden/SrlVX8VUInt8.c new file mode 100644 index 0000000..8511f65 --- /dev/null +++ b/test/codegen-golden/SrlVX8VUInt8.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r SrlVX8VUInt8 -n 1 -l 7 --has-ta --has-ma -c SrlVX8VUInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint32_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp = 3902764u; +value_1 = tmp; +} +void vsrl_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint32_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vsrl_vx_u8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsrl_vx_operator_0() { +uint8_t tmp[] = {1,5,4,2,3,0,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsrl_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsrl_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsrl_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SrlVX8VUInt8VBVUSL_TAMA.c b/test/codegen-golden/SrlVX8VUInt8VBVUSL_TAMA.c new file mode 100644 index 0000000..0681a7d --- /dev/null +++ b/test/codegen-golden/SrlVX8VUInt8VBVUSL_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r SrlVX8VUInt8VBVUSL_TAMA -n 1 -l 7 --has-ta --has-ma -c SrlVX8VUInt8VBVUSL_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +size_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +size_t tmp = 3902764ull; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsrl_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +size_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vsrl_vx_u8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsrl_vx_operator_0() { +uint8_t tmp[] = {255,255,3,255,1,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsrl_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsrl_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsrl_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SrlVX8VUInt8VBVUVUSL_TAMU.c b/test/codegen-golden/SrlVX8VUInt8VBVUVUSL_TAMU.c new file mode 100644 index 0000000..291b1e4 --- /dev/null +++ b/test/codegen-golden/SrlVX8VUInt8VBVUVUSL_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SrlVX8VUInt8VBVUVUSL_TAMU -n 1 -l 7 --has-ta --has-ma -c SrlVX8VUInt8VBVUVUSL_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +size_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsrl_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vsrl_vx_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsrl_vx_operator_0() { +uint8_t tmp[] = {75,255,3,255,0,255,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsrl_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsrl_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsrl_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SrlVX8VUInt8VBVUVUSL_TUMA.c b/test/codegen-golden/SrlVX8VUInt8VBVUVUSL_TUMA.c new file mode 100644 index 0000000..83fdc9a --- /dev/null +++ b/test/codegen-golden/SrlVX8VUInt8VBVUVUSL_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SrlVX8VUInt8VBVUVUSL_TUMA -n 1 -l 7 --has-ta --has-ma -c SrlVX8VUInt8VBVUVUSL_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +size_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsrl_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vsrl_vx_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsrl_vx_operator_0() { +uint8_t tmp[] = {255,42,3,58,0,37,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsrl_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsrl_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsrl_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SrlVX8VUInt8VBVUVUSL_TUMU.c b/test/codegen-golden/SrlVX8VUInt8VBVUVUSL_TUMU.c new file mode 100644 index 0000000..061c7e3 --- /dev/null +++ b/test/codegen-golden/SrlVX8VUInt8VBVUVUSL_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SrlVX8VUInt8VBVUVUSL_TUMU -n 1 -l 7 --has-ta --has-ma -c SrlVX8VUInt8VBVUVUSL_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +size_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsrl_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vsrl_vx_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsrl_vx_operator_0() { +uint8_t tmp[] = {75,42,3,58,0,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsrl_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsrl_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsrl_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SrlVX8VUInt8VUSL_TA.c b/test/codegen-golden/SrlVX8VUInt8VUSL_TA.c new file mode 100644 index 0000000..945e701 --- /dev/null +++ b/test/codegen-golden/SrlVX8VUInt8VUSL_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r SrlVX8VUInt8VUSL_TA -n 1 -l 7 --has-ta --has-ma -c SrlVX8VUInt8VUSL_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +size_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +size_t tmp = 3902764ull; +value_1 = tmp; +} +void vsrl_vx_operator_0() { +uint8_t *placeholder0 = value_0; +size_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vsrl_vx_u8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsrl_vx_operator_0() { +uint8_t tmp[] = {1,255,4,255,3,255,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsrl_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsrl_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsrl_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SrlVX8VUInt8VUVUSL_TU.c b/test/codegen-golden/SrlVX8VUInt8VUVUSL_TU.c new file mode 100644 index 0000000..7f08939 --- /dev/null +++ b/test/codegen-golden/SrlVX8VUInt8VUVUSL_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r SrlVX8VUInt8VUVUSL_TU -n 1 -l 7 --has-ta --has-ma -c SrlVX8VUInt8VUVUSL_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +size_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +size_t tmp = 3902764ull; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsrl_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +size_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vsrl_vx_u8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsrl_vx_operator_0() { +uint8_t tmp[] = {4,90,3,43,1,14,4,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsrl_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsrl_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsrl_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SrlVX8VUInt8_m.c b/test/codegen-golden/SrlVX8VUInt8_m.c new file mode 100644 index 0000000..23a57a8 --- /dev/null +++ b/test/codegen-golden/SrlVX8VUInt8_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r SrlVX8VUInt8_m -n 1 -l 7 --has-ta --has-ma -c SrlVX8VUInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint32_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp = 3902764u; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsrl_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint32_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vsrl_vx_u8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsrl_vx_operator_0() { +uint8_t tmp[] = {75,3,3,58,0,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsrl_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsrl_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsrl_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsraVV8VInt8VBVIVIVU_TAMU.c b/test/codegen-golden/SsraVV8VInt8VBVIVIVU_TAMU.c new file mode 100644 index 0000000..2b8f707 --- /dev/null +++ b/test/codegen-golden/SsraVV8VInt8VBVIVIVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SsraVV8VInt8VBVIVIVU_TAMU -n 1 -l 7 --has-ta --has-ma -c SsraVV8VInt8VBVIVIVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssra_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vssra_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssra_vv_operator_0() { +int8_t tmp[] = {29,-1,10,-1,-10,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssra_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssra_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssra_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsraVV8VInt8VBVIVIVU_TUMA.c b/test/codegen-golden/SsraVV8VInt8VBVIVIVU_TUMA.c new file mode 100644 index 0000000..366fe7f --- /dev/null +++ b/test/codegen-golden/SsraVV8VInt8VBVIVIVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SsraVV8VInt8VBVIVIVU_TUMA -n 1 -l 7 --has-ta --has-ma -c SsraVV8VInt8VBVIVIVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssra_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vssra_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssra_vv_operator_0() { +int8_t tmp[] = {-1,84,10,19,-10,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssra_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssra_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssra_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsraVV8VInt8VBVIVIVU_TUMU.c b/test/codegen-golden/SsraVV8VInt8VBVIVIVU_TUMU.c new file mode 100644 index 0000000..7348a9a --- /dev/null +++ b/test/codegen-golden/SsraVV8VInt8VBVIVIVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SsraVV8VInt8VBVIVIVU_TUMU -n 1 -l 7 --has-ta --has-ma -c SsraVV8VInt8VBVIVIVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssra_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vssra_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssra_vv_operator_0() { +int8_t tmp[] = {29,84,10,19,-10,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssra_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssra_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssra_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsraVV8VInt8VBVIVIVU_m.c b/test/codegen-golden/SsraVV8VInt8VBVIVIVU_m.c new file mode 100644 index 0000000..2633414 --- /dev/null +++ b/test/codegen-golden/SsraVV8VInt8VBVIVIVU_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r SsraVV8VInt8VBVIVIVU_m -n 1 -l 7 --has-ta --has-ma -c SsraVV8VInt8VBVIVIVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssra_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vssra_vv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssra_vv_operator_0() { +int8_t tmp[] = {29,-3,10,19,-10,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssra_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssra_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssra_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsraVV8VInt8VBVIVU_TAMA.c b/test/codegen-golden/SsraVV8VInt8VBVIVU_TAMA.c new file mode 100644 index 0000000..ee4e190 --- /dev/null +++ b/test/codegen-golden/SsraVV8VInt8VBVIVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r SsraVV8VInt8VBVIVU_TAMA -n 1 -l 7 --has-ta --has-ma -c SsraVV8VInt8VBVIVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssra_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vssra_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssra_vv_operator_0() { +int8_t tmp[] = {-1,-1,5,-1,6,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vssra_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssra_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssra_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsraVV8VInt8VIVIVU_TU.c b/test/codegen-golden/SsraVV8VInt8VIVIVU_TU.c new file mode 100644 index 0000000..e6b286f --- /dev/null +++ b/test/codegen-golden/SsraVV8VInt8VIVIVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r SsraVV8VInt8VIVIVU_TU -n 1 -l 7 --has-ta --has-ma -c SsraVV8VInt8VIVIVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssra_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vssra_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssra_vv_operator_0() { +int8_t tmp[] = {0,79,5,-14,6,-73,0,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vssra_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssra_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssra_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsraVV8VInt8VIVU.c b/test/codegen-golden/SsraVV8VInt8VIVU.c new file mode 100644 index 0000000..75facd2 --- /dev/null +++ b/test/codegen-golden/SsraVV8VInt8VIVU.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r SsraVV8VInt8VIVU -n 1 -l 7 --has-ta --has-ma -c SsraVV8VInt8VIVU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssra_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vssra_vv_i8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssra_vv_operator_0() { +int8_t tmp[] = {0,10,14,-14,7,-18,-2,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vssra_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssra_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssra_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsraVV8VInt8VIVU_TA.c b/test/codegen-golden/SsraVV8VInt8VIVU_TA.c new file mode 100644 index 0000000..96cde95 --- /dev/null +++ b/test/codegen-golden/SsraVV8VInt8VIVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r SsraVV8VInt8VIVU_TA -n 1 -l 7 --has-ta --has-ma -c SsraVV8VInt8VIVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssra_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vssra_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssra_vv_operator_0() { +int8_t tmp[] = {0,-1,14,-1,7,-1,-2,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vssra_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssra_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssra_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsraVX8VInt8VBVISL_TAMA.c b/test/codegen-golden/SsraVX8VInt8VBVISL_TAMA.c new file mode 100644 index 0000000..8a91321 --- /dev/null +++ b/test/codegen-golden/SsraVX8VInt8VBVISL_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r SsraVX8VInt8VBVISL_TAMA -n 1 -l 7 --has-ta --has-ma -c SsraVX8VInt8VBVISL_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +size_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +size_t tmp = 3902764ull; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssra_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +size_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vssra_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssra_vx_operator_0() { +int8_t tmp[] = {-1,-1,1,-1,-4,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vssra_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssra_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssra_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsraVX8VInt8VBVIVISL_TAMU.c b/test/codegen-golden/SsraVX8VInt8VBVIVISL_TAMU.c new file mode 100644 index 0000000..cfb7a47 --- /dev/null +++ b/test/codegen-golden/SsraVX8VInt8VBVIVISL_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SsraVX8VInt8VBVIVISL_TAMU -n 1 -l 7 --has-ta --has-ma -c SsraVX8VInt8VBVIVISL_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +size_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssra_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vssra_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssra_vx_operator_0() { +int8_t tmp[] = {50,-1,1,-1,-5,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssra_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssra_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssra_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsraVX8VInt8VBVIVISL_TUMA.c b/test/codegen-golden/SsraVX8VInt8VBVIVISL_TUMA.c new file mode 100644 index 0000000..dd7345f --- /dev/null +++ b/test/codegen-golden/SsraVX8VInt8VBVIVISL_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SsraVX8VInt8VBVIVISL_TUMA -n 1 -l 7 --has-ta --has-ma -c SsraVX8VInt8VBVIVISL_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +size_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssra_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vssra_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssra_vx_operator_0() { +int8_t tmp[] = {-1,-15,1,16,-5,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssra_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssra_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssra_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsraVX8VInt8VBVIVISL_TUMU.c b/test/codegen-golden/SsraVX8VInt8VBVIVISL_TUMU.c new file mode 100644 index 0000000..148a480 --- /dev/null +++ b/test/codegen-golden/SsraVX8VInt8VBVIVISL_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SsraVX8VInt8VBVIVISL_TUMU -n 1 -l 7 --has-ta --has-ma -c SsraVX8VInt8VBVIVISL_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +size_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssra_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vssra_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssra_vx_operator_0() { +int8_t tmp[] = {50,-15,1,16,-5,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssra_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssra_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssra_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsraVX8VInt8VBVIVISU_m.c b/test/codegen-golden/SsraVX8VInt8VBVIVISU_m.c new file mode 100644 index 0000000..5a7b88f --- /dev/null +++ b/test/codegen-golden/SsraVX8VInt8VBVIVISU_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r SsraVX8VInt8VBVIVISU_m -n 1 -l 7 --has-ta --has-ma -c SsraVX8VInt8VBVIVISU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint32_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp = 3902764u; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssra_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint32_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vssra_vx_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssra_vx_operator_0() { +int8_t tmp[] = {50,1,1,16,-5,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssra_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssra_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssra_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsraVX8VInt8VISL_TA.c b/test/codegen-golden/SsraVX8VInt8VISL_TA.c new file mode 100644 index 0000000..2ceedd7 --- /dev/null +++ b/test/codegen-golden/SsraVX8VInt8VISL_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r SsraVX8VInt8VISL_TA -n 1 -l 7 --has-ta --has-ma -c SsraVX8VInt8VISL_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +size_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +size_t tmp = 3902764ull; +value_1 = tmp; +} +void vssra_vx_operator_0() { +int8_t *placeholder0 = value_0; +size_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vssra_vx_i8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssra_vx_operator_0() { +int8_t tmp[] = {-3,-1,3,-1,2,-1,-4,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vssra_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssra_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssra_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsraVX8VInt8VISU.c b/test/codegen-golden/SsraVX8VInt8VISU.c new file mode 100644 index 0000000..aeba570 --- /dev/null +++ b/test/codegen-golden/SsraVX8VInt8VISU.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r SsraVX8VInt8VISU -n 1 -l 7 --has-ta --has-ma -c SsraVX8VInt8VISU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp = 3902764u; +value_1 = tmp; +} +void vssra_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vssra_vx_i8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssra_vx_operator_0() { +int8_t tmp[] = {-3,5,3,-1,2,-5,-4,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vssra_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssra_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssra_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsraVX8VInt8VIVISL_TU.c b/test/codegen-golden/SsraVX8VInt8VIVISL_TU.c new file mode 100644 index 0000000..6ae2e5c --- /dev/null +++ b/test/codegen-golden/SsraVX8VInt8VIVISL_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r SsraVX8VInt8VIVISL_TU -n 1 -l 7 --has-ta --has-ma -c SsraVX8VInt8VIVISL_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +size_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +size_t tmp = 3902764ull; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssra_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +size_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vssra_vx_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssra_vx_operator_0() { +int8_t tmp[] = {3,79,1,-14,-4,-73,2,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vssra_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssra_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssra_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsrlVV8VUInt8VBVUVUVU_TAMU.c b/test/codegen-golden/SsrlVV8VUInt8VBVUVUVU_TAMU.c new file mode 100644 index 0000000..a3c3c5a --- /dev/null +++ b/test/codegen-golden/SsrlVV8VUInt8VBVUVUVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SsrlVV8VUInt8VBVUVUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c SsrlVV8VUInt8VBVUVUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssrl_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vssrl_vv_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssrl_vv_operator_0() { +uint8_t tmp[] = {65,255,18,255,8,255,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssrl_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssrl_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssrl_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsrlVV8VUInt8VBVUVUVU_TUMA.c b/test/codegen-golden/SsrlVV8VUInt8VBVUVUVU_TUMA.c new file mode 100644 index 0000000..54b49dd --- /dev/null +++ b/test/codegen-golden/SsrlVV8VUInt8VBVUVUVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SsrlVV8VUInt8VBVUVUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c SsrlVV8VUInt8VBVUVUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssrl_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vssrl_vv_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssrl_vv_operator_0() { +uint8_t tmp[] = {255,92,18,59,8,13,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssrl_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssrl_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssrl_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsrlVV8VUInt8VBVUVUVU_TUMU.c b/test/codegen-golden/SsrlVV8VUInt8VBVUVUVU_TUMU.c new file mode 100644 index 0000000..a34f6ce --- /dev/null +++ b/test/codegen-golden/SsrlVV8VUInt8VBVUVUVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SsrlVV8VUInt8VBVUVUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c SsrlVV8VUInt8VBVUVUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssrl_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vssrl_vv_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssrl_vv_operator_0() { +uint8_t tmp[] = {65,92,18,59,8,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssrl_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssrl_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssrl_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsrlVV8VUInt8VBVUVUVU_m.c b/test/codegen-golden/SsrlVV8VUInt8VBVUVUVU_m.c new file mode 100644 index 0000000..6e8c503 --- /dev/null +++ b/test/codegen-golden/SsrlVV8VUInt8VBVUVUVU_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r SsrlVV8VUInt8VBVUVUVU_m -n 1 -l 7 --has-ta --has-ma -c SsrlVV8VUInt8VBVUVUVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssrl_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vssrl_vv_u8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssrl_vv_operator_0() { +uint8_t tmp[] = {65,5,18,59,8,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssrl_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssrl_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssrl_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsrlVV8VUInt8VBVUVU_TAMA.c b/test/codegen-golden/SsrlVV8VUInt8VBVUVU_TAMA.c new file mode 100644 index 0000000..8cfb0ec --- /dev/null +++ b/test/codegen-golden/SsrlVV8VUInt8VBVUVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r SsrlVV8VUInt8VBVUVU_TAMA -n 1 -l 7 --has-ta --has-ma -c SsrlVV8VUInt8VBVUVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssrl_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vssrl_vv_u8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssrl_vv_operator_0() { +uint8_t tmp[] = {255,255,15,255,16,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vssrl_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssrl_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssrl_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsrlVV8VUInt8VUVU.c b/test/codegen-golden/SsrlVV8VUInt8VUVU.c new file mode 100644 index 0000000..dcc817f --- /dev/null +++ b/test/codegen-golden/SsrlVV8VUInt8VUVU.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r SsrlVV8VUInt8VUVU -n 1 -l 7 --has-ta --has-ma -c SsrlVV8VUInt8VUVU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssrl_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vssrl_vv_u8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssrl_vv_operator_0() { +uint8_t tmp[] = {0,11,20,43,16,4,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vssrl_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssrl_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssrl_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsrlVV8VUInt8VUVUVU_TU.c b/test/codegen-golden/SsrlVV8VUInt8VUVUVU_TU.c new file mode 100644 index 0000000..f85a843 --- /dev/null +++ b/test/codegen-golden/SsrlVV8VUInt8VUVUVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r SsrlVV8VUInt8VUVUVU_TU -n 1 -l 7 --has-ta --has-ma -c SsrlVV8VUInt8VUVUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssrl_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vssrl_vv_u8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssrl_vv_operator_0() { +uint8_t tmp[] = {1,90,15,43,16,14,1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vssrl_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssrl_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssrl_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsrlVV8VUInt8VUVU_TA.c b/test/codegen-golden/SsrlVV8VUInt8VUVU_TA.c new file mode 100644 index 0000000..5c8d361 --- /dev/null +++ b/test/codegen-golden/SsrlVV8VUInt8VUVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r SsrlVV8VUInt8VUVU_TA -n 1 -l 7 --has-ta --has-ma -c SsrlVV8VUInt8VUVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssrl_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vssrl_vv_u8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssrl_vv_operator_0() { +uint8_t tmp[] = {0,255,20,255,16,255,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vssrl_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssrl_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssrl_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsrlVX8VUInt8VBVUSL_TAMA.c b/test/codegen-golden/SsrlVX8VUInt8VBVUSL_TAMA.c new file mode 100644 index 0000000..f8eca78 --- /dev/null +++ b/test/codegen-golden/SsrlVX8VUInt8VBVUSL_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r SsrlVX8VUInt8VBVUSL_TAMA -n 1 -l 7 --has-ta --has-ma -c SsrlVX8VUInt8VBVUSL_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +size_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +size_t tmp = 3902764ull; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssrl_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +size_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vssrl_vx_u8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssrl_vx_operator_0() { +uint8_t tmp[] = {255,255,4,255,1,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vssrl_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssrl_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssrl_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsrlVX8VUInt8VBVUVUSL_TAMU.c b/test/codegen-golden/SsrlVX8VUInt8VBVUVUSL_TAMU.c new file mode 100644 index 0000000..9fd0eef --- /dev/null +++ b/test/codegen-golden/SsrlVX8VUInt8VBVUVUSL_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SsrlVX8VUInt8VBVUVUSL_TAMU -n 1 -l 7 --has-ta --has-ma -c SsrlVX8VUInt8VBVUVUSL_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +size_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssrl_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vssrl_vx_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssrl_vx_operator_0() { +uint8_t tmp[] = {75,255,4,255,1,255,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssrl_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssrl_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssrl_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsrlVX8VUInt8VBVUVUSL_TUMA.c b/test/codegen-golden/SsrlVX8VUInt8VBVUVUSL_TUMA.c new file mode 100644 index 0000000..9348b3b --- /dev/null +++ b/test/codegen-golden/SsrlVX8VUInt8VBVUVUSL_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SsrlVX8VUInt8VBVUVUSL_TUMA -n 1 -l 7 --has-ta --has-ma -c SsrlVX8VUInt8VBVUVUSL_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +size_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssrl_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vssrl_vx_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssrl_vx_operator_0() { +uint8_t tmp[] = {255,42,4,58,1,37,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssrl_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssrl_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssrl_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsrlVX8VUInt8VBVUVUSL_TUMU.c b/test/codegen-golden/SsrlVX8VUInt8VBVUVUSL_TUMU.c new file mode 100644 index 0000000..42c0419 --- /dev/null +++ b/test/codegen-golden/SsrlVX8VUInt8VBVUVUSL_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SsrlVX8VUInt8VBVUVUSL_TUMU -n 1 -l 7 --has-ta --has-ma -c SsrlVX8VUInt8VBVUVUSL_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +size_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +size_t tmp = 3902764ull; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssrl_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +size_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vssrl_vx_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssrl_vx_operator_0() { +uint8_t tmp[] = {75,42,4,58,1,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssrl_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssrl_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssrl_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsrlVX8VUInt8VBVUVUSU_m.c b/test/codegen-golden/SsrlVX8VUInt8VBVUVUSU_m.c new file mode 100644 index 0000000..83e71c3 --- /dev/null +++ b/test/codegen-golden/SsrlVX8VUInt8VBVUVUSU_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r SsrlVX8VUInt8VBVUVUSU_m -n 1 -l 7 --has-ta --has-ma -c SsrlVX8VUInt8VBVUVUSU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint32_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp = 3902764u; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssrl_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint32_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vssrl_vx_u8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssrl_vx_operator_0() { +uint8_t tmp[] = {75,4,4,58,1,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssrl_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssrl_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssrl_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsrlVX8VUInt8VUSL_TA.c b/test/codegen-golden/SsrlVX8VUInt8VUSL_TA.c new file mode 100644 index 0000000..49452c4 --- /dev/null +++ b/test/codegen-golden/SsrlVX8VUInt8VUSL_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r SsrlVX8VUInt8VUSL_TA -n 1 -l 7 --has-ta --has-ma -c SsrlVX8VUInt8VUSL_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +size_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +size_t tmp = 3902764ull; +value_1 = tmp; +} +void vssrl_vx_operator_0() { +uint8_t *placeholder0 = value_0; +size_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vssrl_vx_u8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssrl_vx_operator_0() { +uint8_t tmp[] = {1,255,5,255,4,255,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vssrl_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssrl_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssrl_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsrlVX8VUInt8VUSU.c b/test/codegen-golden/SsrlVX8VUInt8VUSU.c new file mode 100644 index 0000000..e5fe041 --- /dev/null +++ b/test/codegen-golden/SsrlVX8VUInt8VUSU.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r SsrlVX8VUInt8VUSU -n 1 -l 7 --has-ta --has-ma -c SsrlVX8VUInt8VUSU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint32_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp = 3902764u; +value_1 = tmp; +} +void vssrl_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint32_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vssrl_vx_u8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssrl_vx_operator_0() { +uint8_t tmp[] = {1,6,5,3,4,1,1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vssrl_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssrl_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssrl_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsrlVX8VUInt8VUVUSL_TU.c b/test/codegen-golden/SsrlVX8VUInt8VUVUSL_TU.c new file mode 100644 index 0000000..6bcc37d --- /dev/null +++ b/test/codegen-golden/SsrlVX8VUInt8VUVUSL_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r SsrlVX8VUInt8VUVUSL_TU -n 1 -l 7 --has-ta --has-ma -c SsrlVX8VUInt8VUVUSL_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +size_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +size_t tmp = 3902764ull; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssrl_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +size_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vssrl_vx_u8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssrl_vx_operator_0() { +uint8_t tmp[] = {5,90,4,43,1,14,4,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vssrl_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssrl_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssrl_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubVV8VInt8VBVIVIVI_TAMU.c b/test/codegen-golden/SsubVV8VInt8VBVIVIVI_TAMU.c new file mode 100644 index 0000000..d6bf44f --- /dev/null +++ b/test/codegen-golden/SsubVV8VInt8VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SsubVV8VInt8VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c SsubVV8VInt8VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vssub_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssub_vv_operator_0() { +int8_t tmp[] = {29,-1,54,-1,-55,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubVV8VInt8VBVIVIVI_TUMA.c b/test/codegen-golden/SsubVV8VInt8VBVIVIVI_TUMA.c new file mode 100644 index 0000000..3013747 --- /dev/null +++ b/test/codegen-golden/SsubVV8VInt8VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SsubVV8VInt8VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c SsubVV8VInt8VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vssub_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssub_vv_operator_0() { +int8_t tmp[] = {-1,84,54,19,-55,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubVV8VInt8VBVIVIVI_TUMU.c b/test/codegen-golden/SsubVV8VInt8VBVIVIVI_TUMU.c new file mode 100644 index 0000000..f2f6daf --- /dev/null +++ b/test/codegen-golden/SsubVV8VInt8VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SsubVV8VInt8VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c SsubVV8VInt8VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vssub_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssub_vv_operator_0() { +int8_t tmp[] = {29,84,54,19,-55,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubVV8VInt8VBVIVIVI_m.c b/test/codegen-golden/SsubVV8VInt8VBVIVIVI_m.c new file mode 100644 index 0000000..9d8bac9 --- /dev/null +++ b/test/codegen-golden/SsubVV8VInt8VBVIVIVI_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r SsubVV8VInt8VBVIVIVI_m -n 1 -l 7 --has-ta --has-ma -c SsubVV8VInt8VBVIVIVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vssub_vv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssub_vv_operator_0() { +int8_t tmp[] = {29,-78,54,19,-55,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubVV8VInt8VBVIVI_TAMA.c b/test/codegen-golden/SsubVV8VInt8VBVIVI_TAMA.c new file mode 100644 index 0000000..c339dea --- /dev/null +++ b/test/codegen-golden/SsubVV8VInt8VBVIVI_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r SsubVV8VInt8VBVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c SsubVV8VInt8VBVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vssub_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssub_vv_operator_0() { +int8_t tmp[] = {-1,-1,35,-1,7,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vssub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubVV8VInt8VIVI.c b/test/codegen-golden/SsubVV8VInt8VIVI.c new file mode 100644 index 0000000..af544ea --- /dev/null +++ b/test/codegen-golden/SsubVV8VInt8VIVI.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r SsubVV8VInt8VIVI -n 1 -l 7 --has-ta --has-ma -c SsubVV8VInt8VIVI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vssub_vv_i8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssub_vv_operator_0() { +int8_t tmp[] = {-34,29,70,-26,10,-8,-31,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vssub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubVV8VInt8VIVIVI_TU.c b/test/codegen-golden/SsubVV8VInt8VIVIVI_TU.c new file mode 100644 index 0000000..aa291d9 --- /dev/null +++ b/test/codegen-golden/SsubVV8VInt8VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r SsubVV8VInt8VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c SsubVV8VInt8VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vssub_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssub_vv_operator_0() { +int8_t tmp[] = {51,79,35,-14,7,-73,19,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vssub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubVV8VInt8VIVI_TA.c b/test/codegen-golden/SsubVV8VInt8VIVI_TA.c new file mode 100644 index 0000000..dfd578d --- /dev/null +++ b/test/codegen-golden/SsubVV8VInt8VIVI_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r SsubVV8VInt8VIVI_TA -n 1 -l 7 --has-ta --has-ma -c SsubVV8VInt8VIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vssub_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssub_vv_operator_0() { +int8_t tmp[] = {-34,-1,70,-1,10,-1,-31,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vssub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubVX8VInt8VBVISI_TAMA.c b/test/codegen-golden/SsubVX8VInt8VBVISI_TAMA.c new file mode 100644 index 0000000..d29880a --- /dev/null +++ b/test/codegen-golden/SsubVX8VInt8VBVISI_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r SsubVX8VInt8VBVISI_TAMA -n 1 -l 7 --has-ta --has-ma -c SsubVX8VInt8VBVISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vssub_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssub_vx_operator_0() { +int8_t tmp[] = {-1,-1,34,-1,-43,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vssub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubVX8VInt8VBVIVISI_TAMU.c b/test/codegen-golden/SsubVX8VInt8VBVIVISI_TAMU.c new file mode 100644 index 0000000..f977f2c --- /dev/null +++ b/test/codegen-golden/SsubVX8VInt8VBVIVISI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SsubVX8VInt8VBVIVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c SsubVX8VInt8VBVIVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vssub_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssub_vx_operator_0() { +int8_t tmp[] = {50,-1,41,-1,-52,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubVX8VInt8VBVIVISI_TUMA.c b/test/codegen-golden/SsubVX8VInt8VBVIVISI_TUMA.c new file mode 100644 index 0000000..9c854fd --- /dev/null +++ b/test/codegen-golden/SsubVX8VInt8VBVIVISI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SsubVX8VInt8VBVIVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c SsubVX8VInt8VBVIVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vssub_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssub_vx_operator_0() { +int8_t tmp[] = {-1,-15,41,16,-52,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubVX8VInt8VBVIVISI_TUMU.c b/test/codegen-golden/SsubVX8VInt8VBVIVISI_TUMU.c new file mode 100644 index 0000000..0856020 --- /dev/null +++ b/test/codegen-golden/SsubVX8VInt8VBVIVISI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SsubVX8VInt8VBVIVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c SsubVX8VInt8VBVIVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vssub_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssub_vx_operator_0() { +int8_t tmp[] = {50,-15,41,16,-52,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubVX8VInt8VBVIVISI_m.c b/test/codegen-golden/SsubVX8VInt8VBVIVISI_m.c new file mode 100644 index 0000000..f724bff --- /dev/null +++ b/test/codegen-golden/SsubVX8VInt8VBVIVISI_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r SsubVX8VInt8VBVIVISI_m -n 1 -l 7 --has-ta --has-ma -c SsubVX8VInt8VBVIVISI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vssub_vx_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssub_vx_operator_0() { +int8_t tmp[] = {50,42,41,16,-52,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubVX8VInt8VISI.c b/test/codegen-golden/SsubVX8VInt8VISI.c new file mode 100644 index 0000000..5bc72fc --- /dev/null +++ b/test/codegen-golden/SsubVX8VInt8VISI.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r SsubVX8VInt8VISI -n 1 -l 7 --has-ta --has-ma -c SsubVX8VInt8VISI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vssub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vssub_vx_i8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssub_vx_operator_0() { +int8_t tmp[] = {-34,101,77,8,48,-51,-35,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vssub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubVX8VInt8VISI_TA.c b/test/codegen-golden/SsubVX8VInt8VISI_TA.c new file mode 100644 index 0000000..2721d3b --- /dev/null +++ b/test/codegen-golden/SsubVX8VInt8VISI_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r SsubVX8VInt8VISI_TA -n 1 -l 7 --has-ta --has-ma -c SsubVX8VInt8VISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vssub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vssub_vx_i8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssub_vx_operator_0() { +int8_t tmp[] = {-34,-1,77,-1,48,-1,-35,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vssub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubVX8VInt8VIVISI_TU.c b/test/codegen-golden/SsubVX8VInt8VIVISI_TU.c new file mode 100644 index 0000000..50321e3 --- /dev/null +++ b/test/codegen-golden/SsubVX8VInt8VIVISI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r SsubVX8VInt8VIVISI_TU -n 1 -l 7 --has-ta --has-ma -c SsubVX8VInt8VIVISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vssub_vx_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssub_vx_operator_0() { +int8_t tmp[] = {72,79,34,-14,-43,-73,51,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vssub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubuVV8VUInt8VBVUVUVU_TAMU.c b/test/codegen-golden/SsubuVV8VUInt8VBVUVUVU_TAMU.c new file mode 100644 index 0000000..937ebf6 --- /dev/null +++ b/test/codegen-golden/SsubuVV8VUInt8VBVUVUVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SsubuVV8VUInt8VBVUVUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c SsubuVV8VUInt8VBVUVUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssubu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vssubu_vv_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssubu_vv_operator_0() { +uint8_t tmp[] = {65,255,28,255,0,255,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubuVV8VUInt8VBVUVUVU_TUMA.c b/test/codegen-golden/SsubuVV8VUInt8VBVUVUVU_TUMA.c new file mode 100644 index 0000000..7b6d2b8 --- /dev/null +++ b/test/codegen-golden/SsubuVV8VUInt8VBVUVUVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SsubuVV8VUInt8VBVUVUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c SsubuVV8VUInt8VBVUVUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssubu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vssubu_vv_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssubu_vv_operator_0() { +uint8_t tmp[] = {255,92,28,59,0,13,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubuVV8VUInt8VBVUVUVU_TUMU.c b/test/codegen-golden/SsubuVV8VUInt8VBVUVUVU_TUMU.c new file mode 100644 index 0000000..5f5055c --- /dev/null +++ b/test/codegen-golden/SsubuVV8VUInt8VBVUVUVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SsubuVV8VUInt8VBVUVUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c SsubuVV8VUInt8VBVUVUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssubu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vssubu_vv_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssubu_vv_operator_0() { +uint8_t tmp[] = {65,92,28,59,0,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubuVV8VUInt8VBVUVUVU_m.c b/test/codegen-golden/SsubuVV8VUInt8VBVUVUVU_m.c new file mode 100644 index 0000000..b07ca7b --- /dev/null +++ b/test/codegen-golden/SsubuVV8VUInt8VBVUVUVU_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r SsubuVV8VUInt8VBVUVUVU_m -n 1 -l 7 --has-ta --has-ma -c SsubuVV8VUInt8VBVUVUVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssubu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint8m1_t vec_value_4_0= vssubu_vv_u8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssubu_vv_operator_0() { +uint8_t tmp[] = {65,0,28,59,0,13,46,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubuVV8VUInt8VBVUVU_TAMA.c b/test/codegen-golden/SsubuVV8VUInt8VBVUVU_TAMA.c new file mode 100644 index 0000000..6f52a18 --- /dev/null +++ b/test/codegen-golden/SsubuVV8VUInt8VBVUVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r SsubuVV8VUInt8VBVUVU_TAMA -n 1 -l 7 --has-ta --has-ma -c SsubuVV8VUInt8VBVUVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssubu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vssubu_vv_u8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssubu_vv_operator_0() { +uint8_t tmp[] = {255,255,18,255,4,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vssubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubuVV8VUInt8VUVU.c b/test/codegen-golden/SsubuVV8VUInt8VUVU.c new file mode 100644 index 0000000..8094f24 --- /dev/null +++ b/test/codegen-golden/SsubuVV8VUInt8VUVU.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r SsubuVV8VUInt8VUVU -n 1 -l 7 --has-ta --has-ma -c SsubuVV8VUInt8VUVU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssubu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vssubu_vv_u8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssubu_vv_operator_0() { +uint8_t tmp[] = {0,15,36,0,5,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vssubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubuVV8VUInt8VUVUVU_TU.c b/test/codegen-golden/SsubuVV8VUInt8VUVUVU_TU.c new file mode 100644 index 0000000..a4b0f13 --- /dev/null +++ b/test/codegen-golden/SsubuVV8VUInt8VUVUVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r SsubuVV8VUInt8VUVUVU_TU -n 1 -l 7 --has-ta --has-ma -c SsubuVV8VUInt8VUVUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssubu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_3_0= vssubu_vv_u8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssubu_vv_operator_0() { +uint8_t tmp[] = {26,90,18,43,4,14,9,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vssubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubuVV8VUInt8VUVU_TA.c b/test/codegen-golden/SsubuVV8VUInt8VUVU_TA.c new file mode 100644 index 0000000..634bc37 --- /dev/null +++ b/test/codegen-golden/SsubuVV8VUInt8VUVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r SsubuVV8VUInt8VUVU_TA -n 1 -l 7 --has-ta --has-ma -c SsubuVV8VUInt8VUVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssubu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_2_0= vssubu_vv_u8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssubu_vv_operator_0() { +uint8_t tmp[] = {0,255,36,255,5,255,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vssubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubuVX8VUInt8VBVUSU_TAMA.c b/test/codegen-golden/SsubuVX8VUInt8VBVUSU_TAMA.c new file mode 100644 index 0000000..f6fabb0 --- /dev/null +++ b/test/codegen-golden/SsubuVX8VUInt8VBVUSU_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r SsubuVX8VUInt8VBVUSU_TAMA -n 1 -l 7 --has-ta --has-ma -c SsubuVX8VUInt8VBVUSU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssubu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vssubu_vx_u8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssubu_vx_operator_0() { +uint8_t tmp[] = {255,255,17,255,0,255,255,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vssubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubuVX8VUInt8VBVUVUSU_TAMU.c b/test/codegen-golden/SsubuVX8VUInt8VBVUVUSU_TAMU.c new file mode 100644 index 0000000..25f0d96 --- /dev/null +++ b/test/codegen-golden/SsubuVX8VUInt8VBVUVUSU_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SsubuVX8VUInt8VBVUVUSU_TAMU -n 1 -l 7 --has-ta --has-ma -c SsubuVX8VUInt8VBVUVUSU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssubu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vssubu_vx_u8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssubu_vx_operator_0() { +uint8_t tmp[] = {75,255,20,255,0,255,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubuVX8VUInt8VBVUVUSU_TUMA.c b/test/codegen-golden/SsubuVX8VUInt8VBVUVUSU_TUMA.c new file mode 100644 index 0000000..2c46280 --- /dev/null +++ b/test/codegen-golden/SsubuVX8VUInt8VBVUVUSU_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SsubuVX8VUInt8VBVUVUSU_TUMA -n 1 -l 7 --has-ta --has-ma -c SsubuVX8VUInt8VBVUVUSU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssubu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vssubu_vx_u8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssubu_vx_operator_0() { +uint8_t tmp[] = {255,42,20,58,0,37,255,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubuVX8VUInt8VBVUVUSU_TUMU.c b/test/codegen-golden/SsubuVX8VUInt8VBVUVUSU_TUMU.c new file mode 100644 index 0000000..4f6e60c --- /dev/null +++ b/test/codegen-golden/SsubuVX8VUInt8VBVUVUSU_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SsubuVX8VUInt8VBVUVUSU_TUMU -n 1 -l 7 --has-ta --has-ma -c SsubuVX8VUInt8VBVUVUSU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssubu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vssubu_vx_u8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssubu_vx_operator_0() { +uint8_t tmp[] = {75,42,20,58,0,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubuVX8VUInt8VBVUVUSU_m.c b/test/codegen-golden/SsubuVX8VUInt8VBVUVUSU_m.c new file mode 100644 index 0000000..242691e --- /dev/null +++ b/test/codegen-golden/SsubuVX8VUInt8VBVUVUSU_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r SsubuVX8VUInt8VBVUVUSU_m -n 1 -l 7 --has-ta --has-ma -c SsubuVX8VUInt8VBVUVUSU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vssubu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint8m1_t vec_value_4_0= vssubu_vx_u8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_u8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vssubu_vx_operator_0() { +uint8_t tmp[] = {75,21,20,58,0,37,65,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vssubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vssubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubuVX8VUInt8VUSU.c b/test/codegen-golden/SsubuVX8VUInt8VUSU.c new file mode 100644 index 0000000..7c138fe --- /dev/null +++ b/test/codegen-golden/SsubuVX8VUInt8VUSU.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r SsubuVX8VUInt8VUSU -n 1 -l 7 --has-ta --has-ma -c SsubuVX8VUInt8VUSU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vssubu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vssubu_vx_u8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssubu_vx_operator_0() { +uint8_t tmp[] = {0,51,39,4,24,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vssubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubuVX8VUInt8VUSU_TA.c b/test/codegen-golden/SsubuVX8VUInt8VUSU_TA.c new file mode 100644 index 0000000..7aa38c3 --- /dev/null +++ b/test/codegen-golden/SsubuVX8VUInt8VUSU_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r SsubuVX8VUInt8VUSU_TA -n 1 -l 7 --has-ta --has-ma -c SsubuVX8VUInt8VUSU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +uint8_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vssubu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint8m1_t vec_value_2_0= vssubu_vx_u8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_u8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssubu_vx_operator_0() { +uint8_t tmp[] = {0,255,39,255,24,255,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vssubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SsubuVX8VUInt8VUVUSU_TU.c b/test/codegen-golden/SsubuVX8VUInt8VUVUSU_TU.c new file mode 100644 index 0000000..5e5bdab --- /dev/null +++ b/test/codegen-golden/SsubuVX8VUInt8VUVUSU_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r SsubuVX8VUInt8VUVUSU_TU -n 1 -l 7 --has-ta --has-ma -c SsubuVX8VUInt8VUVUSU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint8_t value_3[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vssubu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint8m1_t vec_value_3_0= vssubu_vx_u8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_u8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vssubu_vx_operator_0() { +uint8_t tmp[] = {36,90,17,43,0,14,26,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vssubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vssubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vssubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SubVV8VInt8.c b/test/codegen-golden/SubVV8VInt8.c new file mode 100644 index 0000000..eaef80a --- /dev/null +++ b/test/codegen-golden/SubVV8VInt8.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r SubVV8VInt8 -n 1 -l 7 --has-ta --has-ma -c SubVV8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vsub_vv_i8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsub_vv_operator_0() { +int8_t tmp[] = {-34,29,70,-26,10,-8,-31,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SubVV8VInt8VBVIVIVI_TAMU.c b/test/codegen-golden/SubVV8VInt8VBVIVIVI_TAMU.c new file mode 100644 index 0000000..16487bd --- /dev/null +++ b/test/codegen-golden/SubVV8VInt8VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SubVV8VInt8VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c SubVV8VInt8VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vsub_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsub_vv_operator_0() { +int8_t tmp[] = {29,-1,54,-1,-55,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SubVV8VInt8VBVIVIVI_TUMA.c b/test/codegen-golden/SubVV8VInt8VBVIVIVI_TUMA.c new file mode 100644 index 0000000..987fb5b --- /dev/null +++ b/test/codegen-golden/SubVV8VInt8VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SubVV8VInt8VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c SubVV8VInt8VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vsub_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsub_vv_operator_0() { +int8_t tmp[] = {-1,84,54,19,-55,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SubVV8VInt8VBVIVIVI_TUMU.c b/test/codegen-golden/SubVV8VInt8VBVIVIVI_TUMU.c new file mode 100644 index 0000000..855d3a7 --- /dev/null +++ b/test/codegen-golden/SubVV8VInt8VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r SubVV8VInt8VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c SubVV8VInt8VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vsub_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsub_vv_operator_0() { +int8_t tmp[] = {29,84,54,19,-55,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SubVV8VInt8VBVIVI_TAMA.c b/test/codegen-golden/SubVV8VInt8VBVIVI_TAMA.c new file mode 100644 index 0000000..8efbda6 --- /dev/null +++ b/test/codegen-golden/SubVV8VInt8VBVIVI_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r SubVV8VInt8VBVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c SubVV8VInt8VBVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vsub_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsub_vv_operator_0() { +int8_t tmp[] = {-1,-1,35,-1,7,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SubVV8VInt8VIVIVI_TU.c b/test/codegen-golden/SubVV8VInt8VIVIVI_TU.c new file mode 100644 index 0000000..ec49a5d --- /dev/null +++ b/test/codegen-golden/SubVV8VInt8VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r SubVV8VInt8VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c SubVV8VInt8VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vsub_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsub_vv_operator_0() { +int8_t tmp[] = {51,79,35,-14,7,-73,19,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SubVV8VInt8VIVI_TA.c b/test/codegen-golden/SubVV8VInt8VIVI_TA.c new file mode 100644 index 0000000..f601c53 --- /dev/null +++ b/test/codegen-golden/SubVV8VInt8VIVI_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r SubVV8VInt8VIVI_TA -n 1 -l 7 --has-ta --has-ma -c SubVV8VInt8VIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vsub_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsub_vv_operator_0() { +int8_t tmp[] = {-34,-1,70,-1,10,-1,-31,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SubVV8VInt8_m.c b/test/codegen-golden/SubVV8VInt8_m.c new file mode 100644 index 0000000..eecf8af --- /dev/null +++ b/test/codegen-golden/SubVV8VInt8_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r SubVV8VInt8_m -n 1 -l 7 --has-ta --has-ma -c SubVV8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vsub_vv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsub_vv_operator_0() { +int8_t tmp[] = {29,-78,54,19,-55,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SubVX8VInt8.c b/test/codegen-golden/SubVX8VInt8.c new file mode 100644 index 0000000..9af7e8a --- /dev/null +++ b/test/codegen-golden/SubVX8VInt8.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r SubVX8VInt8 -n 1 -l 7 --has-ta --has-ma -c SubVX8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vsub_vx_i8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsub_vx_operator_0() { +int8_t tmp[] = {-34,101,77,8,48,-51,-35,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SubVX8VInt8VBVISI_TAMA.c b/test/codegen-golden/SubVX8VInt8VBVISI_TAMA.c new file mode 100644 index 0000000..be214dd --- /dev/null +++ b/test/codegen-golden/SubVX8VInt8VBVISI_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r SubVX8VInt8VBVISI_TAMA -n 1 -l 7 --has-ta --has-ma -c SubVX8VInt8VBVISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vsub_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsub_vx_operator_0() { +int8_t tmp[] = {-1,-1,34,-1,-43,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SubVX8VInt8VBVIVISI_TAMU.c b/test/codegen-golden/SubVX8VInt8VBVIVISI_TAMU.c new file mode 100644 index 0000000..a91df52 --- /dev/null +++ b/test/codegen-golden/SubVX8VInt8VBVIVISI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SubVX8VInt8VBVIVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c SubVX8VInt8VBVIVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vsub_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsub_vx_operator_0() { +int8_t tmp[] = {50,-1,41,-1,-52,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SubVX8VInt8VBVIVISI_TUMA.c b/test/codegen-golden/SubVX8VInt8VBVIVISI_TUMA.c new file mode 100644 index 0000000..b87c705 --- /dev/null +++ b/test/codegen-golden/SubVX8VInt8VBVIVISI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SubVX8VInt8VBVIVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c SubVX8VInt8VBVIVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vsub_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsub_vx_operator_0() { +int8_t tmp[] = {-1,-15,41,16,-52,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SubVX8VInt8VBVIVISI_TUMU.c b/test/codegen-golden/SubVX8VInt8VBVIVISI_TUMU.c new file mode 100644 index 0000000..0b366c3 --- /dev/null +++ b/test/codegen-golden/SubVX8VInt8VBVIVISI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r SubVX8VInt8VBVIVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c SubVX8VInt8VBVIVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vsub_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsub_vx_operator_0() { +int8_t tmp[] = {50,-15,41,16,-52,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SubVX8VInt8VISI_TA.c b/test/codegen-golden/SubVX8VInt8VISI_TA.c new file mode 100644 index 0000000..fc95697 --- /dev/null +++ b/test/codegen-golden/SubVX8VInt8VISI_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r SubVX8VInt8VISI_TA -n 1 -l 7 --has-ta --has-ma -c SubVX8VInt8VISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vsub_vx_i8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsub_vx_operator_0() { +int8_t tmp[] = {-34,-1,77,-1,48,-1,-35,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SubVX8VInt8VIVISI_TU.c b/test/codegen-golden/SubVX8VInt8VIVISI_TU.c new file mode 100644 index 0000000..cce6844 --- /dev/null +++ b/test/codegen-golden/SubVX8VInt8VIVISI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r SubVX8VInt8VIVISI_TU -n 1 -l 7 --has-ta --has-ma -c SubVX8VInt8VIVISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vsub_vx_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsub_vx_operator_0() { +int8_t tmp[] = {72,79,34,-14,-43,-73,51,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/SubVX8VInt8_m.c b/test/codegen-golden/SubVX8VInt8_m.c new file mode 100644 index 0000000..f5d5fb1 --- /dev/null +++ b/test/codegen-golden/SubVX8VInt8_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r SubVX8VInt8_m -n 1 -l 7 --has-ta --has-ma -c SubVX8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vsub_vx_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vsub_vx_operator_0() { +int8_t tmp[] = {50,42,41,16,-52,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle16X16VInt16SI_TA.c b/test/codegen-golden/Vle16X16VInt16SI_TA.c new file mode 100644 index 0000000..3edb97f --- /dev/null +++ b/test/codegen-golden/Vle16X16VInt16SI_TA.c @@ -0,0 +1,57 @@ +// COMMAND: random_gen -r Vle16X16VInt16SI_TA -n 1 -l 7 --has-ta --has-ma -c Vle16X16VInt16SI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int16_t value_1[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vle16_v_operator_0() { +int16_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int placeholder2 = 7; + +size_t placeholder3 = 0; +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m1_t vec_value_1_0= vle16_v_i16m1_ta(placeholder0, tail_vl); +vse16_v_i16m1(placeholder1, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vle16_v_operator_0() { +int16_t tmp[] = {-5546,-1,5458,-1,2596,-1,-5630,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vle16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vle16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle16X16VInt16VBSI_TAMA.c b/test/codegen-golden/Vle16X16VInt16VBSI_TAMA.c new file mode 100644 index 0000000..c0db2b6 --- /dev/null +++ b/test/codegen-golden/Vle16X16VInt16VBSI_TAMA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r Vle16X16VInt16VBSI_TAMA -n 1 -l 7 --has-ta --has-ma -c Vle16X16VInt16VBSI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {-2195,5001,-1530,1184,1614,-6427,-2596,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle16_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_2_0= vle16_v_i16m1_tama(mask_value_0_0, placeholder1, tail_vl); +vse16_v_i16m1(placeholder2, vec_value_2_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle16_v_operator_0() { +int16_t tmp[] = {-1,-1,-1530,-1,1614,-1,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vle16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle16X16VInt16VBVISI_TAMU.c b/test/codegen-golden/Vle16X16VInt16VBVISI_TAMU.c new file mode 100644 index 0000000..c49b597 --- /dev/null +++ b/test/codegen-golden/Vle16X16VInt16VBVISI_TAMU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r Vle16X16VInt16VBVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c Vle16X16VInt16VBVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {-2195,5001,-1530,1184,1614,-6427,-2596,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle16_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); +vint16m1_t vec_value_3_0= vle16_v_i16m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); +vse16_v_i16m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle16_v_operator_0() { +int16_t tmp[] = {2884,-1,-1530,-1,1614,-1,-734,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle16X16VInt16VBVISI_TUMA.c b/test/codegen-golden/Vle16X16VInt16VBVISI_TUMA.c new file mode 100644 index 0000000..8ad71b5 --- /dev/null +++ b/test/codegen-golden/Vle16X16VInt16VBVISI_TUMA.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r Vle16X16VInt16VBVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c Vle16X16VInt16VBVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {-2195,5001,-1530,1184,1614,-6427,-2596,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle16_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); +vint16m1_t vec_value_3_0= vle16_v_i16m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); +vse16_v_i16m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle16_v_operator_0() { +int16_t tmp[] = {-1,8399,-1530,1879,1614,-7354,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle16X16VInt16VBVISI_TUMU.c b/test/codegen-golden/Vle16X16VInt16VBVISI_TUMU.c new file mode 100644 index 0000000..5f24009 --- /dev/null +++ b/test/codegen-golden/Vle16X16VInt16VBVISI_TUMU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r Vle16X16VInt16VBVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c Vle16X16VInt16VBVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {-2195,5001,-1530,1184,1614,-6427,-2596,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle16_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); +vint16m1_t vec_value_3_0= vle16_v_i16m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); +vse16_v_i16m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle16_v_operator_0() { +int16_t tmp[] = {2884,8399,-1530,1879,1614,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle16X16VInt16VBVISI_m.c b/test/codegen-golden/Vle16X16VInt16VBVISI_m.c new file mode 100644 index 0000000..4166327 --- /dev/null +++ b/test/codegen-golden/Vle16X16VInt16VBVISI_m.c @@ -0,0 +1,87 @@ +// COMMAND: random_gen -r Vle16X16VInt16VBVISI_m -n 1 -l 7 --has-ta --has-ma -c Vle16X16VInt16VBVISI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {-2195,5001,-1530,1184,1614,-6427,-2596,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle16_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); +vint16m1_t vec_value_3_0= vle16_v_i16m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vl); +vse16_v_i16m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle16_v_operator_0() { +int16_t tmp[] = {2884,5001,-1530,1879,1614,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle16X16VInt16VISI_TU.c b/test/codegen-golden/Vle16X16VInt16VISI_TU.c new file mode 100644 index 0000000..4360b43 --- /dev/null +++ b/test/codegen-golden/Vle16X16VInt16VISI_TU.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r Vle16X16VInt16VISI_TU -n 1 -l 7 --has-ta --has-ma -c Vle16X16VInt16VISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {-2195,5001,-1530,1184,1614,-6427,-2596,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle16_v_operator_0() { +int16_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m1_t vec_value_0_0= vle16_v_i16m1(placeholder0, vl); +vint16m1_t vec_value_2_0= vle16_v_i16m1_tu(vec_value_0_0, placeholder1, tail_vl); +vse16_v_i16m1(placeholder2, vec_value_2_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle16_v_operator_0() { +int16_t tmp[] = {-2195,7893,-1530,-1417,1614,-7226,-2596,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vle16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VFloat32SF.c b/test/codegen-golden/Vle32X32VFloat32SF.c new file mode 100644 index 0000000..ddbca24 --- /dev/null +++ b/test/codegen-golden/Vle32X32VFloat32SF.c @@ -0,0 +1,63 @@ +// COMMAND: random_gen -r Vle32X32VFloat32SF -n 1 -l 7 --has-ta --has-ma -c Vle32X32VFloat32SF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float32_t value_1[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vle32_v_operator_0() { +float32_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +int placeholder2 = 7; + +size_t placeholder3 = 0; +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e32m1(placeholder2); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder0, vl); +vse32_v_f32m1(placeholder1, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vle32_v_operator_0() { +uint64_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_1[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VFloat32SF_TA.c b/test/codegen-golden/Vle32X32VFloat32SF_TA.c new file mode 100644 index 0000000..b03fc04 --- /dev/null +++ b/test/codegen-golden/Vle32X32VFloat32SF_TA.c @@ -0,0 +1,64 @@ +// COMMAND: random_gen -r Vle32X32VFloat32SF_TA -n 1 -l 7 --has-ta --has-ma -c Vle32X32VFloat32SF_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float32_t value_1[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vle32_v_operator_0() { +float32_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +int placeholder2 = 7; + +size_t placeholder3 = 0; +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m1_t vec_value_1_0= vle32_v_f32m1_ta(placeholder0, tail_vl); +vse32_v_f32m1(placeholder1, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vle32_v_operator_0() { +uint64_t tmp[] = {1250422356u,4294967295u,1265360466u,4294967295u,1262498700u,4294967295u,1250254620u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_1[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VFloat32VBSF_TAMA.c b/test/codegen-golden/Vle32X32VFloat32VBSF_TAMA.c new file mode 100644 index 0000000..aaacb38 --- /dev/null +++ b/test/codegen-golden/Vle32X32VFloat32VBSF_TAMA.c @@ -0,0 +1,80 @@ +// COMMAND: random_gen -r Vle32X32VFloat32VBSF_TAMA -n 1 -l 7 --has-ta --has-ma -c Vle32X32VFloat32VBSF_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1257125040u,1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vle32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat32m1_t vec_value_2_0= vle32_v_f32m1_tama(mask_value_0_0, placeholder1, tail_vl); +vse32_v_f32m1(placeholder2, vec_value_2_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle32_v_operator_0() { +uint64_t tmp[] = {4294967295u,4294967295u,1258373094u,4294967295u,1261516319u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VFloat32VBVFSF_TAMU.c b/test/codegen-golden/Vle32X32VFloat32VBVFSF_TAMU.c new file mode 100644 index 0000000..306b0db --- /dev/null +++ b/test/codegen-golden/Vle32X32VFloat32VBVFSF_TAMU.c @@ -0,0 +1,97 @@ +// COMMAND: random_gen -r Vle32X32VFloat32VBVFSF_TAMU -n 1 -l 7 --has-ta --has-ma -c Vle32X32VFloat32VBVFSF_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1257125040u,1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vle32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); +vfloat32m1_t vec_value_3_0= vle32_v_f32m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); +vse32_v_f32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle32_v_operator_0() { +uint64_t tmp[] = {1262786923u,4294967295u,1258373094u,4294967295u,1261516319u,4294967295u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VFloat32VBVFSF_TUMA.c b/test/codegen-golden/Vle32X32VFloat32VBVFSF_TUMA.c new file mode 100644 index 0000000..7b8cfa4 --- /dev/null +++ b/test/codegen-golden/Vle32X32VFloat32VBVFSF_TUMA.c @@ -0,0 +1,97 @@ +// COMMAND: random_gen -r Vle32X32VFloat32VBVFSF_TUMA -n 1 -l 7 --has-ta --has-ma -c Vle32X32VFloat32VBVFSF_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1257125040u,1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vle32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); +vfloat32m1_t vec_value_3_0= vle32_v_f32m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); +vse32_v_f32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle32_v_operator_0() { +uint64_t tmp[] = {4294967295u,1267490606u,1258373094u,1261781606u,1261516319u,1243709844u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VFloat32VBVFSF_TUMU.c b/test/codegen-golden/Vle32X32VFloat32VBVFSF_TUMU.c new file mode 100644 index 0000000..2186bad --- /dev/null +++ b/test/codegen-golden/Vle32X32VFloat32VBVFSF_TUMU.c @@ -0,0 +1,97 @@ +// COMMAND: random_gen -r Vle32X32VFloat32VBVFSF_TUMU -n 1 -l 7 --has-ta --has-ma -c Vle32X32VFloat32VBVFSF_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1257125040u,1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vle32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); +vfloat32m1_t vec_value_3_0= vle32_v_f32m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); +vse32_v_f32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle32_v_operator_0() { +uint64_t tmp[] = {1262786923u,1267490606u,1258373094u,1261781606u,1261516319u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VFloat32VBVFSF_m.c b/test/codegen-golden/Vle32X32VFloat32VBVFSF_m.c new file mode 100644 index 0000000..1969b06 --- /dev/null +++ b/test/codegen-golden/Vle32X32VFloat32VBVFSF_m.c @@ -0,0 +1,96 @@ +// COMMAND: random_gen -r Vle32X32VFloat32VBVFSF_m -n 1 -l 7 --has-ta --has-ma -c Vle32X32VFloat32VBVFSF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1257125040u,1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vle32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); +vfloat32m1_t vec_value_3_0= vle32_v_f32m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vl); +vse32_v_f32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle32_v_operator_0() { +uint64_t tmp[] = {1262786923u,1264903012u,1258373094u,1261781606u,1261516319u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VFloat32VFSF_TU.c b/test/codegen-golden/Vle32X32VFloat32VFSF_TU.c new file mode 100644 index 0000000..bd81f4c --- /dev/null +++ b/test/codegen-golden/Vle32X32VFloat32VFSF_TU.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r Vle32X32VFloat32VFSF_TU -n 1 -l 7 --has-ta --has-ma -c Vle32X32VFloat32VFSF_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1257125040u,1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vle32_v_operator_0() { +float32_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m1_t vec_value_0_0= vle32_v_f32m1(placeholder0, vl); +vfloat32m1_t vec_value_2_0= vle32_v_f32m1_tu(vec_value_0_0, placeholder1, tail_vl); +vse32_v_f32m1(placeholder2, vec_value_2_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle32_v_operator_0() { +uint64_t tmp[] = {1257125040u,1267237304u,1258373094u,1258485599u,1261516319u,1244223528u,1256322614u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VInt32SI.c b/test/codegen-golden/Vle32X32VInt32SI.c new file mode 100644 index 0000000..5e5ebe9 --- /dev/null +++ b/test/codegen-golden/Vle32X32VInt32SI.c @@ -0,0 +1,56 @@ +// COMMAND: random_gen -r Vle32X32VInt32SI -n 1 -l 7 --has-ta --has-ma -c Vle32X32VInt32SI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int32_t value_0[7]; +int32_t value_1[7]; +void vinit_rif_operator_1() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vle32_v_operator_0() { +int32_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int placeholder2 = 7; + +size_t placeholder3 = 0; +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e32m1(placeholder2); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder0, vl); +vse32_v_i32m1(placeholder1, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vle32_v_operator_0() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VInt32SI_TA.c b/test/codegen-golden/Vle32X32VInt32SI_TA.c new file mode 100644 index 0000000..f765e25 --- /dev/null +++ b/test/codegen-golden/Vle32X32VInt32SI_TA.c @@ -0,0 +1,57 @@ +// COMMAND: random_gen -r Vle32X32VInt32SI_TA -n 1 -l 7 --has-ta --has-ma -c Vle32X32VInt32SI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int32_t value_0[7]; +int32_t value_1[7]; +void vinit_rif_operator_1() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vle32_v_operator_0() { +int32_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int placeholder2 = 7; + +size_t placeholder3 = 0; +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint32m1_t vec_value_1_0= vle32_v_i32m1_ta(placeholder0, tail_vl); +vse32_v_i32m1(placeholder1, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vle32_v_operator_0() { +int32_t tmp[] = {-5545814,-1,5457874,-1,2596108,-1,-5629682,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VInt32VBSI_TAMA.c b/test/codegen-golden/Vle32X32VInt32VBSI_TAMA.c new file mode 100644 index 0000000..1387db2 --- /dev/null +++ b/test/codegen-golden/Vle32X32VInt32VBSI_TAMA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r Vle32X32VInt32VBSI_TAMA -n 1 -l 7 --has-ta --has-ma -c Vle32X32VInt32VBSI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +int32_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {-2194472,5000420,-1529498,1184154,1613727,-6426492,-2595685,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_2_0= vle32_v_i32m1_tama(mask_value_0_0, placeholder1, tail_vl); +vse32_v_i32m1(placeholder2, vec_value_2_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle32_v_operator_0() { +int32_t tmp[] = {-1,-1,-1529498,-1,1613727,-1,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VInt32VBVISI_TAMU.c b/test/codegen-golden/Vle32X32VInt32VBVISI_TAMU.c new file mode 100644 index 0000000..59586e6 --- /dev/null +++ b/test/codegen-golden/Vle32X32VInt32VBVISI_TAMU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r Vle32X32VInt32VBVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c Vle32X32VInt32VBVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +int32_t value_2[7]; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int32_t tmp[] = {-2194472,5000420,-1529498,1184154,1613727,-6426492,-2595685,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +int32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +vint32m1_t vec_value_3_0= vle32_v_i32m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); +vse32_v_i32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle32_v_operator_0() { +int32_t tmp[] = {2884331,-1,-1529498,-1,1613727,-1,-734314,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VInt32VBVISI_TUMA.c b/test/codegen-golden/Vle32X32VInt32VBVISI_TUMA.c new file mode 100644 index 0000000..c0d5082 --- /dev/null +++ b/test/codegen-golden/Vle32X32VInt32VBVISI_TUMA.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r Vle32X32VInt32VBVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c Vle32X32VInt32VBVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +int32_t value_2[7]; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int32_t tmp[] = {-2194472,5000420,-1529498,1184154,1613727,-6426492,-2595685,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +int32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +vint32m1_t vec_value_3_0= vle32_v_i32m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); +vse32_v_i32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle32_v_operator_0() { +int32_t tmp[] = {-1,8398813,-1529498,1879014,1613727,-7353883,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VInt32VBVISI_TUMU.c b/test/codegen-golden/Vle32X32VInt32VBVISI_TUMU.c new file mode 100644 index 0000000..20dfb22 --- /dev/null +++ b/test/codegen-golden/Vle32X32VInt32VBVISI_TUMU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r Vle32X32VInt32VBVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c Vle32X32VInt32VBVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +int32_t value_2[7]; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int32_t tmp[] = {-2194472,5000420,-1529498,1184154,1613727,-6426492,-2595685,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +int32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +vint32m1_t vec_value_3_0= vle32_v_i32m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); +vse32_v_i32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle32_v_operator_0() { +int32_t tmp[] = {2884331,8398813,-1529498,1879014,1613727,-7353883,-734314,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VInt32VBVISI_m.c b/test/codegen-golden/Vle32X32VInt32VBVISI_m.c new file mode 100644 index 0000000..ec4072a --- /dev/null +++ b/test/codegen-golden/Vle32X32VInt32VBVISI_m.c @@ -0,0 +1,87 @@ +// COMMAND: random_gen -r Vle32X32VInt32VBVISI_m -n 1 -l 7 --has-ta --has-ma -c Vle32X32VInt32VBVISI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +int32_t value_2[7]; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int32_t tmp[] = {-2194472,5000420,-1529498,1184154,1613727,-6426492,-2595685,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +int32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +vint32m1_t vec_value_3_0= vle32_v_i32m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vl); +vse32_v_i32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle32_v_operator_0() { +int32_t tmp[] = {2884331,5000420,-1529498,1879014,1613727,-7353883,-734314,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VInt32VISI_TU.c b/test/codegen-golden/Vle32X32VInt32VISI_TU.c new file mode 100644 index 0000000..5f2f58e --- /dev/null +++ b/test/codegen-golden/Vle32X32VInt32VISI_TU.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r Vle32X32VInt32VISI_TU -n 1 -l 7 --has-ta --has-ma -c Vle32X32VInt32VISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int32_t value_0[7]; +int32_t value_1[7]; +int32_t value_2[7]; +void vinit_rif_operator_1() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {-2194472,5000420,-1529498,1184154,1613727,-6426492,-2595685,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle32_v_operator_0() { +int32_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint32m1_t vec_value_0_0= vle32_v_i32m1(placeholder0, vl); +vint32m1_t vec_value_2_0= vle32_v_i32m1_tu(vec_value_0_0, placeholder1, tail_vl); +vse32_v_i32m1(placeholder2, vec_value_2_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle32_v_operator_0() { +int32_t tmp[] = {-2194472,7892207,-1529498,-1416993,1613727,-7225462,-2595685,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VUInt32SU.c b/test/codegen-golden/Vle32X32VUInt32SU.c new file mode 100644 index 0000000..f3544b6 --- /dev/null +++ b/test/codegen-golden/Vle32X32VUInt32SU.c @@ -0,0 +1,56 @@ +// COMMAND: random_gen -r Vle32X32VUInt32SU -n 1 -l 7 --has-ta --has-ma -c Vle32X32VUInt32SU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint32_t value_0[7]; +uint32_t value_1[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vle32_v_operator_0() { +uint32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +int placeholder2 = 7; + +size_t placeholder3 = 0; +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e32m1(placeholder2); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder0, vl); +vse32_v_u32m1(placeholder1, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vle32_v_operator_0() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VUInt32SU_TA.c b/test/codegen-golden/Vle32X32VUInt32SU_TA.c new file mode 100644 index 0000000..79f4f1e --- /dev/null +++ b/test/codegen-golden/Vle32X32VUInt32SU_TA.c @@ -0,0 +1,57 @@ +// COMMAND: random_gen -r Vle32X32VUInt32SU_TA -n 1 -l 7 --has-ta --has-ma -c Vle32X32VUInt32SU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint32_t value_0[7]; +uint32_t value_1[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vle32_v_operator_0() { +uint32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +int placeholder2 = 7; + +size_t placeholder3 = 0; +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint32m1_t vec_value_1_0= vle32_v_u32m1_ta(placeholder0, tail_vl); +vse32_v_u32m1(placeholder1, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vle32_v_operator_0() { +uint32_t tmp[] = {2227093u,4294967295u,7728937u,4294967295u,6298054u,4294967295u,2185159u,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VUInt32VBSU_TAMA.c b/test/codegen-golden/Vle32X32VUInt32VBSU_TAMA.c new file mode 100644 index 0000000..3608146 --- /dev/null +++ b/test/codegen-golden/Vle32X32VUInt32VBSU_TAMA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r Vle32X32VUInt32VBSU_TAMA -n 1 -l 7 --has-ta --has-ma -c Vle32X32VUInt32VBSU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1_tama(mask_value_0_0, placeholder1, tail_vl); +vse32_v_u32m1(placeholder2, vec_value_2_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle32_v_operator_0() { +uint32_t tmp[] = {4294967295u,4294967295u,4235251u,4294967295u,5806864u,4294967295u,4294967295u,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VUInt32VBVUSU_TAMU.c b/test/codegen-golden/Vle32X32VUInt32VBVUSU_TAMU.c new file mode 100644 index 0000000..3f8a937 --- /dev/null +++ b/test/codegen-golden/Vle32X32VUInt32VBVUSU_TAMU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r Vle32X32VUInt32VBVUSU_TAMU -n 1 -l 7 --has-ta --has-ma -c Vle32X32VUInt32VBVUSU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); +vse32_v_u32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle32_v_operator_0() { +uint32_t tmp[] = {6442165u,4294967295u,4235251u,4294967295u,5806864u,4294967295u,4632843u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VUInt32VBVUSU_TUMA.c b/test/codegen-golden/Vle32X32VUInt32VBVUSU_TUMA.c new file mode 100644 index 0000000..6c104ec --- /dev/null +++ b/test/codegen-golden/Vle32X32VUInt32VBVUSU_TUMA.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r Vle32X32VUInt32VBVUSU_TUMA -n 1 -l 7 --has-ta --has-ma -c Vle32X32VUInt32VBVUSU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); +vse32_v_u32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle32_v_operator_0() { +uint32_t tmp[] = {4294967295u,9199407u,4235251u,5939507u,5806864u,1323058u,4294967295u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VUInt32VBVUSU_TUMU.c b/test/codegen-golden/Vle32X32VUInt32VBVUSU_TUMU.c new file mode 100644 index 0000000..5503470 --- /dev/null +++ b/test/codegen-golden/Vle32X32VUInt32VBVUSU_TUMU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r Vle32X32VUInt32VBVUSU_TUMU -n 1 -l 7 --has-ta --has-ma -c Vle32X32VUInt32VBVUSU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); +vse32_v_u32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle32_v_operator_0() { +uint32_t tmp[] = {6442165u,9199407u,4235251u,5939507u,5806864u,1323058u,4632843u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VUInt32VBVUSU_m.c b/test/codegen-golden/Vle32X32VUInt32VBVUSU_m.c new file mode 100644 index 0000000..3822c4f --- /dev/null +++ b/test/codegen-golden/Vle32X32VUInt32VBVUSU_m.c @@ -0,0 +1,87 @@ +// COMMAND: random_gen -r Vle32X32VUInt32VBVUSU_m -n 1 -l 7 --has-ta --has-ma -c Vle32X32VUInt32VBVUSU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vl); +vse32_v_u32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle32_v_operator_0() { +uint32_t tmp[] = {6442165u,7500210u,4235251u,5939507u,5806864u,1323058u,4632843u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle32X32VUInt32VUSU_TU.c b/test/codegen-golden/Vle32X32VUInt32VUSU_TU.c new file mode 100644 index 0000000..0dfe8d1 --- /dev/null +++ b/test/codegen-golden/Vle32X32VUInt32VUSU_TU.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r Vle32X32VUInt32VUSU_TU -n 1 -l 7 --has-ta --has-ma -c Vle32X32VUInt32VUSU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint32_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle32_v_operator_0() { +uint32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint32m1_t vec_value_0_0= vle32_v_u32m1(placeholder0, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1_tu(vec_value_0_0, placeholder1, tail_vl); +vse32_v_u32m1(placeholder2, vec_value_2_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle32_v_operator_0() { +uint32_t tmp[] = {3902764u,8946104u,4235251u,4291503u,5806864u,1387269u,3702157u,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vle32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle64X64VInt64SI_TA.c b/test/codegen-golden/Vle64X64VInt64SI_TA.c new file mode 100644 index 0000000..c95396c --- /dev/null +++ b/test/codegen-golden/Vle64X64VInt64SI_TA.c @@ -0,0 +1,57 @@ +// COMMAND: random_gen -r Vle64X64VInt64SI_TA -n 1 -l 7 --has-ta --has-ma -c Vle64X64VInt64SI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int64_t value_0[7]; +int64_t value_1[7]; +void vinit_rif_operator_1() { +int64_t tmp[] = {-5545814ll,7892207ll,5457874ll,-1416993ll,2596108ll,-7225462ll,-5629682ll,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vle64_v_operator_0() { +int64_t *placeholder0 = value_0; +int64_t *placeholder1 = value_1; +int placeholder2 = 7; + +size_t placeholder3 = 0; +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint64m1_t vec_value_1_0= vle64_v_i64m1_ta(placeholder0, tail_vl); +vse64_v_i64m1(placeholder1, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vle64_v_operator_0() { +int64_t tmp[] = {-5545814ll,-1ll,5457874ll,-1ll,2596108ll,-1ll,-5629682ll,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vle64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vle64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle64X64VInt64VBSI_TAMA.c b/test/codegen-golden/Vle64X64VInt64VBSI_TAMA.c new file mode 100644 index 0000000..bd3cb97 --- /dev/null +++ b/test/codegen-golden/Vle64X64VInt64VBSI_TAMA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r Vle64X64VInt64VBSI_TAMA -n 1 -l 7 --has-ta --has-ma -c Vle64X64VInt64VBSI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int64_t value_1[7]; +int64_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int64_t tmp[] = {-2194472ll,5000420ll,-1529498ll,1184154ll,1613727ll,-6426492ll,-2595685ll,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle64_v_operator_0() { +int8_t *placeholder0 = value_0; +int64_t *placeholder1 = value_1; +int64_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf8_t vec_value_0= vle8_v_i8mf8(placeholder0, vl); +vbool64_t mask_value_0_0= vmseq_vx_i8mf8_b64(vec_value_0, 1, vl); +vint64m1_t vec_value_2_0= vle64_v_i64m1_tama(mask_value_0_0, placeholder1, tail_vl); +vse64_v_i64m1(placeholder2, vec_value_2_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle64_v_operator_0() { +int64_t tmp[] = {-1ll,-1ll,-1529498ll,-1ll,1613727ll,-1ll,-1ll,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vle64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle64X64VInt64VBVISI_TAMU.c b/test/codegen-golden/Vle64X64VInt64VBVISI_TAMU.c new file mode 100644 index 0000000..ad1c6a0 --- /dev/null +++ b/test/codegen-golden/Vle64X64VInt64VBVISI_TAMU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r Vle64X64VInt64VBVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c Vle64X64VInt64VBVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int64_t value_1[7]; +int64_t value_2[7]; +int64_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int64_t tmp[] = {-2194472ll,5000420ll,-1529498ll,1184154ll,1613727ll,-6426492ll,-2595685ll,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int64_t tmp[] = {2884331ll,8398813ll,1958398ll,1879014ll,2303187ll,-7353883ll,-734314ll,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle64_v_operator_0() { +int8_t *placeholder0 = value_0; +int64_t *placeholder1 = value_1; +int64_t *placeholder2 = value_2; +int64_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf8_t vec_value_0= vle8_v_i8mf8(placeholder0, vl); +vbool64_t mask_value_0_0= vmseq_vx_i8mf8_b64(vec_value_0, 1, vl); +vint64m1_t vec_value_1_0= vle64_v_i64m1(placeholder1, vl); +vint64m1_t vec_value_3_0= vle64_v_i64m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); +vse64_v_i64m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle64_v_operator_0() { +int64_t tmp[] = {2884331ll,-1ll,-1529498ll,-1ll,1613727ll,-1ll,-734314ll,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle64X64VInt64VBVISI_TUMA.c b/test/codegen-golden/Vle64X64VInt64VBVISI_TUMA.c new file mode 100644 index 0000000..5e2eab6 --- /dev/null +++ b/test/codegen-golden/Vle64X64VInt64VBVISI_TUMA.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r Vle64X64VInt64VBVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c Vle64X64VInt64VBVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int64_t value_1[7]; +int64_t value_2[7]; +int64_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int64_t tmp[] = {-2194472ll,5000420ll,-1529498ll,1184154ll,1613727ll,-6426492ll,-2595685ll,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int64_t tmp[] = {2884331ll,8398813ll,1958398ll,1879014ll,2303187ll,-7353883ll,-734314ll,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle64_v_operator_0() { +int8_t *placeholder0 = value_0; +int64_t *placeholder1 = value_1; +int64_t *placeholder2 = value_2; +int64_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf8_t vec_value_0= vle8_v_i8mf8(placeholder0, vl); +vbool64_t mask_value_0_0= vmseq_vx_i8mf8_b64(vec_value_0, 1, vl); +vint64m1_t vec_value_1_0= vle64_v_i64m1(placeholder1, vl); +vint64m1_t vec_value_3_0= vle64_v_i64m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); +vse64_v_i64m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle64_v_operator_0() { +int64_t tmp[] = {-1ll,8398813ll,-1529498ll,1879014ll,1613727ll,-7353883ll,-1ll,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle64X64VInt64VBVISI_TUMU.c b/test/codegen-golden/Vle64X64VInt64VBVISI_TUMU.c new file mode 100644 index 0000000..c388883 --- /dev/null +++ b/test/codegen-golden/Vle64X64VInt64VBVISI_TUMU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r Vle64X64VInt64VBVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c Vle64X64VInt64VBVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int64_t value_1[7]; +int64_t value_2[7]; +int64_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int64_t tmp[] = {-2194472ll,5000420ll,-1529498ll,1184154ll,1613727ll,-6426492ll,-2595685ll,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int64_t tmp[] = {2884331ll,8398813ll,1958398ll,1879014ll,2303187ll,-7353883ll,-734314ll,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle64_v_operator_0() { +int8_t *placeholder0 = value_0; +int64_t *placeholder1 = value_1; +int64_t *placeholder2 = value_2; +int64_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf8_t vec_value_0= vle8_v_i8mf8(placeholder0, vl); +vbool64_t mask_value_0_0= vmseq_vx_i8mf8_b64(vec_value_0, 1, vl); +vint64m1_t vec_value_1_0= vle64_v_i64m1(placeholder1, vl); +vint64m1_t vec_value_3_0= vle64_v_i64m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); +vse64_v_i64m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle64_v_operator_0() { +int64_t tmp[] = {2884331ll,8398813ll,-1529498ll,1879014ll,1613727ll,-7353883ll,-734314ll,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle64X64VInt64VBVISI_m.c b/test/codegen-golden/Vle64X64VInt64VBVISI_m.c new file mode 100644 index 0000000..9242bc5 --- /dev/null +++ b/test/codegen-golden/Vle64X64VInt64VBVISI_m.c @@ -0,0 +1,87 @@ +// COMMAND: random_gen -r Vle64X64VInt64VBVISI_m -n 1 -l 7 --has-ta --has-ma -c Vle64X64VInt64VBVISI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int64_t value_1[7]; +int64_t value_2[7]; +int64_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int64_t tmp[] = {-2194472ll,5000420ll,-1529498ll,1184154ll,1613727ll,-6426492ll,-2595685ll,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int64_t tmp[] = {2884331ll,8398813ll,1958398ll,1879014ll,2303187ll,-7353883ll,-734314ll,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle64_v_operator_0() { +int8_t *placeholder0 = value_0; +int64_t *placeholder1 = value_1; +int64_t *placeholder2 = value_2; +int64_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e64m1(placeholder4); +vint8mf8_t vec_value_0= vle8_v_i8mf8(placeholder0, vl); +vbool64_t mask_value_0_0= vmseq_vx_i8mf8_b64(vec_value_0, 1, vl); +vint64m1_t vec_value_1_0= vle64_v_i64m1(placeholder1, vl); +vint64m1_t vec_value_3_0= vle64_v_i64m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vl); +vse64_v_i64m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle64_v_operator_0() { +int64_t tmp[] = {2884331ll,5000420ll,-1529498ll,1879014ll,1613727ll,-7353883ll,-734314ll,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle64X64VInt64VISI_TU.c b/test/codegen-golden/Vle64X64VInt64VISI_TU.c new file mode 100644 index 0000000..948a0d0 --- /dev/null +++ b/test/codegen-golden/Vle64X64VInt64VISI_TU.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r Vle64X64VInt64VISI_TU -n 1 -l 7 --has-ta --has-ma -c Vle64X64VInt64VISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int64_t value_0[7]; +int64_t value_1[7]; +int64_t value_2[7]; +void vinit_rif_operator_1() { +int64_t tmp[] = {-5545814ll,7892207ll,5457874ll,-1416993ll,2596108ll,-7225462ll,-5629682ll,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int64_t tmp[] = {-2194472ll,5000420ll,-1529498ll,1184154ll,1613727ll,-6426492ll,-2595685ll,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle64_v_operator_0() { +int64_t *placeholder0 = value_0; +int64_t *placeholder1 = value_1; +int64_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint64m1_t vec_value_0_0= vle64_v_i64m1(placeholder0, vl); +vint64m1_t vec_value_2_0= vle64_v_i64m1_tu(vec_value_0_0, placeholder1, tail_vl); +vse64_v_i64m1(placeholder2, vec_value_2_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle64_v_operator_0() { +int64_t tmp[] = {-2194472ll,7892207ll,-1529498ll,-1416993ll,1613727ll,-7225462ll,-2595685ll,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vle64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle8X8VInt8SI_TA.c b/test/codegen-golden/Vle8X8VInt8SI_TA.c new file mode 100644 index 0000000..9452b53 --- /dev/null +++ b/test/codegen-golden/Vle8X8VInt8SI_TA.c @@ -0,0 +1,57 @@ +// COMMAND: random_gen -r Vle8X8VInt8SI_TA -n 1 -l 7 --has-ta --has-ma -c Vle8X8VInt8SI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vle8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int placeholder2 = 7; + +size_t placeholder3 = 0; +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_1_0= vle8_v_i8m1_ta(placeholder0, tail_vl); +vse8_v_i8m1(placeholder1, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vle8_v_operator_0() { +int8_t tmp[] = {-56,-1,55,-1,26,-1,-57,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vle8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vle8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle8X8VInt8VBSI_TAMA.c b/test/codegen-golden/Vle8X8VInt8VBSI_TAMA.c new file mode 100644 index 0000000..d708958 --- /dev/null +++ b/test/codegen-golden/Vle8X8VInt8VBSI_TAMA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r Vle8X8VInt8VBSI_TAMA -n 1 -l 7 --has-ta --has-ma -c Vle8X8VInt8VBSI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1_tama(mask_value_0_0, placeholder1, tail_vl); +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle8_v_operator_0() { +int8_t tmp[] = {-1,-1,-15,-1,16,-1,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vle8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle8X8VInt8VBVISI_TAMU.c b/test/codegen-golden/Vle8X8VInt8VBVISI_TAMU.c new file mode 100644 index 0000000..4a54a3d --- /dev/null +++ b/test/codegen-golden/Vle8X8VInt8VBVISI_TAMU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r Vle8X8VInt8VBVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c Vle8X8VInt8VBVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle8_v_operator_0() { +int8_t tmp[] = {29,-1,-15,-1,16,-1,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle8X8VInt8VBVISI_TUMA.c b/test/codegen-golden/Vle8X8VInt8VBVISI_TUMA.c new file mode 100644 index 0000000..a584840 --- /dev/null +++ b/test/codegen-golden/Vle8X8VInt8VBVISI_TUMA.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r Vle8X8VInt8VBVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c Vle8X8VInt8VBVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle8_v_operator_0() { +int8_t tmp[] = {-1,84,-15,19,16,-74,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle8X8VInt8VBVISI_TUMU.c b/test/codegen-golden/Vle8X8VInt8VBVISI_TUMU.c new file mode 100644 index 0000000..3f078af --- /dev/null +++ b/test/codegen-golden/Vle8X8VInt8VBVISI_TUMU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r Vle8X8VInt8VBVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c Vle8X8VInt8VBVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle8_v_operator_0() { +int8_t tmp[] = {29,84,-15,19,16,-74,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle8X8VInt8VBVISI_m.c b/test/codegen-golden/Vle8X8VInt8VBVISI_m.c new file mode 100644 index 0000000..1218ecb --- /dev/null +++ b/test/codegen-golden/Vle8X8VInt8VBVISI_m.c @@ -0,0 +1,87 @@ +// COMMAND: random_gen -r Vle8X8VInt8VBVISI_m -n 1 -l 7 --has-ta --has-ma -c Vle8X8VInt8VBVISI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vl); +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle8_v_operator_0() { +int8_t tmp[] = {29,50,-15,19,16,-74,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vle8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vle8X8VInt8VISI_TU.c b/test/codegen-golden/Vle8X8VInt8VISI_TU.c new file mode 100644 index 0000000..a7b4d0a --- /dev/null +++ b/test/codegen-golden/Vle8X8VInt8VISI_TU.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r Vle8X8VInt8VISI_TU -n 1 -l 7 --has-ta --has-ma -c Vle8X8VInt8VISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vle8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1_tu(vec_value_0_0, placeholder1, tail_vl); +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vle8_v_operator_0() { +int8_t tmp[] = {-22,79,-15,-14,16,-73,-26,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vle8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vle8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vle8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei16V8VInt8SIVU_TA.c b/test/codegen-golden/Vloxei16V8VInt8SIVU_TA.c new file mode 100644 index 0000000..26cc7ca --- /dev/null +++ b/test/codegen-golden/Vloxei16V8VInt8SIVU_TA.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r Vloxei16V8VInt8SIVU_TA -n 1 -l 7 --has-ta --has-ma -c Vloxei16V8VInt8SIVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {3903,7500,4235,5592,5807,1786,3702,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vloxei16_v_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +if (7 < 65535) { +vec_value_1_0 = vremu_vx_u16m2(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u16m2(vec_value_1_0, 1, vl); +vint8m1_t vec_value_2_0= vloxei16_v_i8m1_ta(placeholder0, vec_value_1_0, tail_vl); +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei16_v_operator_0() { +int8_t tmp[] = {26,-1,-56,-1,26,-1,-57,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vloxei16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei16V8VInt8VBSIVU_TAMA.c b/test/codegen-golden/Vloxei16V8VInt8VBSIVU_TAMA.c new file mode 100644 index 0000000..35c2a7a --- /dev/null +++ b/test/codegen-golden/Vloxei16V8VInt8VBSIVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Vloxei16V8VInt8VBSIVU_TAMA -n 1 -l 7 --has-ta --has-ma -c Vloxei16V8VInt8VBSIVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {3903,7500,4235,5592,5807,1786,3702,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vloxei16_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); +if (7 < 65535) { +vuint16m2_t placeholder6= vmv_v_x_u16m2(0, vsetvlmax_e16m2()); +vec_value_2_0 = vremu_vx_u16m2_m(mask_value_0_0, placeholder6, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u16m2(vec_value_2_0, 1, vl); +vint8m1_t vec_value_3_0= vloxei16_v_i8m1_tama(mask_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei16_v_operator_0() { +int8_t tmp[] = {-1,-1,29,-1,23,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vloxei16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei16V8VInt8VBVISIVU_TAMU.c b/test/codegen-golden/Vloxei16V8VInt8VBVISIVU_TAMU.c new file mode 100644 index 0000000..40f96f0 --- /dev/null +++ b/test/codegen-golden/Vloxei16V8VInt8VBVISIVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vloxei16V8VInt8VBVISIVU_TAMU -n 1 -l 7 --has-ta --has-ma -c Vloxei16V8VInt8VBVISIVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint16_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {3903,7500,4235,5592,5807,1786,3702,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei16_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint16m2_t vec_value_3_0= vle16_v_u16m2(placeholder3, vl); +if (7 < 65535) { +vuint16m2_t placeholder7= vmv_v_x_u16m2(0, vsetvlmax_e16m2()); +vec_value_3_0 = vremu_vx_u16m2_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u16m2(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vloxei16_v_i8m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei16_v_operator_0() { +int8_t tmp[] = {29,-1,70,-1,-39,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei16V8VInt8VBVISIVU_TUMA.c b/test/codegen-golden/Vloxei16V8VInt8VBVISIVU_TUMA.c new file mode 100644 index 0000000..faf258d --- /dev/null +++ b/test/codegen-golden/Vloxei16V8VInt8VBVISIVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vloxei16V8VInt8VBVISIVU_TUMA -n 1 -l 7 --has-ta --has-ma -c Vloxei16V8VInt8VBVISIVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint16_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {3903,7500,4235,5592,5807,1786,3702,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei16_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint16m2_t vec_value_3_0= vle16_v_u16m2(placeholder3, vl); +if (7 < 65535) { +vuint16m2_t placeholder7= vmv_v_x_u16m2(0, vsetvlmax_e16m2()); +vec_value_3_0 = vremu_vx_u16m2_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u16m2(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vloxei16_v_i8m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei16_v_operator_0() { +int8_t tmp[] = {-1,84,70,19,-39,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei16V8VInt8VBVISIVU_TUMU.c b/test/codegen-golden/Vloxei16V8VInt8VBVISIVU_TUMU.c new file mode 100644 index 0000000..85b0938 --- /dev/null +++ b/test/codegen-golden/Vloxei16V8VInt8VBVISIVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vloxei16V8VInt8VBVISIVU_TUMU -n 1 -l 7 --has-ta --has-ma -c Vloxei16V8VInt8VBVISIVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint16_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {3903,7500,4235,5592,5807,1786,3702,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei16_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint16m2_t vec_value_3_0= vle16_v_u16m2(placeholder3, vl); +if (7 < 65535) { +vuint16m2_t placeholder7= vmv_v_x_u16m2(0, vsetvlmax_e16m2()); +vec_value_3_0 = vremu_vx_u16m2_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u16m2(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vloxei16_v_i8m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei16_v_operator_0() { +int8_t tmp[] = {29,84,70,19,-39,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei16V8VInt8VBVISIVU_m.c b/test/codegen-golden/Vloxei16V8VInt8VBVISIVU_m.c new file mode 100644 index 0000000..3a54087 --- /dev/null +++ b/test/codegen-golden/Vloxei16V8VInt8VBVISIVU_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r Vloxei16V8VInt8VBVISIVU_m -n 1 -l 7 --has-ta --has-ma -c Vloxei16V8VInt8VBVISIVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint16_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {3903,7500,4235,5592,5807,1786,3702,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei16_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint16m2_t vec_value_3_0= vle16_v_u16m2(placeholder3, vl); +if (7 < 65535) { +vuint16m2_t placeholder7= vmv_v_x_u16m2(0, vsetvlmax_e16m2()); +vec_value_3_0 = vremu_vx_u16m2_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u16m2(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vloxei16_v_i8m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei16_v_operator_0() { +int8_t tmp[] = {29,92,70,19,-39,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei16V8VInt8VISIVU_TU.c b/test/codegen-golden/Vloxei16V8VInt8VISIVU_TU.c new file mode 100644 index 0000000..0377abe --- /dev/null +++ b/test/codegen-golden/Vloxei16V8VInt8VISIVU_TU.c @@ -0,0 +1,90 @@ +// COMMAND: random_gen -r Vloxei16V8VInt8VISIVU_TU -n 1 -l 7 --has-ta --has-ma -c Vloxei16V8VInt8VISIVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {3903,7500,4235,5592,5807,1786,3702,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vloxei16_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); +if (7 < 65535) { +vec_value_2_0 = vremu_vx_u16m2(vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u16m2(vec_value_2_0, 1, vl); +vint8m1_t vec_value_3_0= vloxei16_v_i8m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei16_v_operator_0() { +int8_t tmp[] = {23,79,29,-14,23,-73,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vloxei16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VFloat32SFVU.c b/test/codegen-golden/Vloxei32V32VFloat32SFVU.c new file mode 100644 index 0000000..357fb80 --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VFloat32SFVU.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r Vloxei32V32VFloat32SFVU -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VFloat32SFVU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +uint32_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +float32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e32m1(placeholder3); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +if (7 < 4294967295) { +vec_value_1_0 = vremu_vx_u32m1(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u32m1(vec_value_1_0, 4, vl); +vfloat32m1_t vec_value_2_0= vloxei32_v_f32m1(placeholder0, vec_value_1_0, vl); +vse32_v_f32m1(placeholder2, vec_value_2_0, vl); +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei32_v_operator_0() { +uint64_t tmp[] = {1244223528u,1262498700u,1250254620u,1267237304u,1250422356u,1262498700u,1262498700u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VFloat32SFVU_TA.c b/test/codegen-golden/Vloxei32V32VFloat32SFVU_TA.c new file mode 100644 index 0000000..0a9be35 --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VFloat32SFVU_TA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r Vloxei32V32VFloat32SFVU_TA -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VFloat32SFVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +uint32_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +float32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +if (7 < 4294967295) { +vec_value_1_0 = vremu_vx_u32m1(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u32m1(vec_value_1_0, 4, vl); +vfloat32m1_t vec_value_2_0= vloxei32_v_f32m1_ta(placeholder0, vec_value_1_0, tail_vl); +vse32_v_f32m1(placeholder2, vec_value_2_0, vl); +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei32_v_operator_0() { +uint64_t tmp[] = {1244223528u,4294967295u,1250254620u,4294967295u,1250422356u,4294967295u,1262498700u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VFloat32VBSFVU_TAMA.c b/test/codegen-golden/Vloxei32V32VFloat32VBSFVU_TAMA.c new file mode 100644 index 0000000..901c186 --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VFloat32VBSFVU_TAMA.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r Vloxei32V32VFloat32VBSFVU_TAMA -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VFloat32VBSFVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +uint32_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vloxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1(placeholder2, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder6= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_2_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder6, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m1(vec_value_2_0, 4, vl); +vfloat32m1_t vec_value_3_0= vloxei32_v_f32m1_tama(mask_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse32_v_f32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei32_v_operator_0() { +uint64_t tmp[] = {4294967295u,4294967295u,1259168278u,4294967295u,1262786923u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VFloat32VBVFSFVU_TAMU.c b/test/codegen-golden/Vloxei32V32VFloat32VBVFSFVU_TAMU.c new file mode 100644 index 0000000..5102dad --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VFloat32VBVFSFVU_TAMU.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r Vloxei32V32VFloat32VBVFSFVU_TAMU -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VFloat32VBVFSFVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +uint32_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1266779219u,1255845574u,1263781768u,1267886662u,1253798282u,1250916304u,1253542582u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vloxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vfloat32m1_t vec_value_4_0= vloxei32_v_f32m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse32_v_f32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei32_v_operator_0() { +uint64_t tmp[] = {1262786923u,4294967295u,1253542582u,4294967295u,1266779219u,4294967295u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VFloat32VBVFSFVU_TUMA.c b/test/codegen-golden/Vloxei32V32VFloat32VBVFSFVU_TUMA.c new file mode 100644 index 0000000..fe8bb33 --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VFloat32VBVFSFVU_TUMA.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r Vloxei32V32VFloat32VBVFSFVU_TUMA -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VFloat32VBVFSFVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +uint32_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1266779219u,1255845574u,1263781768u,1267886662u,1253798282u,1250916304u,1253542582u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vloxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vfloat32m1_t vec_value_4_0= vloxei32_v_f32m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse32_v_f32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei32_v_operator_0() { +uint64_t tmp[] = {4294967295u,1267490606u,1253542582u,1261781606u,1266779219u,1243709844u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VFloat32VBVFSFVU_TUMU.c b/test/codegen-golden/Vloxei32V32VFloat32VBVFSFVU_TUMU.c new file mode 100644 index 0000000..b28be9e --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VFloat32VBVFSFVU_TUMU.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r Vloxei32V32VFloat32VBVFSFVU_TUMU -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VFloat32VBVFSFVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +uint32_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1266779219u,1255845574u,1263781768u,1267886662u,1253798282u,1250916304u,1253542582u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vloxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vfloat32m1_t vec_value_4_0= vloxei32_v_f32m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse32_v_f32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei32_v_operator_0() { +uint64_t tmp[] = {1262786923u,1267490606u,1253542582u,1261781606u,1266779219u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VFloat32VBVFSFVU_m.c b/test/codegen-golden/Vloxei32V32VFloat32VBVFSFVU_m.c new file mode 100644 index 0000000..524e983 --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VFloat32VBVFSFVU_m.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r Vloxei32V32VFloat32VBVFSFVU_m -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VFloat32VBVFSFVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +uint32_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1266779219u,1255845574u,1263781768u,1267886662u,1253798282u,1250916304u,1253542582u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vloxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vfloat32m1_t vec_value_4_0= vloxei32_v_f32m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); +vse32_v_f32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei32_v_operator_0() { +uint64_t tmp[] = {1262786923u,1253798282u,1253542582u,1261781606u,1266779219u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VFloat32VFSFVU_TU.c b/test/codegen-golden/Vloxei32V32VFloat32VFSFVU_TU.c new file mode 100644 index 0000000..0b36224 --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VFloat32VFSFVU_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r Vloxei32V32VFloat32VFSFVU_TU -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VFloat32VFSFVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float32_t value_1[7]; +uint32_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vloxei32_v_operator_0() { +float32_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m1_t vec_value_0_0= vle32_v_f32m1(placeholder0, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1(placeholder2, vl); +if (7 < 4294967295) { +vec_value_2_0 = vremu_vx_u32m1(vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m1(vec_value_2_0, 4, vl); +vfloat32m1_t vec_value_3_0= vloxei32_v_f32m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse32_v_f32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei32_v_operator_0() { +uint64_t tmp[] = {1243709844u,1267237304u,1259168278u,1258485599u,1262786923u,1244223528u,1262205779u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VInt32SIVU.c b/test/codegen-golden/Vloxei32V32VInt32SIVU.c new file mode 100644 index 0000000..70f0276 --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VInt32SIVU.c @@ -0,0 +1,74 @@ +// COMMAND: random_gen -r Vloxei32V32VInt32SIVU -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VInt32SIVU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int32_t value_0[7]; +uint32_t value_1[7]; +int32_t value_2[7]; +void vinit_rif_operator_1() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +int32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e32m1(placeholder3); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +if (7 < 4294967295) { +vec_value_1_0 = vremu_vx_u32m1(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u32m1(vec_value_1_0, 4, vl); +vint32m1_t vec_value_2_0= vloxei32_v_i32m1(placeholder0, vec_value_1_0, vl); +vse32_v_i32m1(placeholder2, vec_value_2_0, vl); +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei32_v_operator_0() { +int32_t tmp[] = {-7225462,2596108,-5629682,7892207,-5545814,2596108,2596108,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VInt32SIVU_TA.c b/test/codegen-golden/Vloxei32V32VInt32SIVU_TA.c new file mode 100644 index 0000000..decca63 --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VInt32SIVU_TA.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r Vloxei32V32VInt32SIVU_TA -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VInt32SIVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int32_t value_0[7]; +uint32_t value_1[7]; +int32_t value_2[7]; +void vinit_rif_operator_1() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +int32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +if (7 < 4294967295) { +vec_value_1_0 = vremu_vx_u32m1(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u32m1(vec_value_1_0, 4, vl); +vint32m1_t vec_value_2_0= vloxei32_v_i32m1_ta(placeholder0, vec_value_1_0, tail_vl); +vse32_v_i32m1(placeholder2, vec_value_2_0, vl); +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei32_v_operator_0() { +int32_t tmp[] = {-7225462,-1,-5629682,-1,-5545814,-1,2596108,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VInt32VBSIVU_TAMA.c b/test/codegen-golden/Vloxei32V32VInt32VBSIVU_TAMA.c new file mode 100644 index 0000000..538812d --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VInt32VBSIVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Vloxei32V32VInt32VBSIVU_TAMA -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VInt32VBSIVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +uint32_t value_2[7]; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +int32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1(placeholder2, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder6= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_2_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder6, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m1(vec_value_2_0, 4, vl); +vint32m1_t vec_value_3_0= vloxei32_v_i32m1_tama(mask_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse32_v_i32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei32_v_operator_0() { +int32_t tmp[] = {-1,-1,-734314,-1,2884331,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VInt32VBVISIVU_TAMU.c b/test/codegen-golden/Vloxei32V32VInt32VBVISIVU_TAMU.c new file mode 100644 index 0000000..62960d0 --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VInt32VBVISIVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vloxei32V32VInt32VBVISIVU_TAMU -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VInt32VBVISIVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +int32_t value_2[7]; +uint32_t value_3[7]; +int32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int32_t tmp[] = {6976038,-2834205,3879176,9190924,-3857851,-5298840,-3985701,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vint32m1_t vec_value_4_0= vloxei32_v_i32m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse32_v_i32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei32_v_operator_0() { +int32_t tmp[] = {2884331,-1,-3985701,-1,6976038,-1,-734314,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VInt32VBVISIVU_TUMA.c b/test/codegen-golden/Vloxei32V32VInt32VBVISIVU_TUMA.c new file mode 100644 index 0000000..461bbae --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VInt32VBVISIVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vloxei32V32VInt32VBVISIVU_TUMA -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VInt32VBVISIVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +int32_t value_2[7]; +uint32_t value_3[7]; +int32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int32_t tmp[] = {6976038,-2834205,3879176,9190924,-3857851,-5298840,-3985701,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vint32m1_t vec_value_4_0= vloxei32_v_i32m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse32_v_i32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei32_v_operator_0() { +int32_t tmp[] = {-1,8398813,-3985701,1879014,6976038,-7353883,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VInt32VBVISIVU_TUMU.c b/test/codegen-golden/Vloxei32V32VInt32VBVISIVU_TUMU.c new file mode 100644 index 0000000..abe8ea8 --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VInt32VBVISIVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vloxei32V32VInt32VBVISIVU_TUMU -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VInt32VBVISIVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +int32_t value_2[7]; +uint32_t value_3[7]; +int32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int32_t tmp[] = {6976038,-2834205,3879176,9190924,-3857851,-5298840,-3985701,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vint32m1_t vec_value_4_0= vloxei32_v_i32m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse32_v_i32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei32_v_operator_0() { +int32_t tmp[] = {2884331,8398813,-3985701,1879014,6976038,-7353883,-734314,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VInt32VBVISIVU_m.c b/test/codegen-golden/Vloxei32V32VInt32VBVISIVU_m.c new file mode 100644 index 0000000..03828dd --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VInt32VBVISIVU_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r Vloxei32V32VInt32VBVISIVU_m -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VInt32VBVISIVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +int32_t value_2[7]; +uint32_t value_3[7]; +int32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int32_t tmp[] = {6976038,-2834205,3879176,9190924,-3857851,-5298840,-3985701,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vint32m1_t vec_value_4_0= vloxei32_v_i32m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); +vse32_v_i32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei32_v_operator_0() { +int32_t tmp[] = {2884331,-3857851,-3985701,1879014,6976038,-7353883,-734314,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VInt32VISIVU_TU.c b/test/codegen-golden/Vloxei32V32VInt32VISIVU_TU.c new file mode 100644 index 0000000..c1ed06a --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VInt32VISIVU_TU.c @@ -0,0 +1,90 @@ +// COMMAND: random_gen -r Vloxei32V32VInt32VISIVU_TU -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VInt32VISIVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int32_t value_0[7]; +int32_t value_1[7]; +uint32_t value_2[7]; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +int32_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +int32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint32m1_t vec_value_0_0= vle32_v_i32m1(placeholder0, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1(placeholder2, vl); +if (7 < 4294967295) { +vec_value_2_0 = vremu_vx_u32m1(vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m1(vec_value_2_0, 4, vl); +vint32m1_t vec_value_3_0= vloxei32_v_i32m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse32_v_i32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei32_v_operator_0() { +int32_t tmp[] = {-7353883,7892207,-734314,-1416993,2884331,-7225462,2303187,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VUInt32SUVU.c b/test/codegen-golden/Vloxei32V32VUInt32SUVU.c new file mode 100644 index 0000000..91e8b19 --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VUInt32SUVU.c @@ -0,0 +1,74 @@ +// COMMAND: random_gen -r Vloxei32V32VUInt32SUVU -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VUInt32SUVU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint32_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +uint32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e32m1(placeholder3); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +if (7 < 4294967295) { +vec_value_1_0 = vremu_vx_u32m1(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u32m1(vec_value_1_0, 4, vl); +vuint32m1_t vec_value_2_0= vloxei32_v_u32m1(placeholder0, vec_value_1_0, vl); +vse32_v_u32m1(placeholder2, vec_value_2_0, vl); +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei32_v_operator_0() { +uint32_t tmp[] = {1387269u,6298054u,2185159u,8946104u,2227093u,6298054u,6298054u,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VUInt32SUVU_TA.c b/test/codegen-golden/Vloxei32V32VUInt32SUVU_TA.c new file mode 100644 index 0000000..a50ed17 --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VUInt32SUVU_TA.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r Vloxei32V32VUInt32SUVU_TA -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VUInt32SUVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint32_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +uint32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +if (7 < 4294967295) { +vec_value_1_0 = vremu_vx_u32m1(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u32m1(vec_value_1_0, 4, vl); +vuint32m1_t vec_value_2_0= vloxei32_v_u32m1_ta(placeholder0, vec_value_1_0, tail_vl); +vse32_v_u32m1(placeholder2, vec_value_2_0, vl); +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei32_v_operator_0() { +uint32_t tmp[] = {1387269u,4294967295u,2185159u,4294967295u,2227093u,4294967295u,6298054u,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VUInt32VBSUVU_TAMA.c b/test/codegen-golden/Vloxei32V32VUInt32VBSUVU_TAMA.c new file mode 100644 index 0000000..aaa61a8 --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VUInt32VBSUVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Vloxei32V32VUInt32VBSUVU_TAMA -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VUInt32VBSUVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1(placeholder2, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder6= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_2_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder6, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m1(vec_value_2_0, 4, vl); +vuint32m1_t vec_value_3_0= vloxei32_v_u32m1_tama(mask_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse32_v_u32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei32_v_operator_0() { +uint32_t tmp[] = {4294967295u,4294967295u,4632843u,4294967295u,6442165u,4294967295u,4294967295u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VUInt32VBVUSUVU_TAMU.c b/test/codegen-golden/Vloxei32V32VUInt32VBVUSUVU_TAMU.c new file mode 100644 index 0000000..a23f542 --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VUInt32VBVUSUVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vloxei32V32VUInt32VBVUSUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VUInt32VBVUSUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +uint32_t value_3[7]; +uint32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {8488019u,3582897u,6939588u,9595462u,3071074u,2350580u,3007149u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +uint32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vuint32m1_t vec_value_4_0= vloxei32_v_u32m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse32_v_u32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei32_v_operator_0() { +uint32_t tmp[] = {6442165u,4294967295u,3007149u,4294967295u,8488019u,4294967295u,4632843u,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VUInt32VBVUSUVU_TUMA.c b/test/codegen-golden/Vloxei32V32VUInt32VBVUSUVU_TUMA.c new file mode 100644 index 0000000..5012ff5 --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VUInt32VBVUSUVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vloxei32V32VUInt32VBVUSUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VUInt32VBVUSUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +uint32_t value_3[7]; +uint32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {8488019u,3582897u,6939588u,9595462u,3071074u,2350580u,3007149u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +uint32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vuint32m1_t vec_value_4_0= vloxei32_v_u32m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse32_v_u32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei32_v_operator_0() { +uint32_t tmp[] = {4294967295u,9199407u,3007149u,5939507u,8488019u,1323058u,4294967295u,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VUInt32VBVUSUVU_TUMU.c b/test/codegen-golden/Vloxei32V32VUInt32VBVUSUVU_TUMU.c new file mode 100644 index 0000000..34e1ecc --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VUInt32VBVUSUVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vloxei32V32VUInt32VBVUSUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VUInt32VBVUSUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +uint32_t value_3[7]; +uint32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {8488019u,3582897u,6939588u,9595462u,3071074u,2350580u,3007149u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +uint32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vuint32m1_t vec_value_4_0= vloxei32_v_u32m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse32_v_u32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei32_v_operator_0() { +uint32_t tmp[] = {6442165u,9199407u,3007149u,5939507u,8488019u,1323058u,4632843u,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VUInt32VBVUSUVU_m.c b/test/codegen-golden/Vloxei32V32VUInt32VBVUSUVU_m.c new file mode 100644 index 0000000..a51aa59 --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VUInt32VBVUSUVU_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r Vloxei32V32VUInt32VBVUSUVU_m -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VUInt32VBVUSUVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +uint32_t value_3[7]; +uint32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {8488019u,3582897u,6939588u,9595462u,3071074u,2350580u,3007149u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +uint32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vuint32m1_t vec_value_4_0= vloxei32_v_u32m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); +vse32_v_u32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei32_v_operator_0() { +uint32_t tmp[] = {6442165u,3071074u,3007149u,5939507u,8488019u,1323058u,4632843u,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V32VUInt32VUSUVU_TU.c b/test/codegen-golden/Vloxei32V32VUInt32VUSUVU_TU.c new file mode 100644 index 0000000..9198a84 --- /dev/null +++ b/test/codegen-golden/Vloxei32V32VUInt32VUSUVU_TU.c @@ -0,0 +1,90 @@ +// COMMAND: random_gen -r Vloxei32V32VUInt32VUSUVU_TU -n 1 -l 7 --has-ta --has-ma -c Vloxei32V32VUInt32VUSUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint32_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +uint32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint32m1_t vec_value_0_0= vle32_v_u32m1(placeholder0, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1(placeholder2, vl); +if (7 < 4294967295) { +vec_value_2_0 = vremu_vx_u32m1(vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m1(vec_value_2_0, 4, vl); +vuint32m1_t vec_value_3_0= vloxei32_v_u32m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse32_v_u32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei32_v_operator_0() { +uint32_t tmp[] = {1323058u,8946104u,4632843u,4291503u,6442165u,1387269u,6151593u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V8VInt8SIVU_TA.c b/test/codegen-golden/Vloxei32V8VInt8SIVU_TA.c new file mode 100644 index 0000000..7a6eb81 --- /dev/null +++ b/test/codegen-golden/Vloxei32V8VInt8SIVU_TA.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r Vloxei32V8VInt8SIVU_TA -n 1 -l 7 --has-ta --has-ma -c Vloxei32V8VInt8SIVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint32m4_t vec_value_1_0= vle32_v_u32m4(placeholder1, vl); +if (7 < 4294967295) { +vec_value_1_0 = vremu_vx_u32m4(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u32m4(vec_value_1_0, 1, vl); +vint8m1_t vec_value_2_0= vloxei32_v_i8m1_ta(placeholder0, vec_value_1_0, tail_vl); +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei32_v_operator_0() { +int8_t tmp[] = {-73,-1,-57,-1,-56,-1,26,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V8VInt8VBSIVU_TAMA.c b/test/codegen-golden/Vloxei32V8VInt8VBSIVU_TAMA.c new file mode 100644 index 0000000..226bb7a --- /dev/null +++ b/test/codegen-golden/Vloxei32V8VInt8VBSIVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Vloxei32V8VInt8VBSIVU_TAMA -n 1 -l 7 --has-ta --has-ma -c Vloxei32V8VInt8VBSIVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint32_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint32m4_t vec_value_2_0= vle32_v_u32m4(placeholder2, vl); +if (7 < 4294967295) { +vuint32m4_t placeholder6= vmv_v_x_u32m4(0, vsetvlmax_e32m4()); +vec_value_2_0 = vremu_vx_u32m4_m(mask_value_0_0, placeholder6, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m4(vec_value_2_0, 1, vl); +vint8m1_t vec_value_3_0= vloxei32_v_i8m1_tama(mask_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei32_v_operator_0() { +int8_t tmp[] = {-1,-1,-7,-1,29,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V8VInt8VBVISIVU_TAMU.c b/test/codegen-golden/Vloxei32V8VInt8VBVISIVU_TAMU.c new file mode 100644 index 0000000..87d739a --- /dev/null +++ b/test/codegen-golden/Vloxei32V8VInt8VBVISIVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vloxei32V8VInt8VBVISIVU_TAMU -n 1 -l 7 --has-ta --has-ma -c Vloxei32V8VInt8VBVISIVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint32_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint32m4_t vec_value_3_0= vle32_v_u32m4(placeholder3, vl); +if (7 < 4294967295) { +vuint32m4_t placeholder7= vmv_v_x_u32m4(0, vsetvlmax_e32m4()); +vec_value_3_0 = vremu_vx_u32m4_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m4(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vloxei32_v_i8m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei32_v_operator_0() { +int8_t tmp[] = {29,-1,-40,-1,70,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V8VInt8VBVISIVU_TUMA.c b/test/codegen-golden/Vloxei32V8VInt8VBVISIVU_TUMA.c new file mode 100644 index 0000000..f160269 --- /dev/null +++ b/test/codegen-golden/Vloxei32V8VInt8VBVISIVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vloxei32V8VInt8VBVISIVU_TUMA -n 1 -l 7 --has-ta --has-ma -c Vloxei32V8VInt8VBVISIVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint32_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint32m4_t vec_value_3_0= vle32_v_u32m4(placeholder3, vl); +if (7 < 4294967295) { +vuint32m4_t placeholder7= vmv_v_x_u32m4(0, vsetvlmax_e32m4()); +vec_value_3_0 = vremu_vx_u32m4_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m4(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vloxei32_v_i8m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei32_v_operator_0() { +int8_t tmp[] = {-1,84,-40,19,70,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V8VInt8VBVISIVU_TUMU.c b/test/codegen-golden/Vloxei32V8VInt8VBVISIVU_TUMU.c new file mode 100644 index 0000000..e953e25 --- /dev/null +++ b/test/codegen-golden/Vloxei32V8VInt8VBVISIVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vloxei32V8VInt8VBVISIVU_TUMU -n 1 -l 7 --has-ta --has-ma -c Vloxei32V8VInt8VBVISIVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint32_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint32m4_t vec_value_3_0= vle32_v_u32m4(placeholder3, vl); +if (7 < 4294967295) { +vuint32m4_t placeholder7= vmv_v_x_u32m4(0, vsetvlmax_e32m4()); +vec_value_3_0 = vremu_vx_u32m4_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m4(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vloxei32_v_i8m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei32_v_operator_0() { +int8_t tmp[] = {29,84,-40,19,70,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V8VInt8VBVISIVU_m.c b/test/codegen-golden/Vloxei32V8VInt8VBVISIVU_m.c new file mode 100644 index 0000000..605fa8e --- /dev/null +++ b/test/codegen-golden/Vloxei32V8VInt8VBVISIVU_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r Vloxei32V8VInt8VBVISIVU_m -n 1 -l 7 --has-ta --has-ma -c Vloxei32V8VInt8VBVISIVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint32_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint32m4_t vec_value_3_0= vle32_v_u32m4(placeholder3, vl); +if (7 < 4294967295) { +vuint32m4_t placeholder7= vmv_v_x_u32m4(0, vsetvlmax_e32m4()); +vec_value_3_0 = vremu_vx_u32m4_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m4(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vloxei32_v_i8m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei32_v_operator_0() { +int8_t tmp[] = {29,-39,-40,19,70,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei32V8VInt8VISIVU_TU.c b/test/codegen-golden/Vloxei32V8VInt8VISIVU_TU.c new file mode 100644 index 0000000..849e29f --- /dev/null +++ b/test/codegen-golden/Vloxei32V8VInt8VISIVU_TU.c @@ -0,0 +1,90 @@ +// COMMAND: random_gen -r Vloxei32V8VInt8VISIVU_TU -n 1 -l 7 --has-ta --has-ma -c Vloxei32V8VInt8VISIVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint32_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vloxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vuint32m4_t vec_value_2_0= vle32_v_u32m4(placeholder2, vl); +if (7 < 4294967295) { +vec_value_2_0 = vremu_vx_u32m4(vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m4(vec_value_2_0, 1, vl); +vint8m1_t vec_value_3_0= vloxei32_v_i8m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei32_v_operator_0() { +int8_t tmp[] = {-74,79,-7,-14,29,-73,23,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vloxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei64V8VInt8SIVU_TA.c b/test/codegen-golden/Vloxei64V8VInt8SIVU_TA.c new file mode 100644 index 0000000..cde2c57 --- /dev/null +++ b/test/codegen-golden/Vloxei64V8VInt8SIVU_TA.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r Vloxei64V8VInt8SIVU_TA -n 1 -l 7 --has-ta --has-ma -c Vloxei64V8VInt8SIVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint64_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint64_t tmp[] = {3902764ull,7500210ull,4235251ull,5592077ull,5806864ull,1786754ull,3702157ull,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vloxei64_v_operator_0() { +int8_t *placeholder0 = value_0; +uint64_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint64m8_t vec_value_1_0= vle64_v_u64m8(placeholder1, vl); +{ +vec_value_1_0 = vremu_vx_u64m8(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u64m8(vec_value_1_0, 1, vl); +vint8m1_t vec_value_2_0= vloxei64_v_i8m1_ta(placeholder0, vec_value_1_0, tail_vl); +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei64_v_operator_0() { +int8_t tmp[] = {-73,-1,-57,-1,-56,-1,26,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vloxei64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei64V8VInt8VBSIVU_TAMA.c b/test/codegen-golden/Vloxei64V8VInt8VBSIVU_TAMA.c new file mode 100644 index 0000000..a44d80d --- /dev/null +++ b/test/codegen-golden/Vloxei64V8VInt8VBSIVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Vloxei64V8VInt8VBSIVU_TAMA -n 1 -l 7 --has-ta --has-ma -c Vloxei64V8VInt8VBSIVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint64_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint64_t tmp[] = {3902764ull,7500210ull,4235251ull,5592077ull,5806864ull,1786754ull,3702157ull,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vloxei64_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint64_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint64m8_t vec_value_2_0= vle64_v_u64m8(placeholder2, vl); +{ +vuint64m8_t placeholder6= vmv_v_x_u64m8(0, vsetvlmax_e64m8()); +vec_value_2_0 = vremu_vx_u64m8_m(mask_value_0_0, placeholder6, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u64m8(vec_value_2_0, 1, vl); +vint8m1_t vec_value_3_0= vloxei64_v_i8m1_tama(mask_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei64_v_operator_0() { +int8_t tmp[] = {-1,-1,-7,-1,29,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vloxei64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei64V8VInt8VBVISIVU_TAMU.c b/test/codegen-golden/Vloxei64V8VInt8VBVISIVU_TAMU.c new file mode 100644 index 0000000..18e3382 --- /dev/null +++ b/test/codegen-golden/Vloxei64V8VInt8VBVISIVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vloxei64V8VInt8VBVISIVU_TAMU -n 1 -l 7 --has-ta --has-ma -c Vloxei64V8VInt8VBVISIVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint64_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint64_t tmp[] = {3902764ull,7500210ull,4235251ull,5592077ull,5806864ull,1786754ull,3702157ull,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei64_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint64_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint64m8_t vec_value_3_0= vle64_v_u64m8(placeholder3, vl); +{ +vuint64m8_t placeholder7= vmv_v_x_u64m8(0, vsetvlmax_e64m8()); +vec_value_3_0 = vremu_vx_u64m8_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u64m8(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vloxei64_v_i8m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei64_v_operator_0() { +int8_t tmp[] = {29,-1,-40,-1,70,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei64V8VInt8VBVISIVU_TUMA.c b/test/codegen-golden/Vloxei64V8VInt8VBVISIVU_TUMA.c new file mode 100644 index 0000000..ab1c3af --- /dev/null +++ b/test/codegen-golden/Vloxei64V8VInt8VBVISIVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vloxei64V8VInt8VBVISIVU_TUMA -n 1 -l 7 --has-ta --has-ma -c Vloxei64V8VInt8VBVISIVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint64_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint64_t tmp[] = {3902764ull,7500210ull,4235251ull,5592077ull,5806864ull,1786754ull,3702157ull,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei64_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint64_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint64m8_t vec_value_3_0= vle64_v_u64m8(placeholder3, vl); +{ +vuint64m8_t placeholder7= vmv_v_x_u64m8(0, vsetvlmax_e64m8()); +vec_value_3_0 = vremu_vx_u64m8_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u64m8(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vloxei64_v_i8m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei64_v_operator_0() { +int8_t tmp[] = {-1,84,-40,19,70,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei64V8VInt8VBVISIVU_TUMU.c b/test/codegen-golden/Vloxei64V8VInt8VBVISIVU_TUMU.c new file mode 100644 index 0000000..d5d7591 --- /dev/null +++ b/test/codegen-golden/Vloxei64V8VInt8VBVISIVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vloxei64V8VInt8VBVISIVU_TUMU -n 1 -l 7 --has-ta --has-ma -c Vloxei64V8VInt8VBVISIVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint64_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint64_t tmp[] = {3902764ull,7500210ull,4235251ull,5592077ull,5806864ull,1786754ull,3702157ull,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei64_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint64_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint64m8_t vec_value_3_0= vle64_v_u64m8(placeholder3, vl); +{ +vuint64m8_t placeholder7= vmv_v_x_u64m8(0, vsetvlmax_e64m8()); +vec_value_3_0 = vremu_vx_u64m8_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u64m8(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vloxei64_v_i8m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei64_v_operator_0() { +int8_t tmp[] = {29,84,-40,19,70,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei64V8VInt8VBVISIVU_m.c b/test/codegen-golden/Vloxei64V8VInt8VBVISIVU_m.c new file mode 100644 index 0000000..722bbbb --- /dev/null +++ b/test/codegen-golden/Vloxei64V8VInt8VBVISIVU_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r Vloxei64V8VInt8VBVISIVU_m -n 1 -l 7 --has-ta --has-ma -c Vloxei64V8VInt8VBVISIVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint64_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint64_t tmp[] = {3902764ull,7500210ull,4235251ull,5592077ull,5806864ull,1786754ull,3702157ull,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei64_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint64_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint64m8_t vec_value_3_0= vle64_v_u64m8(placeholder3, vl); +{ +vuint64m8_t placeholder7= vmv_v_x_u64m8(0, vsetvlmax_e64m8()); +vec_value_3_0 = vremu_vx_u64m8_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u64m8(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vloxei64_v_i8m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei64_v_operator_0() { +int8_t tmp[] = {29,-39,-40,19,70,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei64V8VInt8VISIVU_TU.c b/test/codegen-golden/Vloxei64V8VInt8VISIVU_TU.c new file mode 100644 index 0000000..40f1401 --- /dev/null +++ b/test/codegen-golden/Vloxei64V8VInt8VISIVU_TU.c @@ -0,0 +1,90 @@ +// COMMAND: random_gen -r Vloxei64V8VInt8VISIVU_TU -n 1 -l 7 --has-ta --has-ma -c Vloxei64V8VInt8VISIVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint64_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint64_t tmp[] = {3902764ull,7500210ull,4235251ull,5592077ull,5806864ull,1786754ull,3702157ull,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vloxei64_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint64_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vuint64m8_t vec_value_2_0= vle64_v_u64m8(placeholder2, vl); +{ +vec_value_2_0 = vremu_vx_u64m8(vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u64m8(vec_value_2_0, 1, vl); +vint8m1_t vec_value_3_0= vloxei64_v_i8m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei64_v_operator_0() { +int8_t tmp[] = {-74,79,-7,-14,29,-73,23,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vloxei64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei8V8VInt8SIVU_TA.c b/test/codegen-golden/Vloxei8V8VInt8SIVU_TA.c new file mode 100644 index 0000000..82c6807 --- /dev/null +++ b/test/codegen-golden/Vloxei8V8VInt8SIVU_TA.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r Vloxei8V8VInt8SIVU_TA -n 1 -l 7 --has-ta --has-ma -c Vloxei8V8VInt8SIVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vloxei8_v_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +if (7 < 255) { +vec_value_1_0 = vremu_vx_u8m1(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u8m1(vec_value_1_0, 1, vl); +vint8m1_t vec_value_2_0= vloxei8_v_i8m1_ta(placeholder0, vec_value_1_0, tail_vl); +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei8_v_operator_0() { +int8_t tmp[] = {26,-1,-56,-1,55,-1,55,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vloxei8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei8V8VInt8VBSIVU_TAMA.c b/test/codegen-golden/Vloxei8V8VInt8VBSIVU_TAMA.c new file mode 100644 index 0000000..2c51618 --- /dev/null +++ b/test/codegen-golden/Vloxei8V8VInt8VBSIVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Vloxei8V8VInt8VBSIVU_TAMA -n 1 -l 7 --has-ta --has-ma -c Vloxei8V8VInt8VBSIVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vloxei8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +if (7 < 255) { +vuint8m1_t placeholder6= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vec_value_2_0 = vremu_vx_u8m1_m(mask_value_0_0, placeholder6, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u8m1(vec_value_2_0, 1, vl); +vint8m1_t vec_value_3_0= vloxei8_v_i8m1_tama(mask_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei8_v_operator_0() { +int8_t tmp[] = {-1,-1,29,-1,20,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vloxei8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei8V8VInt8VBVISIVU_TAMU.c b/test/codegen-golden/Vloxei8V8VInt8VBVISIVU_TAMU.c new file mode 100644 index 0000000..79685b9 --- /dev/null +++ b/test/codegen-golden/Vloxei8V8VInt8VBVISIVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vloxei8V8VInt8VBVISIVU_TAMU -n 1 -l 7 --has-ta --has-ma -c Vloxei8V8VInt8VBVISIVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); +if (7 < 255) { +vuint8m1_t placeholder7= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vec_value_3_0 = vremu_vx_u8m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u8m1(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vloxei8_v_i8m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei8_v_operator_0() { +int8_t tmp[] = {29,-1,70,-1,39,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei8V8VInt8VBVISIVU_TUMA.c b/test/codegen-golden/Vloxei8V8VInt8VBVISIVU_TUMA.c new file mode 100644 index 0000000..43abda4 --- /dev/null +++ b/test/codegen-golden/Vloxei8V8VInt8VBVISIVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vloxei8V8VInt8VBVISIVU_TUMA -n 1 -l 7 --has-ta --has-ma -c Vloxei8V8VInt8VBVISIVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); +if (7 < 255) { +vuint8m1_t placeholder7= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vec_value_3_0 = vremu_vx_u8m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u8m1(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vloxei8_v_i8m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei8_v_operator_0() { +int8_t tmp[] = {-1,84,70,19,39,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei8V8VInt8VBVISIVU_TUMU.c b/test/codegen-golden/Vloxei8V8VInt8VBVISIVU_TUMU.c new file mode 100644 index 0000000..11828fb --- /dev/null +++ b/test/codegen-golden/Vloxei8V8VInt8VBVISIVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vloxei8V8VInt8VBVISIVU_TUMU -n 1 -l 7 --has-ta --has-ma -c Vloxei8V8VInt8VBVISIVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); +if (7 < 255) { +vuint8m1_t placeholder7= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vec_value_3_0 = vremu_vx_u8m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u8m1(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vloxei8_v_i8m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei8_v_operator_0() { +int8_t tmp[] = {29,84,70,19,39,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei8V8VInt8VBVISIVU_m.c b/test/codegen-golden/Vloxei8V8VInt8VBVISIVU_m.c new file mode 100644 index 0000000..840a170 --- /dev/null +++ b/test/codegen-golden/Vloxei8V8VInt8VBVISIVU_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r Vloxei8V8VInt8VBVISIVU_m -n 1 -l 7 --has-ta --has-ma -c Vloxei8V8VInt8VBVISIVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vloxei8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); +if (7 < 255) { +vuint8m1_t placeholder7= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vec_value_3_0 = vremu_vx_u8m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u8m1(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vloxei8_v_i8m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vloxei8_v_operator_0() { +int8_t tmp[] = {29,-53,70,19,39,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vloxei8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vloxei8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vloxei8V8VInt8VISIVU_TU.c b/test/codegen-golden/Vloxei8V8VInt8VISIVU_TU.c new file mode 100644 index 0000000..fd6e75b --- /dev/null +++ b/test/codegen-golden/Vloxei8V8VInt8VISIVU_TU.c @@ -0,0 +1,90 @@ +// COMMAND: random_gen -r Vloxei8V8VInt8VISIVU_TU -n 1 -l 7 --has-ta --has-ma -c Vloxei8V8VInt8VISIVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vloxei8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +if (7 < 255) { +vec_value_2_0 = vremu_vx_u8m1(vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u8m1(vec_value_2_0, 1, vl); +vint8m1_t vec_value_3_0= vloxei8_v_i8m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vloxei8_v_operator_0() { +int8_t tmp[] = {23,79,29,-14,20,-73,20,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vloxei8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vloxei8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vloxei8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse16XX16VInt16SISI_TA.c b/test/codegen-golden/Vlse16XX16VInt16SISI_TA.c new file mode 100644 index 0000000..d88f378 --- /dev/null +++ b/test/codegen-golden/Vlse16XX16VInt16SISI_TA.c @@ -0,0 +1,95 @@ +// COMMAND: random_gen -r Vlse16XX16VInt16SISI_TA -n 1 -l 7 --has-ta --has-ma -c Vlse16XX16VInt16SISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +ptrdiff_t value_1; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +ptrdiff_t tmp = 3902764ll; +value_1 = tmp; +} +void vlse16_v_operator_0() { +int16_t *placeholder0 = value_0; +ptrdiff_t placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int16_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint16m1_t placeholder5= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vse16_v_i16m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +placeholder1 = (placeholder1 % 4) + 1; +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = 2; +size_t tail_vl = 1; +if (placeholder7 < 7) { +vint16m1_t placeholder8= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vse16_v_i16m1(placeholder2, placeholder8, vl); +size_t placeholder9 = vl; +vl = vl < (7 - placeholder7 + placeholder1 - 1) / placeholder1 ? +vl : (7 - placeholder7 + placeholder1 - 1) / placeholder1; +int32_t placeholder10 = placeholder1; +placeholder1 *= 2; +vint16m1_t vec_value_2_0= vlse16_v_i16m1_ta(placeholder0, placeholder1, tail_vl); +vse16_v_i16m1(placeholder2, vec_value_2_0, vl); +vl = placeholder9; // recover vl +placeholder1 = placeholder10; // recover stride +} +else { +vint16m1_t placeholder11= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vse16_v_i16m1(placeholder2, placeholder11, vl); +}; +placeholder0 += vl * placeholder1; +placeholder2 += vl; +placeholder7 += vl * placeholder1; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vlse16_v_operator_0() { +int16_t tmp[] = {-5546,-1,5458,-1,2596,-1,-5630,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vlse16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vlse16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse16XX16VInt16VBSISI_TAMA.c b/test/codegen-golden/Vlse16XX16VInt16VBSISI_TAMA.c new file mode 100644 index 0000000..c5a4dc2 --- /dev/null +++ b/test/codegen-golden/Vlse16XX16VInt16VBSISI_TAMA.c @@ -0,0 +1,111 @@ +// COMMAND: random_gen -r Vlse16XX16VInt16VBSISI_TAMA -n 1 -l 7 --has-ta --has-ma -c Vlse16XX16VInt16VBSISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +ptrdiff_t value_2; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +ptrdiff_t tmp = 3902764ll; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vlse16_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +ptrdiff_t placeholder2 = value_2; +int16_t *placeholder3 = value_3; +int16_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint16m1_t placeholder6= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vse16_v_i16m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +placeholder2 = (placeholder2 % 4) + 1; +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +if (placeholder8 < 7) { +vint16m1_t placeholder9= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vse16_v_i16m1(placeholder3, placeholder9, vl); +size_t placeholder10 = vl; +vl = vl < (7 - placeholder8 + placeholder2 - 1) / placeholder2 ? +vl : (7 - placeholder8 + placeholder2 - 1) / placeholder2; +int32_t placeholder11 = placeholder2; +placeholder2 *= 2; +vint16m1_t vec_value_3_0= vlse16_v_i16m1_tama(mask_value_0_0, placeholder1, placeholder2, tail_vl); +vse16_v_i16m1(placeholder3, vec_value_3_0, vl); +vl = placeholder10; // recover vl +placeholder2 = placeholder11; // recover stride +} +else { +vint16m1_t placeholder12= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vse16_v_i16m1(placeholder3, placeholder12, vl); +}; +placeholder0 += vl; +placeholder1 += vl * placeholder2; +placeholder3 += vl; +placeholder8 += vl * placeholder2; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vlse16_v_operator_0() { +int16_t tmp[] = {-1,-1,1184,-1,-6427,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vlse16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vlse16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse16XX16VInt16VBVISISI_TAMU.c b/test/codegen-golden/Vlse16XX16VInt16VBVISISI_TAMU.c new file mode 100644 index 0000000..40246bf --- /dev/null +++ b/test/codegen-golden/Vlse16XX16VInt16VBVISISI_TAMU.c @@ -0,0 +1,126 @@ +// COMMAND: random_gen -r Vlse16XX16VInt16VBVISISI_TAMU -n 1 -l 7 --has-ta --has-ma -c Vlse16XX16VInt16VBVISISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +ptrdiff_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {8399,1958,1879,2303,-7354,-734,6976,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vlse16_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; +int16_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e16m1(placeholder6); +vint16m1_t placeholder7= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vse16_v_i16m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); +if (placeholder9 < 7) { +vint16m1_t placeholder10= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vse16_v_i16m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 2; +vint16m1_t vec_value_4_0= vlse16_v_i16m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, tail_vl); +vse16_v_i16m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vint16m1_t placeholder13= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vse16_v_i16m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse16_v_operator_0() { +int16_t tmp[] = {5001,-1,1879,-1,-7354,-1,2884,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse16XX16VInt16VBVISISI_TUMA.c b/test/codegen-golden/Vlse16XX16VInt16VBVISISI_TUMA.c new file mode 100644 index 0000000..478f3be --- /dev/null +++ b/test/codegen-golden/Vlse16XX16VInt16VBVISISI_TUMA.c @@ -0,0 +1,126 @@ +// COMMAND: random_gen -r Vlse16XX16VInt16VBVISISI_TUMA -n 1 -l 7 --has-ta --has-ma -c Vlse16XX16VInt16VBVISISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +ptrdiff_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {8399,1958,1879,2303,-7354,-734,6976,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vlse16_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; +int16_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e16m1(placeholder6); +vint16m1_t placeholder7= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vse16_v_i16m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); +if (placeholder9 < 7) { +vint16m1_t placeholder10= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vse16_v_i16m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 2; +vint16m1_t vec_value_4_0= vlse16_v_i16m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, tail_vl); +vse16_v_i16m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vint16m1_t placeholder13= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vse16_v_i16m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse16_v_operator_0() { +int16_t tmp[] = {-1,-1530,1879,1614,-7354,-2596,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse16XX16VInt16VBVISISI_TUMU.c b/test/codegen-golden/Vlse16XX16VInt16VBVISISI_TUMU.c new file mode 100644 index 0000000..fff73c8 --- /dev/null +++ b/test/codegen-golden/Vlse16XX16VInt16VBVISISI_TUMU.c @@ -0,0 +1,126 @@ +// COMMAND: random_gen -r Vlse16XX16VInt16VBVISISI_TUMU -n 1 -l 7 --has-ta --has-ma -c Vlse16XX16VInt16VBVISISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +ptrdiff_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {8399,1958,1879,2303,-7354,-734,6976,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vlse16_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; +int16_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e16m1(placeholder6); +vint16m1_t placeholder7= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vse16_v_i16m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); +if (placeholder9 < 7) { +vint16m1_t placeholder10= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vse16_v_i16m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 2; +vint16m1_t vec_value_4_0= vlse16_v_i16m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, tail_vl); +vse16_v_i16m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vint16m1_t placeholder13= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vse16_v_i16m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse16_v_operator_0() { +int16_t tmp[] = {5001,-1530,1879,1614,-7354,-2596,2884,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse16XX16VInt16VBVISISI_m.c b/test/codegen-golden/Vlse16XX16VInt16VBVISISI_m.c new file mode 100644 index 0000000..e26bbcf --- /dev/null +++ b/test/codegen-golden/Vlse16XX16VInt16VBVISISI_m.c @@ -0,0 +1,125 @@ +// COMMAND: random_gen -r Vlse16XX16VInt16VBVISISI_m -n 1 -l 7 --has-ta --has-ma -c Vlse16XX16VInt16VBVISISI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +ptrdiff_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {8399,1958,1879,2303,-7354,-734,6976,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vlse16_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; +int16_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e16m1(placeholder6); +vint16m1_t placeholder7= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vse16_v_i16m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = vsetvl_e16m1(placeholder8); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); +if (placeholder9 < 7) { +vint16m1_t placeholder10= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vse16_v_i16m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 2; +vint16m1_t vec_value_4_0= vlse16_v_i16m1_m (mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, vl); +vse16_v_i16m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vint16m1_t placeholder13= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vse16_v_i16m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse16_v_operator_0() { +int16_t tmp[] = {5001,1958,1879,1614,-7354,-2596,2884,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse16XX16VInt16VISISI_TU.c b/test/codegen-golden/Vlse16XX16VInt16VISISI_TU.c new file mode 100644 index 0000000..31434fa --- /dev/null +++ b/test/codegen-golden/Vlse16XX16VInt16VISISI_TU.c @@ -0,0 +1,110 @@ +// COMMAND: random_gen -r Vlse16XX16VInt16VISISI_TU -n 1 -l 7 --has-ta --has-ma -c Vlse16XX16VInt16VISISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int16_t value_1[7]; +ptrdiff_t value_2; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +ptrdiff_t tmp = 3902764ll; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vlse16_v_operator_0() { +int16_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +ptrdiff_t placeholder2 = value_2; +int16_t *placeholder3 = value_3; +int16_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint16m1_t placeholder6= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vse16_v_i16m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +placeholder2 = (placeholder2 % 4) + 1; +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m1_t vec_value_0_0= vle16_v_i16m1(placeholder0, vl); +if (placeholder8 < 7) { +vint16m1_t placeholder9= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vse16_v_i16m1(placeholder3, placeholder9, vl); +size_t placeholder10 = vl; +vl = vl < (7 - placeholder8 + placeholder2 - 1) / placeholder2 ? +vl : (7 - placeholder8 + placeholder2 - 1) / placeholder2; +int32_t placeholder11 = placeholder2; +placeholder2 *= 2; +vint16m1_t vec_value_3_0= vlse16_v_i16m1_tu(vec_value_0_0, placeholder1, placeholder2, tail_vl); +vse16_v_i16m1(placeholder3, vec_value_3_0, vl); +vl = placeholder10; // recover vl +placeholder2 = placeholder11; // recover stride +} +else { +vint16m1_t placeholder12= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vse16_v_i16m1(placeholder3, placeholder12, vl); +}; +placeholder0 += vl; +placeholder1 += vl * placeholder2; +placeholder3 += vl; +placeholder8 += vl * placeholder2; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vlse16_v_operator_0() { +int16_t tmp[] = {5001,7893,1184,-1417,-6427,-7226,2884,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vlse16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vlse16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VFloat32SFSI.c b/test/codegen-golden/Vlse32XX32VFloat32SFSI.c new file mode 100644 index 0000000..04f1b6b --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VFloat32SFSI.c @@ -0,0 +1,101 @@ +// COMMAND: random_gen -r Vlse32XX32VFloat32SFSI -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VFloat32SFSI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +ptrdiff_t value_1; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +ptrdiff_t tmp = 3902764ll; +value_1 = tmp; +} +void vlse32_v_operator_0() { +float32_t *placeholder0 = value_0; +ptrdiff_t placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float32_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vfloat32m1_t placeholder5= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +placeholder1 = (placeholder1 % 4) + 1; +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +if (placeholder7 < 7) { +vfloat32m1_t placeholder8= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder2, placeholder8, vl); +size_t placeholder9 = vl; +vl = vl < (7 - placeholder7 + placeholder1 - 1) / placeholder1 ? +vl : (7 - placeholder7 + placeholder1 - 1) / placeholder1; +int32_t placeholder10 = placeholder1; +placeholder1 *= 4; +vfloat32m1_t vec_value_2_0= vlse32_v_f32m1(placeholder0, placeholder1, vl); +vse32_v_f32m1(placeholder2, vec_value_2_0, vl); +vl = placeholder9; // recover vl +placeholder1 = placeholder10; // recover stride +} +else { +vfloat32m1_t placeholder11= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder2, placeholder11, vl); +}; +placeholder0 += vl * placeholder1; +placeholder2 += vl; +placeholder7 += vl * placeholder1; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vlse32_v_operator_0() { +uint64_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VFloat32SFSI_TA.c b/test/codegen-golden/Vlse32XX32VFloat32SFSI_TA.c new file mode 100644 index 0000000..36bdc6a --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VFloat32SFSI_TA.c @@ -0,0 +1,102 @@ +// COMMAND: random_gen -r Vlse32XX32VFloat32SFSI_TA -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VFloat32SFSI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +ptrdiff_t value_1; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +ptrdiff_t tmp = 3902764ll; +value_1 = tmp; +} +void vlse32_v_operator_0() { +float32_t *placeholder0 = value_0; +ptrdiff_t placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float32_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vfloat32m1_t placeholder5= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +placeholder1 = (placeholder1 % 4) + 1; +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = 2; +size_t tail_vl = 1; +if (placeholder7 < 7) { +vfloat32m1_t placeholder8= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder2, placeholder8, vl); +size_t placeholder9 = vl; +vl = vl < (7 - placeholder7 + placeholder1 - 1) / placeholder1 ? +vl : (7 - placeholder7 + placeholder1 - 1) / placeholder1; +int32_t placeholder10 = placeholder1; +placeholder1 *= 4; +vfloat32m1_t vec_value_2_0= vlse32_v_f32m1_ta(placeholder0, placeholder1, tail_vl); +vse32_v_f32m1(placeholder2, vec_value_2_0, vl); +vl = placeholder9; // recover vl +placeholder1 = placeholder10; // recover stride +} +else { +vfloat32m1_t placeholder11= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder2, placeholder11, vl); +}; +placeholder0 += vl * placeholder1; +placeholder2 += vl; +placeholder7 += vl * placeholder1; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vlse32_v_operator_0() { +uint64_t tmp[] = {1250422356u,4294967295u,1265360466u,4294967295u,1262498700u,4294967295u,1250254620u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VFloat32VBSFSI_TAMA.c b/test/codegen-golden/Vlse32XX32VFloat32VBSFSI_TAMA.c new file mode 100644 index 0000000..c2336c0 --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VFloat32VBSFSI_TAMA.c @@ -0,0 +1,118 @@ +// COMMAND: random_gen -r Vlse32XX32VFloat32VBSFSI_TAMA -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VFloat32VBSFSI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +ptrdiff_t value_2; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +ptrdiff_t tmp = 3902764ll; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vlse32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +ptrdiff_t placeholder2 = value_2; +float32_t *placeholder3 = value_3; +float32_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vfloat32m1_t placeholder6= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +placeholder2 = (placeholder2 % 4) + 1; +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +if (placeholder8 < 7) { +vfloat32m1_t placeholder9= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder3, placeholder9, vl); +size_t placeholder10 = vl; +vl = vl < (7 - placeholder8 + placeholder2 - 1) / placeholder2 ? +vl : (7 - placeholder8 + placeholder2 - 1) / placeholder2; +int32_t placeholder11 = placeholder2; +placeholder2 *= 4; +vfloat32m1_t vec_value_3_0= vlse32_v_f32m1_tama(mask_value_0_0, placeholder1, placeholder2, tail_vl); +vse32_v_f32m1(placeholder3, vec_value_3_0, vl); +vl = placeholder10; // recover vl +placeholder2 = placeholder11; // recover stride +} +else { +vfloat32m1_t placeholder12= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder3, placeholder12, vl); +}; +placeholder0 += vl; +placeholder1 += vl * placeholder2; +placeholder3 += vl; +placeholder8 += vl * placeholder2; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vlse32_v_operator_0() { +uint64_t tmp[] = {4294967295u,4294967295u,1261086746u,4294967295u,1247419408u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VFloat32VBVFSFSI_TAMU.c b/test/codegen-golden/Vlse32XX32VFloat32VBVFSFSI_TAMU.c new file mode 100644 index 0000000..6e47a41 --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VFloat32VBVFSFSI_TAMU.c @@ -0,0 +1,135 @@ +// COMMAND: random_gen -r Vlse32XX32VFloat32VBVFSFSI_TAMU -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VFloat32VBVFSFSI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +ptrdiff_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,1266779219u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vlse32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; +float32_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vfloat32m1_t placeholder7= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); +if (placeholder9 < 7) { +vfloat32m1_t placeholder10= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 4; +vfloat32m1_t vec_value_4_0= vlse32_v_f32m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, tail_vl); +vse32_v_f32m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vfloat32m1_t placeholder13= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse32_v_operator_0() { +uint64_t tmp[] = {1264903012u,4294967295u,1261781606u,4294967295u,1243709844u,4294967295u,1262786923u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VFloat32VBVFSFSI_TUMA.c b/test/codegen-golden/Vlse32XX32VFloat32VBVFSFSI_TUMA.c new file mode 100644 index 0000000..abea2c1 --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VFloat32VBVFSFSI_TUMA.c @@ -0,0 +1,135 @@ +// COMMAND: random_gen -r Vlse32XX32VFloat32VBVFSFSI_TUMA -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VFloat32VBVFSFSI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +ptrdiff_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,1266779219u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vlse32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; +float32_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vfloat32m1_t placeholder7= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); +if (placeholder9 < 7) { +vfloat32m1_t placeholder10= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 4; +vfloat32m1_t vec_value_4_0= vlse32_v_f32m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, tail_vl); +vse32_v_f32m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vfloat32m1_t placeholder13= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse32_v_operator_0() { +uint64_t tmp[] = {4294967295u,1258373094u,1261781606u,1261516319u,1243709844u,1256322614u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VFloat32VBVFSFSI_TUMU.c b/test/codegen-golden/Vlse32XX32VFloat32VBVFSFSI_TUMU.c new file mode 100644 index 0000000..c13ec8b --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VFloat32VBVFSFSI_TUMU.c @@ -0,0 +1,135 @@ +// COMMAND: random_gen -r Vlse32XX32VFloat32VBVFSFSI_TUMU -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VFloat32VBVFSFSI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +ptrdiff_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,1266779219u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vlse32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; +float32_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vfloat32m1_t placeholder7= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); +if (placeholder9 < 7) { +vfloat32m1_t placeholder10= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 4; +vfloat32m1_t vec_value_4_0= vlse32_v_f32m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, tail_vl); +vse32_v_f32m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vfloat32m1_t placeholder13= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse32_v_operator_0() { +uint64_t tmp[] = {1264903012u,1258373094u,1261781606u,1261516319u,1243709844u,1256322614u,1262786923u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VFloat32VBVFSFSI_m.c b/test/codegen-golden/Vlse32XX32VFloat32VBVFSFSI_m.c new file mode 100644 index 0000000..8128866 --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VFloat32VBVFSFSI_m.c @@ -0,0 +1,134 @@ +// COMMAND: random_gen -r Vlse32XX32VFloat32VBVFSFSI_m -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VFloat32VBVFSFSI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +ptrdiff_t value_3; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,1266779219u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vlse32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +float32_t *placeholder4 = value_4; +float32_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vfloat32m1_t placeholder7= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = vsetvl_e32m1(placeholder8); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); +if (placeholder9 < 7) { +vfloat32m1_t placeholder10= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 4; +vfloat32m1_t vec_value_4_0= vlse32_v_f32m1_m (mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, vl); +vse32_v_f32m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vfloat32m1_t placeholder13= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse32_v_operator_0() { +uint64_t tmp[] = {1264903012u,1261860990u,1261781606u,1261516319u,1243709844u,1256322614u,1262786923u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VFloat32VFSFSI_TU.c b/test/codegen-golden/Vlse32XX32VFloat32VFSFSI_TU.c new file mode 100644 index 0000000..2cd1763 --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VFloat32VFSFSI_TU.c @@ -0,0 +1,119 @@ +// COMMAND: random_gen -r Vlse32XX32VFloat32VFSFSI_TU -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VFloat32VFSFSI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float32_t value_1[7]; +ptrdiff_t value_2; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +ptrdiff_t tmp = 3902764ll; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vlse32_v_operator_0() { +float32_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +ptrdiff_t placeholder2 = value_2; +float32_t *placeholder3 = value_3; +float32_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vfloat32m1_t placeholder6= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +placeholder2 = (placeholder2 % 4) + 1; +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m1_t vec_value_0_0= vle32_v_f32m1(placeholder0, vl); +if (placeholder8 < 7) { +vfloat32m1_t placeholder9= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder3, placeholder9, vl); +size_t placeholder10 = vl; +vl = vl < (7 - placeholder8 + placeholder2 - 1) / placeholder2 ? +vl : (7 - placeholder8 + placeholder2 - 1) / placeholder2; +int32_t placeholder11 = placeholder2; +placeholder2 *= 4; +vfloat32m1_t vec_value_3_0= vlse32_v_f32m1_tu(vec_value_0_0, placeholder1, placeholder2, tail_vl); +vse32_v_f32m1(placeholder3, vec_value_3_0, vl); +vl = placeholder10; // recover vl +placeholder2 = placeholder11; // recover stride +} +else { +vfloat32m1_t placeholder12= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder3, placeholder12, vl); +}; +placeholder0 += vl; +placeholder1 += vl * placeholder2; +placeholder3 += vl; +placeholder8 += vl * placeholder2; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vlse32_v_operator_0() { +uint64_t tmp[] = {1264903012u,1267237304u,1261086746u,1258485599u,1247419408u,1244223528u,1262786923u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VInt32SISI.c b/test/codegen-golden/Vlse32XX32VInt32SISI.c new file mode 100644 index 0000000..af5f96e --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VInt32SISI.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r Vlse32XX32VInt32SISI -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VInt32SISI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int32_t value_0[7]; +ptrdiff_t value_1; +int32_t value_2[7]; +void vinit_rif_operator_1() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +ptrdiff_t tmp = 3902764ll; +value_1 = tmp; +} +void vlse32_v_operator_0() { +int32_t *placeholder0 = value_0; +ptrdiff_t placeholder1 = value_1; +int32_t *placeholder2 = value_2; +int32_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vint32m1_t placeholder5= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +placeholder1 = (placeholder1 % 4) + 1; +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +if (placeholder7 < 7) { +vint32m1_t placeholder8= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder2, placeholder8, vl); +size_t placeholder9 = vl; +vl = vl < (7 - placeholder7 + placeholder1 - 1) / placeholder1 ? +vl : (7 - placeholder7 + placeholder1 - 1) / placeholder1; +int32_t placeholder10 = placeholder1; +placeholder1 *= 4; +vint32m1_t vec_value_2_0= vlse32_v_i32m1(placeholder0, placeholder1, vl); +vse32_v_i32m1(placeholder2, vec_value_2_0, vl); +vl = placeholder9; // recover vl +placeholder1 = placeholder10; // recover stride +} +else { +vint32m1_t placeholder11= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder2, placeholder11, vl); +}; +placeholder0 += vl * placeholder1; +placeholder2 += vl; +placeholder7 += vl * placeholder1; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vlse32_v_operator_0() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VInt32SISI_TA.c b/test/codegen-golden/Vlse32XX32VInt32SISI_TA.c new file mode 100644 index 0000000..e47a559 --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VInt32SISI_TA.c @@ -0,0 +1,95 @@ +// COMMAND: random_gen -r Vlse32XX32VInt32SISI_TA -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VInt32SISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int32_t value_0[7]; +ptrdiff_t value_1; +int32_t value_2[7]; +void vinit_rif_operator_1() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +ptrdiff_t tmp = 3902764ll; +value_1 = tmp; +} +void vlse32_v_operator_0() { +int32_t *placeholder0 = value_0; +ptrdiff_t placeholder1 = value_1; +int32_t *placeholder2 = value_2; +int32_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vint32m1_t placeholder5= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +placeholder1 = (placeholder1 % 4) + 1; +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = 2; +size_t tail_vl = 1; +if (placeholder7 < 7) { +vint32m1_t placeholder8= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder2, placeholder8, vl); +size_t placeholder9 = vl; +vl = vl < (7 - placeholder7 + placeholder1 - 1) / placeholder1 ? +vl : (7 - placeholder7 + placeholder1 - 1) / placeholder1; +int32_t placeholder10 = placeholder1; +placeholder1 *= 4; +vint32m1_t vec_value_2_0= vlse32_v_i32m1_ta(placeholder0, placeholder1, tail_vl); +vse32_v_i32m1(placeholder2, vec_value_2_0, vl); +vl = placeholder9; // recover vl +placeholder1 = placeholder10; // recover stride +} +else { +vint32m1_t placeholder11= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder2, placeholder11, vl); +}; +placeholder0 += vl * placeholder1; +placeholder2 += vl; +placeholder7 += vl * placeholder1; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vlse32_v_operator_0() { +int32_t tmp[] = {-5545814,-1,5457874,-1,2596108,-1,-5629682,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VInt32VBSISI_TAMA.c b/test/codegen-golden/Vlse32XX32VInt32VBSISI_TAMA.c new file mode 100644 index 0000000..3f7e7e4 --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VInt32VBSISI_TAMA.c @@ -0,0 +1,111 @@ +// COMMAND: random_gen -r Vlse32XX32VInt32VBSISI_TAMA -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VInt32VBSISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +ptrdiff_t value_2; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +ptrdiff_t tmp = 3902764ll; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int32_t tmp[] = {5000420,-1529498,1184154,1613727,-6426492,-2595685,2884331,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vlse32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +ptrdiff_t placeholder2 = value_2; +int32_t *placeholder3 = value_3; +int32_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vint32m1_t placeholder6= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +placeholder2 = (placeholder2 % 4) + 1; +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +if (placeholder8 < 7) { +vint32m1_t placeholder9= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder3, placeholder9, vl); +size_t placeholder10 = vl; +vl = vl < (7 - placeholder8 + placeholder2 - 1) / placeholder2 ? +vl : (7 - placeholder8 + placeholder2 - 1) / placeholder2; +int32_t placeholder11 = placeholder2; +placeholder2 *= 4; +vint32m1_t vec_value_3_0= vlse32_v_i32m1_tama(mask_value_0_0, placeholder1, placeholder2, tail_vl); +vse32_v_i32m1(placeholder3, vec_value_3_0, vl); +vl = placeholder10; // recover vl +placeholder2 = placeholder11; // recover stride +} +else { +vint32m1_t placeholder12= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder3, placeholder12, vl); +}; +placeholder0 += vl; +placeholder1 += vl * placeholder2; +placeholder3 += vl; +placeholder8 += vl * placeholder2; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vlse32_v_operator_0() { +int32_t tmp[] = {-1,-1,1184154,-1,-6426492,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VInt32VBVISISI_TAMU.c b/test/codegen-golden/Vlse32XX32VInt32VBVISISI_TAMU.c new file mode 100644 index 0000000..274db10 --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VInt32VBVISISI_TAMU.c @@ -0,0 +1,126 @@ +// COMMAND: random_gen -r Vlse32XX32VInt32VBVISISI_TAMU -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VInt32VBVISISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +int32_t value_2[7]; +ptrdiff_t value_3; +int32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int32_t tmp[] = {5000420,-1529498,1184154,1613727,-6426492,-2595685,2884331,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int32_t tmp[] = {8398813,1958398,1879014,2303187,-7353883,-734314,6976038,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vlse32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +int32_t *placeholder4 = value_4; +int32_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vint32m1_t placeholder7= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +if (placeholder9 < 7) { +vint32m1_t placeholder10= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 4; +vint32m1_t vec_value_4_0= vlse32_v_i32m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, tail_vl); +vse32_v_i32m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vint32m1_t placeholder13= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse32_v_operator_0() { +int32_t tmp[] = {5000420,-1,1879014,-1,-7353883,-1,2884331,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VInt32VBVISISI_TUMA.c b/test/codegen-golden/Vlse32XX32VInt32VBVISISI_TUMA.c new file mode 100644 index 0000000..c37f939 --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VInt32VBVISISI_TUMA.c @@ -0,0 +1,126 @@ +// COMMAND: random_gen -r Vlse32XX32VInt32VBVISISI_TUMA -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VInt32VBVISISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +int32_t value_2[7]; +ptrdiff_t value_3; +int32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int32_t tmp[] = {5000420,-1529498,1184154,1613727,-6426492,-2595685,2884331,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int32_t tmp[] = {8398813,1958398,1879014,2303187,-7353883,-734314,6976038,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vlse32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +int32_t *placeholder4 = value_4; +int32_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vint32m1_t placeholder7= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +if (placeholder9 < 7) { +vint32m1_t placeholder10= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 4; +vint32m1_t vec_value_4_0= vlse32_v_i32m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, tail_vl); +vse32_v_i32m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vint32m1_t placeholder13= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse32_v_operator_0() { +int32_t tmp[] = {-1,-1529498,1879014,1613727,-7353883,-2595685,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VInt32VBVISISI_TUMU.c b/test/codegen-golden/Vlse32XX32VInt32VBVISISI_TUMU.c new file mode 100644 index 0000000..c6feed6 --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VInt32VBVISISI_TUMU.c @@ -0,0 +1,126 @@ +// COMMAND: random_gen -r Vlse32XX32VInt32VBVISISI_TUMU -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VInt32VBVISISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +int32_t value_2[7]; +ptrdiff_t value_3; +int32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int32_t tmp[] = {5000420,-1529498,1184154,1613727,-6426492,-2595685,2884331,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int32_t tmp[] = {8398813,1958398,1879014,2303187,-7353883,-734314,6976038,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vlse32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +int32_t *placeholder4 = value_4; +int32_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vint32m1_t placeholder7= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +if (placeholder9 < 7) { +vint32m1_t placeholder10= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 4; +vint32m1_t vec_value_4_0= vlse32_v_i32m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, tail_vl); +vse32_v_i32m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vint32m1_t placeholder13= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse32_v_operator_0() { +int32_t tmp[] = {5000420,-1529498,1879014,1613727,-7353883,-2595685,2884331,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VInt32VBVISISI_m.c b/test/codegen-golden/Vlse32XX32VInt32VBVISISI_m.c new file mode 100644 index 0000000..b2f5ea9 --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VInt32VBVISISI_m.c @@ -0,0 +1,125 @@ +// COMMAND: random_gen -r Vlse32XX32VInt32VBVISISI_m -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VInt32VBVISISI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +int32_t value_2[7]; +ptrdiff_t value_3; +int32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int32_t tmp[] = {5000420,-1529498,1184154,1613727,-6426492,-2595685,2884331,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int32_t tmp[] = {8398813,1958398,1879014,2303187,-7353883,-734314,6976038,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vlse32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +int32_t *placeholder4 = value_4; +int32_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vint32m1_t placeholder7= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = vsetvl_e32m1(placeholder8); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +if (placeholder9 < 7) { +vint32m1_t placeholder10= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 4; +vint32m1_t vec_value_4_0= vlse32_v_i32m1_m (mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, vl); +vse32_v_i32m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vint32m1_t placeholder13= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse32_v_operator_0() { +int32_t tmp[] = {5000420,1958398,1879014,1613727,-7353883,-2595685,2884331,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VInt32VISISI_TU.c b/test/codegen-golden/Vlse32XX32VInt32VISISI_TU.c new file mode 100644 index 0000000..a5fc12e --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VInt32VISISI_TU.c @@ -0,0 +1,110 @@ +// COMMAND: random_gen -r Vlse32XX32VInt32VISISI_TU -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VInt32VISISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int32_t value_0[7]; +int32_t value_1[7]; +ptrdiff_t value_2; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +ptrdiff_t tmp = 3902764ll; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int32_t tmp[] = {5000420,-1529498,1184154,1613727,-6426492,-2595685,2884331,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vlse32_v_operator_0() { +int32_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +ptrdiff_t placeholder2 = value_2; +int32_t *placeholder3 = value_3; +int32_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vint32m1_t placeholder6= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +placeholder2 = (placeholder2 % 4) + 1; +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint32m1_t vec_value_0_0= vle32_v_i32m1(placeholder0, vl); +if (placeholder8 < 7) { +vint32m1_t placeholder9= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder3, placeholder9, vl); +size_t placeholder10 = vl; +vl = vl < (7 - placeholder8 + placeholder2 - 1) / placeholder2 ? +vl : (7 - placeholder8 + placeholder2 - 1) / placeholder2; +int32_t placeholder11 = placeholder2; +placeholder2 *= 4; +vint32m1_t vec_value_3_0= vlse32_v_i32m1_tu(vec_value_0_0, placeholder1, placeholder2, tail_vl); +vse32_v_i32m1(placeholder3, vec_value_3_0, vl); +vl = placeholder10; // recover vl +placeholder2 = placeholder11; // recover stride +} +else { +vint32m1_t placeholder12= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder3, placeholder12, vl); +}; +placeholder0 += vl; +placeholder1 += vl * placeholder2; +placeholder3 += vl; +placeholder8 += vl * placeholder2; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vlse32_v_operator_0() { +int32_t tmp[] = {5000420,7892207,1184154,-1416993,-6426492,-7225462,2884331,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VUInt32SUSI.c b/test/codegen-golden/Vlse32XX32VUInt32SUSI.c new file mode 100644 index 0000000..664c512 --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VUInt32SUSI.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r Vlse32XX32VUInt32SUSI -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VUInt32SUSI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint32_t value_0[7]; +ptrdiff_t value_1; +uint32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +ptrdiff_t tmp = 3902764ll; +value_1 = tmp; +} +void vlse32_v_operator_0() { +uint32_t *placeholder0 = value_0; +ptrdiff_t placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vuint32m1_t placeholder5= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +placeholder1 = (placeholder1 % 4) + 1; +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +if (placeholder7 < 7) { +vuint32m1_t placeholder8= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder2, placeholder8, vl); +size_t placeholder9 = vl; +vl = vl < (7 - placeholder7 + placeholder1 - 1) / placeholder1 ? +vl : (7 - placeholder7 + placeholder1 - 1) / placeholder1; +int32_t placeholder10 = placeholder1; +placeholder1 *= 4; +vuint32m1_t vec_value_2_0= vlse32_v_u32m1(placeholder0, placeholder1, vl); +vse32_v_u32m1(placeholder2, vec_value_2_0, vl); +vl = placeholder9; // recover vl +placeholder1 = placeholder10; // recover stride +} +else { +vuint32m1_t placeholder11= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder2, placeholder11, vl); +}; +placeholder0 += vl * placeholder1; +placeholder2 += vl; +placeholder7 += vl * placeholder1; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vlse32_v_operator_0() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VUInt32SUSI_TA.c b/test/codegen-golden/Vlse32XX32VUInt32SUSI_TA.c new file mode 100644 index 0000000..7ea65c6 --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VUInt32SUSI_TA.c @@ -0,0 +1,95 @@ +// COMMAND: random_gen -r Vlse32XX32VUInt32SUSI_TA -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VUInt32SUSI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint32_t value_0[7]; +ptrdiff_t value_1; +uint32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +ptrdiff_t tmp = 3902764ll; +value_1 = tmp; +} +void vlse32_v_operator_0() { +uint32_t *placeholder0 = value_0; +ptrdiff_t placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vuint32m1_t placeholder5= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +placeholder1 = (placeholder1 % 4) + 1; +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = 2; +size_t tail_vl = 1; +if (placeholder7 < 7) { +vuint32m1_t placeholder8= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder2, placeholder8, vl); +size_t placeholder9 = vl; +vl = vl < (7 - placeholder7 + placeholder1 - 1) / placeholder1 ? +vl : (7 - placeholder7 + placeholder1 - 1) / placeholder1; +int32_t placeholder10 = placeholder1; +placeholder1 *= 4; +vuint32m1_t vec_value_2_0= vlse32_v_u32m1_ta(placeholder0, placeholder1, tail_vl); +vse32_v_u32m1(placeholder2, vec_value_2_0, vl); +vl = placeholder9; // recover vl +placeholder1 = placeholder10; // recover stride +} +else { +vuint32m1_t placeholder11= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder2, placeholder11, vl); +}; +placeholder0 += vl * placeholder1; +placeholder2 += vl; +placeholder7 += vl * placeholder1; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vlse32_v_operator_0() { +uint32_t tmp[] = {2227093u,4294967295u,7728937u,4294967295u,6298054u,4294967295u,2185159u,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VUInt32VBSUSI_TAMA.c b/test/codegen-golden/Vlse32XX32VUInt32VBSUSI_TAMA.c new file mode 100644 index 0000000..9e7cfad --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VUInt32VBSUSI_TAMA.c @@ -0,0 +1,111 @@ +// COMMAND: random_gen -r Vlse32XX32VUInt32VBSUSI_TAMA -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VUInt32VBSUSI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +ptrdiff_t value_2; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +ptrdiff_t tmp = 3902764ll; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,6442165u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vlse32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +ptrdiff_t placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +uint32_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vuint32m1_t placeholder6= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +placeholder2 = (placeholder2 % 4) + 1; +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +if (placeholder8 < 7) { +vuint32m1_t placeholder9= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder3, placeholder9, vl); +size_t placeholder10 = vl; +vl = vl < (7 - placeholder8 + placeholder2 - 1) / placeholder2 ? +vl : (7 - placeholder8 + placeholder2 - 1) / placeholder2; +int32_t placeholder11 = placeholder2; +placeholder2 *= 4; +vuint32m1_t vec_value_3_0= vlse32_v_u32m1_tama(mask_value_0_0, placeholder1, placeholder2, tail_vl); +vse32_v_u32m1(placeholder3, vec_value_3_0, vl); +vl = placeholder10; // recover vl +placeholder2 = placeholder11; // recover stride +} +else { +vuint32m1_t placeholder12= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder3, placeholder12, vl); +}; +placeholder0 += vl; +placeholder1 += vl * placeholder2; +placeholder3 += vl; +placeholder8 += vl * placeholder2; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vlse32_v_operator_0() { +uint32_t tmp[] = {4294967295u,4294967295u,5592077u,4294967295u,1786754u,4294967295u,4294967295u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VUInt32VBVUSUSI_TAMU.c b/test/codegen-golden/Vlse32XX32VUInt32VBVUSUSI_TAMU.c new file mode 100644 index 0000000..41cae20 --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VUInt32VBVUSUSI_TAMU.c @@ -0,0 +1,126 @@ +// COMMAND: random_gen -r Vlse32XX32VUInt32VBVUSUSI_TAMU -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VUInt32VBVUSUSI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +ptrdiff_t value_3; +uint32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,6442165u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,8488019u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vlse32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +uint32_t *placeholder4 = value_4; +uint32_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +if (placeholder9 < 7) { +vuint32m1_t placeholder10= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 4; +vuint32m1_t vec_value_4_0= vlse32_v_u32m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, tail_vl); +vse32_v_u32m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vuint32m1_t placeholder13= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse32_v_operator_0() { +uint32_t tmp[] = {7500210u,4294967295u,5939507u,4294967295u,1323058u,4294967295u,6442165u,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VUInt32VBVUSUSI_TUMA.c b/test/codegen-golden/Vlse32XX32VUInt32VBVUSUSI_TUMA.c new file mode 100644 index 0000000..c07350f --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VUInt32VBVUSUSI_TUMA.c @@ -0,0 +1,126 @@ +// COMMAND: random_gen -r Vlse32XX32VUInt32VBVUSUSI_TUMA -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VUInt32VBVUSUSI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +ptrdiff_t value_3; +uint32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,6442165u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,8488019u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vlse32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +uint32_t *placeholder4 = value_4; +uint32_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +if (placeholder9 < 7) { +vuint32m1_t placeholder10= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 4; +vuint32m1_t vec_value_4_0= vlse32_v_u32m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, tail_vl); +vse32_v_u32m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vuint32m1_t placeholder13= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse32_v_operator_0() { +uint32_t tmp[] = {4294967295u,4235251u,5939507u,5806864u,1323058u,3702157u,4294967295u,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VUInt32VBVUSUSI_TUMU.c b/test/codegen-golden/Vlse32XX32VUInt32VBVUSUSI_TUMU.c new file mode 100644 index 0000000..e651c0c --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VUInt32VBVUSUSI_TUMU.c @@ -0,0 +1,126 @@ +// COMMAND: random_gen -r Vlse32XX32VUInt32VBVUSUSI_TUMU -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VUInt32VBVUSUSI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +ptrdiff_t value_3; +uint32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,6442165u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,8488019u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vlse32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +uint32_t *placeholder4 = value_4; +uint32_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +if (placeholder9 < 7) { +vuint32m1_t placeholder10= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 4; +vuint32m1_t vec_value_4_0= vlse32_v_u32m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, tail_vl); +vse32_v_u32m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vuint32m1_t placeholder13= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse32_v_operator_0() { +uint32_t tmp[] = {7500210u,4235251u,5939507u,5806864u,1323058u,3702157u,6442165u,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VUInt32VBVUSUSI_m.c b/test/codegen-golden/Vlse32XX32VUInt32VBVUSUSI_m.c new file mode 100644 index 0000000..18d81a6 --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VUInt32VBVUSUSI_m.c @@ -0,0 +1,125 @@ +// COMMAND: random_gen -r Vlse32XX32VUInt32VBVUSUSI_m -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VUInt32VBVUSUSI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +ptrdiff_t value_3; +uint32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,6442165u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,8488019u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vlse32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +uint32_t *placeholder4 = value_4; +uint32_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = vsetvl_e32m1(placeholder8); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +if (placeholder9 < 7) { +vuint32m1_t placeholder10= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 4; +vuint32m1_t vec_value_4_0= vlse32_v_u32m1_m (mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, vl); +vse32_v_u32m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vuint32m1_t placeholder13= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse32_v_operator_0() { +uint32_t tmp[] = {7500210u,5979199u,5939507u,5806864u,1323058u,3702157u,6442165u,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse32XX32VUInt32VUSUSI_TU.c b/test/codegen-golden/Vlse32XX32VUInt32VUSUSI_TU.c new file mode 100644 index 0000000..189361f --- /dev/null +++ b/test/codegen-golden/Vlse32XX32VUInt32VUSUSI_TU.c @@ -0,0 +1,110 @@ +// COMMAND: random_gen -r Vlse32XX32VUInt32VUSUSI_TU -n 1 -l 7 --has-ta --has-ma -c Vlse32XX32VUInt32VUSUSI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint32_t value_0[7]; +uint32_t value_1[7]; +ptrdiff_t value_2; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +ptrdiff_t tmp = 3902764ll; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,6442165u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vlse32_v_operator_0() { +uint32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +ptrdiff_t placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +uint32_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vuint32m1_t placeholder6= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +placeholder2 = (placeholder2 % 4) + 1; +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint32m1_t vec_value_0_0= vle32_v_u32m1(placeholder0, vl); +if (placeholder8 < 7) { +vuint32m1_t placeholder9= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder3, placeholder9, vl); +size_t placeholder10 = vl; +vl = vl < (7 - placeholder8 + placeholder2 - 1) / placeholder2 ? +vl : (7 - placeholder8 + placeholder2 - 1) / placeholder2; +int32_t placeholder11 = placeholder2; +placeholder2 *= 4; +vuint32m1_t vec_value_3_0= vlse32_v_u32m1_tu(vec_value_0_0, placeholder1, placeholder2, tail_vl); +vse32_v_u32m1(placeholder3, vec_value_3_0, vl); +vl = placeholder10; // recover vl +placeholder2 = placeholder11; // recover stride +} +else { +vuint32m1_t placeholder12= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder3, placeholder12, vl); +}; +placeholder0 += vl; +placeholder1 += vl * placeholder2; +placeholder3 += vl; +placeholder8 += vl * placeholder2; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vlse32_v_operator_0() { +uint32_t tmp[] = {7500210u,8946104u,5592077u,4291503u,1786754u,1387269u,6442165u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vlse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vlse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse64XX64VInt64SISI_TA.c b/test/codegen-golden/Vlse64XX64VInt64SISI_TA.c new file mode 100644 index 0000000..df37076 --- /dev/null +++ b/test/codegen-golden/Vlse64XX64VInt64SISI_TA.c @@ -0,0 +1,95 @@ +// COMMAND: random_gen -r Vlse64XX64VInt64SISI_TA -n 1 -l 7 --has-ta --has-ma -c Vlse64XX64VInt64SISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int64_t value_0[7]; +ptrdiff_t value_1; +int64_t value_2[7]; +void vinit_rif_operator_1() { +int64_t tmp[] = {-5545814ll,7892207ll,5457874ll,-1416993ll,2596108ll,-7225462ll,-5629682ll,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +ptrdiff_t tmp = 3902764ll; +value_1 = tmp; +} +void vlse64_v_operator_0() { +int64_t *placeholder0 = value_0; +ptrdiff_t placeholder1 = value_1; +int64_t *placeholder2 = value_2; +int64_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e64m1(placeholder4); +vint64m1_t placeholder5= vmv_v_x_i64m1(0, vsetvlmax_e64m1()); +vse64_v_i64m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +placeholder1 = (placeholder1 % 4) + 1; +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = 2; +size_t tail_vl = 1; +if (placeholder7 < 7) { +vint64m1_t placeholder8= vmv_v_x_i64m1(0, vsetvlmax_e64m1()); +vse64_v_i64m1(placeholder2, placeholder8, vl); +size_t placeholder9 = vl; +vl = vl < (7 - placeholder7 + placeholder1 - 1) / placeholder1 ? +vl : (7 - placeholder7 + placeholder1 - 1) / placeholder1; +int32_t placeholder10 = placeholder1; +placeholder1 *= 8; +vint64m1_t vec_value_2_0= vlse64_v_i64m1_ta(placeholder0, placeholder1, tail_vl); +vse64_v_i64m1(placeholder2, vec_value_2_0, vl); +vl = placeholder9; // recover vl +placeholder1 = placeholder10; // recover stride +} +else { +vint64m1_t placeholder11= vmv_v_x_i64m1(0, vsetvlmax_e64m1()); +vse64_v_i64m1(placeholder2, placeholder11, vl); +}; +placeholder0 += vl * placeholder1; +placeholder2 += vl; +placeholder7 += vl * placeholder1; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vlse64_v_operator_0() { +int64_t tmp[] = {-5545814ll,-1ll,5457874ll,-1ll,2596108ll,-1ll,-5629682ll,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vlse64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vlse64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse64XX64VInt64VBSISI_TAMA.c b/test/codegen-golden/Vlse64XX64VInt64VBSISI_TAMA.c new file mode 100644 index 0000000..0b2bff5 --- /dev/null +++ b/test/codegen-golden/Vlse64XX64VInt64VBSISI_TAMA.c @@ -0,0 +1,111 @@ +// COMMAND: random_gen -r Vlse64XX64VInt64VBSISI_TAMA -n 1 -l 7 --has-ta --has-ma -c Vlse64XX64VInt64VBSISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int64_t value_1[7]; +ptrdiff_t value_2; +int64_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +ptrdiff_t tmp = 3902764ll; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int64_t tmp[] = {5000420ll,-1529498ll,1184154ll,1613727ll,-6426492ll,-2595685ll,2884331ll,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vlse64_v_operator_0() { +int8_t *placeholder0 = value_0; +int64_t *placeholder1 = value_1; +ptrdiff_t placeholder2 = value_2; +int64_t *placeholder3 = value_3; +int64_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e64m1(placeholder5); +vint64m1_t placeholder6= vmv_v_x_i64m1(0, vsetvlmax_e64m1()); +vse64_v_i64m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +placeholder2 = (placeholder2 % 4) + 1; +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf8_t vec_value_0= vle8_v_i8mf8(placeholder0, vl); +vbool64_t mask_value_0_0= vmseq_vx_i8mf8_b64(vec_value_0, 1, vl); +if (placeholder8 < 7) { +vint64m1_t placeholder9= vmv_v_x_i64m1(0, vsetvlmax_e64m1()); +vse64_v_i64m1(placeholder3, placeholder9, vl); +size_t placeholder10 = vl; +vl = vl < (7 - placeholder8 + placeholder2 - 1) / placeholder2 ? +vl : (7 - placeholder8 + placeholder2 - 1) / placeholder2; +int32_t placeholder11 = placeholder2; +placeholder2 *= 8; +vint64m1_t vec_value_3_0= vlse64_v_i64m1_tama(mask_value_0_0, placeholder1, placeholder2, tail_vl); +vse64_v_i64m1(placeholder3, vec_value_3_0, vl); +vl = placeholder10; // recover vl +placeholder2 = placeholder11; // recover stride +} +else { +vint64m1_t placeholder12= vmv_v_x_i64m1(0, vsetvlmax_e64m1()); +vse64_v_i64m1(placeholder3, placeholder12, vl); +}; +placeholder0 += vl; +placeholder1 += vl * placeholder2; +placeholder3 += vl; +placeholder8 += vl * placeholder2; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vlse64_v_operator_0() { +int64_t tmp[] = {-1ll,-1ll,1184154ll,-1ll,-6426492ll,-1ll,-1ll,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vlse64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vlse64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse64XX64VInt64VBVISISI_TAMU.c b/test/codegen-golden/Vlse64XX64VInt64VBVISISI_TAMU.c new file mode 100644 index 0000000..4cd237e --- /dev/null +++ b/test/codegen-golden/Vlse64XX64VInt64VBVISISI_TAMU.c @@ -0,0 +1,126 @@ +// COMMAND: random_gen -r Vlse64XX64VInt64VBVISISI_TAMU -n 1 -l 7 --has-ta --has-ma -c Vlse64XX64VInt64VBVISISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int64_t value_1[7]; +int64_t value_2[7]; +ptrdiff_t value_3; +int64_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int64_t tmp[] = {5000420ll,-1529498ll,1184154ll,1613727ll,-6426492ll,-2595685ll,2884331ll,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int64_t tmp[] = {8398813ll,1958398ll,1879014ll,2303187ll,-7353883ll,-734314ll,6976038ll,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vlse64_v_operator_0() { +int8_t *placeholder0 = value_0; +int64_t *placeholder1 = value_1; +int64_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +int64_t *placeholder4 = value_4; +int64_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e64m1(placeholder6); +vint64m1_t placeholder7= vmv_v_x_i64m1(0, vsetvlmax_e64m1()); +vse64_v_i64m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf8_t vec_value_0= vle8_v_i8mf8(placeholder0, vl); +vbool64_t mask_value_0_0= vmseq_vx_i8mf8_b64(vec_value_0, 1, vl); +vint64m1_t vec_value_1_0= vle64_v_i64m1(placeholder1, vl); +if (placeholder9 < 7) { +vint64m1_t placeholder10= vmv_v_x_i64m1(0, vsetvlmax_e64m1()); +vse64_v_i64m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 8; +vint64m1_t vec_value_4_0= vlse64_v_i64m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, tail_vl); +vse64_v_i64m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vint64m1_t placeholder13= vmv_v_x_i64m1(0, vsetvlmax_e64m1()); +vse64_v_i64m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse64_v_operator_0() { +int64_t tmp[] = {5000420ll,-1ll,1879014ll,-1ll,-7353883ll,-1ll,2884331ll,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse64XX64VInt64VBVISISI_TUMA.c b/test/codegen-golden/Vlse64XX64VInt64VBVISISI_TUMA.c new file mode 100644 index 0000000..53cb2f2 --- /dev/null +++ b/test/codegen-golden/Vlse64XX64VInt64VBVISISI_TUMA.c @@ -0,0 +1,126 @@ +// COMMAND: random_gen -r Vlse64XX64VInt64VBVISISI_TUMA -n 1 -l 7 --has-ta --has-ma -c Vlse64XX64VInt64VBVISISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int64_t value_1[7]; +int64_t value_2[7]; +ptrdiff_t value_3; +int64_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int64_t tmp[] = {5000420ll,-1529498ll,1184154ll,1613727ll,-6426492ll,-2595685ll,2884331ll,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int64_t tmp[] = {8398813ll,1958398ll,1879014ll,2303187ll,-7353883ll,-734314ll,6976038ll,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vlse64_v_operator_0() { +int8_t *placeholder0 = value_0; +int64_t *placeholder1 = value_1; +int64_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +int64_t *placeholder4 = value_4; +int64_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e64m1(placeholder6); +vint64m1_t placeholder7= vmv_v_x_i64m1(0, vsetvlmax_e64m1()); +vse64_v_i64m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf8_t vec_value_0= vle8_v_i8mf8(placeholder0, vl); +vbool64_t mask_value_0_0= vmseq_vx_i8mf8_b64(vec_value_0, 1, vl); +vint64m1_t vec_value_1_0= vle64_v_i64m1(placeholder1, vl); +if (placeholder9 < 7) { +vint64m1_t placeholder10= vmv_v_x_i64m1(0, vsetvlmax_e64m1()); +vse64_v_i64m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 8; +vint64m1_t vec_value_4_0= vlse64_v_i64m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, tail_vl); +vse64_v_i64m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vint64m1_t placeholder13= vmv_v_x_i64m1(0, vsetvlmax_e64m1()); +vse64_v_i64m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse64_v_operator_0() { +int64_t tmp[] = {-1ll,-1529498ll,1879014ll,1613727ll,-7353883ll,-2595685ll,-1ll,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse64XX64VInt64VBVISISI_TUMU.c b/test/codegen-golden/Vlse64XX64VInt64VBVISISI_TUMU.c new file mode 100644 index 0000000..49b1abf --- /dev/null +++ b/test/codegen-golden/Vlse64XX64VInt64VBVISISI_TUMU.c @@ -0,0 +1,126 @@ +// COMMAND: random_gen -r Vlse64XX64VInt64VBVISISI_TUMU -n 1 -l 7 --has-ta --has-ma -c Vlse64XX64VInt64VBVISISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int64_t value_1[7]; +int64_t value_2[7]; +ptrdiff_t value_3; +int64_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int64_t tmp[] = {5000420ll,-1529498ll,1184154ll,1613727ll,-6426492ll,-2595685ll,2884331ll,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int64_t tmp[] = {8398813ll,1958398ll,1879014ll,2303187ll,-7353883ll,-734314ll,6976038ll,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vlse64_v_operator_0() { +int8_t *placeholder0 = value_0; +int64_t *placeholder1 = value_1; +int64_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +int64_t *placeholder4 = value_4; +int64_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e64m1(placeholder6); +vint64m1_t placeholder7= vmv_v_x_i64m1(0, vsetvlmax_e64m1()); +vse64_v_i64m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf8_t vec_value_0= vle8_v_i8mf8(placeholder0, vl); +vbool64_t mask_value_0_0= vmseq_vx_i8mf8_b64(vec_value_0, 1, vl); +vint64m1_t vec_value_1_0= vle64_v_i64m1(placeholder1, vl); +if (placeholder9 < 7) { +vint64m1_t placeholder10= vmv_v_x_i64m1(0, vsetvlmax_e64m1()); +vse64_v_i64m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 8; +vint64m1_t vec_value_4_0= vlse64_v_i64m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, tail_vl); +vse64_v_i64m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vint64m1_t placeholder13= vmv_v_x_i64m1(0, vsetvlmax_e64m1()); +vse64_v_i64m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse64_v_operator_0() { +int64_t tmp[] = {5000420ll,-1529498ll,1879014ll,1613727ll,-7353883ll,-2595685ll,2884331ll,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse64XX64VInt64VBVISISI_m.c b/test/codegen-golden/Vlse64XX64VInt64VBVISISI_m.c new file mode 100644 index 0000000..9f6da97 --- /dev/null +++ b/test/codegen-golden/Vlse64XX64VInt64VBVISISI_m.c @@ -0,0 +1,125 @@ +// COMMAND: random_gen -r Vlse64XX64VInt64VBVISISI_m -n 1 -l 7 --has-ta --has-ma -c Vlse64XX64VInt64VBVISISI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int64_t value_1[7]; +int64_t value_2[7]; +ptrdiff_t value_3; +int64_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int64_t tmp[] = {5000420ll,-1529498ll,1184154ll,1613727ll,-6426492ll,-2595685ll,2884331ll,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int64_t tmp[] = {8398813ll,1958398ll,1879014ll,2303187ll,-7353883ll,-734314ll,6976038ll,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vlse64_v_operator_0() { +int8_t *placeholder0 = value_0; +int64_t *placeholder1 = value_1; +int64_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +int64_t *placeholder4 = value_4; +int64_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e64m1(placeholder6); +vint64m1_t placeholder7= vmv_v_x_i64m1(0, vsetvlmax_e64m1()); +vse64_v_i64m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = vsetvl_e64m1(placeholder8); +vint8mf8_t vec_value_0= vle8_v_i8mf8(placeholder0, vl); +vbool64_t mask_value_0_0= vmseq_vx_i8mf8_b64(vec_value_0, 1, vl); +vint64m1_t vec_value_1_0= vle64_v_i64m1(placeholder1, vl); +if (placeholder9 < 7) { +vint64m1_t placeholder10= vmv_v_x_i64m1(0, vsetvlmax_e64m1()); +vse64_v_i64m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 8; +vint64m1_t vec_value_4_0= vlse64_v_i64m1_m (mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, vl); +vse64_v_i64m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vint64m1_t placeholder13= vmv_v_x_i64m1(0, vsetvlmax_e64m1()); +vse64_v_i64m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse64_v_operator_0() { +int64_t tmp[] = {5000420ll,1958398ll,1879014ll,1613727ll,-7353883ll,-2595685ll,2884331ll,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse64XX64VInt64VISISI_TU.c b/test/codegen-golden/Vlse64XX64VInt64VISISI_TU.c new file mode 100644 index 0000000..699b9ed --- /dev/null +++ b/test/codegen-golden/Vlse64XX64VInt64VISISI_TU.c @@ -0,0 +1,110 @@ +// COMMAND: random_gen -r Vlse64XX64VInt64VISISI_TU -n 1 -l 7 --has-ta --has-ma -c Vlse64XX64VInt64VISISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int64_t value_0[7]; +int64_t value_1[7]; +ptrdiff_t value_2; +int64_t value_3[7]; +void vinit_rif_operator_1() { +int64_t tmp[] = {-5545814ll,7892207ll,5457874ll,-1416993ll,2596108ll,-7225462ll,-5629682ll,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +ptrdiff_t tmp = 3902764ll; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int64_t tmp[] = {5000420ll,-1529498ll,1184154ll,1613727ll,-6426492ll,-2595685ll,2884331ll,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vlse64_v_operator_0() { +int64_t *placeholder0 = value_0; +int64_t *placeholder1 = value_1; +ptrdiff_t placeholder2 = value_2; +int64_t *placeholder3 = value_3; +int64_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e64m1(placeholder5); +vint64m1_t placeholder6= vmv_v_x_i64m1(0, vsetvlmax_e64m1()); +vse64_v_i64m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +placeholder2 = (placeholder2 % 4) + 1; +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint64m1_t vec_value_0_0= vle64_v_i64m1(placeholder0, vl); +if (placeholder8 < 7) { +vint64m1_t placeholder9= vmv_v_x_i64m1(0, vsetvlmax_e64m1()); +vse64_v_i64m1(placeholder3, placeholder9, vl); +size_t placeholder10 = vl; +vl = vl < (7 - placeholder8 + placeholder2 - 1) / placeholder2 ? +vl : (7 - placeholder8 + placeholder2 - 1) / placeholder2; +int32_t placeholder11 = placeholder2; +placeholder2 *= 8; +vint64m1_t vec_value_3_0= vlse64_v_i64m1_tu(vec_value_0_0, placeholder1, placeholder2, tail_vl); +vse64_v_i64m1(placeholder3, vec_value_3_0, vl); +vl = placeholder10; // recover vl +placeholder2 = placeholder11; // recover stride +} +else { +vint64m1_t placeholder12= vmv_v_x_i64m1(0, vsetvlmax_e64m1()); +vse64_v_i64m1(placeholder3, placeholder12, vl); +}; +placeholder0 += vl; +placeholder1 += vl * placeholder2; +placeholder3 += vl; +placeholder8 += vl * placeholder2; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vlse64_v_operator_0() { +int64_t tmp[] = {5000420ll,7892207ll,1184154ll,-1416993ll,-6426492ll,-7225462ll,2884331ll,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vlse64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vlse64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse8XX8VInt8SISI_TA.c b/test/codegen-golden/Vlse8XX8VInt8SISI_TA.c new file mode 100644 index 0000000..8c2b622 --- /dev/null +++ b/test/codegen-golden/Vlse8XX8VInt8SISI_TA.c @@ -0,0 +1,95 @@ +// COMMAND: random_gen -r Vlse8XX8VInt8SISI_TA -n 1 -l 7 --has-ta --has-ma -c Vlse8XX8VInt8SISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +ptrdiff_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +ptrdiff_t tmp = 3902764ll; +value_1 = tmp; +} +void vlse8_v_operator_0() { +int8_t *placeholder0 = value_0; +ptrdiff_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t placeholder5= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +placeholder1 = (placeholder1 % 4) + 1; +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = 2; +size_t tail_vl = 1; +if (placeholder7 < 7) { +vint8m1_t placeholder8= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder2, placeholder8, vl); +size_t placeholder9 = vl; +vl = vl < (7 - placeholder7 + placeholder1 - 1) / placeholder1 ? +vl : (7 - placeholder7 + placeholder1 - 1) / placeholder1; +int32_t placeholder10 = placeholder1; +placeholder1 *= 1; +vint8m1_t vec_value_2_0= vlse8_v_i8m1_ta(placeholder0, placeholder1, tail_vl); +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); +vl = placeholder9; // recover vl +placeholder1 = placeholder10; // recover stride +} +else { +vint8m1_t placeholder11= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder2, placeholder11, vl); +}; +placeholder0 += vl * placeholder1; +placeholder2 += vl; +placeholder7 += vl * placeholder1; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vlse8_v_operator_0() { +int8_t tmp[] = {-56,-1,55,-1,26,-1,-57,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vlse8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vlse8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse8XX8VInt8VBSISI_TAMA.c b/test/codegen-golden/Vlse8XX8VInt8VBSISI_TAMA.c new file mode 100644 index 0000000..d5ba104 --- /dev/null +++ b/test/codegen-golden/Vlse8XX8VInt8VBSISI_TAMA.c @@ -0,0 +1,111 @@ +// COMMAND: random_gen -r Vlse8XX8VInt8VBSISI_TAMA -n 1 -l 7 --has-ta --has-ma -c Vlse8XX8VInt8VBSISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +ptrdiff_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +ptrdiff_t tmp = 3902764ll; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vlse8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +ptrdiff_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t placeholder6= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +placeholder2 = (placeholder2 % 4) + 1; +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +if (placeholder8 < 7) { +vint8m1_t placeholder9= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder3, placeholder9, vl); +size_t placeholder10 = vl; +vl = vl < (7 - placeholder8 + placeholder2 - 1) / placeholder2 ? +vl : (7 - placeholder8 + placeholder2 - 1) / placeholder2; +int32_t placeholder11 = placeholder2; +placeholder2 *= 1; +vint8m1_t vec_value_3_0= vlse8_v_i8m1_tama(mask_value_0_0, placeholder1, placeholder2, tail_vl); +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); +vl = placeholder10; // recover vl +placeholder2 = placeholder11; // recover stride +} +else { +vint8m1_t placeholder12= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder3, placeholder12, vl); +}; +placeholder0 += vl; +placeholder1 += vl * placeholder2; +placeholder3 += vl; +placeholder8 += vl * placeholder2; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vlse8_v_operator_0() { +int8_t tmp[] = {-1,-1,12,-1,-65,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vlse8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vlse8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse8XX8VInt8VBVISISI_TAMU.c b/test/codegen-golden/Vlse8XX8VInt8VBVISISI_TAMU.c new file mode 100644 index 0000000..344439b --- /dev/null +++ b/test/codegen-golden/Vlse8XX8VInt8VBVISISI_TAMU.c @@ -0,0 +1,126 @@ +// COMMAND: random_gen -r Vlse8XX8VInt8VBVISISI_TAMU -n 1 -l 7 --has-ta --has-ma -c Vlse8XX8VInt8VBVISISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +ptrdiff_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vlse8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int8_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e8m1(placeholder6); +vint8m1_t placeholder7= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +if (placeholder9 < 7) { +vint8m1_t placeholder10= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 1; +vint8m1_t vec_value_4_0= vlse8_v_i8m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vint8m1_t placeholder13= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse8_v_operator_0() { +int8_t tmp[] = {50,-1,19,-1,-74,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse8XX8VInt8VBVISISI_TUMA.c b/test/codegen-golden/Vlse8XX8VInt8VBVISISI_TUMA.c new file mode 100644 index 0000000..98b352b --- /dev/null +++ b/test/codegen-golden/Vlse8XX8VInt8VBVISISI_TUMA.c @@ -0,0 +1,126 @@ +// COMMAND: random_gen -r Vlse8XX8VInt8VBVISISI_TUMA -n 1 -l 7 --has-ta --has-ma -c Vlse8XX8VInt8VBVISISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +ptrdiff_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vlse8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int8_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e8m1(placeholder6); +vint8m1_t placeholder7= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +if (placeholder9 < 7) { +vint8m1_t placeholder10= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 1; +vint8m1_t vec_value_4_0= vlse8_v_i8m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vint8m1_t placeholder13= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse8_v_operator_0() { +int8_t tmp[] = {-1,-15,19,16,-74,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse8XX8VInt8VBVISISI_TUMU.c b/test/codegen-golden/Vlse8XX8VInt8VBVISISI_TUMU.c new file mode 100644 index 0000000..e652e04 --- /dev/null +++ b/test/codegen-golden/Vlse8XX8VInt8VBVISISI_TUMU.c @@ -0,0 +1,126 @@ +// COMMAND: random_gen -r Vlse8XX8VInt8VBVISISI_TUMU -n 1 -l 7 --has-ta --has-ma -c Vlse8XX8VInt8VBVISISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +ptrdiff_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vlse8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int8_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e8m1(placeholder6); +vint8m1_t placeholder7= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +if (placeholder9 < 7) { +vint8m1_t placeholder10= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 1; +vint8m1_t vec_value_4_0= vlse8_v_i8m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vint8m1_t placeholder13= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse8_v_operator_0() { +int8_t tmp[] = {50,-15,19,16,-74,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse8XX8VInt8VBVISISI_m.c b/test/codegen-golden/Vlse8XX8VInt8VBVISISI_m.c new file mode 100644 index 0000000..9b2d42e --- /dev/null +++ b/test/codegen-golden/Vlse8XX8VInt8VBVISISI_m.c @@ -0,0 +1,125 @@ +// COMMAND: random_gen -r Vlse8XX8VInt8VBVISISI_m -n 1 -l 7 --has-ta --has-ma -c Vlse8XX8VInt8VBVISISI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +ptrdiff_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +ptrdiff_t tmp = 3902764ll; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vlse8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +ptrdiff_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int8_t *placeholder5 = value_4; +int placeholder6 = 7; + +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e8m1(placeholder6); +vint8m1_t placeholder7= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder5, placeholder7, vl); +placeholder5 += vl; +} +placeholder3 = (placeholder3 % 4) + 1; +int placeholder8 = 7; + +size_t placeholder9 = 0; +for (size_t vl; placeholder8 > 0; placeholder8 -= vl) { +vl = vsetvl_e8m1(placeholder8); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +if (placeholder9 < 7) { +vint8m1_t placeholder10= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder4, placeholder10, vl); +size_t placeholder11 = vl; +vl = vl < (7 - placeholder9 + placeholder3 - 1) / placeholder3 ? +vl : (7 - placeholder9 + placeholder3 - 1) / placeholder3; +int32_t placeholder12 = placeholder3; +placeholder3 *= 1; +vint8m1_t vec_value_4_0= vlse8_v_i8m1_m (mask_value_0_0, vec_value_1_0, placeholder2, placeholder3, vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +vl = placeholder11; // recover vl +placeholder3 = placeholder12; // recover stride +} +else { +vint8m1_t placeholder13= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder4, placeholder13, vl); +}; +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl * placeholder3; +placeholder4 += vl; +placeholder9 += vl * placeholder3; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vlse8_v_operator_0() { +int8_t tmp[] = {50,20,19,16,-74,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vlse8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vlse8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vlse8XX8VInt8VISISI_TU.c b/test/codegen-golden/Vlse8XX8VInt8VISISI_TU.c new file mode 100644 index 0000000..ea7c865 --- /dev/null +++ b/test/codegen-golden/Vlse8XX8VInt8VISISI_TU.c @@ -0,0 +1,110 @@ +// COMMAND: random_gen -r Vlse8XX8VInt8VISISI_TU -n 1 -l 7 --has-ta --has-ma -c Vlse8XX8VInt8VISISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +ptrdiff_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +ptrdiff_t tmp = 3902764ll; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vlse8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +ptrdiff_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t placeholder6= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +placeholder2 = (placeholder2 % 4) + 1; +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +if (placeholder8 < 7) { +vint8m1_t placeholder9= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder3, placeholder9, vl); +size_t placeholder10 = vl; +vl = vl < (7 - placeholder8 + placeholder2 - 1) / placeholder2 ? +vl : (7 - placeholder8 + placeholder2 - 1) / placeholder2; +int32_t placeholder11 = placeholder2; +placeholder2 *= 1; +vint8m1_t vec_value_3_0= vlse8_v_i8m1_tu(vec_value_0_0, placeholder1, placeholder2, tail_vl); +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); +vl = placeholder10; // recover vl +placeholder2 = placeholder11; // recover stride +} +else { +vint8m1_t placeholder12= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder3, placeholder12, vl); +}; +placeholder0 += vl; +placeholder1 += vl * placeholder2; +placeholder3 += vl; +placeholder8 += vl * placeholder2; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vlse8_v_operator_0() { +int8_t tmp[] = {50,79,12,-14,-65,-73,29,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vlse8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vlse8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vlse8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei16V8VInt8SIVU_TA.c b/test/codegen-golden/Vluxei16V8VInt8SIVU_TA.c new file mode 100644 index 0000000..df33e01 --- /dev/null +++ b/test/codegen-golden/Vluxei16V8VInt8SIVU_TA.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r Vluxei16V8VInt8SIVU_TA -n 1 -l 7 --has-ta --has-ma -c Vluxei16V8VInt8SIVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {3903,7500,4235,5592,5807,1786,3702,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vluxei16_v_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +if (7 < 65535) { +vec_value_1_0 = vremu_vx_u16m2(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u16m2(vec_value_1_0, 1, vl); +vint8m1_t vec_value_2_0= vluxei16_v_i8m1_ta(placeholder0, vec_value_1_0, tail_vl); +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei16_v_operator_0() { +int8_t tmp[] = {26,-1,-56,-1,26,-1,-57,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vluxei16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei16V8VInt8VBSIVU_TAMA.c b/test/codegen-golden/Vluxei16V8VInt8VBSIVU_TAMA.c new file mode 100644 index 0000000..4c63ea2 --- /dev/null +++ b/test/codegen-golden/Vluxei16V8VInt8VBSIVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Vluxei16V8VInt8VBSIVU_TAMA -n 1 -l 7 --has-ta --has-ma -c Vluxei16V8VInt8VBSIVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {3903,7500,4235,5592,5807,1786,3702,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vluxei16_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); +if (7 < 65535) { +vuint16m2_t placeholder6= vmv_v_x_u16m2(0, vsetvlmax_e16m2()); +vec_value_2_0 = vremu_vx_u16m2_m(mask_value_0_0, placeholder6, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u16m2(vec_value_2_0, 1, vl); +vint8m1_t vec_value_3_0= vluxei16_v_i8m1_tama(mask_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei16_v_operator_0() { +int8_t tmp[] = {-1,-1,29,-1,23,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vluxei16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei16V8VInt8VBVISIVU_TAMU.c b/test/codegen-golden/Vluxei16V8VInt8VBVISIVU_TAMU.c new file mode 100644 index 0000000..b487f84 --- /dev/null +++ b/test/codegen-golden/Vluxei16V8VInt8VBVISIVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vluxei16V8VInt8VBVISIVU_TAMU -n 1 -l 7 --has-ta --has-ma -c Vluxei16V8VInt8VBVISIVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint16_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {3903,7500,4235,5592,5807,1786,3702,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei16_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint16m2_t vec_value_3_0= vle16_v_u16m2(placeholder3, vl); +if (7 < 65535) { +vuint16m2_t placeholder7= vmv_v_x_u16m2(0, vsetvlmax_e16m2()); +vec_value_3_0 = vremu_vx_u16m2_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u16m2(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vluxei16_v_i8m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei16_v_operator_0() { +int8_t tmp[] = {29,-1,70,-1,-39,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei16V8VInt8VBVISIVU_TUMA.c b/test/codegen-golden/Vluxei16V8VInt8VBVISIVU_TUMA.c new file mode 100644 index 0000000..4f737b3 --- /dev/null +++ b/test/codegen-golden/Vluxei16V8VInt8VBVISIVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vluxei16V8VInt8VBVISIVU_TUMA -n 1 -l 7 --has-ta --has-ma -c Vluxei16V8VInt8VBVISIVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint16_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {3903,7500,4235,5592,5807,1786,3702,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei16_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint16m2_t vec_value_3_0= vle16_v_u16m2(placeholder3, vl); +if (7 < 65535) { +vuint16m2_t placeholder7= vmv_v_x_u16m2(0, vsetvlmax_e16m2()); +vec_value_3_0 = vremu_vx_u16m2_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u16m2(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vluxei16_v_i8m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei16_v_operator_0() { +int8_t tmp[] = {-1,84,70,19,-39,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei16V8VInt8VBVISIVU_TUMU.c b/test/codegen-golden/Vluxei16V8VInt8VBVISIVU_TUMU.c new file mode 100644 index 0000000..6b83867 --- /dev/null +++ b/test/codegen-golden/Vluxei16V8VInt8VBVISIVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vluxei16V8VInt8VBVISIVU_TUMU -n 1 -l 7 --has-ta --has-ma -c Vluxei16V8VInt8VBVISIVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint16_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {3903,7500,4235,5592,5807,1786,3702,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei16_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint16m2_t vec_value_3_0= vle16_v_u16m2(placeholder3, vl); +if (7 < 65535) { +vuint16m2_t placeholder7= vmv_v_x_u16m2(0, vsetvlmax_e16m2()); +vec_value_3_0 = vremu_vx_u16m2_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u16m2(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vluxei16_v_i8m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei16_v_operator_0() { +int8_t tmp[] = {29,84,70,19,-39,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei16V8VInt8VBVISIVU_m.c b/test/codegen-golden/Vluxei16V8VInt8VBVISIVU_m.c new file mode 100644 index 0000000..eff1a88 --- /dev/null +++ b/test/codegen-golden/Vluxei16V8VInt8VBVISIVU_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r Vluxei16V8VInt8VBVISIVU_m -n 1 -l 7 --has-ta --has-ma -c Vluxei16V8VInt8VBVISIVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint16_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint16_t tmp[] = {3903,7500,4235,5592,5807,1786,3702,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei16_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint16m2_t vec_value_3_0= vle16_v_u16m2(placeholder3, vl); +if (7 < 65535) { +vuint16m2_t placeholder7= vmv_v_x_u16m2(0, vsetvlmax_e16m2()); +vec_value_3_0 = vremu_vx_u16m2_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u16m2(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vluxei16_v_i8m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei16_v_operator_0() { +int8_t tmp[] = {29,92,70,19,-39,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei16V8VInt8VISIVU_TU.c b/test/codegen-golden/Vluxei16V8VInt8VISIVU_TU.c new file mode 100644 index 0000000..c57329b --- /dev/null +++ b/test/codegen-golden/Vluxei16V8VInt8VISIVU_TU.c @@ -0,0 +1,90 @@ +// COMMAND: random_gen -r Vluxei16V8VInt8VISIVU_TU -n 1 -l 7 --has-ta --has-ma -c Vluxei16V8VInt8VISIVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {3903,7500,4235,5592,5807,1786,3702,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vluxei16_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); +if (7 < 65535) { +vec_value_2_0 = vremu_vx_u16m2(vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u16m2(vec_value_2_0, 1, vl); +vint8m1_t vec_value_3_0= vluxei16_v_i8m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei16_v_operator_0() { +int8_t tmp[] = {23,79,29,-14,23,-73,-7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vluxei16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VFloat32SFVU.c b/test/codegen-golden/Vluxei32V32VFloat32SFVU.c new file mode 100644 index 0000000..aac4921 --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VFloat32SFVU.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r Vluxei32V32VFloat32SFVU -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VFloat32SFVU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +uint32_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +float32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e32m1(placeholder3); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +if (7 < 4294967295) { +vec_value_1_0 = vremu_vx_u32m1(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u32m1(vec_value_1_0, 4, vl); +vfloat32m1_t vec_value_2_0= vluxei32_v_f32m1(placeholder0, vec_value_1_0, vl); +vse32_v_f32m1(placeholder2, vec_value_2_0, vl); +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei32_v_operator_0() { +uint64_t tmp[] = {1244223528u,1262498700u,1250254620u,1267237304u,1250422356u,1262498700u,1262498700u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VFloat32SFVU_TA.c b/test/codegen-golden/Vluxei32V32VFloat32SFVU_TA.c new file mode 100644 index 0000000..07460f9 --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VFloat32SFVU_TA.c @@ -0,0 +1,82 @@ +// COMMAND: random_gen -r Vluxei32V32VFloat32SFVU_TA -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VFloat32SFVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +uint32_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +float32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +if (7 < 4294967295) { +vec_value_1_0 = vremu_vx_u32m1(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u32m1(vec_value_1_0, 4, vl); +vfloat32m1_t vec_value_2_0= vluxei32_v_f32m1_ta(placeholder0, vec_value_1_0, tail_vl); +vse32_v_f32m1(placeholder2, vec_value_2_0, vl); +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei32_v_operator_0() { +uint64_t tmp[] = {1244223528u,4294967295u,1250254620u,4294967295u,1250422356u,4294967295u,1262498700u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VFloat32VBSFVU_TAMA.c b/test/codegen-golden/Vluxei32V32VFloat32VBSFVU_TAMA.c new file mode 100644 index 0000000..c2076d2 --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VFloat32VBSFVU_TAMA.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r Vluxei32V32VFloat32VBSFVU_TAMA -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VFloat32VBSFVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +uint32_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vluxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1(placeholder2, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder6= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_2_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder6, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m1(vec_value_2_0, 4, vl); +vfloat32m1_t vec_value_3_0= vluxei32_v_f32m1_tama(mask_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse32_v_f32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei32_v_operator_0() { +uint64_t tmp[] = {4294967295u,4294967295u,1259168278u,4294967295u,1262786923u,4294967295u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VFloat32VBVFSFVU_TAMU.c b/test/codegen-golden/Vluxei32V32VFloat32VBVFSFVU_TAMU.c new file mode 100644 index 0000000..d226184 --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VFloat32VBVFSFVU_TAMU.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r Vluxei32V32VFloat32VBVFSFVU_TAMU -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VFloat32VBVFSFVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +uint32_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1266779219u,1255845574u,1263781768u,1267886662u,1253798282u,1250916304u,1253542582u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vluxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vfloat32m1_t vec_value_4_0= vluxei32_v_f32m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse32_v_f32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei32_v_operator_0() { +uint64_t tmp[] = {1262786923u,4294967295u,1253542582u,4294967295u,1266779219u,4294967295u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VFloat32VBVFSFVU_TUMA.c b/test/codegen-golden/Vluxei32V32VFloat32VBVFSFVU_TUMA.c new file mode 100644 index 0000000..68d9a6f --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VFloat32VBVFSFVU_TUMA.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r Vluxei32V32VFloat32VBVFSFVU_TUMA -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VFloat32VBVFSFVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +uint32_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1266779219u,1255845574u,1263781768u,1267886662u,1253798282u,1250916304u,1253542582u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vluxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vfloat32m1_t vec_value_4_0= vluxei32_v_f32m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse32_v_f32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei32_v_operator_0() { +uint64_t tmp[] = {4294967295u,1267490606u,1253542582u,1261781606u,1266779219u,1243709844u,4294967295u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VFloat32VBVFSFVU_TUMU.c b/test/codegen-golden/Vluxei32V32VFloat32VBVFSFVU_TUMU.c new file mode 100644 index 0000000..a1d69d7 --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VFloat32VBVFSFVU_TUMU.c @@ -0,0 +1,116 @@ +// COMMAND: random_gen -r Vluxei32V32VFloat32VBVFSFVU_TUMU -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VFloat32VBVFSFVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +uint32_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1266779219u,1255845574u,1263781768u,1267886662u,1253798282u,1250916304u,1253542582u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vluxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vfloat32m1_t vec_value_4_0= vluxei32_v_f32m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse32_v_f32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei32_v_operator_0() { +uint64_t tmp[] = {1262786923u,1267490606u,1253542582u,1261781606u,1266779219u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VFloat32VBVFSFVU_m.c b/test/codegen-golden/Vluxei32V32VFloat32VBVFSFVU_m.c new file mode 100644 index 0000000..1f5435b --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VFloat32VBVFSFVU_m.c @@ -0,0 +1,115 @@ +// COMMAND: random_gen -r Vluxei32V32VFloat32VBVFSFVU_m -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VFloat32VBVFSFVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +uint32_t value_3[7]; +float32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {1266779219u,1255845574u,1263781768u,1267886662u,1253798282u,1250916304u,1253542582u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_2[i] = converter.f; +} +} +void vluxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +float32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vfloat32m1_t vec_value_4_0= vluxei32_v_f32m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); +vse32_v_f32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei32_v_operator_0() { +uint64_t tmp[] = {1262786923u,1253798282u,1253542582u,1261781606u,1266779219u,1243709844u,1259168278u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_4[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VFloat32VFSFVU_TU.c b/test/codegen-golden/Vluxei32V32VFloat32VFSFVU_TU.c new file mode 100644 index 0000000..ca2fffa --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VFloat32VFSFVU_TU.c @@ -0,0 +1,99 @@ +// COMMAND: random_gen -r Vluxei32V32VFloat32VFSFVU_TU -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VFloat32VFSFVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float32_t value_1[7]; +uint32_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vluxei32_v_operator_0() { +float32_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vfloat32m1_t vec_value_0_0= vle32_v_f32m1(placeholder0, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1(placeholder2, vl); +if (7 < 4294967295) { +vec_value_2_0 = vremu_vx_u32m1(vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m1(vec_value_2_0, 4, vl); +vfloat32m1_t vec_value_3_0= vluxei32_v_f32m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse32_v_f32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei32_v_operator_0() { +uint64_t tmp[] = {1243709844u,1267237304u,1259168278u,1258485599u,1262786923u,1244223528u,1262205779u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VInt32SIVU.c b/test/codegen-golden/Vluxei32V32VInt32SIVU.c new file mode 100644 index 0000000..08b8a64 --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VInt32SIVU.c @@ -0,0 +1,74 @@ +// COMMAND: random_gen -r Vluxei32V32VInt32SIVU -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VInt32SIVU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int32_t value_0[7]; +uint32_t value_1[7]; +int32_t value_2[7]; +void vinit_rif_operator_1() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +int32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e32m1(placeholder3); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +if (7 < 4294967295) { +vec_value_1_0 = vremu_vx_u32m1(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u32m1(vec_value_1_0, 4, vl); +vint32m1_t vec_value_2_0= vluxei32_v_i32m1(placeholder0, vec_value_1_0, vl); +vse32_v_i32m1(placeholder2, vec_value_2_0, vl); +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei32_v_operator_0() { +int32_t tmp[] = {-7225462,2596108,-5629682,7892207,-5545814,2596108,2596108,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VInt32SIVU_TA.c b/test/codegen-golden/Vluxei32V32VInt32SIVU_TA.c new file mode 100644 index 0000000..51e73f8 --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VInt32SIVU_TA.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r Vluxei32V32VInt32SIVU_TA -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VInt32SIVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int32_t value_0[7]; +uint32_t value_1[7]; +int32_t value_2[7]; +void vinit_rif_operator_1() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +int32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +if (7 < 4294967295) { +vec_value_1_0 = vremu_vx_u32m1(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u32m1(vec_value_1_0, 4, vl); +vint32m1_t vec_value_2_0= vluxei32_v_i32m1_ta(placeholder0, vec_value_1_0, tail_vl); +vse32_v_i32m1(placeholder2, vec_value_2_0, vl); +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei32_v_operator_0() { +int32_t tmp[] = {-7225462,-1,-5629682,-1,-5545814,-1,2596108,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VInt32VBSIVU_TAMA.c b/test/codegen-golden/Vluxei32V32VInt32VBSIVU_TAMA.c new file mode 100644 index 0000000..b7e72a8 --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VInt32VBSIVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Vluxei32V32VInt32VBSIVU_TAMA -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VInt32VBSIVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +uint32_t value_2[7]; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +int32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1(placeholder2, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder6= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_2_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder6, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m1(vec_value_2_0, 4, vl); +vint32m1_t vec_value_3_0= vluxei32_v_i32m1_tama(mask_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse32_v_i32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei32_v_operator_0() { +int32_t tmp[] = {-1,-1,-734314,-1,2884331,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VInt32VBVISIVU_TAMU.c b/test/codegen-golden/Vluxei32V32VInt32VBVISIVU_TAMU.c new file mode 100644 index 0000000..c389cc0 --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VInt32VBVISIVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vluxei32V32VInt32VBVISIVU_TAMU -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VInt32VBVISIVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +int32_t value_2[7]; +uint32_t value_3[7]; +int32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int32_t tmp[] = {6976038,-2834205,3879176,9190924,-3857851,-5298840,-3985701,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vint32m1_t vec_value_4_0= vluxei32_v_i32m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse32_v_i32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei32_v_operator_0() { +int32_t tmp[] = {2884331,-1,-3985701,-1,6976038,-1,-734314,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VInt32VBVISIVU_TUMA.c b/test/codegen-golden/Vluxei32V32VInt32VBVISIVU_TUMA.c new file mode 100644 index 0000000..69db3c8 --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VInt32VBVISIVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vluxei32V32VInt32VBVISIVU_TUMA -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VInt32VBVISIVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +int32_t value_2[7]; +uint32_t value_3[7]; +int32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int32_t tmp[] = {6976038,-2834205,3879176,9190924,-3857851,-5298840,-3985701,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vint32m1_t vec_value_4_0= vluxei32_v_i32m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse32_v_i32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei32_v_operator_0() { +int32_t tmp[] = {-1,8398813,-3985701,1879014,6976038,-7353883,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VInt32VBVISIVU_TUMU.c b/test/codegen-golden/Vluxei32V32VInt32VBVISIVU_TUMU.c new file mode 100644 index 0000000..36e2180 --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VInt32VBVISIVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vluxei32V32VInt32VBVISIVU_TUMU -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VInt32VBVISIVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +int32_t value_2[7]; +uint32_t value_3[7]; +int32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int32_t tmp[] = {6976038,-2834205,3879176,9190924,-3857851,-5298840,-3985701,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vint32m1_t vec_value_4_0= vluxei32_v_i32m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse32_v_i32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei32_v_operator_0() { +int32_t tmp[] = {2884331,8398813,-3985701,1879014,6976038,-7353883,-734314,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VInt32VBVISIVU_m.c b/test/codegen-golden/Vluxei32V32VInt32VBVISIVU_m.c new file mode 100644 index 0000000..06efc2e --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VInt32VBVISIVU_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r Vluxei32V32VInt32VBVISIVU_m -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VInt32VBVISIVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +int32_t value_2[7]; +uint32_t value_3[7]; +int32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int32_t tmp[] = {6976038,-2834205,3879176,9190924,-3857851,-5298840,-3985701,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vint32m1_t vec_value_4_0= vluxei32_v_i32m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); +vse32_v_i32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei32_v_operator_0() { +int32_t tmp[] = {2884331,-3857851,-3985701,1879014,6976038,-7353883,-734314,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VInt32VISIVU_TU.c b/test/codegen-golden/Vluxei32V32VInt32VISIVU_TU.c new file mode 100644 index 0000000..a4e7073 --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VInt32VISIVU_TU.c @@ -0,0 +1,90 @@ +// COMMAND: random_gen -r Vluxei32V32VInt32VISIVU_TU -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VInt32VISIVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int32_t value_0[7]; +int32_t value_1[7]; +uint32_t value_2[7]; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +int32_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +int32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint32m1_t vec_value_0_0= vle32_v_i32m1(placeholder0, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1(placeholder2, vl); +if (7 < 4294967295) { +vec_value_2_0 = vremu_vx_u32m1(vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m1(vec_value_2_0, 4, vl); +vint32m1_t vec_value_3_0= vluxei32_v_i32m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse32_v_i32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei32_v_operator_0() { +int32_t tmp[] = {-7353883,7892207,-734314,-1416993,2884331,-7225462,2303187,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VUInt32SUVU.c b/test/codegen-golden/Vluxei32V32VUInt32SUVU.c new file mode 100644 index 0000000..6e2c7eb --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VUInt32SUVU.c @@ -0,0 +1,74 @@ +// COMMAND: random_gen -r Vluxei32V32VUInt32SUVU -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VUInt32SUVU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint32_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +uint32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e32m1(placeholder3); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +if (7 < 4294967295) { +vec_value_1_0 = vremu_vx_u32m1(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u32m1(vec_value_1_0, 4, vl); +vuint32m1_t vec_value_2_0= vluxei32_v_u32m1(placeholder0, vec_value_1_0, vl); +vse32_v_u32m1(placeholder2, vec_value_2_0, vl); +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei32_v_operator_0() { +uint32_t tmp[] = {1387269u,6298054u,2185159u,8946104u,2227093u,6298054u,6298054u,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VUInt32SUVU_TA.c b/test/codegen-golden/Vluxei32V32VUInt32SUVU_TA.c new file mode 100644 index 0000000..3f1e6e9 --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VUInt32SUVU_TA.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r Vluxei32V32VUInt32SUVU_TA -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VUInt32SUVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint32_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +uint32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +if (7 < 4294967295) { +vec_value_1_0 = vremu_vx_u32m1(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u32m1(vec_value_1_0, 4, vl); +vuint32m1_t vec_value_2_0= vluxei32_v_u32m1_ta(placeholder0, vec_value_1_0, tail_vl); +vse32_v_u32m1(placeholder2, vec_value_2_0, vl); +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei32_v_operator_0() { +uint32_t tmp[] = {1387269u,4294967295u,2185159u,4294967295u,2227093u,4294967295u,6298054u,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VUInt32VBSUVU_TAMA.c b/test/codegen-golden/Vluxei32V32VUInt32VBSUVU_TAMA.c new file mode 100644 index 0000000..51227a7 --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VUInt32VBSUVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Vluxei32V32VUInt32VBSUVU_TAMA -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VUInt32VBSUVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1(placeholder2, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder6= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_2_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder6, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m1(vec_value_2_0, 4, vl); +vuint32m1_t vec_value_3_0= vluxei32_v_u32m1_tama(mask_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse32_v_u32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei32_v_operator_0() { +uint32_t tmp[] = {4294967295u,4294967295u,4632843u,4294967295u,6442165u,4294967295u,4294967295u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VUInt32VBVUSUVU_TAMU.c b/test/codegen-golden/Vluxei32V32VUInt32VBVUSUVU_TAMU.c new file mode 100644 index 0000000..63f7f65 --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VUInt32VBVUSUVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vluxei32V32VUInt32VBVUSUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VUInt32VBVUSUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +uint32_t value_3[7]; +uint32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {8488019u,3582897u,6939588u,9595462u,3071074u,2350580u,3007149u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +uint32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vuint32m1_t vec_value_4_0= vluxei32_v_u32m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse32_v_u32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei32_v_operator_0() { +uint32_t tmp[] = {6442165u,4294967295u,3007149u,4294967295u,8488019u,4294967295u,4632843u,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VUInt32VBVUSUVU_TUMA.c b/test/codegen-golden/Vluxei32V32VUInt32VBVUSUVU_TUMA.c new file mode 100644 index 0000000..46d51ad --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VUInt32VBVUSUVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vluxei32V32VUInt32VBVUSUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VUInt32VBVUSUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +uint32_t value_3[7]; +uint32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {8488019u,3582897u,6939588u,9595462u,3071074u,2350580u,3007149u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +uint32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vuint32m1_t vec_value_4_0= vluxei32_v_u32m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse32_v_u32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei32_v_operator_0() { +uint32_t tmp[] = {4294967295u,9199407u,3007149u,5939507u,8488019u,1323058u,4294967295u,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VUInt32VBVUSUVU_TUMU.c b/test/codegen-golden/Vluxei32V32VUInt32VBVUSUVU_TUMU.c new file mode 100644 index 0000000..6c09fff --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VUInt32VBVUSUVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vluxei32V32VUInt32VBVUSUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VUInt32VBVUSUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +uint32_t value_3[7]; +uint32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {8488019u,3582897u,6939588u,9595462u,3071074u,2350580u,3007149u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +uint32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vuint32m1_t vec_value_4_0= vluxei32_v_u32m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse32_v_u32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei32_v_operator_0() { +uint32_t tmp[] = {6442165u,9199407u,3007149u,5939507u,8488019u,1323058u,4632843u,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VUInt32VBVUSUVU_m.c b/test/codegen-golden/Vluxei32V32VUInt32VBVUSUVU_m.c new file mode 100644 index 0000000..57258c9 --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VUInt32VBVUSUVU_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r Vluxei32V32VUInt32VBVUSUVU_m -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VUInt32VBVUSUVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +uint32_t value_3[7]; +uint32_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {8488019u,3582897u,6939588u,9595462u,3071074u,2350580u,3007149u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +uint32_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +vuint32m1_t vec_value_3_0= vle32_v_u32m1(placeholder3, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder7= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_3_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m1(vec_value_3_0, 4, vl); +vuint32m1_t vec_value_4_0= vluxei32_v_u32m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); +vse32_v_u32m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei32_v_operator_0() { +uint32_t tmp[] = {6442165u,3071074u,3007149u,5939507u,8488019u,1323058u,4632843u,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V32VUInt32VUSUVU_TU.c b/test/codegen-golden/Vluxei32V32VUInt32VUSUVU_TU.c new file mode 100644 index 0000000..b7fa121 --- /dev/null +++ b/test/codegen-golden/Vluxei32V32VUInt32VUSUVU_TU.c @@ -0,0 +1,90 @@ +// COMMAND: random_gen -r Vluxei32V32VUInt32VUSUVU_TU -n 1 -l 7 --has-ta --has-ma -c Vluxei32V32VUInt32VUSUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint32_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +uint32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint32m1_t vec_value_0_0= vle32_v_u32m1(placeholder0, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1(placeholder2, vl); +if (7 < 4294967295) { +vec_value_2_0 = vremu_vx_u32m1(vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m1(vec_value_2_0, 4, vl); +vuint32m1_t vec_value_3_0= vluxei32_v_u32m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse32_v_u32m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei32_v_operator_0() { +uint32_t tmp[] = {1323058u,8946104u,4632843u,4291503u,6442165u,1387269u,6151593u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V8VInt8SIVU_TA.c b/test/codegen-golden/Vluxei32V8VInt8SIVU_TA.c new file mode 100644 index 0000000..5df7246 --- /dev/null +++ b/test/codegen-golden/Vluxei32V8VInt8SIVU_TA.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r Vluxei32V8VInt8SIVU_TA -n 1 -l 7 --has-ta --has-ma -c Vluxei32V8VInt8SIVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint32m4_t vec_value_1_0= vle32_v_u32m4(placeholder1, vl); +if (7 < 4294967295) { +vec_value_1_0 = vremu_vx_u32m4(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u32m4(vec_value_1_0, 1, vl); +vint8m1_t vec_value_2_0= vluxei32_v_i8m1_ta(placeholder0, vec_value_1_0, tail_vl); +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei32_v_operator_0() { +int8_t tmp[] = {-73,-1,-57,-1,-56,-1,26,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V8VInt8VBSIVU_TAMA.c b/test/codegen-golden/Vluxei32V8VInt8VBSIVU_TAMA.c new file mode 100644 index 0000000..ef040d3 --- /dev/null +++ b/test/codegen-golden/Vluxei32V8VInt8VBSIVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Vluxei32V8VInt8VBSIVU_TAMA -n 1 -l 7 --has-ta --has-ma -c Vluxei32V8VInt8VBSIVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint32_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint32m4_t vec_value_2_0= vle32_v_u32m4(placeholder2, vl); +if (7 < 4294967295) { +vuint32m4_t placeholder6= vmv_v_x_u32m4(0, vsetvlmax_e32m4()); +vec_value_2_0 = vremu_vx_u32m4_m(mask_value_0_0, placeholder6, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m4(vec_value_2_0, 1, vl); +vint8m1_t vec_value_3_0= vluxei32_v_i8m1_tama(mask_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei32_v_operator_0() { +int8_t tmp[] = {-1,-1,-7,-1,29,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V8VInt8VBVISIVU_TAMU.c b/test/codegen-golden/Vluxei32V8VInt8VBVISIVU_TAMU.c new file mode 100644 index 0000000..99854f7 --- /dev/null +++ b/test/codegen-golden/Vluxei32V8VInt8VBVISIVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vluxei32V8VInt8VBVISIVU_TAMU -n 1 -l 7 --has-ta --has-ma -c Vluxei32V8VInt8VBVISIVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint32_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint32m4_t vec_value_3_0= vle32_v_u32m4(placeholder3, vl); +if (7 < 4294967295) { +vuint32m4_t placeholder7= vmv_v_x_u32m4(0, vsetvlmax_e32m4()); +vec_value_3_0 = vremu_vx_u32m4_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m4(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vluxei32_v_i8m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei32_v_operator_0() { +int8_t tmp[] = {29,-1,-40,-1,70,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V8VInt8VBVISIVU_TUMA.c b/test/codegen-golden/Vluxei32V8VInt8VBVISIVU_TUMA.c new file mode 100644 index 0000000..49ebd36 --- /dev/null +++ b/test/codegen-golden/Vluxei32V8VInt8VBVISIVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vluxei32V8VInt8VBVISIVU_TUMA -n 1 -l 7 --has-ta --has-ma -c Vluxei32V8VInt8VBVISIVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint32_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint32m4_t vec_value_3_0= vle32_v_u32m4(placeholder3, vl); +if (7 < 4294967295) { +vuint32m4_t placeholder7= vmv_v_x_u32m4(0, vsetvlmax_e32m4()); +vec_value_3_0 = vremu_vx_u32m4_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m4(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vluxei32_v_i8m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei32_v_operator_0() { +int8_t tmp[] = {-1,84,-40,19,70,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V8VInt8VBVISIVU_TUMU.c b/test/codegen-golden/Vluxei32V8VInt8VBVISIVU_TUMU.c new file mode 100644 index 0000000..84a670c --- /dev/null +++ b/test/codegen-golden/Vluxei32V8VInt8VBVISIVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vluxei32V8VInt8VBVISIVU_TUMU -n 1 -l 7 --has-ta --has-ma -c Vluxei32V8VInt8VBVISIVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint32_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint32m4_t vec_value_3_0= vle32_v_u32m4(placeholder3, vl); +if (7 < 4294967295) { +vuint32m4_t placeholder7= vmv_v_x_u32m4(0, vsetvlmax_e32m4()); +vec_value_3_0 = vremu_vx_u32m4_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m4(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vluxei32_v_i8m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei32_v_operator_0() { +int8_t tmp[] = {29,84,-40,19,70,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V8VInt8VBVISIVU_m.c b/test/codegen-golden/Vluxei32V8VInt8VBVISIVU_m.c new file mode 100644 index 0000000..f99ae63 --- /dev/null +++ b/test/codegen-golden/Vluxei32V8VInt8VBVISIVU_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r Vluxei32V8VInt8VBVISIVU_m -n 1 -l 7 --has-ta --has-ma -c Vluxei32V8VInt8VBVISIVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint32_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint32m4_t vec_value_3_0= vle32_v_u32m4(placeholder3, vl); +if (7 < 4294967295) { +vuint32m4_t placeholder7= vmv_v_x_u32m4(0, vsetvlmax_e32m4()); +vec_value_3_0 = vremu_vx_u32m4_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u32m4(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vluxei32_v_i8m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei32_v_operator_0() { +int8_t tmp[] = {29,-39,-40,19,70,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei32V8VInt8VISIVU_TU.c b/test/codegen-golden/Vluxei32V8VInt8VISIVU_TU.c new file mode 100644 index 0000000..fb4ac37 --- /dev/null +++ b/test/codegen-golden/Vluxei32V8VInt8VISIVU_TU.c @@ -0,0 +1,90 @@ +// COMMAND: random_gen -r Vluxei32V8VInt8VISIVU_TU -n 1 -l 7 --has-ta --has-ma -c Vluxei32V8VInt8VISIVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint32_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vluxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vuint32m4_t vec_value_2_0= vle32_v_u32m4(placeholder2, vl); +if (7 < 4294967295) { +vec_value_2_0 = vremu_vx_u32m4(vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m4(vec_value_2_0, 1, vl); +vint8m1_t vec_value_3_0= vluxei32_v_i8m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei32_v_operator_0() { +int8_t tmp[] = {-74,79,-7,-14,29,-73,23,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vluxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei64V8VInt8SIVU_TA.c b/test/codegen-golden/Vluxei64V8VInt8SIVU_TA.c new file mode 100644 index 0000000..b72620f --- /dev/null +++ b/test/codegen-golden/Vluxei64V8VInt8SIVU_TA.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r Vluxei64V8VInt8SIVU_TA -n 1 -l 7 --has-ta --has-ma -c Vluxei64V8VInt8SIVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint64_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint64_t tmp[] = {3902764ull,7500210ull,4235251ull,5592077ull,5806864ull,1786754ull,3702157ull,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vluxei64_v_operator_0() { +int8_t *placeholder0 = value_0; +uint64_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint64m8_t vec_value_1_0= vle64_v_u64m8(placeholder1, vl); +{ +vec_value_1_0 = vremu_vx_u64m8(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u64m8(vec_value_1_0, 1, vl); +vint8m1_t vec_value_2_0= vluxei64_v_i8m1_ta(placeholder0, vec_value_1_0, tail_vl); +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei64_v_operator_0() { +int8_t tmp[] = {-73,-1,-57,-1,-56,-1,26,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vluxei64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei64V8VInt8VBSIVU_TAMA.c b/test/codegen-golden/Vluxei64V8VInt8VBSIVU_TAMA.c new file mode 100644 index 0000000..2301eb8 --- /dev/null +++ b/test/codegen-golden/Vluxei64V8VInt8VBSIVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Vluxei64V8VInt8VBSIVU_TAMA -n 1 -l 7 --has-ta --has-ma -c Vluxei64V8VInt8VBSIVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint64_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint64_t tmp[] = {3902764ull,7500210ull,4235251ull,5592077ull,5806864ull,1786754ull,3702157ull,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vluxei64_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint64_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint64m8_t vec_value_2_0= vle64_v_u64m8(placeholder2, vl); +{ +vuint64m8_t placeholder6= vmv_v_x_u64m8(0, vsetvlmax_e64m8()); +vec_value_2_0 = vremu_vx_u64m8_m(mask_value_0_0, placeholder6, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u64m8(vec_value_2_0, 1, vl); +vint8m1_t vec_value_3_0= vluxei64_v_i8m1_tama(mask_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei64_v_operator_0() { +int8_t tmp[] = {-1,-1,-7,-1,29,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vluxei64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei64V8VInt8VBVISIVU_TAMU.c b/test/codegen-golden/Vluxei64V8VInt8VBVISIVU_TAMU.c new file mode 100644 index 0000000..28d1f4d --- /dev/null +++ b/test/codegen-golden/Vluxei64V8VInt8VBVISIVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vluxei64V8VInt8VBVISIVU_TAMU -n 1 -l 7 --has-ta --has-ma -c Vluxei64V8VInt8VBVISIVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint64_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint64_t tmp[] = {3902764ull,7500210ull,4235251ull,5592077ull,5806864ull,1786754ull,3702157ull,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei64_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint64_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint64m8_t vec_value_3_0= vle64_v_u64m8(placeholder3, vl); +{ +vuint64m8_t placeholder7= vmv_v_x_u64m8(0, vsetvlmax_e64m8()); +vec_value_3_0 = vremu_vx_u64m8_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u64m8(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vluxei64_v_i8m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei64_v_operator_0() { +int8_t tmp[] = {29,-1,-40,-1,70,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei64V8VInt8VBVISIVU_TUMA.c b/test/codegen-golden/Vluxei64V8VInt8VBVISIVU_TUMA.c new file mode 100644 index 0000000..aa7bf7f --- /dev/null +++ b/test/codegen-golden/Vluxei64V8VInt8VBVISIVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vluxei64V8VInt8VBVISIVU_TUMA -n 1 -l 7 --has-ta --has-ma -c Vluxei64V8VInt8VBVISIVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint64_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint64_t tmp[] = {3902764ull,7500210ull,4235251ull,5592077ull,5806864ull,1786754ull,3702157ull,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei64_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint64_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint64m8_t vec_value_3_0= vle64_v_u64m8(placeholder3, vl); +{ +vuint64m8_t placeholder7= vmv_v_x_u64m8(0, vsetvlmax_e64m8()); +vec_value_3_0 = vremu_vx_u64m8_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u64m8(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vluxei64_v_i8m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei64_v_operator_0() { +int8_t tmp[] = {-1,84,-40,19,70,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei64V8VInt8VBVISIVU_TUMU.c b/test/codegen-golden/Vluxei64V8VInt8VBVISIVU_TUMU.c new file mode 100644 index 0000000..0df966b --- /dev/null +++ b/test/codegen-golden/Vluxei64V8VInt8VBVISIVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vluxei64V8VInt8VBVISIVU_TUMU -n 1 -l 7 --has-ta --has-ma -c Vluxei64V8VInt8VBVISIVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint64_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint64_t tmp[] = {3902764ull,7500210ull,4235251ull,5592077ull,5806864ull,1786754ull,3702157ull,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei64_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint64_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint64m8_t vec_value_3_0= vle64_v_u64m8(placeholder3, vl); +{ +vuint64m8_t placeholder7= vmv_v_x_u64m8(0, vsetvlmax_e64m8()); +vec_value_3_0 = vremu_vx_u64m8_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u64m8(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vluxei64_v_i8m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei64_v_operator_0() { +int8_t tmp[] = {29,84,-40,19,70,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei64V8VInt8VBVISIVU_m.c b/test/codegen-golden/Vluxei64V8VInt8VBVISIVU_m.c new file mode 100644 index 0000000..285bb32 --- /dev/null +++ b/test/codegen-golden/Vluxei64V8VInt8VBVISIVU_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r Vluxei64V8VInt8VBVISIVU_m -n 1 -l 7 --has-ta --has-ma -c Vluxei64V8VInt8VBVISIVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint64_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint64_t tmp[] = {3902764ull,7500210ull,4235251ull,5592077ull,5806864ull,1786754ull,3702157ull,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei64_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint64_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint64m8_t vec_value_3_0= vle64_v_u64m8(placeholder3, vl); +{ +vuint64m8_t placeholder7= vmv_v_x_u64m8(0, vsetvlmax_e64m8()); +vec_value_3_0 = vremu_vx_u64m8_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u64m8(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vluxei64_v_i8m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei64_v_operator_0() { +int8_t tmp[] = {29,-39,-40,19,70,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei64V8VInt8VISIVU_TU.c b/test/codegen-golden/Vluxei64V8VInt8VISIVU_TU.c new file mode 100644 index 0000000..60965f3 --- /dev/null +++ b/test/codegen-golden/Vluxei64V8VInt8VISIVU_TU.c @@ -0,0 +1,90 @@ +// COMMAND: random_gen -r Vluxei64V8VInt8VISIVU_TU -n 1 -l 7 --has-ta --has-ma -c Vluxei64V8VInt8VISIVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint64_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint64_t tmp[] = {3902764ull,7500210ull,4235251ull,5592077ull,5806864ull,1786754ull,3702157ull,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vluxei64_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint64_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vuint64m8_t vec_value_2_0= vle64_v_u64m8(placeholder2, vl); +{ +vec_value_2_0 = vremu_vx_u64m8(vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u64m8(vec_value_2_0, 1, vl); +vint8m1_t vec_value_3_0= vluxei64_v_i8m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei64_v_operator_0() { +int8_t tmp[] = {-74,79,-7,-14,29,-73,23,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vluxei64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei8V8VInt8SIVU_TA.c b/test/codegen-golden/Vluxei8V8VInt8SIVU_TA.c new file mode 100644 index 0000000..98ecb40 --- /dev/null +++ b/test/codegen-golden/Vluxei8V8VInt8SIVU_TA.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r Vluxei8V8VInt8SIVU_TA -n 1 -l 7 --has-ta --has-ma -c Vluxei8V8VInt8SIVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vluxei8_v_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int placeholder3 = 7; + +size_t placeholder4 = 0; +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +if (7 < 255) { +vec_value_1_0 = vremu_vx_u8m1(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u8m1(vec_value_1_0, 1, vl); +vint8m1_t vec_value_2_0= vluxei8_v_i8m1_ta(placeholder0, vec_value_1_0, tail_vl); +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei8_v_operator_0() { +int8_t tmp[] = {26,-1,-56,-1,55,-1,55,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vluxei8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei8V8VInt8VBSIVU_TAMA.c b/test/codegen-golden/Vluxei8V8VInt8VBSIVU_TAMA.c new file mode 100644 index 0000000..52987c7 --- /dev/null +++ b/test/codegen-golden/Vluxei8V8VInt8VBSIVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Vluxei8V8VInt8VBSIVU_TAMA -n 1 -l 7 --has-ta --has-ma -c Vluxei8V8VInt8VBSIVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vluxei8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +if (7 < 255) { +vuint8m1_t placeholder6= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vec_value_2_0 = vremu_vx_u8m1_m(mask_value_0_0, placeholder6, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u8m1(vec_value_2_0, 1, vl); +vint8m1_t vec_value_3_0= vluxei8_v_i8m1_tama(mask_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei8_v_operator_0() { +int8_t tmp[] = {-1,-1,29,-1,20,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vluxei8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei8V8VInt8VBVISIVU_TAMU.c b/test/codegen-golden/Vluxei8V8VInt8VBVISIVU_TAMU.c new file mode 100644 index 0000000..d0d129f --- /dev/null +++ b/test/codegen-golden/Vluxei8V8VInt8VBVISIVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vluxei8V8VInt8VBVISIVU_TAMU -n 1 -l 7 --has-ta --has-ma -c Vluxei8V8VInt8VBVISIVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); +if (7 < 255) { +vuint8m1_t placeholder7= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vec_value_3_0 = vremu_vx_u8m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u8m1(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vluxei8_v_i8m1_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei8_v_operator_0() { +int8_t tmp[] = {29,-1,70,-1,39,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei8V8VInt8VBVISIVU_TUMA.c b/test/codegen-golden/Vluxei8V8VInt8VBVISIVU_TUMA.c new file mode 100644 index 0000000..cbfbd4e --- /dev/null +++ b/test/codegen-golden/Vluxei8V8VInt8VBVISIVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vluxei8V8VInt8VBVISIVU_TUMA -n 1 -l 7 --has-ta --has-ma -c Vluxei8V8VInt8VBVISIVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); +if (7 < 255) { +vuint8m1_t placeholder7= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vec_value_3_0 = vremu_vx_u8m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u8m1(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vluxei8_v_i8m1_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei8_v_operator_0() { +int8_t tmp[] = {-1,84,70,19,39,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei8V8VInt8VBVISIVU_TUMU.c b/test/codegen-golden/Vluxei8V8VInt8VBVISIVU_TUMU.c new file mode 100644 index 0000000..e173ac8 --- /dev/null +++ b/test/codegen-golden/Vluxei8V8VInt8VBVISIVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vluxei8V8VInt8VBVISIVU_TUMU -n 1 -l 7 --has-ta --has-ma -c Vluxei8V8VInt8VBVISIVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); +if (7 < 255) { +vuint8m1_t placeholder7= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vec_value_3_0 = vremu_vx_u8m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u8m1(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vluxei8_v_i8m1_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei8_v_operator_0() { +int8_t tmp[] = {29,84,70,19,39,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei8V8VInt8VBVISIVU_m.c b/test/codegen-golden/Vluxei8V8VInt8VBVISIVU_m.c new file mode 100644 index 0000000..9cb778e --- /dev/null +++ b/test/codegen-golden/Vluxei8V8VInt8VBVISIVU_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r Vluxei8V8VInt8VBVISIVU_m -n 1 -l 7 --has-ta --has-ma -c Vluxei8V8VInt8VBVISIVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vluxei8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); +if (7 < 255) { +vuint8m1_t placeholder7= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vec_value_3_0 = vremu_vx_u8m1_m(mask_value_0_0, placeholder7, vec_value_3_0, 7, vl); +} +vec_value_3_0 = vmul_vx_u8m1(vec_value_3_0, 1, vl); +vint8m1_t vec_value_4_0= vluxei8_v_i8m1_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vluxei8_v_operator_0() { +int8_t tmp[] = {29,-53,70,19,39,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vluxei8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vluxei8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vluxei8V8VInt8VISIVU_TU.c b/test/codegen-golden/Vluxei8V8VInt8VISIVU_TU.c new file mode 100644 index 0000000..fe5aa84 --- /dev/null +++ b/test/codegen-golden/Vluxei8V8VInt8VISIVU_TU.c @@ -0,0 +1,90 @@ +// COMMAND: random_gen -r Vluxei8V8VInt8VISIVU_TU -n 1 -l 7 --has-ta --has-ma -c Vluxei8V8VInt8VISIVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vluxei8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int placeholder4 = 7; + +size_t placeholder5 = 0; +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +if (7 < 255) { +vec_value_2_0 = vremu_vx_u8m1(vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u8m1(vec_value_2_0, 1, vl); +vint8m1_t vec_value_3_0= vluxei8_v_i8m1_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vluxei8_v_operator_0() { +int8_t tmp[] = {23,79,29,-14,20,-73,20,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vluxei8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vluxei8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vluxei8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vse16X16VoidVBSIVI_m.c b/test/codegen-golden/Vse16X16VoidVBSIVI_m.c new file mode 100644 index 0000000..56eaaba --- /dev/null +++ b/test/codegen-golden/Vse16X16VoidVBSIVI_m.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r Vse16X16VoidVBSIVI_m -n 1 -l 7 --has-ta --has-ma -c Vse16X16VoidVBSIVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {-2195,5001,-1530,1184,1614,-6427,-2596,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vse16_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int16_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint16m1_t placeholder5= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vse16_v_i16m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e16m1(placeholder6); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); +vse16_v_i16m1_m (mask_value_0_0, placeholder2, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vse16_v_operator_0() { +int16_t tmp[] = {0,5001,-1530,0,1614,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vse16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vse16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vse16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vse32X32VoidSFVF.c b/test/codegen-golden/Vse32X32VoidSFVF.c new file mode 100644 index 0000000..f487b2b --- /dev/null +++ b/test/codegen-golden/Vse32X32VoidSFVF.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r Vse32X32VoidSFVF -n 1 -l 7 --has-ta --has-ma -c Vse32X32VoidSFVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +float32_t value_1[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vse32_v_operator_0() { +float32_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_1; +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e32m1(placeholder3); +vfloat32m1_t placeholder4= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder2, placeholder4, vl); +placeholder2 += vl; +} +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vfloat32m1_t vec_value_0_0= vle32_v_f32m1(placeholder0, vl); +vse32_v_f32m1(placeholder1, vec_value_0_0, vl); +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vse32_v_operator_0() { +uint64_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_1[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vse32X32VoidSIVI.c b/test/codegen-golden/Vse32X32VoidSIVI.c new file mode 100644 index 0000000..fc22b6c --- /dev/null +++ b/test/codegen-golden/Vse32X32VoidSIVI.c @@ -0,0 +1,65 @@ +// COMMAND: random_gen -r Vse32X32VoidSIVI -n 1 -l 7 --has-ta --has-ma -c Vse32X32VoidSIVI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int32_t value_0[7]; +int32_t value_1[7]; +void vinit_rif_operator_1() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vse32_v_operator_0() { +int32_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_1; +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e32m1(placeholder3); +vint32m1_t placeholder4= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder2, placeholder4, vl); +placeholder2 += vl; +} +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vint32m1_t vec_value_0_0= vle32_v_i32m1(placeholder0, vl); +vse32_v_i32m1(placeholder1, vec_value_0_0, vl); +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vse32_v_operator_0() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vse32X32VoidSUVU.c b/test/codegen-golden/Vse32X32VoidSUVU.c new file mode 100644 index 0000000..c0a1c3b --- /dev/null +++ b/test/codegen-golden/Vse32X32VoidSUVU.c @@ -0,0 +1,65 @@ +// COMMAND: random_gen -r Vse32X32VoidSUVU -n 1 -l 7 --has-ta --has-ma -c Vse32X32VoidSUVU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint32_t value_0[7]; +uint32_t value_1[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vse32_v_operator_0() { +uint32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_1; +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e32m1(placeholder3); +vuint32m1_t placeholder4= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder2, placeholder4, vl); +placeholder2 += vl; +} +int placeholder5 = 7; + +size_t placeholder6 = 0; +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vuint32m1_t vec_value_0_0= vle32_v_u32m1(placeholder0, vl); +vse32_v_u32m1(placeholder1, vec_value_0_0, vl); +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vse32_v_operator_0() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vse32X32VoidVBSFVF_m.c b/test/codegen-golden/Vse32X32VoidVBSFVF_m.c new file mode 100644 index 0000000..2e5bbcb --- /dev/null +++ b/test/codegen-golden/Vse32X32VoidVBSFVF_m.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r Vse32X32VoidVBSFVF_m -n 1 -l 7 --has-ta --has-ma -c Vse32X32VoidVBSFVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1257125040u,1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vse32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float32_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vfloat32m1_t placeholder5= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); +vse32_v_f32m1_m (mask_value_0_0, placeholder2, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vse32_v_operator_0() { +uint64_t tmp[] = {0u,1264903012u,1258373094u,0u,1261516319u,0u,0u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vse32X32VoidVBSIVI_m.c b/test/codegen-golden/Vse32X32VoidVBSIVI_m.c new file mode 100644 index 0000000..96da5fd --- /dev/null +++ b/test/codegen-golden/Vse32X32VoidVBSIVI_m.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r Vse32X32VoidVBSIVI_m -n 1 -l 7 --has-ta --has-ma -c Vse32X32VoidVBSIVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +int32_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {-2194472,5000420,-1529498,1184154,1613727,-6426492,-2595685,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vse32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +int32_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vint32m1_t placeholder5= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +vse32_v_i32m1_m (mask_value_0_0, placeholder2, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vse32_v_operator_0() { +int32_t tmp[] = {0,5000420,-1529498,0,1613727,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vse32X32VoidVBSUVU_m.c b/test/codegen-golden/Vse32X32VoidVBSUVU_m.c new file mode 100644 index 0000000..0847af2 --- /dev/null +++ b/test/codegen-golden/Vse32X32VoidVBSUVU_m.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r Vse32X32VoidVBSUVU_m -n 1 -l 7 --has-ta --has-ma -c Vse32X32VoidVBSUVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vse32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vuint32m1_t placeholder5= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +vse32_v_u32m1_m (mask_value_0_0, placeholder2, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vse32_v_operator_0() { +uint32_t tmp[] = {0u,7500210u,4235251u,0u,5806864u,0u,0u,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vse64X64VoidVBSIVI_m.c b/test/codegen-golden/Vse64X64VoidVBSIVI_m.c new file mode 100644 index 0000000..c0eb14e --- /dev/null +++ b/test/codegen-golden/Vse64X64VoidVBSIVI_m.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r Vse64X64VoidVBSIVI_m -n 1 -l 7 --has-ta --has-ma -c Vse64X64VoidVBSIVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int64_t value_1[7]; +int64_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int64_t tmp[] = {-2194472ll,5000420ll,-1529498ll,1184154ll,1613727ll,-6426492ll,-2595685ll,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vse64_v_operator_0() { +int8_t *placeholder0 = value_0; +int64_t *placeholder1 = value_1; +int64_t *placeholder2 = value_2; +int64_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e64m1(placeholder4); +vint64m1_t placeholder5= vmv_v_x_i64m1(0, vsetvlmax_e64m1()); +vse64_v_i64m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e64m1(placeholder6); +vint8mf8_t vec_value_0= vle8_v_i8mf8(placeholder0, vl); +vbool64_t mask_value_0_0= vmseq_vx_i8mf8_b64(vec_value_0, 1, vl); +vint64m1_t vec_value_1_0= vle64_v_i64m1(placeholder1, vl); +vse64_v_i64m1_m (mask_value_0_0, placeholder2, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vse64_v_operator_0() { +int64_t tmp[] = {0ll,5000420ll,-1529498ll,0ll,1613727ll,0ll,0ll,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vse64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vse64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vse64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vse8X8VoidVBSIVI_m.c b/test/codegen-golden/Vse8X8VoidVBSIVI_m.c new file mode 100644 index 0000000..b9484f3 --- /dev/null +++ b/test/codegen-golden/Vse8X8VoidVBSIVI_m.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r Vse8X8VoidVBSIVI_m -n 1 -l 7 --has-ta --has-ma -c Vse8X8VoidVBSIVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vse8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t placeholder5= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e8m1(placeholder6); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vse8_v_i8m1_m (mask_value_0_0, placeholder2, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vse8_v_operator_0() { +int8_t tmp[] = {0,50,-15,0,16,0,0,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vse8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vse8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vse8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsext_vf2V16VInt16VBVIVI_m.c b/test/codegen-golden/Vsext_vf2V16VInt16VBVIVI_m.c new file mode 100644 index 0000000..e667a62 --- /dev/null +++ b/test/codegen-golden/Vsext_vf2V16VInt16VBVIVI_m.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r Vsext_vf2V16VInt16VBVIVI_m -n 1 -l 7 --has-ta --has-ma -c Vsext_vf2V16VInt16VBVIVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsext_vf2_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); +vint8mf2_t vec_value_2_0= vle8_v_i8mf2(placeholder2, vl); + +vint16m1_t vec_value_3_0= vsext_vf2_i16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_i16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsext_vf2_operator_0() { +int16_t tmp[] = {2884,50,-15,1879,16,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsext_vf2_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsext_vf2_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsext_vf2_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsext_vf4V32VInt32VBVIVI_m.c b/test/codegen-golden/Vsext_vf4V32VInt32VBVIVI_m.c new file mode 100644 index 0000000..5d90678 --- /dev/null +++ b/test/codegen-golden/Vsext_vf4V32VInt32VBVIVI_m.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r Vsext_vf4V32VInt32VBVIVI_m -n 1 -l 7 --has-ta --has-ma -c Vsext_vf4V32VInt32VBVIVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +int8_t value_2[7]; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsext_vf4_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +vint8mf4_t vec_value_2_0= vle8_v_i8mf4(placeholder2, vl); + +vint32m1_t vec_value_3_0= vsext_vf4_i32m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse32_v_i32m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsext_vf4_operator_0() { +int32_t tmp[] = {2884331,50,-15,1879014,16,-7353883,-734314,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsext_vf4_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsext_vf4_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsext_vf4_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsext_vf8V64VInt64VBVIVI_m.c b/test/codegen-golden/Vsext_vf8V64VInt64VBVIVI_m.c new file mode 100644 index 0000000..a98b00c --- /dev/null +++ b/test/codegen-golden/Vsext_vf8V64VInt64VBVIVI_m.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r Vsext_vf8V64VInt64VBVIVI_m -n 1 -l 7 --has-ta --has-ma -c Vsext_vf8V64VInt64VBVIVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int64_t value_1[7]; +int8_t value_2[7]; +int64_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int64_t tmp[] = {2884331ll,8398813ll,1958398ll,1879014ll,2303187ll,-7353883ll,-734314ll,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsext_vf8_operator_0() { +int8_t *placeholder0 = value_0; +int64_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int64_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e64m1(placeholder4); +vint8mf8_t vec_value_0= vle8_v_i8mf8(placeholder0, vl); +vbool64_t mask_value_0_0= vmseq_vx_i8mf8_b64(vec_value_0, 1, vl); +vint64m1_t vec_value_1_0= vle64_v_i64m1(placeholder1, vl); +vint8mf8_t vec_value_2_0= vle8_v_i8mf8(placeholder2, vl); + +vint64m1_t vec_value_3_0= vsext_vf8_i64m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse64_v_i64m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsext_vf8_operator_0() { +int64_t tmp[] = {2884331ll,50ll,-15ll,1879014ll,16ll,-7353883ll,-734314ll,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsext_vf8_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsext_vf8_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsext_vf8_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsoxei16V8VoidVBVUVI_m.c b/test/codegen-golden/Vsoxei16V8VoidVBVUVI_m.c new file mode 100644 index 0000000..efc4bc6 --- /dev/null +++ b/test/codegen-golden/Vsoxei16V8VoidVBVUVI_m.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r Vsoxei16V8VoidVBVUVI_m -n 1 -l 7 --has-ta --has-ma -c Vsoxei16V8VoidVBVUVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {3903,7500,4235,5592,5807,1786,3702,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsoxei16_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t placeholder6= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = vsetvl_e8m1(placeholder7); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +if (7 < 65535) { +vuint16m2_t placeholder9= vmv_v_x_u16m2(0, vsetvlmax_e16m2()); +vec_value_2_0 = vremu_vx_u16m2_m(mask_value_0_0, placeholder9, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u16m2(vec_value_2_0, 1, vl); +vsoxei16_v_i8m1_m (mask_value_0_0, placeholder3, vec_value_2_0, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsoxei16_v_operator_0() { +int8_t tmp[] = {20,0,0,84,23,0,0,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsoxei16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsoxei16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsoxei16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsoxei32V32VoidVBVUVF_m.c b/test/codegen-golden/Vsoxei32V32VoidVBVUVF_m.c new file mode 100644 index 0000000..41df905 --- /dev/null +++ b/test/codegen-golden/Vsoxei32V32VoidVBVUVF_m.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vsoxei32V32VoidVBVUVF_m -n 1 -l 7 --has-ta --has-ma -c Vsoxei32V32VoidVBVUVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +uint32_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vsoxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; +float32_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vfloat32m1_t placeholder6= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = vsetvl_e32m1(placeholder7); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1(placeholder2, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder9= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_2_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder9, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m1(vec_value_2_0, 4, vl); +vsoxei32_v_f32m1_m (mask_value_0_0, placeholder3, vec_value_2_0, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsoxei32_v_operator_0() { +uint64_t tmp[] = {1262205779u,0u,0u,0u,1267490606u,0u,1261860990u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsoxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsoxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsoxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsoxei32V32VoidVBVUVI_m.c b/test/codegen-golden/Vsoxei32V32VoidVBVUVI_m.c new file mode 100644 index 0000000..4ec8a54 --- /dev/null +++ b/test/codegen-golden/Vsoxei32V32VoidVBVUVI_m.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r Vsoxei32V32VoidVBVUVI_m -n 1 -l 7 --has-ta --has-ma -c Vsoxei32V32VoidVBVUVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +uint32_t value_2[7]; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsoxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +int32_t *placeholder3 = value_3; +int32_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vint32m1_t placeholder6= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = vsetvl_e32m1(placeholder7); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1(placeholder2, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder9= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_2_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder9, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m1(vec_value_2_0, 4, vl); +vsoxei32_v_i32m1_m (mask_value_0_0, placeholder3, vec_value_2_0, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsoxei32_v_operator_0() { +int32_t tmp[] = {2303187,0,0,0,8398813,0,1958398,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsoxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsoxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsoxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsoxei32V32VoidVBVUVU_m.c b/test/codegen-golden/Vsoxei32V32VoidVBVUVU_m.c new file mode 100644 index 0000000..fac359b --- /dev/null +++ b/test/codegen-golden/Vsoxei32V32VoidVBVUVU_m.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r Vsoxei32V32VoidVBVUVU_m -n 1 -l 7 --has-ta --has-ma -c Vsoxei32V32VoidVBVUVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsoxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +uint32_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vuint32m1_t placeholder6= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = vsetvl_e32m1(placeholder7); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1(placeholder2, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder9= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_2_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder9, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m1(vec_value_2_0, 4, vl); +vsoxei32_v_u32m1_m (mask_value_0_0, placeholder3, vec_value_2_0, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsoxei32_v_operator_0() { +uint32_t tmp[] = {6151593u,0u,0u,0u,9199407u,0u,5979199u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsoxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsoxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsoxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsoxei32V32VoidVUVF.c b/test/codegen-golden/Vsoxei32V32VoidVUVF.c new file mode 100644 index 0000000..913ad88 --- /dev/null +++ b/test/codegen-golden/Vsoxei32V32VoidVUVF.c @@ -0,0 +1,90 @@ +// COMMAND: random_gen -r Vsoxei32V32VoidVUVF -n 1 -l 7 --has-ta --has-ma -c Vsoxei32V32VoidVUVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +uint32_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsoxei32_v_operator_0() { +float32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float32_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vfloat32m1_t placeholder5= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +vfloat32m1_t vec_value_0_0= vle32_v_f32m1(placeholder0, vl); +if (7 < 4294967295) { +vec_value_1_0 = vremu_vx_u32m1(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u32m1(vec_value_1_0, 4, vl); +vsoxei32_v_f32m1(placeholder2, vec_value_1_0, vec_value_0_0, vl); +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsoxei32_v_operator_0() { +uint64_t tmp[] = {1262498700u,1258485599u,0u,0u,1250254620u,1250422356u,1265360466u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsoxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsoxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsoxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsoxei32V32VoidVUVI.c b/test/codegen-golden/Vsoxei32V32VoidVUVI.c new file mode 100644 index 0000000..07dc961 --- /dev/null +++ b/test/codegen-golden/Vsoxei32V32VoidVUVI.c @@ -0,0 +1,83 @@ +// COMMAND: random_gen -r Vsoxei32V32VoidVUVI -n 1 -l 7 --has-ta --has-ma -c Vsoxei32V32VoidVUVI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int32_t value_0[7]; +uint32_t value_1[7]; +int32_t value_2[7]; +void vinit_rif_operator_1() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsoxei32_v_operator_0() { +int32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +int32_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vint32m1_t placeholder5= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +vint32m1_t vec_value_0_0= vle32_v_i32m1(placeholder0, vl); +if (7 < 4294967295) { +vec_value_1_0 = vremu_vx_u32m1(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u32m1(vec_value_1_0, 4, vl); +vsoxei32_v_i32m1(placeholder2, vec_value_1_0, vec_value_0_0, vl); +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsoxei32_v_operator_0() { +int32_t tmp[] = {2596108,-1416993,0,0,-5629682,-5545814,5457874,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsoxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsoxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsoxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsoxei32V32VoidVUVU.c b/test/codegen-golden/Vsoxei32V32VoidVUVU.c new file mode 100644 index 0000000..db9111e --- /dev/null +++ b/test/codegen-golden/Vsoxei32V32VoidVUVU.c @@ -0,0 +1,83 @@ +// COMMAND: random_gen -r Vsoxei32V32VoidVUVU -n 1 -l 7 --has-ta --has-ma -c Vsoxei32V32VoidVUVU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint32_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsoxei32_v_operator_0() { +uint32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vuint32m1_t placeholder5= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +vuint32m1_t vec_value_0_0= vle32_v_u32m1(placeholder0, vl); +if (7 < 4294967295) { +vec_value_1_0 = vremu_vx_u32m1(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u32m1(vec_value_1_0, 4, vl); +vsoxei32_v_u32m1(placeholder2, vec_value_1_0, vec_value_0_0, vl); +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsoxei32_v_operator_0() { +uint32_t tmp[] = {6298054u,4291503u,0u,0u,2185159u,2227093u,7728937u,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsoxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsoxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsoxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsoxei32V8VoidVBVUVI_m.c b/test/codegen-golden/Vsoxei32V8VoidVBVUVI_m.c new file mode 100644 index 0000000..b9b925c --- /dev/null +++ b/test/codegen-golden/Vsoxei32V8VoidVBVUVI_m.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r Vsoxei32V8VoidVBVUVI_m -n 1 -l 7 --has-ta --has-ma -c Vsoxei32V8VoidVBVUVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint32_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsoxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t placeholder6= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = vsetvl_e8m1(placeholder7); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint32m4_t vec_value_2_0= vle32_v_u32m4(placeholder2, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +if (7 < 4294967295) { +vuint32m4_t placeholder9= vmv_v_x_u32m4(0, vsetvlmax_e32m4()); +vec_value_2_0 = vremu_vx_u32m4_m(mask_value_0_0, placeholder9, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m4(vec_value_2_0, 1, vl); +vsoxei32_v_i8m1_m (mask_value_0_0, placeholder3, vec_value_2_0, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsoxei32_v_operator_0() { +int8_t tmp[] = {23,0,0,0,84,0,20,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsoxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsoxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsoxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsoxei64V8VoidVBVUVI_m.c b/test/codegen-golden/Vsoxei64V8VoidVBVUVI_m.c new file mode 100644 index 0000000..7d0fc6c --- /dev/null +++ b/test/codegen-golden/Vsoxei64V8VoidVBVUVI_m.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r Vsoxei64V8VoidVBVUVI_m -n 1 -l 7 --has-ta --has-ma -c Vsoxei64V8VoidVBVUVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint64_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint64_t tmp[] = {3902764ull,7500210ull,4235251ull,5592077ull,5806864ull,1786754ull,3702157ull,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsoxei64_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint64_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t placeholder6= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = vsetvl_e8m1(placeholder7); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint64m8_t vec_value_2_0= vle64_v_u64m8(placeholder2, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +{ +vuint64m8_t placeholder9= vmv_v_x_u64m8(0, vsetvlmax_e64m8()); +vec_value_2_0 = vremu_vx_u64m8_m(mask_value_0_0, placeholder9, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u64m8(vec_value_2_0, 1, vl); +vsoxei64_v_i8m1_m (mask_value_0_0, placeholder3, vec_value_2_0, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsoxei64_v_operator_0() { +int8_t tmp[] = {23,0,0,0,84,0,20,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsoxei64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsoxei64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsoxei64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsoxei8V8VoidVBVUVI_m.c b/test/codegen-golden/Vsoxei8V8VoidVBVUVI_m.c new file mode 100644 index 0000000..52e284e --- /dev/null +++ b/test/codegen-golden/Vsoxei8V8VoidVBVUVI_m.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r Vsoxei8V8VoidVBVUVI_m -n 1 -l 7 --has-ta --has-ma -c Vsoxei8V8VoidVBVUVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsoxei8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t placeholder6= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = vsetvl_e8m1(placeholder7); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +if (7 < 255) { +vuint8m1_t placeholder9= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vec_value_2_0 = vremu_vx_u8m1_m(mask_value_0_0, placeholder9, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u8m1(vec_value_2_0, 1, vl); +vsoxei8_v_i8m1_m (mask_value_0_0, placeholder3, vec_value_2_0, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsoxei8_v_operator_0() { +int8_t tmp[] = {20,0,23,0,0,84,0,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsoxei8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsoxei8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsoxei8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsse16XX16VoidVBSIVI_m.c b/test/codegen-golden/Vsse16XX16VoidVBSIVI_m.c new file mode 100644 index 0000000..fb0a136 --- /dev/null +++ b/test/codegen-golden/Vsse16XX16VoidVBSIVI_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r Vsse16XX16VoidVBSIVI_m -n 1 -l 7 --has-ta --has-ma -c Vsse16XX16VoidVBSIVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +ptrdiff_t value_2; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +ptrdiff_t tmp = 3902764ll; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsse16_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +ptrdiff_t placeholder2 = value_2; +int16_t *placeholder3 = value_3; +int16_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m1(placeholder5); +vint16m1_t placeholder6= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vse16_v_i16m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +placeholder2 = (placeholder2 % 4) + 1; +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = vsetvl_e16m1(placeholder7); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); +if (placeholder8 < 7) { +vl = vl < (7 - placeholder8 + placeholder2 - 1) / placeholder2 ? +vl : (7 - placeholder8 + placeholder2 - 1) / placeholder2; +int32_t placeholder9 = placeholder2; +placeholder2 *= 2; +vsse16_v_i16m1_m (mask_value_0_0, placeholder3, placeholder2, vec_value_1_0, vl); +placeholder2 = placeholder9; // recover stride +} +else {} +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl * placeholder2; +placeholder8 += vl * placeholder2; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsse16_v_operator_0() { +int16_t tmp[] = {0,-1530,1184,0,-6427,0,0,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsse16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsse16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsse16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsse32XX32VoidSIVF.c b/test/codegen-golden/Vsse32XX32VoidSIVF.c new file mode 100644 index 0000000..d700a74 --- /dev/null +++ b/test/codegen-golden/Vsse32XX32VoidSIVF.c @@ -0,0 +1,94 @@ +// COMMAND: random_gen -r Vsse32XX32VoidSIVF -n 1 -l 7 --has-ta --has-ma -c Vsse32XX32VoidSIVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +ptrdiff_t value_1; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +ptrdiff_t tmp = 3902764ll; +value_1 = tmp; +} +void vsse32_v_operator_0() { +float32_t *placeholder0 = value_0; +ptrdiff_t placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float32_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vfloat32m1_t placeholder5= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +placeholder1 = (placeholder1 % 4) + 1; +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vfloat32m1_t vec_value_0_0= vle32_v_f32m1(placeholder0, vl); +if (placeholder7 < 7) { +vl = vl < (7 - placeholder7 + placeholder1 - 1) / placeholder1 ? +vl : (7 - placeholder7 + placeholder1 - 1) / placeholder1; +int32_t placeholder8 = placeholder1; +placeholder1 *= 4; +vsse32_v_f32m1(placeholder2, placeholder1, vec_value_0_0, vl); +placeholder1 = placeholder8; // recover stride +} +else {} +placeholder0 += vl; +placeholder2 += vl * placeholder1; +placeholder7 += vl * placeholder1; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsse32_v_operator_0() { +uint64_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsse32XX32VoidSIVI.c b/test/codegen-golden/Vsse32XX32VoidSIVI.c new file mode 100644 index 0000000..74a4b83 --- /dev/null +++ b/test/codegen-golden/Vsse32XX32VoidSIVI.c @@ -0,0 +1,87 @@ +// COMMAND: random_gen -r Vsse32XX32VoidSIVI -n 1 -l 7 --has-ta --has-ma -c Vsse32XX32VoidSIVI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int32_t value_0[7]; +ptrdiff_t value_1; +int32_t value_2[7]; +void vinit_rif_operator_1() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +ptrdiff_t tmp = 3902764ll; +value_1 = tmp; +} +void vsse32_v_operator_0() { +int32_t *placeholder0 = value_0; +ptrdiff_t placeholder1 = value_1; +int32_t *placeholder2 = value_2; +int32_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vint32m1_t placeholder5= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +placeholder1 = (placeholder1 % 4) + 1; +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vint32m1_t vec_value_0_0= vle32_v_i32m1(placeholder0, vl); +if (placeholder7 < 7) { +vl = vl < (7 - placeholder7 + placeholder1 - 1) / placeholder1 ? +vl : (7 - placeholder7 + placeholder1 - 1) / placeholder1; +int32_t placeholder8 = placeholder1; +placeholder1 *= 4; +vsse32_v_i32m1(placeholder2, placeholder1, vec_value_0_0, vl); +placeholder1 = placeholder8; // recover stride +} +else {} +placeholder0 += vl; +placeholder2 += vl * placeholder1; +placeholder7 += vl * placeholder1; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsse32_v_operator_0() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsse32XX32VoidSIVU.c b/test/codegen-golden/Vsse32XX32VoidSIVU.c new file mode 100644 index 0000000..753b9f5 --- /dev/null +++ b/test/codegen-golden/Vsse32XX32VoidSIVU.c @@ -0,0 +1,87 @@ +// COMMAND: random_gen -r Vsse32XX32VoidSIVU -n 1 -l 7 --has-ta --has-ma -c Vsse32XX32VoidSIVU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint32_t value_0[7]; +ptrdiff_t value_1; +uint32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +ptrdiff_t tmp = 3902764ll; +value_1 = tmp; +} +void vsse32_v_operator_0() { +uint32_t *placeholder0 = value_0; +ptrdiff_t placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vuint32m1_t placeholder5= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +placeholder1 = (placeholder1 % 4) + 1; +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vuint32m1_t vec_value_0_0= vle32_v_u32m1(placeholder0, vl); +if (placeholder7 < 7) { +vl = vl < (7 - placeholder7 + placeholder1 - 1) / placeholder1 ? +vl : (7 - placeholder7 + placeholder1 - 1) / placeholder1; +int32_t placeholder8 = placeholder1; +placeholder1 *= 4; +vsse32_v_u32m1(placeholder2, placeholder1, vec_value_0_0, vl); +placeholder1 = placeholder8; // recover stride +} +else {} +placeholder0 += vl; +placeholder2 += vl * placeholder1; +placeholder7 += vl * placeholder1; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsse32_v_operator_0() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsse32XX32VoidVBSIVF_m.c b/test/codegen-golden/Vsse32XX32VoidVBSIVF_m.c new file mode 100644 index 0000000..3945f27 --- /dev/null +++ b/test/codegen-golden/Vsse32XX32VoidVBSIVF_m.c @@ -0,0 +1,110 @@ +// COMMAND: random_gen -r Vsse32XX32VoidVBSIVF_m -n 1 -l 7 --has-ta --has-ma -c Vsse32XX32VoidVBSIVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +ptrdiff_t value_2; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +ptrdiff_t tmp = 3902764ll; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1264903012u,1258373094u,1261086746u,1261516319u,1247419408u,1256322614u,1262786923u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vsse32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +ptrdiff_t placeholder2 = value_2; +float32_t *placeholder3 = value_3; +float32_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vfloat32m1_t placeholder6= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +placeholder2 = (placeholder2 % 4) + 1; +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = vsetvl_e32m1(placeholder7); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); +if (placeholder8 < 7) { +vl = vl < (7 - placeholder8 + placeholder2 - 1) / placeholder2 ? +vl : (7 - placeholder8 + placeholder2 - 1) / placeholder2; +int32_t placeholder9 = placeholder2; +placeholder2 *= 4; +vsse32_v_f32m1_m (mask_value_0_0, placeholder3, placeholder2, vec_value_1_0, vl); +placeholder2 = placeholder9; // recover stride +} +else {} +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl * placeholder2; +placeholder8 += vl * placeholder2; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsse32_v_operator_0() { +uint64_t tmp[] = {0u,1258373094u,1261086746u,0u,1247419408u,0u,0u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsse32XX32VoidVBSIVI_m.c b/test/codegen-golden/Vsse32XX32VoidVBSIVI_m.c new file mode 100644 index 0000000..98fed8d --- /dev/null +++ b/test/codegen-golden/Vsse32XX32VoidVBSIVI_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r Vsse32XX32VoidVBSIVI_m -n 1 -l 7 --has-ta --has-ma -c Vsse32XX32VoidVBSIVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +ptrdiff_t value_2; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +ptrdiff_t tmp = 3902764ll; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int32_t tmp[] = {5000420,-1529498,1184154,1613727,-6426492,-2595685,2884331,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsse32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +ptrdiff_t placeholder2 = value_2; +int32_t *placeholder3 = value_3; +int32_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vint32m1_t placeholder6= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +placeholder2 = (placeholder2 % 4) + 1; +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = vsetvl_e32m1(placeholder7); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +if (placeholder8 < 7) { +vl = vl < (7 - placeholder8 + placeholder2 - 1) / placeholder2 ? +vl : (7 - placeholder8 + placeholder2 - 1) / placeholder2; +int32_t placeholder9 = placeholder2; +placeholder2 *= 4; +vsse32_v_i32m1_m (mask_value_0_0, placeholder3, placeholder2, vec_value_1_0, vl); +placeholder2 = placeholder9; // recover stride +} +else {} +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl * placeholder2; +placeholder8 += vl * placeholder2; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsse32_v_operator_0() { +int32_t tmp[] = {0,-1529498,1184154,0,-6426492,0,0,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsse32XX32VoidVBSIVU_m.c b/test/codegen-golden/Vsse32XX32VoidVBSIVU_m.c new file mode 100644 index 0000000..73e213c --- /dev/null +++ b/test/codegen-golden/Vsse32XX32VoidVBSIVU_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r Vsse32XX32VoidVBSIVU_m -n 1 -l 7 --has-ta --has-ma -c Vsse32XX32VoidVBSIVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +ptrdiff_t value_2; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +ptrdiff_t tmp = 3902764ll; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,6442165u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsse32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +ptrdiff_t placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +uint32_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vuint32m1_t placeholder6= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +placeholder2 = (placeholder2 % 4) + 1; +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = vsetvl_e32m1(placeholder7); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +if (placeholder8 < 7) { +vl = vl < (7 - placeholder8 + placeholder2 - 1) / placeholder2 ? +vl : (7 - placeholder8 + placeholder2 - 1) / placeholder2; +int32_t placeholder9 = placeholder2; +placeholder2 *= 4; +vsse32_v_u32m1_m (mask_value_0_0, placeholder3, placeholder2, vec_value_1_0, vl); +placeholder2 = placeholder9; // recover stride +} +else {} +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl * placeholder2; +placeholder8 += vl * placeholder2; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsse32_v_operator_0() { +uint32_t tmp[] = {0u,4235251u,5592077u,0u,1786754u,0u,0u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsse32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsse32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsse32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsse64XX64VoidVBSIVI_m.c b/test/codegen-golden/Vsse64XX64VoidVBSIVI_m.c new file mode 100644 index 0000000..cd82665 --- /dev/null +++ b/test/codegen-golden/Vsse64XX64VoidVBSIVI_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r Vsse64XX64VoidVBSIVI_m -n 1 -l 7 --has-ta --has-ma -c Vsse64XX64VoidVBSIVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int64_t value_1[7]; +ptrdiff_t value_2; +int64_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +ptrdiff_t tmp = 3902764ll; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int64_t tmp[] = {5000420ll,-1529498ll,1184154ll,1613727ll,-6426492ll,-2595685ll,2884331ll,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsse64_v_operator_0() { +int8_t *placeholder0 = value_0; +int64_t *placeholder1 = value_1; +ptrdiff_t placeholder2 = value_2; +int64_t *placeholder3 = value_3; +int64_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e64m1(placeholder5); +vint64m1_t placeholder6= vmv_v_x_i64m1(0, vsetvlmax_e64m1()); +vse64_v_i64m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +placeholder2 = (placeholder2 % 4) + 1; +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = vsetvl_e64m1(placeholder7); +vint8mf8_t vec_value_0= vle8_v_i8mf8(placeholder0, vl); +vbool64_t mask_value_0_0= vmseq_vx_i8mf8_b64(vec_value_0, 1, vl); +vint64m1_t vec_value_1_0= vle64_v_i64m1(placeholder1, vl); +if (placeholder8 < 7) { +vl = vl < (7 - placeholder8 + placeholder2 - 1) / placeholder2 ? +vl : (7 - placeholder8 + placeholder2 - 1) / placeholder2; +int32_t placeholder9 = placeholder2; +placeholder2 *= 8; +vsse64_v_i64m1_m (mask_value_0_0, placeholder3, placeholder2, vec_value_1_0, vl); +placeholder2 = placeholder9; // recover stride +} +else {} +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl * placeholder2; +placeholder8 += vl * placeholder2; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsse64_v_operator_0() { +int64_t tmp[] = {0ll,-1529498ll,1184154ll,0ll,-6426492ll,0ll,0ll,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsse64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsse64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsse64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsse8XX8VoidVBSIVI_m.c b/test/codegen-golden/Vsse8XX8VoidVBSIVI_m.c new file mode 100644 index 0000000..a8f4b16 --- /dev/null +++ b/test/codegen-golden/Vsse8XX8VoidVBSIVI_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r Vsse8XX8VoidVBSIVI_m -n 1 -l 7 --has-ta --has-ma -c Vsse8XX8VoidVBSIVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +ptrdiff_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +ptrdiff_t tmp = 3902764ll; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsse8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +ptrdiff_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t placeholder6= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +placeholder2 = (placeholder2 % 4) + 1; +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = vsetvl_e8m1(placeholder7); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +if (placeholder8 < 7) { +vl = vl < (7 - placeholder8 + placeholder2 - 1) / placeholder2 ? +vl : (7 - placeholder8 + placeholder2 - 1) / placeholder2; +int32_t placeholder9 = placeholder2; +placeholder2 *= 1; +vsse8_v_i8m1_m (mask_value_0_0, placeholder3, placeholder2, vec_value_1_0, vl); +placeholder2 = placeholder9; // recover stride +} +else {} +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl * placeholder2; +placeholder8 += vl * placeholder2; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsse8_v_operator_0() { +int8_t tmp[] = {0,-15,12,0,-65,0,0,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsse8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsse8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsse8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsuxei16V8VoidVBVUVI_m.c b/test/codegen-golden/Vsuxei16V8VoidVBVUVI_m.c new file mode 100644 index 0000000..c5e796c --- /dev/null +++ b/test/codegen-golden/Vsuxei16V8VoidVBVUVI_m.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r Vsuxei16V8VoidVBVUVI_m -n 1 -l 7 --has-ta --has-ma -c Vsuxei16V8VoidVBVUVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint16_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {3903,7500,4235,5592,5807,1786,3702,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsuxei16_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t placeholder6= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = vsetvl_e8m1(placeholder7); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +if (7 < 65535) { +vuint16m2_t placeholder9= vmv_v_x_u16m2(0, vsetvlmax_e16m2()); +vec_value_2_0 = vremu_vx_u16m2_m(mask_value_0_0, placeholder9, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u16m2(vec_value_2_0, 1, vl); +vsuxei16_v_i8m1_m (mask_value_0_0, placeholder3, vec_value_2_0, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsuxei16_v_operator_0() { +int8_t tmp[] = {20,0,0,84,23,0,0,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsuxei16_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsuxei16_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsuxei16_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsuxei32V32VoidVBVUVF_m.c b/test/codegen-golden/Vsuxei32V32VoidVBVUVF_m.c new file mode 100644 index 0000000..9fdc9b9 --- /dev/null +++ b/test/codegen-golden/Vsuxei32V32VoidVBVUVF_m.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r Vsuxei32V32VoidVBVUVF_m -n 1 -l 7 --has-ta --has-ma -c Vsuxei32V32VoidVBVUVF_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +float32_t value_1[7]; +uint32_t value_2[7]; +float32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {1262786923u,1267490606u,1261860990u,1261781606u,1262205779u,1243709844u,1259168278u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_1[i] = converter.f; +} +} +void vsuxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +float32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +float32_t *placeholder3 = value_3; +float32_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vfloat32m1_t placeholder6= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = vsetvl_e32m1(placeholder7); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1(placeholder2, vl); +vfloat32m1_t vec_value_1_0= vle32_v_f32m1(placeholder1, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder9= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_2_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder9, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m1(vec_value_2_0, 4, vl); +vsuxei32_v_f32m1_m (mask_value_0_0, placeholder3, vec_value_2_0, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsuxei32_v_operator_0() { +uint64_t tmp[] = {1262205779u,0u,0u,0u,1267490606u,0u,1261860990u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_3[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsuxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsuxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsuxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsuxei32V32VoidVBVUVI_m.c b/test/codegen-golden/Vsuxei32V32VoidVBVUVI_m.c new file mode 100644 index 0000000..8d00e40 --- /dev/null +++ b/test/codegen-golden/Vsuxei32V32VoidVBVUVI_m.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r Vsuxei32V32VoidVBVUVI_m -n 1 -l 7 --has-ta --has-ma -c Vsuxei32V32VoidVBVUVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int32_t value_1[7]; +uint32_t value_2[7]; +int32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int32_t tmp[] = {2884331,8398813,1958398,1879014,2303187,-7353883,-734314,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsuxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +int32_t *placeholder3 = value_3; +int32_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vint32m1_t placeholder6= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = vsetvl_e32m1(placeholder7); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1(placeholder2, vl); +vint32m1_t vec_value_1_0= vle32_v_i32m1(placeholder1, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder9= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_2_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder9, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m1(vec_value_2_0, 4, vl); +vsuxei32_v_i32m1_m (mask_value_0_0, placeholder3, vec_value_2_0, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsuxei32_v_operator_0() { +int32_t tmp[] = {2303187,0,0,0,8398813,0,1958398,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsuxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsuxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsuxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsuxei32V32VoidVBVUVU_m.c b/test/codegen-golden/Vsuxei32V32VoidVBVUVU_m.c new file mode 100644 index 0000000..6328db1 --- /dev/null +++ b/test/codegen-golden/Vsuxei32V32VoidVBVUVU_m.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r Vsuxei32V32VoidVBVUVU_m -n 1 -l 7 --has-ta --has-ma -c Vsuxei32V32VoidVBVUVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsuxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; +uint32_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e32m1(placeholder5); +vuint32m1_t placeholder6= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = vsetvl_e32m1(placeholder7); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_2_0= vle32_v_u32m1(placeholder2, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +if (7 < 4294967295) { +vuint32m1_t placeholder9= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vec_value_2_0 = vremu_vx_u32m1_m(mask_value_0_0, placeholder9, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m1(vec_value_2_0, 4, vl); +vsuxei32_v_u32m1_m (mask_value_0_0, placeholder3, vec_value_2_0, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsuxei32_v_operator_0() { +uint32_t tmp[] = {6151593u,0u,0u,0u,9199407u,0u,5979199u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsuxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsuxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsuxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsuxei32V32VoidVUVF.c b/test/codegen-golden/Vsuxei32V32VoidVUVF.c new file mode 100644 index 0000000..96c8d19 --- /dev/null +++ b/test/codegen-golden/Vsuxei32V32VoidVUVF.c @@ -0,0 +1,90 @@ +// COMMAND: random_gen -r Vsuxei32V32VoidVUVF -n 1 -l 7 --has-ta --has-ma -c Vsuxei32V32VoidVUVF.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +float32_t value_0[7]; +uint32_t value_1[7]; +float32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {1250422356u,1267237304u,1265360466u,1258485599u,1262498700u,1244223528u,1250254620u,}; +for (int i=0; i<7;++i) {union { uint32_t u32; float32_t f; } converter; +converter.u32 = tmp[i]; +value_0[i] = converter.f; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsuxei32_v_operator_0() { +float32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +float32_t *placeholder2 = value_2; +float32_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vfloat32m1_t placeholder5= vfmv_v_f_f32m1(0, vsetvlmax_e32m1()); +vse32_v_f32m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +vfloat32m1_t vec_value_0_0= vle32_v_f32m1(placeholder0, vl); +if (7 < 4294967295) { +vec_value_1_0 = vremu_vx_u32m1(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u32m1(vec_value_1_0, 4, vl); +vsuxei32_v_f32m1(placeholder2, vec_value_1_0, vec_value_0_0, vl); +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsuxei32_v_operator_0() { +uint64_t tmp[] = {1262498700u,1258485599u,0u,0u,1250254620u,1250422356u,1265360466u,}; +union { float32_t f32; uint32_t u32; } converter; +union { float32_t f32; uint32_t u32; } converter2; +for (int i=0; i<7;++i){ +converter.u32 = tmp[i]; +converter2.f32 = value_2[i]; +if(converter.f32 != converter2.f32 && !(isNaNF32UI(converter.u32) && isNaNF32UI(converter2.u32))) { +return 0; +} +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsuxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsuxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsuxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsuxei32V32VoidVUVI.c b/test/codegen-golden/Vsuxei32V32VoidVUVI.c new file mode 100644 index 0000000..b04d1d9 --- /dev/null +++ b/test/codegen-golden/Vsuxei32V32VoidVUVI.c @@ -0,0 +1,83 @@ +// COMMAND: random_gen -r Vsuxei32V32VoidVUVI -n 1 -l 7 --has-ta --has-ma -c Vsuxei32V32VoidVUVI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int32_t value_0[7]; +uint32_t value_1[7]; +int32_t value_2[7]; +void vinit_rif_operator_1() { +int32_t tmp[] = {-5545814,7892207,5457874,-1416993,2596108,-7225462,-5629682,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsuxei32_v_operator_0() { +int32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +int32_t *placeholder2 = value_2; +int32_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vint32m1_t placeholder5= vmv_v_x_i32m1(0, vsetvlmax_e32m1()); +vse32_v_i32m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +vint32m1_t vec_value_0_0= vle32_v_i32m1(placeholder0, vl); +if (7 < 4294967295) { +vec_value_1_0 = vremu_vx_u32m1(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u32m1(vec_value_1_0, 4, vl); +vsuxei32_v_i32m1(placeholder2, vec_value_1_0, vec_value_0_0, vl); +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsuxei32_v_operator_0() { +int32_t tmp[] = {2596108,-1416993,0,0,-5629682,-5545814,5457874,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsuxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsuxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsuxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsuxei32V32VoidVUVU.c b/test/codegen-golden/Vsuxei32V32VoidVUVU.c new file mode 100644 index 0000000..80f5d95 --- /dev/null +++ b/test/codegen-golden/Vsuxei32V32VoidVUVU.c @@ -0,0 +1,83 @@ +// COMMAND: random_gen -r Vsuxei32V32VoidVUVU -n 1 -l 7 --has-ta --has-ma -c Vsuxei32V32VoidVUVU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint32_t value_0[7]; +uint32_t value_1[7]; +uint32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsuxei32_v_operator_0() { +uint32_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_2; +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vuint32m1_t placeholder5= vmv_v_x_u32m1(0, vsetvlmax_e32m1()); +vse32_v_u32m1(placeholder3, placeholder5, vl); +placeholder3 += vl; +} +int placeholder6 = 7; + +size_t placeholder7 = 0; +for (size_t vl; placeholder6 > 0; placeholder6 -= vl) { +vl = vsetvl_e32m1(placeholder6); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +vuint32m1_t vec_value_0_0= vle32_v_u32m1(placeholder0, vl); +if (7 < 4294967295) { +vec_value_1_0 = vremu_vx_u32m1(vec_value_1_0, 7, vl); +} +vec_value_1_0 = vmul_vx_u32m1(vec_value_1_0, 4, vl); +vsuxei32_v_u32m1(placeholder2, vec_value_1_0, vec_value_0_0, vl); +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsuxei32_v_operator_0() { +uint32_t tmp[] = {6298054u,4291503u,0u,0u,2185159u,2227093u,7728937u,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vsuxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsuxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsuxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsuxei32V8VoidVBVUVI_m.c b/test/codegen-golden/Vsuxei32V8VoidVBVUVI_m.c new file mode 100644 index 0000000..aa6726c --- /dev/null +++ b/test/codegen-golden/Vsuxei32V8VoidVBVUVI_m.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r Vsuxei32V8VoidVBVUVI_m -n 1 -l 7 --has-ta --has-ma -c Vsuxei32V8VoidVBVUVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint32_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint32_t tmp[] = {3902764u,7500210u,4235251u,5592077u,5806864u,1786754u,3702157u,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsuxei32_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t placeholder6= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = vsetvl_e8m1(placeholder7); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint32m4_t vec_value_2_0= vle32_v_u32m4(placeholder2, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +if (7 < 4294967295) { +vuint32m4_t placeholder9= vmv_v_x_u32m4(0, vsetvlmax_e32m4()); +vec_value_2_0 = vremu_vx_u32m4_m(mask_value_0_0, placeholder9, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u32m4(vec_value_2_0, 1, vl); +vsuxei32_v_i8m1_m (mask_value_0_0, placeholder3, vec_value_2_0, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsuxei32_v_operator_0() { +int8_t tmp[] = {23,0,0,0,84,0,20,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsuxei32_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsuxei32_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsuxei32_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsuxei64V8VoidVBVUVI_m.c b/test/codegen-golden/Vsuxei64V8VoidVBVUVI_m.c new file mode 100644 index 0000000..e4fa5b5 --- /dev/null +++ b/test/codegen-golden/Vsuxei64V8VoidVBVUVI_m.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r Vsuxei64V8VoidVBVUVI_m -n 1 -l 7 --has-ta --has-ma -c Vsuxei64V8VoidVBVUVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint64_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint64_t tmp[] = {3902764ull,7500210ull,4235251ull,5592077ull,5806864ull,1786754ull,3702157ull,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsuxei64_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint64_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t placeholder6= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = vsetvl_e8m1(placeholder7); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint64m8_t vec_value_2_0= vle64_v_u64m8(placeholder2, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +{ +vuint64m8_t placeholder9= vmv_v_x_u64m8(0, vsetvlmax_e64m8()); +vec_value_2_0 = vremu_vx_u64m8_m(mask_value_0_0, placeholder9, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u64m8(vec_value_2_0, 1, vl); +vsuxei64_v_i8m1_m (mask_value_0_0, placeholder3, vec_value_2_0, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsuxei64_v_operator_0() { +int8_t tmp[] = {23,0,0,0,84,0,20,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsuxei64_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsuxei64_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsuxei64_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vsuxei8V8VoidVBVUVI_m.c b/test/codegen-golden/Vsuxei8V8VoidVBVUVI_m.c new file mode 100644 index 0000000..fd095d7 --- /dev/null +++ b/test/codegen-golden/Vsuxei8V8VoidVBVUVI_m.c @@ -0,0 +1,100 @@ +// COMMAND: random_gen -r Vsuxei8V8VoidVBVUVI_m -n 1 -l 7 --has-ta --has-ma -c Vsuxei8V8VoidVBVUVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vsuxei8_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_3; +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t placeholder6= vmv_v_x_i8m1(0, vsetvlmax_e8m1()); +vse8_v_i8m1(placeholder4, placeholder6, vl); +placeholder4 += vl; +} +int placeholder7 = 7; + +size_t placeholder8 = 0; +for (size_t vl; placeholder7 > 0; placeholder7 -= vl) { +vl = vsetvl_e8m1(placeholder7); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +if (7 < 255) { +vuint8m1_t placeholder9= vmv_v_x_u8m1(0, vsetvlmax_e8m1()); +vec_value_2_0 = vremu_vx_u8m1_m(mask_value_0_0, placeholder9, vec_value_2_0, 7, vl); +} +vec_value_2_0 = vmul_vx_u8m1(vec_value_2_0, 1, vl); +vsuxei8_v_i8m1_m (mask_value_0_0, placeholder3, vec_value_2_0, vec_value_1_0, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vsuxei8_v_operator_0() { +int8_t tmp[] = {20,0,23,0,0,84,0,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vsuxei8_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vsuxei8_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vsuxei8_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vzext_vf2V16VUInt16VBVUVU_m.c b/test/codegen-golden/Vzext_vf2V16VUInt16VBVUVU_m.c new file mode 100644 index 0000000..ac54fba --- /dev/null +++ b/test/codegen-golden/Vzext_vf2V16VUInt16VBVUVU_m.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r Vzext_vf2V16VUInt16VBVUVU_m -n 1 -l 7 --has-ta --has-ma -c Vzext_vf2V16VUInt16VBVUVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vzext_vf2_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e16m1(placeholder4); +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint16m1_t vec_value_1_0= vle16_v_u16m1(placeholder1, vl); +vuint8mf2_t vec_value_2_0= vle8_v_u8mf2(placeholder2, vl); + +vuint16m1_t vec_value_3_0= vzext_vf2_u16m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_u16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vzext_vf2_operator_0() { +uint16_t tmp[] = {6442,75,42,5940,58,1323,4633,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vzext_vf2_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf2_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vzext_vf2_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vzext_vf2V16VUInt16VU.c b/test/codegen-golden/Vzext_vf2V16VUInt16VU.c new file mode 100644 index 0000000..63f55d6 --- /dev/null +++ b/test/codegen-golden/Vzext_vf2V16VUInt16VU.c @@ -0,0 +1,60 @@ +// COMMAND: random_gen -r Vzext_vf2V16VUInt16VU -n 1 -l 7 --has-ta --has-ma -c Vzext_vf2V16VUInt16VU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint16_t value_1[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vzext_vf2_operator_0() { +uint8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e16m1(placeholder2); +vuint8mf2_t vec_value_0_0= vle8_v_u8mf2(placeholder0, vl); + +vuint16m1_t vec_value_1_0= vzext_vf2_u16m1(vec_value_0_0, vl); + +vse16_v_u16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vzext_vf2_operator_0() { +uint16_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vzext_vf2_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf2_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vzext_vf2_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vzext_vf4V32VUInt32VBVUVU_m.c b/test/codegen-golden/Vzext_vf4V32VUInt32VBVUVU_m.c new file mode 100644 index 0000000..29f5be6 --- /dev/null +++ b/test/codegen-golden/Vzext_vf4V32VUInt32VBVUVU_m.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r Vzext_vf4V32VUInt32VBVUVU_m -n 1 -l 7 --has-ta --has-ma -c Vzext_vf4V32VUInt32VBVUVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint8_t value_2[7]; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vzext_vf4_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e32m1(placeholder4); +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +vuint8mf4_t vec_value_2_0= vle8_v_u8mf4(placeholder2, vl); + +vuint32m1_t vec_value_3_0= vzext_vf4_u32m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse32_v_u32m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vzext_vf4_operator_0() { +uint32_t tmp[] = {6442165u,75u,42u,5939507u,58u,1323058u,4632843u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vzext_vf4_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf4_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vzext_vf4_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vzext_vf4V32VUInt32VU.c b/test/codegen-golden/Vzext_vf4V32VUInt32VU.c new file mode 100644 index 0000000..71dc181 --- /dev/null +++ b/test/codegen-golden/Vzext_vf4V32VUInt32VU.c @@ -0,0 +1,60 @@ +// COMMAND: random_gen -r Vzext_vf4V32VUInt32VU -n 1 -l 7 --has-ta --has-ma -c Vzext_vf4V32VUInt32VU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint32_t value_1[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vzext_vf4_operator_0() { +uint8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e32m1(placeholder2); +vuint8mf4_t vec_value_0_0= vle8_v_u8mf4(placeholder0, vl); + +vuint32m1_t vec_value_1_0= vzext_vf4_u32m1(vec_value_0_0, vl); + +vse32_v_u32m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vzext_vf4_operator_0() { +uint32_t tmp[] = {22u,90u,78u,43u,63u,14u,22u,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vzext_vf4_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf4_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vzext_vf4_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vzext_vf8V64VUInt64VBVUVU_m.c b/test/codegen-golden/Vzext_vf8V64VUInt64VBVUVU_m.c new file mode 100644 index 0000000..5da0f24 --- /dev/null +++ b/test/codegen-golden/Vzext_vf8V64VUInt64VBVUVU_m.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r Vzext_vf8V64VUInt64VBVUVU_m -n 1 -l 7 --has-ta --has-ma -c Vzext_vf8V64VUInt64VBVUVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint64_t value_1[7]; +uint8_t value_2[7]; +uint64_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint64_t tmp[] = {6442165ull,9199407ull,5979199ull,5939507ull,6151593ull,1323058ull,4632843ull,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vzext_vf8_operator_0() { +int8_t *placeholder0 = value_0; +uint64_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint64_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e64m1(placeholder4); +vint8mf8_t vec_value_0= vle8_v_i8mf8(placeholder0, vl); +vbool64_t mask_value_0_0= vmseq_vx_i8mf8_b64(vec_value_0, 1, vl); +vuint64m1_t vec_value_1_0= vle64_v_u64m1(placeholder1, vl); +vuint8mf8_t vec_value_2_0= vle8_v_u8mf8(placeholder2, vl); + +vuint64m1_t vec_value_3_0= vzext_vf8_u64m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse64_v_u64m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vzext_vf8_operator_0() { +uint64_t tmp[] = {6442165ull,75ull,42ull,5939507ull,58ull,1323058ull,4632843ull,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vzext_vf8_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf8_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vzext_vf8_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Vzext_vf8V64VUInt64VU.c b/test/codegen-golden/Vzext_vf8V64VUInt64VU.c new file mode 100644 index 0000000..22a8354 --- /dev/null +++ b/test/codegen-golden/Vzext_vf8V64VUInt64VU.c @@ -0,0 +1,60 @@ +// COMMAND: random_gen -r Vzext_vf8V64VUInt64VU -n 1 -l 7 --has-ta --has-ma -c Vzext_vf8V64VUInt64VU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint64_t value_1[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vzext_vf8_operator_0() { +uint8_t *placeholder0 = value_0; +uint64_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e64m1(placeholder2); +vuint8mf8_t vec_value_0_0= vle8_v_u8mf8(placeholder0, vl); + +vuint64m1_t vec_value_1_0= vzext_vf8_u64m1(vec_value_0_0, vl); + +vse64_v_u64m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vzext_vf8_operator_0() { +uint64_t tmp[] = {22ull,90ull,78ull,43ull,63ull,14ull,22ull,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vzext_vf8_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf8_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vzext_vf8_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddVV8VInt16VBVIVIVI_TAMU.c b/test/codegen-golden/WaddVV8VInt16VBVIVIVI_TAMU.c new file mode 100644 index 0000000..1c28115 --- /dev/null +++ b/test/codegen-golden/WaddVV8VInt16VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WaddVV8VInt16VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c WaddVV8VInt16VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwadd_vv_i16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwadd_vv_operator_0() { +int16_t tmp[] = {2884,-1,24,-1,-23,-1,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddVV8VInt16VBVIVIVI_TUMA.c b/test/codegen-golden/WaddVV8VInt16VBVIVIVI_TUMA.c new file mode 100644 index 0000000..ea3adff --- /dev/null +++ b/test/codegen-golden/WaddVV8VInt16VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WaddVV8VInt16VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c WaddVV8VInt16VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwadd_vv_i16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwadd_vv_operator_0() { +int16_t tmp[] = {-1,8399,24,1879,-23,-7354,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddVV8VInt16VBVIVIVI_TUMU.c b/test/codegen-golden/WaddVV8VInt16VBVIVIVI_TUMU.c new file mode 100644 index 0000000..2996993 --- /dev/null +++ b/test/codegen-golden/WaddVV8VInt16VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WaddVV8VInt16VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c WaddVV8VInt16VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwadd_vv_i16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwadd_vv_operator_0() { +int16_t tmp[] = {2884,8399,24,1879,-23,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddVV8VInt16VBVIVI_TAMA.c b/test/codegen-golden/WaddVV8VInt16VBVIVI_TAMA.c new file mode 100644 index 0000000..f5d8b88 --- /dev/null +++ b/test/codegen-golden/WaddVV8VInt16VBVIVI_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r WaddVV8VInt16VBVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c WaddVV8VInt16VBVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwadd_vv_i16m2_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwadd_vv_operator_0() { +int16_t tmp[] = {-1,-1,5,-1,39,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddVV8VInt16VIVIVI_TU.c b/test/codegen-golden/WaddVV8VInt16VIVIVI_TU.c new file mode 100644 index 0000000..03c13e2 --- /dev/null +++ b/test/codegen-golden/WaddVV8VInt16VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r WaddVV8VInt16VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c WaddVV8VInt16VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwadd_vv_operator_0() { +int16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwadd_vv_i16m2_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwadd_vv_operator_0() { +int16_t tmp[] = {7,7893,5,-1417,39,-7226,-33,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddVV8VInt16VIVI_TA.c b/test/codegen-golden/WaddVV8VInt16VIVI_TA.c new file mode 100644 index 0000000..5126f66 --- /dev/null +++ b/test/codegen-golden/WaddVV8VInt16VIVI_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r WaddVV8VInt16VIVI_TA -n 1 -l 7 --has-ta --has-ma -c WaddVV8VInt16VIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint16m2_t vec_value_2_0= vwadd_vv_i16m2_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwadd_vv_operator_0() { +int16_t tmp[] = {-78,-1,40,-1,42,-1,-83,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddVX8VInt16VBVISI_TAMA.c b/test/codegen-golden/WaddVX8VInt16VBVISI_TAMA.c new file mode 100644 index 0000000..bc0381d --- /dev/null +++ b/test/codegen-golden/WaddVX8VInt16VBVISI_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r WaddVX8VInt16VBVISI_TAMA -n 1 -l 7 --has-ta --has-ma -c WaddVX8VInt16VBVISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint16m2_t vec_value_3_0= vwadd_vx_i16m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwadd_vx_operator_0() { +int16_t tmp[] = {-1,-1,-10,-1,-87,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddVX8VInt16VBVIVISI_TAMU.c b/test/codegen-golden/WaddVX8VInt16VBVIVISI_TAMU.c new file mode 100644 index 0000000..c4eb6c5 --- /dev/null +++ b/test/codegen-golden/WaddVX8VInt16VBVIVISI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WaddVX8VInt16VBVIVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c WaddVX8VInt16VBVIVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwadd_vx_i16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwadd_vx_operator_0() { +int16_t tmp[] = {5001,-1,-3,-1,-96,-1,2884,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddVX8VInt16VBVIVISI_TUMA.c b/test/codegen-golden/WaddVX8VInt16VBVIVISI_TUMA.c new file mode 100644 index 0000000..2435613 --- /dev/null +++ b/test/codegen-golden/WaddVX8VInt16VBVIVISI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WaddVX8VInt16VBVIVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c WaddVX8VInt16VBVIVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwadd_vx_i16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwadd_vx_operator_0() { +int16_t tmp[] = {-1,-1530,-3,1614,-96,-2596,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddVX8VInt16VBVIVISI_TUMU.c b/test/codegen-golden/WaddVX8VInt16VBVIVISI_TUMU.c new file mode 100644 index 0000000..f240765 --- /dev/null +++ b/test/codegen-golden/WaddVX8VInt16VBVIVISI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WaddVX8VInt16VBVIVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c WaddVX8VInt16VBVIVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwadd_vx_i16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwadd_vx_operator_0() { +int16_t tmp[] = {5001,-1530,-3,1614,-96,-2596,2884,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddVX8VInt16VISI_TA.c b/test/codegen-golden/WaddVX8VInt16VISI_TA.c new file mode 100644 index 0000000..81d019f --- /dev/null +++ b/test/codegen-golden/WaddVX8VInt16VISI_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r WaddVX8VInt16VISI_TA -n 1 -l 7 --has-ta --has-ma -c WaddVX8VInt16VISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vwadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint16m2_t vec_value_2_0= vwadd_vx_i16m2_ta(vec_value_0_0, placeholder1, tail_vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwadd_vx_operator_0() { +int16_t tmp[] = {-78,-1,33,-1,4,-1,-79,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddVX8VInt16VIVISI_TU.c b/test/codegen-golden/WaddVX8VInt16VIVISI_TU.c new file mode 100644 index 0000000..1cebf94 --- /dev/null +++ b/test/codegen-golden/WaddVX8VInt16VIVISI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r WaddVX8VInt16VIVISI_TU -n 1 -l 7 --has-ta --has-ma -c WaddVX8VInt16VIVISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwadd_vx_operator_0() { +int16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint16m2_t vec_value_3_0= vwadd_vx_i16m2_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwadd_vx_operator_0() { +int16_t tmp[] = {28,7893,-10,-1417,-87,-7226,7,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddWV8VInt16VBVIVIVI_TAMU.c b/test/codegen-golden/WaddWV8VInt16VBVIVIVI_TAMU.c new file mode 100644 index 0000000..54f3482 --- /dev/null +++ b/test/codegen-golden/WaddWV8VInt16VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WaddWV8VInt16VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c WaddWV8VInt16VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {6976,-2834,3879,9191,-3858,-5299,-3986,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwadd_wv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwadd_wv_i16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwadd_wv_operator_0() { +int16_t tmp[] = {2884,-1,3864,-1,-3842,-1,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwadd_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwadd_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddWV8VInt16VBVIVIVI_TUMA.c b/test/codegen-golden/WaddWV8VInt16VBVIVIVI_TUMA.c new file mode 100644 index 0000000..ada4d05 --- /dev/null +++ b/test/codegen-golden/WaddWV8VInt16VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WaddWV8VInt16VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c WaddWV8VInt16VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {6976,-2834,3879,9191,-3858,-5299,-3986,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwadd_wv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwadd_wv_i16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwadd_wv_operator_0() { +int16_t tmp[] = {-1,8399,3864,1879,-3842,-7354,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwadd_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwadd_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddWV8VInt16VBVIVIVI_TUMU.c b/test/codegen-golden/WaddWV8VInt16VBVIVIVI_TUMU.c new file mode 100644 index 0000000..b2ca739 --- /dev/null +++ b/test/codegen-golden/WaddWV8VInt16VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WaddWV8VInt16VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c WaddWV8VInt16VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {6976,-2834,3879,9191,-3858,-5299,-3986,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwadd_wv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwadd_wv_i16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwadd_wv_operator_0() { +int16_t tmp[] = {2884,8399,3864,1879,-3842,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwadd_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwadd_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddWV8VInt16VBVIVI_TAMA.c b/test/codegen-golden/WaddWV8VInt16VBVIVI_TAMA.c new file mode 100644 index 0000000..ab0d657 --- /dev/null +++ b/test/codegen-golden/WaddWV8VInt16VBVIVI_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r WaddWV8VInt16VBVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c WaddWV8VInt16VBVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwadd_wv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwadd_wv_i16m2_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwadd_wv_operator_0() { +int16_t tmp[] = {-1,-1,1943,-1,2319,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwadd_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwadd_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddWV8VInt16VIVIVI_TU.c b/test/codegen-golden/WaddWV8VInt16VIVIVI_TU.c new file mode 100644 index 0000000..51da241 --- /dev/null +++ b/test/codegen-golden/WaddWV8VInt16VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r WaddWV8VInt16VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c WaddWV8VInt16VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwadd_wv_operator_0() { +int16_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwadd_wv_i16m2_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwadd_wv_operator_0() { +int16_t tmp[] = {2862,7893,1943,-1417,2319,-7226,-760,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwadd_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwadd_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddWV8VInt16VIVI_TA.c b/test/codegen-golden/WaddWV8VInt16VIVI_TA.c new file mode 100644 index 0000000..d6f469b --- /dev/null +++ b/test/codegen-golden/WaddWV8VInt16VIVI_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r WaddWV8VInt16VIVI_TA -n 1 -l 7 --has-ta --has-ma -c WaddWV8VInt16VIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwadd_wv_operator_0() { +int16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint16m2_t vec_value_2_0= vwadd_wv_i16m2_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwadd_wv_operator_0() { +int16_t tmp[] = {-5568,-1,5443,-1,2612,-1,-5656,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwadd_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwadd_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddWVV8VInt16.c b/test/codegen-golden/WaddWVV8VInt16.c new file mode 100644 index 0000000..3e74e36 --- /dev/null +++ b/test/codegen-golden/WaddWVV8VInt16.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r WaddWVV8VInt16 -n 1 -l 7 --has-ta --has-ma -c WaddWVV8VInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint16m2_t vec_value_2_0= vwadd_vv_i16m2(vec_value_0_0, vec_value_1_0, vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwadd_vv_operator_0() { +int16_t tmp[] = {-78,129,40,-2,42,-138,-83,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddWVV8VInt16_m.c b/test/codegen-golden/WaddWVV8VInt16_m.c new file mode 100644 index 0000000..eef0734 --- /dev/null +++ b/test/codegen-golden/WaddWVV8VInt16_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r WaddWVV8VInt16_m -n 1 -l 7 --has-ta --has-ma -c WaddWVV8VInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwadd_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwadd_vv_i16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwadd_vv_operator_0() { +int16_t tmp[] = {2884,22,24,1879,-23,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwadd_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwadd_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddWVX8VInt16.c b/test/codegen-golden/WaddWVX8VInt16.c new file mode 100644 index 0000000..1bc80d1 --- /dev/null +++ b/test/codegen-golden/WaddWVX8VInt16.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r WaddWVX8VInt16 -n 1 -l 7 --has-ta --has-ma -c WaddWVX8VInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vwadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint16m2_t vec_value_2_0= vwadd_vx_i16m2(vec_value_0_0, placeholder1, vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwadd_vx_operator_0() { +int16_t tmp[] = {-78,57,33,-36,4,-95,-79,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddWVX8VInt16_m.c b/test/codegen-golden/WaddWVX8VInt16_m.c new file mode 100644 index 0000000..5c8ca8d --- /dev/null +++ b/test/codegen-golden/WaddWVX8VInt16_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r WaddWVX8VInt16_m -n 1 -l 7 --has-ta --has-ma -c WaddWVX8VInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwadd_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwadd_vx_i16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwadd_vx_operator_0() { +int16_t tmp[] = {5001,-2,-3,1614,-96,-2596,2884,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwadd_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwadd_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddWWV8VInt16.c b/test/codegen-golden/WaddWWV8VInt16.c new file mode 100644 index 0000000..dc53717 --- /dev/null +++ b/test/codegen-golden/WaddWWV8VInt16.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r WaddWWV8VInt16 -n 1 -l 7 --has-ta --has-ma -c WaddWWV8VInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwadd_wv_operator_0() { +int16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m2(placeholder3); +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint16m2_t vec_value_2_0= vwadd_wv_i16m2(vec_value_0_0, vec_value_1_0, vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwadd_wv_operator_0() { +int16_t tmp[] = {-5568,7943,5443,-1405,2612,-7291,-5656,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwadd_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwadd_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddWWV8VInt16_m.c b/test/codegen-golden/WaddWWV8VInt16_m.c new file mode 100644 index 0000000..8523f28 --- /dev/null +++ b/test/codegen-golden/WaddWWV8VInt16_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r WaddWWV8VInt16_m -n 1 -l 7 --has-ta --has-ma -c WaddWWV8VInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {6976,-2834,3879,9191,-3858,-5299,-3986,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwadd_wv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m2(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwadd_wv_i16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwadd_wv_operator_0() { +int16_t tmp[] = {2884,-2784,3864,1879,-3842,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwadd_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwadd_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddWWX8VInt16.c b/test/codegen-golden/WaddWWX8VInt16.c new file mode 100644 index 0000000..2d3a601 --- /dev/null +++ b/test/codegen-golden/WaddWWX8VInt16.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r WaddWWX8VInt16 -n 1 -l 7 --has-ta --has-ma -c WaddWWX8VInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vwadd_wx_operator_0() { +int16_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m2(placeholder3); +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); + +vint16m2_t vec_value_2_0= vwadd_wx_i16m2(vec_value_0_0, placeholder1, vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwadd_wx_operator_0() { +int16_t tmp[] = {-5568,7871,5436,-1439,2574,-7248,-5652,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwadd_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwadd_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddWWX8VInt16_m.c b/test/codegen-golden/WaddWWX8VInt16_m.c new file mode 100644 index 0000000..efc9c19 --- /dev/null +++ b/test/codegen-golden/WaddWWX8VInt16_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r WaddWWX8VInt16_m -n 1 -l 7 --has-ta --has-ma -c WaddWWX8VInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +int8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {8399,1958,1879,2303,-7354,-734,6976,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwadd_wx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m2(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwadd_wx_i16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwadd_wx_operator_0() { +int16_t tmp[] = {5001,1936,1857,1614,-7376,-2596,2884,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwadd_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwadd_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddWX8VInt16VBVISI_TAMA.c b/test/codegen-golden/WaddWX8VInt16VBVISI_TAMA.c new file mode 100644 index 0000000..6e0e22d --- /dev/null +++ b/test/codegen-golden/WaddWX8VInt16VBVISI_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r WaddWX8VInt16VBVISI_TAMA -n 1 -l 7 --has-ta --has-ma -c WaddWX8VInt16VBVISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwadd_wx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); + +vint16m2_t vec_value_3_0= vwadd_wx_i16m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwadd_wx_operator_0() { +int16_t tmp[] = {-1,-1,1162,-1,-6449,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwadd_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwadd_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddWX8VInt16VBVIVISI_TAMU.c b/test/codegen-golden/WaddWX8VInt16VBVIVISI_TAMU.c new file mode 100644 index 0000000..373a117 --- /dev/null +++ b/test/codegen-golden/WaddWX8VInt16VBVIVISI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WaddWX8VInt16VBVIVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c WaddWX8VInt16VBVIVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +int8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {8399,1958,1879,2303,-7354,-734,6976,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwadd_wx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwadd_wx_i16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwadd_wx_operator_0() { +int16_t tmp[] = {5001,-1,1857,-1,-7376,-1,2884,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwadd_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwadd_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddWX8VInt16VBVIVISI_TUMA.c b/test/codegen-golden/WaddWX8VInt16VBVIVISI_TUMA.c new file mode 100644 index 0000000..dba7b79 --- /dev/null +++ b/test/codegen-golden/WaddWX8VInt16VBVIVISI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WaddWX8VInt16VBVIVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c WaddWX8VInt16VBVIVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +int8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {8399,1958,1879,2303,-7354,-734,6976,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwadd_wx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwadd_wx_i16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwadd_wx_operator_0() { +int16_t tmp[] = {-1,-1530,1857,1614,-7376,-2596,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwadd_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwadd_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddWX8VInt16VBVIVISI_TUMU.c b/test/codegen-golden/WaddWX8VInt16VBVIVISI_TUMU.c new file mode 100644 index 0000000..4ccf62e --- /dev/null +++ b/test/codegen-golden/WaddWX8VInt16VBVIVISI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WaddWX8VInt16VBVIVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c WaddWX8VInt16VBVIVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +int8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {8399,1958,1879,2303,-7354,-734,6976,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwadd_wx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwadd_wx_i16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwadd_wx_operator_0() { +int16_t tmp[] = {5001,-1530,1857,1614,-7376,-2596,2884,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwadd_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwadd_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddWX8VInt16VISI_TA.c b/test/codegen-golden/WaddWX8VInt16VISI_TA.c new file mode 100644 index 0000000..d7b7f6f --- /dev/null +++ b/test/codegen-golden/WaddWX8VInt16VISI_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r WaddWX8VInt16VISI_TA -n 1 -l 7 --has-ta --has-ma -c WaddWX8VInt16VISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vwadd_wx_operator_0() { +int16_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); + +vint16m2_t vec_value_2_0= vwadd_wx_i16m2_ta(vec_value_0_0, placeholder1, tail_vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwadd_wx_operator_0() { +int16_t tmp[] = {-5568,-1,5436,-1,2574,-1,-5652,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwadd_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwadd_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WaddWX8VInt16VIVISI_TU.c b/test/codegen-golden/WaddWX8VInt16VIVISI_TU.c new file mode 100644 index 0000000..7246573 --- /dev/null +++ b/test/codegen-golden/WaddWX8VInt16VIVISI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r WaddWX8VInt16VIVISI_TU -n 1 -l 7 --has-ta --has-ma -c WaddWX8VInt16VIVISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int16_t value_1[7]; +int8_t value_2; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwadd_wx_operator_0() { +int16_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); + +vint16m2_t vec_value_3_0= vwadd_wx_i16m2_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwadd_wx_operator_0() { +int16_t tmp[] = {4979,7893,1162,-1417,-6449,-7226,2862,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwadd_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwadd_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwadd_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduVV8VUInt16VBVUVUVU_TAMU.c b/test/codegen-golden/WadduVV8VUInt16VBVUVUVU_TAMU.c new file mode 100644 index 0000000..e4c5235 --- /dev/null +++ b/test/codegen-golden/WadduVV8VUInt16VBVUVUVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WadduVV8VUInt16VBVUVUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c WadduVV8VUInt16VBVUVUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwaddu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwaddu_vv_u16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwaddu_vv_operator_0() { +uint16_t tmp[] = {6442,65535,112,65535,89,65535,4633,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduVV8VUInt16VBVUVUVU_TUMA.c b/test/codegen-golden/WadduVV8VUInt16VBVUVUVU_TUMA.c new file mode 100644 index 0000000..5a99df8 --- /dev/null +++ b/test/codegen-golden/WadduVV8VUInt16VBVUVUVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WadduVV8VUInt16VBVUVUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c WadduVV8VUInt16VBVUVUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwaddu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwaddu_vv_u16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwaddu_vv_operator_0() { +uint16_t tmp[] = {65535,9200,112,5940,89,1323,65535,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduVV8VUInt16VBVUVUVU_TUMU.c b/test/codegen-golden/WadduVV8VUInt16VBVUVUVU_TUMU.c new file mode 100644 index 0000000..155f23c --- /dev/null +++ b/test/codegen-golden/WadduVV8VUInt16VBVUVUVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WadduVV8VUInt16VBVUVUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c WadduVV8VUInt16VBVUVUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwaddu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwaddu_vv_u16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwaddu_vv_operator_0() { +uint16_t tmp[] = {6442,9200,112,5940,89,1323,4633,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduVV8VUInt16VBVUVU_TAMA.c b/test/codegen-golden/WadduVV8VUInt16VBVUVU_TAMA.c new file mode 100644 index 0000000..8f4cfc8 --- /dev/null +++ b/test/codegen-golden/WadduVV8VUInt16VBVUVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r WadduVV8VUInt16VBVUVU_TAMA -n 1 -l 7 --has-ta --has-ma -c WadduVV8VUInt16VBVUVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwaddu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_3_0= vwaddu_vv_u16m2_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwaddu_vv_operator_0() { +uint16_t tmp[] = {65535,65535,102,65535,120,65535,65535,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduVV8VUInt16VUVUVU_TU.c b/test/codegen-golden/WadduVV8VUInt16VUVUVU_TU.c new file mode 100644 index 0000000..7050b18 --- /dev/null +++ b/test/codegen-golden/WadduVV8VUInt16VUVUVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r WadduVV8VUInt16VUVUVU_TU -n 1 -l 7 --has-ta --has-ma -c WadduVV8VUInt16VUVUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwaddu_vv_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_3_0= vwaddu_vv_u16m2_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwaddu_vv_operator_0() { +uint16_t tmp[] = {104,8946,102,4291,120,1387,83,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduVV8VUInt16VUVU_TA.c b/test/codegen-golden/WadduVV8VUInt16VUVU_TA.c new file mode 100644 index 0000000..2b46193 --- /dev/null +++ b/test/codegen-golden/WadduVV8VUInt16VUVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r WadduVV8VUInt16VUVU_TA -n 1 -l 7 --has-ta --has-ma -c WadduVV8VUInt16VUVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwaddu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint16m2_t vec_value_2_0= vwaddu_vv_u16m2_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_u16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwaddu_vv_operator_0() { +uint16_t tmp[] = {61,65535,120,65535,121,65535,59,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduVX8VUInt16VBVUSU_TAMA.c b/test/codegen-golden/WadduVX8VUInt16VBVUSU_TAMA.c new file mode 100644 index 0000000..9efcea7 --- /dev/null +++ b/test/codegen-golden/WadduVX8VUInt16VBVUSU_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r WadduVX8VUInt16VBVUSU_TAMA -n 1 -l 7 --has-ta --has-ma -c WadduVX8VUInt16VBVUSU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwaddu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint16m2_t vec_value_3_0= vwaddu_vx_u16m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwaddu_vx_operator_0() { +uint16_t tmp[] = {65535,65535,95,65535,57,65535,65535,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduVX8VUInt16VBVUVUSU_TAMU.c b/test/codegen-golden/WadduVX8VUInt16VBVUVUSU_TAMU.c new file mode 100644 index 0000000..e7d9aa6 --- /dev/null +++ b/test/codegen-golden/WadduVX8VUInt16VBVUVUSU_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WadduVX8VUInt16VBVUVUSU_TAMU -n 1 -l 7 --has-ta --has-ma -c WadduVX8VUInt16VBVUVUSU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwaddu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_4_0= vwaddu_vx_u16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwaddu_vx_operator_0() { +uint16_t tmp[] = {7500,65535,98,65535,52,65535,6442,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduVX8VUInt16VBVUVUSU_TUMA.c b/test/codegen-golden/WadduVX8VUInt16VBVUVUSU_TUMA.c new file mode 100644 index 0000000..4a74e39 --- /dev/null +++ b/test/codegen-golden/WadduVX8VUInt16VBVUVUSU_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WadduVX8VUInt16VBVUVUSU_TUMA -n 1 -l 7 --has-ta --has-ma -c WadduVX8VUInt16VBVUVUSU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwaddu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_4_0= vwaddu_vx_u16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwaddu_vx_operator_0() { +uint16_t tmp[] = {65535,4235,98,5807,52,3702,65535,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduVX8VUInt16VBVUVUSU_TUMU.c b/test/codegen-golden/WadduVX8VUInt16VBVUVUSU_TUMU.c new file mode 100644 index 0000000..77fbf98 --- /dev/null +++ b/test/codegen-golden/WadduVX8VUInt16VBVUVUSU_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WadduVX8VUInt16VBVUVUSU_TUMU -n 1 -l 7 --has-ta --has-ma -c WadduVX8VUInt16VBVUVUSU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwaddu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_4_0= vwaddu_vx_u16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwaddu_vx_operator_0() { +uint16_t tmp[] = {7500,4235,98,5807,52,3702,6442,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduVX8VUInt16VUSU_TA.c b/test/codegen-golden/WadduVX8VUInt16VUSU_TA.c new file mode 100644 index 0000000..b998080 --- /dev/null +++ b/test/codegen-golden/WadduVX8VUInt16VUSU_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r WadduVX8VUInt16VUSU_TA -n 1 -l 7 --has-ta --has-ma -c WadduVX8VUInt16VUSU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vwaddu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint16m2_t vec_value_2_0= vwaddu_vx_u16m2_ta(vec_value_0_0, placeholder1, tail_vl); + +vse16_v_u16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwaddu_vx_operator_0() { +uint16_t tmp[] = {61,65535,117,65535,102,65535,61,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduVX8VUInt16VUVUSU_TU.c b/test/codegen-golden/WadduVX8VUInt16VUVUSU_TU.c new file mode 100644 index 0000000..f55c052 --- /dev/null +++ b/test/codegen-golden/WadduVX8VUInt16VUVUSU_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r WadduVX8VUInt16VUVUSU_TU -n 1 -l 7 --has-ta --has-ma -c WadduVX8VUInt16VUVUSU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwaddu_vx_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint16m2_t vec_value_3_0= vwaddu_vx_u16m2_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwaddu_vx_operator_0() { +uint16_t tmp[] = {114,8946,95,4291,57,1387,104,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduWV8VUInt16VBVUVUVU_TAMU.c b/test/codegen-golden/WadduWV8VUInt16VBVUVUVU_TAMU.c new file mode 100644 index 0000000..60f455c --- /dev/null +++ b/test/codegen-golden/WadduWV8VUInt16VBVUVUVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WadduWV8VUInt16VBVUVUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c WadduWV8VUInt16VBVUVUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {8488,3583,6940,9596,3071,2350,3007,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwaddu_wv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwaddu_wv_u16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwaddu_wv_operator_0() { +uint16_t tmp[] = {6442,65535,6982,65535,3129,65535,4633,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwaddu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwaddu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduWV8VUInt16VBVUVUVU_TUMA.c b/test/codegen-golden/WadduWV8VUInt16VBVUVUVU_TUMA.c new file mode 100644 index 0000000..79e3602 --- /dev/null +++ b/test/codegen-golden/WadduWV8VUInt16VBVUVUVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WadduWV8VUInt16VBVUVUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c WadduWV8VUInt16VBVUVUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {8488,3583,6940,9596,3071,2350,3007,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwaddu_wv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwaddu_wv_u16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwaddu_wv_operator_0() { +uint16_t tmp[] = {65535,9200,6982,5940,3129,1323,65535,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwaddu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwaddu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduWV8VUInt16VBVUVUVU_TUMU.c b/test/codegen-golden/WadduWV8VUInt16VBVUVUVU_TUMU.c new file mode 100644 index 0000000..98a1666 --- /dev/null +++ b/test/codegen-golden/WadduWV8VUInt16VBVUVUVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WadduWV8VUInt16VBVUVUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c WadduWV8VUInt16VBVUVUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {8488,3583,6940,9596,3071,2350,3007,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwaddu_wv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwaddu_wv_u16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwaddu_wv_operator_0() { +uint16_t tmp[] = {6442,9200,6982,5940,3129,1323,4633,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwaddu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwaddu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduWV8VUInt16VBVUVU_TAMA.c b/test/codegen-golden/WadduWV8VUInt16VBVUVU_TAMA.c new file mode 100644 index 0000000..9b3f02e --- /dev/null +++ b/test/codegen-golden/WadduWV8VUInt16VBVUVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r WadduWV8VUInt16VBVUVU_TAMA -n 1 -l 7 --has-ta --has-ma -c WadduWV8VUInt16VBVUVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwaddu_wv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_3_0= vwaddu_wv_u16m2_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwaddu_wv_operator_0() { +uint16_t tmp[] = {65535,65535,6021,65535,6210,65535,65535,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwaddu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwaddu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduWV8VUInt16VUVUVU_TU.c b/test/codegen-golden/WadduWV8VUInt16VUVUVU_TU.c new file mode 100644 index 0000000..1fed1b0 --- /dev/null +++ b/test/codegen-golden/WadduWV8VUInt16VUVUVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r WadduWV8VUInt16VUVUVU_TU -n 1 -l 7 --has-ta --has-ma -c WadduWV8VUInt16VUVUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwaddu_wv_operator_0() { +uint16_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_3_0= vwaddu_wv_u16m2_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwaddu_wv_operator_0() { +uint16_t tmp[] = {6481,8946,6021,4291,6210,1387,4670,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwaddu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwaddu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduWV8VUInt16VUVU_TA.c b/test/codegen-golden/WadduWV8VUInt16VUVU_TA.c new file mode 100644 index 0000000..36854c1 --- /dev/null +++ b/test/codegen-golden/WadduWV8VUInt16VUVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r WadduWV8VUInt16VUVU_TA -n 1 -l 7 --has-ta --has-ma -c WadduWV8VUInt16VUVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwaddu_wv_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint16m2_t vec_value_2_0= vwaddu_wv_u16m2_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_u16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwaddu_wv_operator_0() { +uint16_t tmp[] = {2266,65535,7771,65535,6356,65535,2222,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwaddu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwaddu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduWVV8VUInt16.c b/test/codegen-golden/WadduWVV8VUInt16.c new file mode 100644 index 0000000..6297157 --- /dev/null +++ b/test/codegen-golden/WadduWVV8VUInt16.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r WadduWVV8VUInt16 -n 1 -l 7 --has-ta --has-ma -c WadduWVV8VUInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwaddu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint16m2_t vec_value_2_0= vwaddu_vv_u16m2(vec_value_0_0, vec_value_1_0, vl); + +vse16_v_u16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwaddu_vv_operator_0() { +uint16_t tmp[] = {61,165,120,99,121,32,59,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduWVV8VUInt16_m.c b/test/codegen-golden/WadduWVV8VUInt16_m.c new file mode 100644 index 0000000..f7976c2 --- /dev/null +++ b/test/codegen-golden/WadduWVV8VUInt16_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r WadduWVV8VUInt16_m -n 1 -l 7 --has-ta --has-ma -c WadduWVV8VUInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwaddu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwaddu_vv_u16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwaddu_vv_operator_0() { +uint16_t tmp[] = {6442,111,112,5940,89,1323,4633,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwaddu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwaddu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduWVX8VUInt16.c b/test/codegen-golden/WadduWVX8VUInt16.c new file mode 100644 index 0000000..105450b --- /dev/null +++ b/test/codegen-golden/WadduWVX8VUInt16.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r WadduWVX8VUInt16 -n 1 -l 7 --has-ta --has-ma -c WadduWVX8VUInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vwaddu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint16m2_t vec_value_2_0= vwaddu_vx_u16m2(vec_value_0_0, placeholder1, vl); + +vse16_v_u16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwaddu_vx_operator_0() { +uint16_t tmp[] = {61,129,117,82,102,53,61,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduWVX8VUInt16_m.c b/test/codegen-golden/WadduWVX8VUInt16_m.c new file mode 100644 index 0000000..86661fe --- /dev/null +++ b/test/codegen-golden/WadduWVX8VUInt16_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r WadduWVX8VUInt16_m -n 1 -l 7 --has-ta --has-ma -c WadduWVX8VUInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwaddu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_4_0= vwaddu_vx_u16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwaddu_vx_operator_0() { +uint16_t tmp[] = {7500,99,98,5807,52,3702,6442,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwaddu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwaddu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduWWV8VUInt16.c b/test/codegen-golden/WadduWWV8VUInt16.c new file mode 100644 index 0000000..2c6605d --- /dev/null +++ b/test/codegen-golden/WadduWWV8VUInt16.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r WadduWWV8VUInt16 -n 1 -l 7 --has-ta --has-ma -c WadduWWV8VUInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwaddu_wv_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m2(placeholder3); +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint16m2_t vec_value_2_0= vwaddu_wv_u16m2(vec_value_0_0, vec_value_1_0, vl); + +vse16_v_u16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwaddu_wv_operator_0() { +uint16_t tmp[] = {2266,9021,7771,4347,6356,1405,2222,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwaddu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwaddu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduWWV8VUInt16_m.c b/test/codegen-golden/WadduWWV8VUInt16_m.c new file mode 100644 index 0000000..4e93c17 --- /dev/null +++ b/test/codegen-golden/WadduWWV8VUInt16_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r WadduWWV8VUInt16_m -n 1 -l 7 --has-ta --has-ma -c WadduWWV8VUInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {8488,3583,6940,9596,3071,2350,3007,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwaddu_wv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m2(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwaddu_wv_u16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwaddu_wv_operator_0() { +uint16_t tmp[] = {6442,3658,6982,5940,3129,1323,4633,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwaddu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwaddu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduWWX8VUInt16.c b/test/codegen-golden/WadduWWX8VUInt16.c new file mode 100644 index 0000000..b8a6da0 --- /dev/null +++ b/test/codegen-golden/WadduWWX8VUInt16.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r WadduWWX8VUInt16 -n 1 -l 7 --has-ta --has-ma -c WadduWWX8VUInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vwaddu_wx_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m2(placeholder3); +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); + +vuint16m2_t vec_value_2_0= vwaddu_wx_u16m2(vec_value_0_0, placeholder1, vl); + +vse16_v_u16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwaddu_wx_operator_0() { +uint16_t tmp[] = {2266,8985,7768,4330,6337,1426,2224,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwaddu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwaddu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduWWX8VUInt16_m.c b/test/codegen-golden/WadduWWX8VUInt16_m.c new file mode 100644 index 0000000..adb4875 --- /dev/null +++ b/test/codegen-golden/WadduWWX8VUInt16_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r WadduWWX8VUInt16_m -n 1 -l 7 --has-ta --has-ma -c WadduWWX8VUInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {9200,5979,5940,6152,1323,4633,8488,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwaddu_wx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m2(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); + +vuint16m2_t vec_value_4_0= vwaddu_wx_u16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwaddu_wx_operator_0() { +uint16_t tmp[] = {7500,6018,5979,5807,1362,3702,6442,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwaddu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwaddu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduWX8VUInt16VBVUSU_TAMA.c b/test/codegen-golden/WadduWX8VUInt16VBVUSU_TAMA.c new file mode 100644 index 0000000..ab43ade --- /dev/null +++ b/test/codegen-golden/WadduWX8VUInt16VBVUSU_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r WadduWX8VUInt16VBVUSU_TAMA -n 1 -l 7 --has-ta --has-ma -c WadduWX8VUInt16VBVUSU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwaddu_wx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); + +vuint16m2_t vec_value_3_0= vwaddu_wx_u16m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwaddu_wx_operator_0() { +uint16_t tmp[] = {65535,65535,5631,65535,1825,65535,65535,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwaddu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwaddu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduWX8VUInt16VBVUVUSU_TAMU.c b/test/codegen-golden/WadduWX8VUInt16VBVUVUSU_TAMU.c new file mode 100644 index 0000000..614a7fd --- /dev/null +++ b/test/codegen-golden/WadduWX8VUInt16VBVUVUSU_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WadduWX8VUInt16VBVUVUSU_TAMU -n 1 -l 7 --has-ta --has-ma -c WadduWX8VUInt16VBVUVUSU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {9200,5979,5940,6152,1323,4633,8488,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwaddu_wx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); + +vuint16m2_t vec_value_4_0= vwaddu_wx_u16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwaddu_wx_operator_0() { +uint16_t tmp[] = {7500,65535,5979,65535,1362,65535,6442,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwaddu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwaddu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduWX8VUInt16VBVUVUSU_TUMA.c b/test/codegen-golden/WadduWX8VUInt16VBVUVUSU_TUMA.c new file mode 100644 index 0000000..fca1486 --- /dev/null +++ b/test/codegen-golden/WadduWX8VUInt16VBVUVUSU_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WadduWX8VUInt16VBVUVUSU_TUMA -n 1 -l 7 --has-ta --has-ma -c WadduWX8VUInt16VBVUVUSU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {9200,5979,5940,6152,1323,4633,8488,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwaddu_wx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); + +vuint16m2_t vec_value_4_0= vwaddu_wx_u16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwaddu_wx_operator_0() { +uint16_t tmp[] = {65535,4235,5979,5807,1362,3702,65535,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwaddu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwaddu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduWX8VUInt16VBVUVUSU_TUMU.c b/test/codegen-golden/WadduWX8VUInt16VBVUVUSU_TUMU.c new file mode 100644 index 0000000..18b805e --- /dev/null +++ b/test/codegen-golden/WadduWX8VUInt16VBVUVUSU_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WadduWX8VUInt16VBVUVUSU_TUMU -n 1 -l 7 --has-ta --has-ma -c WadduWX8VUInt16VBVUVUSU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {9200,5979,5940,6152,1323,4633,8488,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwaddu_wx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); + +vuint16m2_t vec_value_4_0= vwaddu_wx_u16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwaddu_wx_operator_0() { +uint16_t tmp[] = {7500,4235,5979,5807,1362,3702,6442,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwaddu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwaddu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduWX8VUInt16VUSU_TA.c b/test/codegen-golden/WadduWX8VUInt16VUSU_TA.c new file mode 100644 index 0000000..b5f4bf5 --- /dev/null +++ b/test/codegen-golden/WadduWX8VUInt16VUSU_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r WadduWX8VUInt16VUSU_TA -n 1 -l 7 --has-ta --has-ma -c WadduWX8VUInt16VUSU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vwaddu_wx_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); + +vuint16m2_t vec_value_2_0= vwaddu_wx_u16m2_ta(vec_value_0_0, placeholder1, tail_vl); + +vse16_v_u16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwaddu_wx_operator_0() { +uint16_t tmp[] = {2266,65535,7768,65535,6337,65535,2224,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwaddu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwaddu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WadduWX8VUInt16VUVUSU_TU.c b/test/codegen-golden/WadduWX8VUInt16VUVUSU_TU.c new file mode 100644 index 0000000..723120a --- /dev/null +++ b/test/codegen-golden/WadduWX8VUInt16VUVUSU_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r WadduWX8VUInt16VUVUSU_TU -n 1 -l 7 --has-ta --has-ma -c WadduWX8VUInt16VUVUSU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwaddu_wx_operator_0() { +uint16_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); + +vuint16m2_t vec_value_3_0= vwaddu_wx_u16m2_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwaddu_wx_operator_0() { +uint16_t tmp[] = {7539,8946,5631,4291,1825,1387,6481,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwaddu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwaddu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwaddu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WcvtV8VInt16VBVIVI_TAMU.c b/test/codegen-golden/WcvtV8VInt16VBVIVI_TAMU.c new file mode 100644 index 0000000..6cd53a3 --- /dev/null +++ b/test/codegen-golden/WcvtV8VInt16VBVIVI_TAMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r WcvtV8VInt16VBVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c WcvtV8VInt16VBVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwcvt_x_x_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwcvt_x_x_v_i16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwcvt_x_x_v_operator_0() { +int16_t tmp[] = {2884,-1,-15,-1,16,-1,-734,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwcvt_x_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwcvt_x_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwcvt_x_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WcvtV8VInt16VBVIVI_TUMA.c b/test/codegen-golden/WcvtV8VInt16VBVIVI_TUMA.c new file mode 100644 index 0000000..9e8bc84 --- /dev/null +++ b/test/codegen-golden/WcvtV8VInt16VBVIVI_TUMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r WcvtV8VInt16VBVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c WcvtV8VInt16VBVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwcvt_x_x_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwcvt_x_x_v_i16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwcvt_x_x_v_operator_0() { +int16_t tmp[] = {-1,8399,-15,1879,16,-7354,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwcvt_x_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwcvt_x_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwcvt_x_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WcvtV8VInt16VBVIVI_TUMU.c b/test/codegen-golden/WcvtV8VInt16VBVIVI_TUMU.c new file mode 100644 index 0000000..b69e580 --- /dev/null +++ b/test/codegen-golden/WcvtV8VInt16VBVIVI_TUMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r WcvtV8VInt16VBVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c WcvtV8VInt16VBVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwcvt_x_x_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwcvt_x_x_v_i16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwcvt_x_x_v_operator_0() { +int16_t tmp[] = {2884,8399,-15,1879,16,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwcvt_x_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwcvt_x_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwcvt_x_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WcvtV8VInt16VBVIVI_m.c b/test/codegen-golden/WcvtV8VInt16VBVIVI_m.c new file mode 100644 index 0000000..9ca6144 --- /dev/null +++ b/test/codegen-golden/WcvtV8VInt16VBVIVI_m.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r WcvtV8VInt16VBVIVI_m -n 1 -l 7 --has-ta --has-ma -c WcvtV8VInt16VBVIVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwcvt_x_x_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwcvt_x_x_v_i16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwcvt_x_x_v_operator_0() { +int16_t tmp[] = {2884,50,-15,1879,16,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwcvt_x_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwcvt_x_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwcvt_x_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WcvtV8VInt16VBVI_TAMA.c b/test/codegen-golden/WcvtV8VInt16VBVI_TAMA.c new file mode 100644 index 0000000..f291357 --- /dev/null +++ b/test/codegen-golden/WcvtV8VInt16VBVI_TAMA.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r WcvtV8VInt16VBVI_TAMA -n 1 -l 7 --has-ta --has-ma -c WcvtV8VInt16VBVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwcvt_x_x_v_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint16m2_t vec_value_2_0= vwcvt_x_x_v_i16m2_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwcvt_x_x_v_operator_0() { +int16_t tmp[] = {-1,-1,-15,-1,16,-1,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwcvt_x_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwcvt_x_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwcvt_x_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WcvtV8VInt16VI.c b/test/codegen-golden/WcvtV8VInt16VI.c new file mode 100644 index 0000000..e2a558a --- /dev/null +++ b/test/codegen-golden/WcvtV8VInt16VI.c @@ -0,0 +1,60 @@ +// COMMAND: random_gen -r WcvtV8VInt16VI -n 1 -l 7 --has-ta --has-ma -c WcvtV8VInt16VI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vwcvt_x_x_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint16m2_t vec_value_1_0= vwcvt_x_x_v_i16m2(vec_value_0_0, vl); + +vse16_v_i16m2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vwcvt_x_x_v_operator_0() { +int16_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vwcvt_x_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwcvt_x_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vwcvt_x_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WcvtV8VInt16VIVI_TU.c b/test/codegen-golden/WcvtV8VInt16VIVI_TU.c new file mode 100644 index 0000000..7a62295 --- /dev/null +++ b/test/codegen-golden/WcvtV8VInt16VIVI_TU.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r WcvtV8VInt16VIVI_TU -n 1 -l 7 --has-ta --has-ma -c WcvtV8VInt16VIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwcvt_x_x_v_operator_0() { +int16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint16m2_t vec_value_2_0= vwcvt_x_x_v_i16m2_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwcvt_x_x_v_operator_0() { +int16_t tmp[] = {-22,7893,-15,-1417,16,-7226,-26,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwcvt_x_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwcvt_x_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwcvt_x_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WcvtV8VInt16VI_TA.c b/test/codegen-golden/WcvtV8VInt16VI_TA.c new file mode 100644 index 0000000..ba55ab8 --- /dev/null +++ b/test/codegen-golden/WcvtV8VInt16VI_TA.c @@ -0,0 +1,61 @@ +// COMMAND: random_gen -r WcvtV8VInt16VI_TA -n 1 -l 7 --has-ta --has-ma -c WcvtV8VInt16VI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vwcvt_x_x_v_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint16m2_t vec_value_1_0= vwcvt_x_x_v_i16m2_ta(vec_value_0_0, tail_vl); + +vse16_v_i16m2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vwcvt_x_x_v_operator_0() { +int16_t tmp[] = {-56,-1,55,-1,26,-1,-57,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vwcvt_x_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwcvt_x_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vwcvt_x_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WcvtuV8VUInt16VBVUVU_TAMU.c b/test/codegen-golden/WcvtuV8VUInt16VBVUVU_TAMU.c new file mode 100644 index 0000000..f098023 --- /dev/null +++ b/test/codegen-golden/WcvtuV8VUInt16VBVUVU_TAMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r WcvtuV8VUInt16VBVUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c WcvtuV8VUInt16VBVUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwcvtu_x_x_v_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_3_0= vwcvtu_x_x_v_u16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwcvtu_x_x_v_operator_0() { +uint16_t tmp[] = {6442,65535,42,65535,58,65535,4633,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwcvtu_x_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwcvtu_x_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwcvtu_x_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WcvtuV8VUInt16VBVUVU_TUMA.c b/test/codegen-golden/WcvtuV8VUInt16VBVUVU_TUMA.c new file mode 100644 index 0000000..4223156 --- /dev/null +++ b/test/codegen-golden/WcvtuV8VUInt16VBVUVU_TUMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r WcvtuV8VUInt16VBVUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c WcvtuV8VUInt16VBVUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwcvtu_x_x_v_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_3_0= vwcvtu_x_x_v_u16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwcvtu_x_x_v_operator_0() { +uint16_t tmp[] = {65535,9200,42,5940,58,1323,65535,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwcvtu_x_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwcvtu_x_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwcvtu_x_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WcvtuV8VUInt16VBVUVU_TUMU.c b/test/codegen-golden/WcvtuV8VUInt16VBVUVU_TUMU.c new file mode 100644 index 0000000..817bffe --- /dev/null +++ b/test/codegen-golden/WcvtuV8VUInt16VBVUVU_TUMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r WcvtuV8VUInt16VBVUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c WcvtuV8VUInt16VBVUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwcvtu_x_x_v_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_3_0= vwcvtu_x_x_v_u16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwcvtu_x_x_v_operator_0() { +uint16_t tmp[] = {6442,9200,42,5940,58,1323,4633,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwcvtu_x_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwcvtu_x_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwcvtu_x_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WcvtuV8VUInt16VBVUVU_m.c b/test/codegen-golden/WcvtuV8VUInt16VBVUVU_m.c new file mode 100644 index 0000000..0a9927a --- /dev/null +++ b/test/codegen-golden/WcvtuV8VUInt16VBVUVU_m.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r WcvtuV8VUInt16VBVUVU_m -n 1 -l 7 --has-ta --has-ma -c WcvtuV8VUInt16VBVUVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwcvtu_x_x_v_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_3_0= vwcvtu_x_x_v_u16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwcvtu_x_x_v_operator_0() { +uint16_t tmp[] = {6442,75,42,5940,58,1323,4633,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwcvtu_x_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwcvtu_x_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwcvtu_x_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WcvtuV8VUInt16VBVU_TAMA.c b/test/codegen-golden/WcvtuV8VUInt16VBVU_TAMA.c new file mode 100644 index 0000000..4a4ecde --- /dev/null +++ b/test/codegen-golden/WcvtuV8VUInt16VBVU_TAMA.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r WcvtuV8VUInt16VBVU_TAMA -n 1 -l 7 --has-ta --has-ma -c WcvtuV8VUInt16VBVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwcvtu_x_x_v_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint16m2_t vec_value_2_0= vwcvtu_x_x_v_u16m2_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_u16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwcvtu_x_x_v_operator_0() { +uint16_t tmp[] = {65535,65535,42,65535,58,65535,65535,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwcvtu_x_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwcvtu_x_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwcvtu_x_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WcvtuV8VUInt16VU.c b/test/codegen-golden/WcvtuV8VUInt16VU.c new file mode 100644 index 0000000..d59ad92 --- /dev/null +++ b/test/codegen-golden/WcvtuV8VUInt16VU.c @@ -0,0 +1,60 @@ +// COMMAND: random_gen -r WcvtuV8VUInt16VU -n 1 -l 7 --has-ta --has-ma -c WcvtuV8VUInt16VU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint16_t value_1[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vwcvtu_x_x_v_operator_0() { +uint8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint16m2_t vec_value_1_0= vwcvtu_x_x_v_u16m2(vec_value_0_0, vl); + +vse16_v_u16m2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vwcvtu_x_x_v_operator_0() { +uint16_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vwcvtu_x_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwcvtu_x_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vwcvtu_x_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WcvtuV8VUInt16VUVU_TU.c b/test/codegen-golden/WcvtuV8VUInt16VUVU_TU.c new file mode 100644 index 0000000..0a7203d --- /dev/null +++ b/test/codegen-golden/WcvtuV8VUInt16VUVU_TU.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r WcvtuV8VUInt16VUVU_TU -n 1 -l 7 --has-ta --has-ma -c WcvtuV8VUInt16VUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwcvtu_x_x_v_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint16m2_t vec_value_2_0= vwcvtu_x_x_v_u16m2_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_u16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwcvtu_x_x_v_operator_0() { +uint16_t tmp[] = {39,8946,42,4291,58,1387,37,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwcvtu_x_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwcvtu_x_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwcvtu_x_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WcvtuV8VUInt16VU_TA.c b/test/codegen-golden/WcvtuV8VUInt16VU_TA.c new file mode 100644 index 0000000..170882f --- /dev/null +++ b/test/codegen-golden/WcvtuV8VUInt16VU_TA.c @@ -0,0 +1,61 @@ +// COMMAND: random_gen -r WcvtuV8VUInt16VU_TA -n 1 -l 7 --has-ta --has-ma -c WcvtuV8VUInt16VU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint16_t value_1[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vwcvtu_x_x_v_operator_0() { +uint8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint16m2_t vec_value_1_0= vwcvtu_x_x_v_u16m2_ta(vec_value_0_0, tail_vl); + +vse16_v_u16m2(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vwcvtu_x_x_v_operator_0() { +uint16_t tmp[] = {22,65535,78,65535,63,65535,22,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vwcvtu_x_x_v_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwcvtu_x_x_v_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vwcvtu_x_x_v_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccVV8VInt16.c b/test/codegen-golden/WmaccVV8VInt16.c new file mode 100644 index 0000000..e28757d --- /dev/null +++ b/test/codegen-golden/WmaccVV8VInt16.c @@ -0,0 +1,90 @@ +// COMMAND: random_gen -r WmaccVV8VInt16 -n 1 -l 7 --has-ta --has-ma -c WmaccVV8VInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmacc_vv_operator_0() { +int16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwmacc_vv_i16m2(vec_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmacc_vv_operator_0() { +int16_t tmp[] = {-6184,12093,5158,-1189,2964,-2416,-5448,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccVV8VInt16VBVIVIVI_TAMA.c b/test/codegen-golden/WmaccVV8VInt16VBVIVIVI_TAMA.c new file mode 100644 index 0000000..5c8477c --- /dev/null +++ b/test/codegen-golden/WmaccVV8VInt16VBVIVIVI_TAMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WmaccVV8VInt16VBVIVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c WmaccVV8VInt16VBVIVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmacc_vv_i16m2_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmacc_vv_operator_0() { +int16_t tmp[] = {-1,-1,1373,-1,1679,-1,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccVV8VInt16VBVIVIVI_TAMU.c b/test/codegen-golden/WmaccVV8VInt16VBVIVIVI_TAMU.c new file mode 100644 index 0000000..f9eebe5 --- /dev/null +++ b/test/codegen-golden/WmaccVV8VInt16VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WmaccVV8VInt16VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c WmaccVV8VInt16VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmacc_vv_i16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmacc_vv_operator_0() { +int16_t tmp[] = {2884,-1,1373,-1,1679,-1,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccVV8VInt16VBVIVIVI_TUMA.c b/test/codegen-golden/WmaccVV8VInt16VBVIVIVI_TUMA.c new file mode 100644 index 0000000..b955255 --- /dev/null +++ b/test/codegen-golden/WmaccVV8VInt16VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WmaccVV8VInt16VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c WmaccVV8VInt16VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmacc_vv_i16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmacc_vv_operator_0() { +int16_t tmp[] = {-1,8399,1373,1879,1679,-7354,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccVV8VInt16VBVIVIVI_TUMU.c b/test/codegen-golden/WmaccVV8VInt16VBVIVIVI_TUMU.c new file mode 100644 index 0000000..4c6dbff --- /dev/null +++ b/test/codegen-golden/WmaccVV8VInt16VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WmaccVV8VInt16VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c WmaccVV8VInt16VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmacc_vv_i16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmacc_vv_operator_0() { +int16_t tmp[] = {2884,8399,1373,1879,1679,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccVV8VInt16VIVIVI_TA.c b/test/codegen-golden/WmaccVV8VInt16VIVIVI_TA.c new file mode 100644 index 0000000..fa1e0b6 --- /dev/null +++ b/test/codegen-golden/WmaccVV8VInt16VIVIVI_TA.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r WmaccVV8VInt16VIVIVI_TA -n 1 -l 7 --has-ta --has-ma -c WmaccVV8VInt16VIVIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmacc_vv_operator_0() { +int16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwmacc_vv_i16m2_ta(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmacc_vv_operator_0() { +int16_t tmp[] = {-6184,-1,5158,-1,2964,-1,-5448,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccVV8VInt16VIVIVI_TU.c b/test/codegen-golden/WmaccVV8VInt16VIVIVI_TU.c new file mode 100644 index 0000000..435f5bf --- /dev/null +++ b/test/codegen-golden/WmaccVV8VInt16VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r WmaccVV8VInt16VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c WmaccVV8VInt16VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmacc_vv_operator_0() { +int16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwmacc_vv_i16m2_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmacc_vv_operator_0() { +int16_t tmp[] = {-6184,7893,5158,-1417,2964,-7226,-5448,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccVV8VInt16_m.c b/test/codegen-golden/WmaccVV8VInt16_m.c new file mode 100644 index 0000000..3b6b9b5 --- /dev/null +++ b/test/codegen-golden/WmaccVV8VInt16_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r WmaccVV8VInt16_m -n 1 -l 7 --has-ta --has-ma -c WmaccVV8VInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmacc_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmacc_vv_i16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmacc_vv_operator_0() { +int16_t tmp[] = {2884,6999,1373,1879,1679,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmacc_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmacc_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmacc_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccVX8VInt16.c b/test/codegen-golden/WmaccVX8VInt16.c new file mode 100644 index 0000000..235c1fe --- /dev/null +++ b/test/codegen-golden/WmaccVX8VInt16.c @@ -0,0 +1,87 @@ +// COMMAND: random_gen -r WmaccVX8VInt16 -n 1 -l 7 --has-ta --has-ma -c WmaccVX8VInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vwmacc_vx_operator_0() { +int16_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwmacc_vx_i16m2(vec_value_0_0, placeholder1, vec_value_2_0, vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmacc_vx_operator_0() { +int16_t tmp[] = {-6184,9343,5023,-1069,3060,-9111,-6384,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmacc_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmacc_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmacc_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccVX8VInt16VBVISIVI_TAMA.c b/test/codegen-golden/WmaccVX8VInt16VBVISIVI_TAMA.c new file mode 100644 index 0000000..2706745 --- /dev/null +++ b/test/codegen-golden/WmaccVX8VInt16VBVISIVI_TAMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmaccVX8VInt16VBVISIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c WmaccVX8VInt16VBVISIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vwmacc_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmacc_vx_i16m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmacc_vx_operator_0() { +int16_t tmp[] = {-1,-1,908,-1,3423,-1,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmacc_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmacc_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmacc_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccVX8VInt16VBVISIVI_TAMU.c b/test/codegen-golden/WmaccVX8VInt16VBVISIVI_TAMU.c new file mode 100644 index 0000000..21d7592 --- /dev/null +++ b/test/codegen-golden/WmaccVX8VInt16VBVISIVI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmaccVX8VInt16VBVISIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c WmaccVX8VInt16VBVISIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vwmacc_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmacc_vx_i16m2_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmacc_vx_operator_0() { +int16_t tmp[] = {2884,-1,908,-1,3423,-1,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmacc_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmacc_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmacc_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccVX8VInt16VBVISIVI_TUMA.c b/test/codegen-golden/WmaccVX8VInt16VBVISIVI_TUMA.c new file mode 100644 index 0000000..9a0feb3 --- /dev/null +++ b/test/codegen-golden/WmaccVX8VInt16VBVISIVI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmaccVX8VInt16VBVISIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c WmaccVX8VInt16VBVISIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vwmacc_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmacc_vx_i16m2_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmacc_vx_operator_0() { +int16_t tmp[] = {-1,8399,908,1879,3423,-7354,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmacc_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmacc_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmacc_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccVX8VInt16VBVISIVI_TUMU.c b/test/codegen-golden/WmaccVX8VInt16VBVISIVI_TUMU.c new file mode 100644 index 0000000..33cfc64 --- /dev/null +++ b/test/codegen-golden/WmaccVX8VInt16VBVISIVI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmaccVX8VInt16VBVISIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c WmaccVX8VInt16VBVISIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vwmacc_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmacc_vx_i16m2_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmacc_vx_operator_0() { +int16_t tmp[] = {2884,8399,908,1879,3423,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmacc_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmacc_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmacc_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccVX8VInt16VISIVI_TA.c b/test/codegen-golden/WmaccVX8VInt16VISIVI_TA.c new file mode 100644 index 0000000..08fa542 --- /dev/null +++ b/test/codegen-golden/WmaccVX8VInt16VISIVI_TA.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r WmaccVX8VInt16VISIVI_TA -n 1 -l 7 --has-ta --has-ma -c WmaccVX8VInt16VISIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vwmacc_vx_operator_0() { +int16_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwmacc_vx_i16m2_ta(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmacc_vx_operator_0() { +int16_t tmp[] = {-6184,-1,5023,-1,3060,-1,-6384,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmacc_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmacc_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmacc_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccVX8VInt16VISIVI_TU.c b/test/codegen-golden/WmaccVX8VInt16VISIVI_TU.c new file mode 100644 index 0000000..46bb729 --- /dev/null +++ b/test/codegen-golden/WmaccVX8VInt16VISIVI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r WmaccVX8VInt16VISIVI_TU -n 1 -l 7 --has-ta --has-ma -c WmaccVX8VInt16VISIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vwmacc_vx_operator_0() { +int16_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwmacc_vx_i16m2_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmacc_vx_operator_0() { +int16_t tmp[] = {-6184,7893,5023,-1417,3060,-7226,-6384,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmacc_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmacc_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmacc_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccVX8VInt16_m.c b/test/codegen-golden/WmaccVX8VInt16_m.c new file mode 100644 index 0000000..78d1ea5 --- /dev/null +++ b/test/codegen-golden/WmaccVX8VInt16_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r WmaccVX8VInt16_m -n 1 -l 7 --has-ta --has-ma -c WmaccVX8VInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vwmacc_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmacc_vx_i16m2_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmacc_vx_operator_0() { +int16_t tmp[] = {2884,11899,908,1879,3423,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmacc_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmacc_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmacc_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccsuVV8VInt16.c b/test/codegen-golden/WmaccsuVV8VInt16.c new file mode 100644 index 0000000..98b9a8c --- /dev/null +++ b/test/codegen-golden/WmaccsuVV8VInt16.c @@ -0,0 +1,90 @@ +// COMMAND: random_gen -r WmaccsuVV8VInt16 -n 1 -l 7 --has-ta --has-ma -c WmaccsuVV8VInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmaccsu_vv_operator_0() { +int16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwmaccsu_vv_i16m2(vec_value_0_0, vec_value_1_0, vec_value_2_0, vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmaccsu_vv_operator_0() { +int16_t tmp[] = {-4415,14193,6298,-353,3930,-8558,-5889,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmaccsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmaccsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccsuVV8VInt16VBVIVIVU_TAMA.c b/test/codegen-golden/WmaccsuVV8VInt16VBVIVIVU_TAMA.c new file mode 100644 index 0000000..038b53f --- /dev/null +++ b/test/codegen-golden/WmaccsuVV8VInt16VBVIVIVU_TAMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WmaccsuVV8VInt16VBVIVIVU_TAMA -n 1 -l 7 --has-ta --has-ma -c WmaccsuVV8VInt16VBVIVIVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmaccsu_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmaccsu_vv_i16m2_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmaccsu_vv_operator_0() { +int16_t tmp[] = {-1,-1,3596,-1,41,-1,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmaccsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmaccsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccsuVV8VInt16VBVIVIVU_TAMU.c b/test/codegen-golden/WmaccsuVV8VInt16VBVIVIVU_TAMU.c new file mode 100644 index 0000000..e5a2afb --- /dev/null +++ b/test/codegen-golden/WmaccsuVV8VInt16VBVIVIVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WmaccsuVV8VInt16VBVIVIVU_TAMU -n 1 -l 7 --has-ta --has-ma -c WmaccsuVV8VInt16VBVIVIVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmaccsu_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmaccsu_vv_i16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmaccsu_vv_operator_0() { +int16_t tmp[] = {2884,-1,3596,-1,41,-1,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmaccsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmaccsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccsuVV8VInt16VBVIVIVU_TUMA.c b/test/codegen-golden/WmaccsuVV8VInt16VBVIVIVU_TUMA.c new file mode 100644 index 0000000..3935c90 --- /dev/null +++ b/test/codegen-golden/WmaccsuVV8VInt16VBVIVIVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WmaccsuVV8VInt16VBVIVIVU_TUMA -n 1 -l 7 --has-ta --has-ma -c WmaccsuVV8VInt16VBVIVIVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmaccsu_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmaccsu_vv_i16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmaccsu_vv_operator_0() { +int16_t tmp[] = {-1,8399,3596,1879,41,-7354,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmaccsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmaccsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccsuVV8VInt16VBVIVIVU_TUMU.c b/test/codegen-golden/WmaccsuVV8VInt16VBVIVIVU_TUMU.c new file mode 100644 index 0000000..4a37b57 --- /dev/null +++ b/test/codegen-golden/WmaccsuVV8VInt16VBVIVIVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WmaccsuVV8VInt16VBVIVIVU_TUMU -n 1 -l 7 --has-ta --has-ma -c WmaccsuVV8VInt16VBVIVIVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmaccsu_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmaccsu_vv_i16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmaccsu_vv_operator_0() { +int16_t tmp[] = {2884,8399,3596,1879,41,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmaccsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmaccsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccsuVV8VInt16VIVIVU_TA.c b/test/codegen-golden/WmaccsuVV8VInt16VIVIVU_TA.c new file mode 100644 index 0000000..db75050 --- /dev/null +++ b/test/codegen-golden/WmaccsuVV8VInt16VIVIVU_TA.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r WmaccsuVV8VInt16VIVIVU_TA -n 1 -l 7 --has-ta --has-ma -c WmaccsuVV8VInt16VIVIVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmaccsu_vv_operator_0() { +int16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwmaccsu_vv_i16m2_ta(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmaccsu_vv_operator_0() { +int16_t tmp[] = {-4415,-1,6298,-1,3930,-1,-5889,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmaccsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmaccsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccsuVV8VInt16VIVIVU_TU.c b/test/codegen-golden/WmaccsuVV8VInt16VIVIVU_TU.c new file mode 100644 index 0000000..fa3de1a --- /dev/null +++ b/test/codegen-golden/WmaccsuVV8VInt16VIVIVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r WmaccsuVV8VInt16VIVIVU_TU -n 1 -l 7 --has-ta --has-ma -c WmaccsuVV8VInt16VIVIVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmaccsu_vv_operator_0() { +int16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwmaccsu_vv_i16m2_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmaccsu_vv_operator_0() { +int16_t tmp[] = {-4415,7893,6298,-1417,3930,-7226,-5889,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmaccsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmaccsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccsuVV8VInt16_m.c b/test/codegen-golden/WmaccsuVV8VInt16_m.c new file mode 100644 index 0000000..0bec34a --- /dev/null +++ b/test/codegen-golden/WmaccsuVV8VInt16_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r WmaccsuVV8VInt16_m -n 1 -l 7 --has-ta --has-ma -c WmaccsuVV8VInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmaccsu_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmaccsu_vv_i16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmaccsu_vv_operator_0() { +int16_t tmp[] = {2884,6299,3596,1879,41,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmaccsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmaccsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccsuVX8VInt16.c b/test/codegen-golden/WmaccsuVX8VInt16.c new file mode 100644 index 0000000..f169be2 --- /dev/null +++ b/test/codegen-golden/WmaccsuVX8VInt16.c @@ -0,0 +1,87 @@ +// COMMAND: random_gen -r WmaccsuVX8VInt16 -n 1 -l 7 --has-ta --has-ma -c WmaccsuVX8VInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1; +uint8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vwmaccsu_vx_operator_0() { +int16_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwmaccsu_vx_i16m2(vec_value_0_0, placeholder1, vec_value_2_0, vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmaccsu_vx_operator_0() { +int16_t tmp[] = {-4415,10068,6676,207,4278,-6704,-4557,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmaccsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmaccsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccsuVX8VInt16VBVISIVU_TAMA.c b/test/codegen-golden/WmaccsuVX8VInt16VBVISIVU_TAMA.c new file mode 100644 index 0000000..05b4b3f --- /dev/null +++ b/test/codegen-golden/WmaccsuVX8VInt16VBVISIVU_TAMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmaccsuVX8VInt16VBVISIVU_TAMA -n 1 -l 7 --has-ta --has-ma -c WmaccsuVX8VInt16VBVISIVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2; +uint8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vwmaccsu_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmaccsu_vx_i16m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmaccsu_vx_operator_0() { +int16_t tmp[] = {-1,-1,4898,-1,6363,-1,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmaccsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmaccsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccsuVX8VInt16VBVISIVU_TAMU.c b/test/codegen-golden/WmaccsuVX8VInt16VBVISIVU_TAMU.c new file mode 100644 index 0000000..f2cd945 --- /dev/null +++ b/test/codegen-golden/WmaccsuVX8VInt16VBVISIVU_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmaccsuVX8VInt16VBVISIVU_TAMU -n 1 -l 7 --has-ta --has-ma -c WmaccsuVX8VInt16VBVISIVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2; +uint8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vwmaccsu_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmaccsu_vx_i16m2_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmaccsu_vx_operator_0() { +int16_t tmp[] = {2884,-1,4898,-1,6363,-1,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmaccsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmaccsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccsuVX8VInt16VBVISIVU_TUMA.c b/test/codegen-golden/WmaccsuVX8VInt16VBVISIVU_TUMA.c new file mode 100644 index 0000000..42491eb --- /dev/null +++ b/test/codegen-golden/WmaccsuVX8VInt16VBVISIVU_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmaccsuVX8VInt16VBVISIVU_TUMA -n 1 -l 7 --has-ta --has-ma -c WmaccsuVX8VInt16VBVISIVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2; +uint8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vwmaccsu_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmaccsu_vx_i16m2_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmaccsu_vx_operator_0() { +int16_t tmp[] = {-1,8399,4898,1879,6363,-7354,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmaccsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmaccsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccsuVX8VInt16VBVISIVU_TUMU.c b/test/codegen-golden/WmaccsuVX8VInt16VBVISIVU_TUMU.c new file mode 100644 index 0000000..2941d2a --- /dev/null +++ b/test/codegen-golden/WmaccsuVX8VInt16VBVISIVU_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmaccsuVX8VInt16VBVISIVU_TUMU -n 1 -l 7 --has-ta --has-ma -c WmaccsuVX8VInt16VBVISIVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2; +uint8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vwmaccsu_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmaccsu_vx_i16m2_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmaccsu_vx_operator_0() { +int16_t tmp[] = {2884,8399,4898,1879,6363,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmaccsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmaccsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccsuVX8VInt16VISIVU_TA.c b/test/codegen-golden/WmaccsuVX8VInt16VISIVU_TA.c new file mode 100644 index 0000000..186d656 --- /dev/null +++ b/test/codegen-golden/WmaccsuVX8VInt16VISIVU_TA.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r WmaccsuVX8VInt16VISIVU_TA -n 1 -l 7 --has-ta --has-ma -c WmaccsuVX8VInt16VISIVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1; +uint8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vwmaccsu_vx_operator_0() { +int16_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwmaccsu_vx_i16m2_ta(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmaccsu_vx_operator_0() { +int16_t tmp[] = {-4415,-1,6676,-1,4278,-1,-4557,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmaccsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmaccsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccsuVX8VInt16VISIVU_TU.c b/test/codegen-golden/WmaccsuVX8VInt16VISIVU_TU.c new file mode 100644 index 0000000..f8becba --- /dev/null +++ b/test/codegen-golden/WmaccsuVX8VInt16VISIVU_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r WmaccsuVX8VInt16VISIVU_TU -n 1 -l 7 --has-ta --has-ma -c WmaccsuVX8VInt16VISIVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1; +uint8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = 29; +value_1 = tmp; +} +void vwmaccsu_vx_operator_0() { +int16_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwmaccsu_vx_i16m2_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmaccsu_vx_operator_0() { +int16_t tmp[] = {-4415,7893,6676,-1417,4278,-7226,-4557,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmaccsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmaccsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccsuVX8VInt16_m.c b/test/codegen-golden/WmaccsuVX8VInt16_m.c new file mode 100644 index 0000000..9cf094c --- /dev/null +++ b/test/codegen-golden/WmaccsuVX8VInt16_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r WmaccsuVX8VInt16_m -n 1 -l 7 --has-ta --has-ma -c WmaccsuVX8VInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2; +uint8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = 70; +value_2 = tmp; +} +void vwmaccsu_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmaccsu_vx_i16m2_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmaccsu_vx_operator_0() { +int16_t tmp[] = {2884,13649,4898,1879,6363,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmaccsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmaccsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccuVV8VUInt16VBVUVUVU_TAMA.c b/test/codegen-golden/WmaccuVV8VUInt16VBVUVUVU_TAMA.c new file mode 100644 index 0000000..86ef0e9 --- /dev/null +++ b/test/codegen-golden/WmaccuVV8VUInt16VBVUVUVU_TAMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WmaccuVV8VUInt16VBVUVUVU_TAMA -n 1 -l 7 --has-ta --has-ma -c WmaccuVV8VUInt16VBVUVUVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmaccu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwmaccu_vv_u16m2_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmaccu_vv_operator_0() { +uint16_t tmp[] = {65535,65535,8919,65535,7950,65535,65535,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmaccu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmaccu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccuVV8VUInt16VBVUVUVU_TAMU.c b/test/codegen-golden/WmaccuVV8VUInt16VBVUVUVU_TAMU.c new file mode 100644 index 0000000..dfb304b --- /dev/null +++ b/test/codegen-golden/WmaccuVV8VUInt16VBVUVUVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WmaccuVV8VUInt16VBVUVUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c WmaccuVV8VUInt16VBVUVUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmaccu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwmaccu_vv_u16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmaccu_vv_operator_0() { +uint16_t tmp[] = {6442,65535,8919,65535,7950,65535,4633,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmaccu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmaccu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccuVV8VUInt16VBVUVUVU_TUMA.c b/test/codegen-golden/WmaccuVV8VUInt16VBVUVUVU_TUMA.c new file mode 100644 index 0000000..324fa4c --- /dev/null +++ b/test/codegen-golden/WmaccuVV8VUInt16VBVUVUVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WmaccuVV8VUInt16VBVUVUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c WmaccuVV8VUInt16VBVUVUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmaccu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwmaccu_vv_u16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmaccu_vv_operator_0() { +uint16_t tmp[] = {65535,9200,8919,5940,7950,1323,65535,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmaccu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmaccu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccuVV8VUInt16VBVUVUVU_TUMU.c b/test/codegen-golden/WmaccuVV8VUInt16VBVUVUVU_TUMU.c new file mode 100644 index 0000000..3387af3 --- /dev/null +++ b/test/codegen-golden/WmaccuVV8VUInt16VBVUVUVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WmaccuVV8VUInt16VBVUVUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c WmaccuVV8VUInt16VBVUVUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmaccu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwmaccu_vv_u16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmaccu_vv_operator_0() { +uint16_t tmp[] = {6442,9200,8919,5940,7950,1323,4633,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmaccu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmaccu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccuVV8VUInt16VUVUVU_TA.c b/test/codegen-golden/WmaccuVV8VUInt16VUVUVU_TA.c new file mode 100644 index 0000000..9552f92 --- /dev/null +++ b/test/codegen-golden/WmaccuVV8VUInt16VUVUVU_TA.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r WmaccuVV8VUInt16VUVUVU_TA -n 1 -l 7 --has-ta --has-ma -c WmaccuVV8VUInt16VUVUVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmaccu_vv_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_3_0= vwmaccu_vv_u16m2_ta(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmaccu_vv_operator_0() { +uint16_t tmp[] = {4762,65535,10249,65535,9894,65535,3887,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmaccu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmaccu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccuVV8VUInt16VUVUVU_TU.c b/test/codegen-golden/WmaccuVV8VUInt16VUVUVU_TU.c new file mode 100644 index 0000000..4d2f5c6 --- /dev/null +++ b/test/codegen-golden/WmaccuVV8VUInt16VUVUVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r WmaccuVV8VUInt16VUVUVU_TU -n 1 -l 7 --has-ta --has-ma -c WmaccuVV8VUInt16VUVUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmaccu_vv_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_3_0= vwmaccu_vv_u16m2_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmaccu_vv_operator_0() { +uint16_t tmp[] = {4762,8946,10249,4291,9894,1387,3887,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmaccu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmaccu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccuVX8VUInt16VBVUSUVU_TAMA.c b/test/codegen-golden/WmaccuVX8VUInt16VBVUSUVU_TAMA.c new file mode 100644 index 0000000..2ff6854 --- /dev/null +++ b/test/codegen-golden/WmaccuVX8VUInt16VBVUSUVU_TAMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmaccuVX8VUInt16VBVUSUVU_TAMA -n 1 -l 7 --has-ta --has-ma -c WmaccuVX8VUInt16VBVUSUVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 85; +value_2 = tmp; +} +void vwmaccu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwmaccu_vx_u16m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmaccu_vx_operator_0() { +uint16_t tmp[] = {65535,65535,9549,65535,11082,65535,65535,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmaccu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmaccu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccuVX8VUInt16VBVUSUVU_TAMU.c b/test/codegen-golden/WmaccuVX8VUInt16VBVUSUVU_TAMU.c new file mode 100644 index 0000000..bd2ef3d --- /dev/null +++ b/test/codegen-golden/WmaccuVX8VUInt16VBVUSUVU_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmaccuVX8VUInt16VBVUSUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c WmaccuVX8VUInt16VBVUSUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 85; +value_2 = tmp; +} +void vwmaccu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwmaccu_vx_u16m2_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmaccu_vx_operator_0() { +uint16_t tmp[] = {6442,65535,9549,65535,11082,65535,4633,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmaccu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmaccu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccuVX8VUInt16VBVUSUVU_TUMA.c b/test/codegen-golden/WmaccuVX8VUInt16VBVUSUVU_TUMA.c new file mode 100644 index 0000000..986f626 --- /dev/null +++ b/test/codegen-golden/WmaccuVX8VUInt16VBVUSUVU_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmaccuVX8VUInt16VBVUSUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c WmaccuVX8VUInt16VBVUSUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 85; +value_2 = tmp; +} +void vwmaccu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwmaccu_vx_u16m2_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmaccu_vx_operator_0() { +uint16_t tmp[] = {65535,9200,9549,5940,11082,1323,65535,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmaccu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmaccu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccuVX8VUInt16VBVUSUVU_TUMU.c b/test/codegen-golden/WmaccuVX8VUInt16VBVUSUVU_TUMU.c new file mode 100644 index 0000000..d048c71 --- /dev/null +++ b/test/codegen-golden/WmaccuVX8VUInt16VBVUSUVU_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmaccuVX8VUInt16VBVUSUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c WmaccuVX8VUInt16VBVUSUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 85; +value_2 = tmp; +} +void vwmaccu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwmaccu_vx_u16m2_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmaccu_vx_operator_0() { +uint16_t tmp[] = {6442,9200,9549,5940,11082,1323,4633,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmaccu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmaccu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccuVX8VUInt16VUSUVU_TA.c b/test/codegen-golden/WmaccuVX8VUInt16VUSUVU_TA.c new file mode 100644 index 0000000..b9238fb --- /dev/null +++ b/test/codegen-golden/WmaccuVX8VUInt16VUSUVU_TA.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r WmaccuVX8VUInt16VUSUVU_TA -n 1 -l 7 --has-ta --has-ma -c WmaccuVX8VUInt16VUSUVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1; +uint8_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 65; +value_1 = tmp; +} +void vwmaccu_vx_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_3_0= vwmaccu_vx_u16m2_ta(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmaccu_vx_operator_0() { +uint16_t tmp[] = {4762,65535,10459,65535,10068,65535,4590,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmaccu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmaccu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccuVX8VUInt16VUSUVU_TU.c b/test/codegen-golden/WmaccuVX8VUInt16VUSUVU_TU.c new file mode 100644 index 0000000..9f2cf07 --- /dev/null +++ b/test/codegen-golden/WmaccuVX8VUInt16VUSUVU_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r WmaccuVX8VUInt16VUSUVU_TU -n 1 -l 7 --has-ta --has-ma -c WmaccuVX8VUInt16VUSUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1; +uint8_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 65; +value_1 = tmp; +} +void vwmaccu_vx_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_3_0= vwmaccu_vx_u16m2_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmaccu_vx_operator_0() { +uint16_t tmp[] = {4762,8946,10459,4291,10068,1387,4590,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmaccu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmaccu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccusVX8VInt16.c b/test/codegen-golden/WmaccusVX8VInt16.c new file mode 100644 index 0000000..5e296db --- /dev/null +++ b/test/codegen-golden/WmaccusVX8VInt16.c @@ -0,0 +1,87 @@ +// COMMAND: random_gen -r WmaccusVX8VInt16 -n 1 -l 7 --has-ta --has-ma -c WmaccusVX8VInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +uint8_t value_1; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 65; +value_1 = tmp; +} +void vwmaccus_vx_operator_0() { +int16_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwmaccus_vx_i16m2(vec_value_0_0, placeholder1, vec_value_2_0, vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmaccus_vx_operator_0() { +int16_t tmp[] = {-6976,11143,4483,-637,3636,-11451,-7320,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmaccus_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccus_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmaccus_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccusVX8VInt16VBVISUVI_TAMA.c b/test/codegen-golden/WmaccusVX8VInt16VBVISUVI_TAMA.c new file mode 100644 index 0000000..d9a0882 --- /dev/null +++ b/test/codegen-golden/WmaccusVX8VInt16VBVISUVI_TAMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmaccusVX8VInt16VBVISUVI_TAMA -n 1 -l 7 --has-ta --has-ma -c WmaccusVX8VInt16VBVISUVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +uint8_t value_2; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 85; +value_2 = tmp; +} +void vwmaccus_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmaccus_vx_i16m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmaccus_vx_operator_0() { +int16_t tmp[] = {-1,-1,683,-1,3663,-1,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmaccus_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccus_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmaccus_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccusVX8VInt16VBVISUVI_TAMU.c b/test/codegen-golden/WmaccusVX8VInt16VBVISUVI_TAMU.c new file mode 100644 index 0000000..8741b12 --- /dev/null +++ b/test/codegen-golden/WmaccusVX8VInt16VBVISUVI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmaccusVX8VInt16VBVISUVI_TAMU -n 1 -l 7 --has-ta --has-ma -c WmaccusVX8VInt16VBVISUVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +uint8_t value_2; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 85; +value_2 = tmp; +} +void vwmaccus_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmaccus_vx_i16m2_tamu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmaccus_vx_operator_0() { +int16_t tmp[] = {2884,-1,683,-1,3663,-1,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmaccus_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccus_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmaccus_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccusVX8VInt16VBVISUVI_TUMA.c b/test/codegen-golden/WmaccusVX8VInt16VBVISUVI_TUMA.c new file mode 100644 index 0000000..90e8925 --- /dev/null +++ b/test/codegen-golden/WmaccusVX8VInt16VBVISUVI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmaccusVX8VInt16VBVISUVI_TUMA -n 1 -l 7 --has-ta --has-ma -c WmaccusVX8VInt16VBVISUVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +uint8_t value_2; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 85; +value_2 = tmp; +} +void vwmaccus_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmaccus_vx_i16m2_tuma(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmaccus_vx_operator_0() { +int16_t tmp[] = {-1,8399,683,1879,3663,-7354,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmaccus_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccus_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmaccus_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccusVX8VInt16VBVISUVI_TUMU.c b/test/codegen-golden/WmaccusVX8VInt16VBVISUVI_TUMU.c new file mode 100644 index 0000000..114a2a3 --- /dev/null +++ b/test/codegen-golden/WmaccusVX8VInt16VBVISUVI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmaccusVX8VInt16VBVISUVI_TUMU -n 1 -l 7 --has-ta --has-ma -c WmaccusVX8VInt16VBVISUVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +uint8_t value_2; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 85; +value_2 = tmp; +} +void vwmaccus_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmaccus_vx_i16m2_tumu(mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmaccus_vx_operator_0() { +int16_t tmp[] = {2884,8399,683,1879,3663,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmaccus_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccus_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmaccus_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccusVX8VInt16VISUVI_TA.c b/test/codegen-golden/WmaccusVX8VInt16VISUVI_TA.c new file mode 100644 index 0000000..f35d3b7 --- /dev/null +++ b/test/codegen-golden/WmaccusVX8VInt16VISUVI_TA.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r WmaccusVX8VInt16VISUVI_TA -n 1 -l 7 --has-ta --has-ma -c WmaccusVX8VInt16VISUVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +uint8_t value_1; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 65; +value_1 = tmp; +} +void vwmaccus_vx_operator_0() { +int16_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwmaccus_vx_i16m2_ta(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmaccus_vx_operator_0() { +int16_t tmp[] = {-6976,-1,4483,-1,3636,-1,-7320,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmaccus_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccus_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmaccus_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccusVX8VInt16VISUVI_TU.c b/test/codegen-golden/WmaccusVX8VInt16VISUVI_TU.c new file mode 100644 index 0000000..25f1d1d --- /dev/null +++ b/test/codegen-golden/WmaccusVX8VInt16VISUVI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r WmaccusVX8VInt16VISUVI_TU -n 1 -l 7 --has-ta --has-ma -c WmaccusVX8VInt16VISUVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +uint8_t value_1; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 65; +value_1 = tmp; +} +void vwmaccus_vx_operator_0() { +int16_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwmaccus_vx_i16m2_tu(vec_value_0_0, placeholder1, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmaccus_vx_operator_0() { +int16_t tmp[] = {-6976,7893,4483,-1417,3636,-7226,-7320,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmaccus_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccus_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmaccus_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmaccusVX8VInt16_m.c b/test/codegen-golden/WmaccusVX8VInt16_m.c new file mode 100644 index 0000000..a92597a --- /dev/null +++ b/test/codegen-golden/WmaccusVX8VInt16_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r WmaccusVX8VInt16_m -n 1 -l 7 --has-ta --has-ma -c WmaccusVX8VInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +uint8_t value_2; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 85; +value_2 = tmp; +} +void vwmaccus_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmaccus_vx_i16m2_m (mask_value_0_0, vec_value_1_0, placeholder2, vec_value_3_0, vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmaccus_vx_operator_0() { +int16_t tmp[] = {2884,12649,683,1879,3663,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmaccus_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmaccus_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmaccus_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulVV8VInt16.c b/test/codegen-golden/WmulVV8VInt16.c new file mode 100644 index 0000000..e8c0e7b --- /dev/null +++ b/test/codegen-golden/WmulVV8VInt16.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r WmulVV8VInt16 -n 1 -l 7 --has-ta --has-ma -c WmulVV8VInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint16m2_t vec_value_2_0= vwmul_vv_i16m2(vec_value_0_0, vec_value_1_0, vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmul_vv_operator_0() { +int16_t tmp[] = {1232,3950,-825,-168,416,4745,1482,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulVV8VInt16VBVIVIVI_TAMU.c b/test/codegen-golden/WmulVV8VInt16VBVIVIVI_TAMU.c new file mode 100644 index 0000000..7fa846c --- /dev/null +++ b/test/codegen-golden/WmulVV8VInt16VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WmulVV8VInt16VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c WmulVV8VInt16VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmul_vv_i16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmul_vv_operator_0() { +int16_t tmp[] = {2884,-1,-585,-1,-624,-1,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulVV8VInt16VBVIVIVI_TUMA.c b/test/codegen-golden/WmulVV8VInt16VBVIVIVI_TUMA.c new file mode 100644 index 0000000..60c9df9 --- /dev/null +++ b/test/codegen-golden/WmulVV8VInt16VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WmulVV8VInt16VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c WmulVV8VInt16VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmul_vv_i16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmul_vv_operator_0() { +int16_t tmp[] = {-1,8399,-585,1879,-624,-7354,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulVV8VInt16VBVIVIVI_TUMU.c b/test/codegen-golden/WmulVV8VInt16VBVIVIVI_TUMU.c new file mode 100644 index 0000000..6e1e4e2 --- /dev/null +++ b/test/codegen-golden/WmulVV8VInt16VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WmulVV8VInt16VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c WmulVV8VInt16VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmul_vv_i16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmul_vv_operator_0() { +int16_t tmp[] = {2884,8399,-585,1879,-624,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulVV8VInt16VBVIVI_TAMA.c b/test/codegen-golden/WmulVV8VInt16VBVIVI_TAMA.c new file mode 100644 index 0000000..64c1497 --- /dev/null +++ b/test/codegen-golden/WmulVV8VInt16VBVIVI_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r WmulVV8VInt16VBVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c WmulVV8VInt16VBVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwmul_vv_i16m2_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmul_vv_operator_0() { +int16_t tmp[] = {-1,-1,-300,-1,368,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulVV8VInt16VIVIVI_TU.c b/test/codegen-golden/WmulVV8VInt16VIVIVI_TU.c new file mode 100644 index 0000000..5fdbb8c --- /dev/null +++ b/test/codegen-golden/WmulVV8VInt16VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r WmulVV8VInt16VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c WmulVV8VInt16VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmul_vv_operator_0() { +int16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwmul_vv_i16m2_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmul_vv_operator_0() { +int16_t tmp[] = {-638,7893,-300,-1417,368,-7226,182,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulVV8VInt16VIVI_TA.c b/test/codegen-golden/WmulVV8VInt16VIVI_TA.c new file mode 100644 index 0000000..cdc311d --- /dev/null +++ b/test/codegen-golden/WmulVV8VInt16VIVI_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r WmulVV8VInt16VIVI_TA -n 1 -l 7 --has-ta --has-ma -c WmulVV8VInt16VIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint16m2_t vec_value_2_0= vwmul_vv_i16m2_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmul_vv_operator_0() { +int16_t tmp[] = {1232,-1,-825,-1,416,-1,1482,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulVV8VInt16_m.c b/test/codegen-golden/WmulVV8VInt16_m.c new file mode 100644 index 0000000..a09b290 --- /dev/null +++ b/test/codegen-golden/WmulVV8VInt16_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r WmulVV8VInt16_m -n 1 -l 7 --has-ta --has-ma -c WmulVV8VInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmul_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmul_vv_i16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmul_vv_operator_0() { +int16_t tmp[] = {2884,-1400,-585,1879,-624,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmul_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmul_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmul_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulVX8VInt16.c b/test/codegen-golden/WmulVX8VInt16.c new file mode 100644 index 0000000..34637e1 --- /dev/null +++ b/test/codegen-golden/WmulVX8VInt16.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r WmulVX8VInt16 -n 1 -l 7 --has-ta --has-ma -c WmulVX8VInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vwmul_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint16m2_t vec_value_2_0= vwmul_vx_i16m2(vec_value_0_0, placeholder1, vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmul_vx_operator_0() { +int16_t tmp[] = {1232,-1738,-1210,308,-572,1606,1254,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulVX8VInt16VBVISI_TAMA.c b/test/codegen-golden/WmulVX8VInt16VBVISI_TAMA.c new file mode 100644 index 0000000..4df0283 --- /dev/null +++ b/test/codegen-golden/WmulVX8VInt16VBVISI_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r WmulVX8VInt16VBVISI_TAMA -n 1 -l 7 --has-ta --has-ma -c WmulVX8VInt16VBVISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmul_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint16m2_t vec_value_3_0= vwmul_vx_i16m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmul_vx_operator_0() { +int16_t tmp[] = {-1,-1,-264,-1,1430,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulVX8VInt16VBVIVISI_TAMU.c b/test/codegen-golden/WmulVX8VInt16VBVIVISI_TAMU.c new file mode 100644 index 0000000..106e5a8 --- /dev/null +++ b/test/codegen-golden/WmulVX8VInt16VBVIVISI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmulVX8VInt16VBVIVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c WmulVX8VInt16VBVIVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmul_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwmul_vx_i16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmul_vx_operator_0() { +int16_t tmp[] = {5001,-1,-418,-1,1628,-1,2884,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulVX8VInt16VBVIVISI_TUMA.c b/test/codegen-golden/WmulVX8VInt16VBVIVISI_TUMA.c new file mode 100644 index 0000000..2583205 --- /dev/null +++ b/test/codegen-golden/WmulVX8VInt16VBVIVISI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmulVX8VInt16VBVIVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c WmulVX8VInt16VBVIVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmul_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwmul_vx_i16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmul_vx_operator_0() { +int16_t tmp[] = {-1,-1530,-418,1614,1628,-2596,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulVX8VInt16VBVIVISI_TUMU.c b/test/codegen-golden/WmulVX8VInt16VBVIVISI_TUMU.c new file mode 100644 index 0000000..e910e4a --- /dev/null +++ b/test/codegen-golden/WmulVX8VInt16VBVIVISI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmulVX8VInt16VBVIVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c WmulVX8VInt16VBVIVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmul_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwmul_vx_i16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmul_vx_operator_0() { +int16_t tmp[] = {5001,-1530,-418,1614,1628,-2596,2884,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulVX8VInt16VISI_TA.c b/test/codegen-golden/WmulVX8VInt16VISI_TA.c new file mode 100644 index 0000000..c141a14 --- /dev/null +++ b/test/codegen-golden/WmulVX8VInt16VISI_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r WmulVX8VInt16VISI_TA -n 1 -l 7 --has-ta --has-ma -c WmulVX8VInt16VISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vwmul_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint16m2_t vec_value_2_0= vwmul_vx_i16m2_ta(vec_value_0_0, placeholder1, tail_vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmul_vx_operator_0() { +int16_t tmp[] = {1232,-1,-1210,-1,-572,-1,1254,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulVX8VInt16VIVISI_TU.c b/test/codegen-golden/WmulVX8VInt16VIVISI_TU.c new file mode 100644 index 0000000..61307ee --- /dev/null +++ b/test/codegen-golden/WmulVX8VInt16VIVISI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r WmulVX8VInt16VIVISI_TU -n 1 -l 7 --has-ta --has-ma -c WmulVX8VInt16VIVISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmul_vx_operator_0() { +int16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint16m2_t vec_value_3_0= vwmul_vx_i16m2_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmul_vx_operator_0() { +int16_t tmp[] = {-1100,7893,-264,-1417,1430,-7226,-638,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulVX8VInt16_m.c b/test/codegen-golden/WmulVX8VInt16_m.c new file mode 100644 index 0000000..d01b6ac --- /dev/null +++ b/test/codegen-golden/WmulVX8VInt16_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r WmulVX8VInt16_m -n 1 -l 7 --has-ta --has-ma -c WmulVX8VInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmul_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwmul_vx_i16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmul_vx_operator_0() { +int16_t tmp[] = {5001,-440,-418,1614,1628,-2596,2884,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmul_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmul_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmul_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulsuVV8VInt16.c b/test/codegen-golden/WmulsuVV8VInt16.c new file mode 100644 index 0000000..245c9c3 --- /dev/null +++ b/test/codegen-golden/WmulsuVV8VInt16.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r WmulsuVV8VInt16 -n 1 -l 7 --has-ta --has-ma -c WmulsuVV8VInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmulsu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vint16m2_t vec_value_2_0= vwmulsu_vv_i16m2(vec_value_0_0, vec_value_1_0, vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmulsu_vv_operator_0() { +int16_t tmp[] = {-2184,5925,2310,-784,1508,-1314,-2109,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwmulsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmulsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulsuVV8VInt16VBVIVIVU_TAMU.c b/test/codegen-golden/WmulsuVV8VInt16VBVIVIVU_TAMU.c new file mode 100644 index 0000000..d98fcda --- /dev/null +++ b/test/codegen-golden/WmulsuVV8VInt16VBVIVIVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WmulsuVV8VInt16VBVIVIVU_TAMU -n 1 -l 7 --has-ta --has-ma -c WmulsuVV8VInt16VBVIVIVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmulsu_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmulsu_vv_i16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmulsu_vv_operator_0() { +int16_t tmp[] = {2884,-1,1638,-1,-2262,-1,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmulsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmulsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulsuVV8VInt16VBVIVIVU_TUMA.c b/test/codegen-golden/WmulsuVV8VInt16VBVIVIVU_TUMA.c new file mode 100644 index 0000000..e44a7d6 --- /dev/null +++ b/test/codegen-golden/WmulsuVV8VInt16VBVIVIVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WmulsuVV8VInt16VBVIVIVU_TUMA -n 1 -l 7 --has-ta --has-ma -c WmulsuVV8VInt16VBVIVIVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmulsu_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmulsu_vv_i16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmulsu_vv_operator_0() { +int16_t tmp[] = {-1,8399,1638,1879,-2262,-7354,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmulsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmulsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulsuVV8VInt16VBVIVIVU_TUMU.c b/test/codegen-golden/WmulsuVV8VInt16VBVIVIVU_TUMU.c new file mode 100644 index 0000000..2f01b7e --- /dev/null +++ b/test/codegen-golden/WmulsuVV8VInt16VBVIVIVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WmulsuVV8VInt16VBVIVIVU_TUMU -n 1 -l 7 --has-ta --has-ma -c WmulsuVV8VInt16VBVIVIVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmulsu_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmulsu_vv_i16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmulsu_vv_operator_0() { +int16_t tmp[] = {2884,8399,1638,1879,-2262,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmulsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmulsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulsuVV8VInt16VBVIVU_TAMA.c b/test/codegen-golden/WmulsuVV8VInt16VBVIVU_TAMA.c new file mode 100644 index 0000000..a408657 --- /dev/null +++ b/test/codegen-golden/WmulsuVV8VInt16VBVIVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r WmulsuVV8VInt16VBVIVU_TAMA -n 1 -l 7 --has-ta --has-ma -c WmulsuVV8VInt16VBVIVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmulsu_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwmulsu_vv_i16m2_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmulsu_vv_operator_0() { +int16_t tmp[] = {-1,-1,840,-1,1334,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmulsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmulsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulsuVV8VInt16VIVIVU_TU.c b/test/codegen-golden/WmulsuVV8VInt16VIVIVU_TU.c new file mode 100644 index 0000000..05c7217 --- /dev/null +++ b/test/codegen-golden/WmulsuVV8VInt16VIVIVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r WmulsuVV8VInt16VIVIVU_TU -n 1 -l 7 --has-ta --has-ma -c WmulsuVV8VInt16VIVIVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmulsu_vv_operator_0() { +int16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwmulsu_vv_i16m2_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmulsu_vv_operator_0() { +int16_t tmp[] = {1131,7893,840,-1417,1334,-7226,-259,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmulsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmulsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulsuVV8VInt16VIVU_TA.c b/test/codegen-golden/WmulsuVV8VInt16VIVU_TA.c new file mode 100644 index 0000000..c6063f9 --- /dev/null +++ b/test/codegen-golden/WmulsuVV8VInt16VIVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r WmulsuVV8VInt16VIVU_TA -n 1 -l 7 --has-ta --has-ma -c WmulsuVV8VInt16VIVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmulsu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vint16m2_t vec_value_2_0= vwmulsu_vv_i16m2_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmulsu_vv_operator_0() { +int16_t tmp[] = {-2184,-1,2310,-1,1508,-1,-2109,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwmulsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmulsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulsuVV8VInt16_m.c b/test/codegen-golden/WmulsuVV8VInt16_m.c new file mode 100644 index 0000000..6020d04 --- /dev/null +++ b/test/codegen-golden/WmulsuVV8VInt16_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r WmulsuVV8VInt16_m -n 1 -l 7 --has-ta --has-ma -c WmulsuVV8VInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmulsu_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwmulsu_vv_i16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmulsu_vv_operator_0() { +int16_t tmp[] = {2884,-2100,1638,1879,-2262,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmulsu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulsu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmulsu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulsuVX8VInt16.c b/test/codegen-golden/WmulsuVX8VInt16.c new file mode 100644 index 0000000..adf57c8 --- /dev/null +++ b/test/codegen-golden/WmulsuVX8VInt16.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r WmulsuVX8VInt16 -n 1 -l 7 --has-ta --has-ma -c WmulsuVX8VInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vwmulsu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint16m2_t vec_value_2_0= vwmulsu_vx_i16m2(vec_value_0_0, placeholder1, vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmulsu_vx_operator_0() { +int16_t tmp[] = {-2184,3081,2145,-546,1014,-2847,-2223,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwmulsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmulsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulsuVX8VInt16VBVISU_TAMA.c b/test/codegen-golden/WmulsuVX8VInt16VBVISU_TAMA.c new file mode 100644 index 0000000..a413c32 --- /dev/null +++ b/test/codegen-golden/WmulsuVX8VInt16VBVISU_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r WmulsuVX8VInt16VBVISU_TAMA -n 1 -l 7 --has-ta --has-ma -c WmulsuVX8VInt16VBVISU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmulsu_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint16m2_t vec_value_3_0= vwmulsu_vx_i16m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmulsu_vx_operator_0() { +int16_t tmp[] = {-1,-1,468,-1,-2535,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmulsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmulsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulsuVX8VInt16VBVIVISU_TAMU.c b/test/codegen-golden/WmulsuVX8VInt16VBVIVISU_TAMU.c new file mode 100644 index 0000000..6fc31e5 --- /dev/null +++ b/test/codegen-golden/WmulsuVX8VInt16VBVIVISU_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmulsuVX8VInt16VBVIVISU_TAMU -n 1 -l 7 --has-ta --has-ma -c WmulsuVX8VInt16VBVIVISU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmulsu_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwmulsu_vx_i16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmulsu_vx_operator_0() { +int16_t tmp[] = {5001,-1,741,-1,-2886,-1,2884,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmulsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmulsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulsuVX8VInt16VBVIVISU_TUMA.c b/test/codegen-golden/WmulsuVX8VInt16VBVIVISU_TUMA.c new file mode 100644 index 0000000..31f4a74 --- /dev/null +++ b/test/codegen-golden/WmulsuVX8VInt16VBVIVISU_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmulsuVX8VInt16VBVIVISU_TUMA -n 1 -l 7 --has-ta --has-ma -c WmulsuVX8VInt16VBVIVISU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmulsu_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwmulsu_vx_i16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmulsu_vx_operator_0() { +int16_t tmp[] = {-1,-1530,741,1614,-2886,-2596,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmulsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmulsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulsuVX8VInt16VBVIVISU_TUMU.c b/test/codegen-golden/WmulsuVX8VInt16VBVIVISU_TUMU.c new file mode 100644 index 0000000..910f1d5 --- /dev/null +++ b/test/codegen-golden/WmulsuVX8VInt16VBVIVISU_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmulsuVX8VInt16VBVIVISU_TUMU -n 1 -l 7 --has-ta --has-ma -c WmulsuVX8VInt16VBVIVISU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmulsu_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwmulsu_vx_i16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmulsu_vx_operator_0() { +int16_t tmp[] = {5001,-1530,741,1614,-2886,-2596,2884,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmulsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmulsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulsuVX8VInt16VISU_TA.c b/test/codegen-golden/WmulsuVX8VInt16VISU_TA.c new file mode 100644 index 0000000..e7bdd34 --- /dev/null +++ b/test/codegen-golden/WmulsuVX8VInt16VISU_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r WmulsuVX8VInt16VISU_TA -n 1 -l 7 --has-ta --has-ma -c WmulsuVX8VInt16VISU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vwmulsu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint16m2_t vec_value_2_0= vwmulsu_vx_i16m2_ta(vec_value_0_0, placeholder1, tail_vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmulsu_vx_operator_0() { +int16_t tmp[] = {-2184,-1,2145,-1,1014,-1,-2223,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwmulsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmulsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulsuVX8VInt16VIVISU_TU.c b/test/codegen-golden/WmulsuVX8VInt16VIVISU_TU.c new file mode 100644 index 0000000..5c9e02c --- /dev/null +++ b/test/codegen-golden/WmulsuVX8VInt16VIVISU_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r WmulsuVX8VInt16VIVISU_TU -n 1 -l 7 --has-ta --has-ma -c WmulsuVX8VInt16VIVISU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1[7]; +uint8_t value_2; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmulsu_vx_operator_0() { +int16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint16m2_t vec_value_3_0= vwmulsu_vx_i16m2_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmulsu_vx_operator_0() { +int16_t tmp[] = {1950,7893,468,-1417,-2535,-7226,1131,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmulsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmulsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmulsuVX8VInt16_m.c b/test/codegen-golden/WmulsuVX8VInt16_m.c new file mode 100644 index 0000000..32bdc91 --- /dev/null +++ b/test/codegen-golden/WmulsuVX8VInt16_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r WmulsuVX8VInt16_m -n 1 -l 7 --has-ta --has-ma -c WmulsuVX8VInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +uint8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmulsu_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwmulsu_vx_i16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmulsu_vx_operator_0() { +int16_t tmp[] = {5001,780,741,1614,-2886,-2596,2884,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmulsu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulsu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmulsu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmuluVV8VUInt16.c b/test/codegen-golden/WmuluVV8VUInt16.c new file mode 100644 index 0000000..c645b92 --- /dev/null +++ b/test/codegen-golden/WmuluVV8VUInt16.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r WmuluVV8VUInt16 -n 1 -l 7 --has-ta --has-ma -c WmuluVV8VUInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmulu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint16m2_t vec_value_2_0= vwmulu_vv_u16m2(vec_value_0_0, vec_value_1_0, vl); + +vse16_v_u16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmulu_vv_operator_0() { +uint16_t tmp[] = {858,6750,3276,2408,3654,252,814,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwmulu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmulu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmuluVV8VUInt16VBVUVUVU_TAMU.c b/test/codegen-golden/WmuluVV8VUInt16VBVUVUVU_TAMU.c new file mode 100644 index 0000000..96ad062 --- /dev/null +++ b/test/codegen-golden/WmuluVV8VUInt16VBVUVUVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WmuluVV8VUInt16VBVUVUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c WmuluVV8VUInt16VBVUVUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmulu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwmulu_vv_u16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmulu_vv_operator_0() { +uint16_t tmp[] = {6442,65535,2940,65535,1798,65535,4633,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmulu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmulu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmuluVV8VUInt16VBVUVUVU_TUMA.c b/test/codegen-golden/WmuluVV8VUInt16VBVUVUVU_TUMA.c new file mode 100644 index 0000000..2f5d2d5 --- /dev/null +++ b/test/codegen-golden/WmuluVV8VUInt16VBVUVUVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WmuluVV8VUInt16VBVUVUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c WmuluVV8VUInt16VBVUVUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmulu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwmulu_vv_u16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmulu_vv_operator_0() { +uint16_t tmp[] = {65535,9200,2940,5940,1798,1323,65535,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmulu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmulu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmuluVV8VUInt16VBVUVUVU_TUMU.c b/test/codegen-golden/WmuluVV8VUInt16VBVUVUVU_TUMU.c new file mode 100644 index 0000000..68568ce --- /dev/null +++ b/test/codegen-golden/WmuluVV8VUInt16VBVUVUVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WmuluVV8VUInt16VBVUVUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c WmuluVV8VUInt16VBVUVUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmulu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwmulu_vv_u16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmulu_vv_operator_0() { +uint16_t tmp[] = {6442,9200,2940,5940,1798,1323,4633,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmulu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmulu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmuluVV8VUInt16VBVUVU_TAMA.c b/test/codegen-golden/WmuluVV8VUInt16VBVUVU_TAMA.c new file mode 100644 index 0000000..4a16672 --- /dev/null +++ b/test/codegen-golden/WmuluVV8VUInt16VBVUVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r WmuluVV8VUInt16VBVUVU_TAMA -n 1 -l 7 --has-ta --has-ma -c WmuluVV8VUInt16VBVUVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmulu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_3_0= vwmulu_vv_u16m2_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmulu_vv_operator_0() { +uint16_t tmp[] = {65535,65535,2520,65535,3596,65535,65535,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmulu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmulu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmuluVV8VUInt16VUVUVU_TU.c b/test/codegen-golden/WmuluVV8VUInt16VUVUVU_TU.c new file mode 100644 index 0000000..543a0e6 --- /dev/null +++ b/test/codegen-golden/WmuluVV8VUInt16VUVUVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r WmuluVV8VUInt16VUVUVU_TU -n 1 -l 7 --has-ta --has-ma -c WmuluVV8VUInt16VUVUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmulu_vv_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_3_0= vwmulu_vv_u16m2_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmulu_vv_operator_0() { +uint16_t tmp[] = {2535,8946,2520,4291,3596,1387,1702,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmulu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmulu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmuluVV8VUInt16VUVU_TA.c b/test/codegen-golden/WmuluVV8VUInt16VUVU_TA.c new file mode 100644 index 0000000..a63ef0f --- /dev/null +++ b/test/codegen-golden/WmuluVV8VUInt16VUVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r WmuluVV8VUInt16VUVU_TA -n 1 -l 7 --has-ta --has-ma -c WmuluVV8VUInt16VUVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmulu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint16m2_t vec_value_2_0= vwmulu_vv_u16m2_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_u16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmulu_vv_operator_0() { +uint16_t tmp[] = {858,65535,3276,65535,3654,65535,814,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwmulu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmulu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmuluVV8VUInt16_m.c b/test/codegen-golden/WmuluVV8VUInt16_m.c new file mode 100644 index 0000000..f14a64f --- /dev/null +++ b/test/codegen-golden/WmuluVV8VUInt16_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r WmuluVV8VUInt16_m -n 1 -l 7 --has-ta --has-ma -c WmuluVV8VUInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmulu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwmulu_vv_u16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmulu_vv_operator_0() { +uint16_t tmp[] = {6442,2700,2940,5940,1798,1323,4633,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmulu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmulu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmuluVX8VUInt16.c b/test/codegen-golden/WmuluVX8VUInt16.c new file mode 100644 index 0000000..837e1d1 --- /dev/null +++ b/test/codegen-golden/WmuluVX8VUInt16.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r WmuluVX8VUInt16 -n 1 -l 7 --has-ta --has-ma -c WmuluVX8VUInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vwmulu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint16m2_t vec_value_2_0= vwmulu_vx_u16m2(vec_value_0_0, placeholder1, vl); + +vse16_v_u16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmulu_vx_operator_0() { +uint16_t tmp[] = {858,3510,3042,1677,2457,546,858,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwmulu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmulu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmuluVX8VUInt16VBVUSU_TAMA.c b/test/codegen-golden/WmuluVX8VUInt16VBVUSU_TAMA.c new file mode 100644 index 0000000..edd0f08 --- /dev/null +++ b/test/codegen-golden/WmuluVX8VUInt16VBVUSU_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r WmuluVX8VUInt16VBVUSU_TAMA -n 1 -l 7 --has-ta --has-ma -c WmuluVX8VUInt16VBVUSU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmulu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint16m2_t vec_value_3_0= vwmulu_vx_u16m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmulu_vx_operator_0() { +uint16_t tmp[] = {65535,65535,2184,65535,702,65535,65535,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmulu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmulu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmuluVX8VUInt16VBVUVUSU_TAMU.c b/test/codegen-golden/WmuluVX8VUInt16VBVUVUSU_TAMU.c new file mode 100644 index 0000000..0c8d0ea --- /dev/null +++ b/test/codegen-golden/WmuluVX8VUInt16VBVUVUSU_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmuluVX8VUInt16VBVUVUSU_TAMU -n 1 -l 7 --has-ta --has-ma -c WmuluVX8VUInt16VBVUVUSU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmulu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_4_0= vwmulu_vx_u16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmulu_vx_operator_0() { +uint16_t tmp[] = {7500,65535,2301,65535,507,65535,6442,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmulu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmulu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmuluVX8VUInt16VBVUVUSU_TUMA.c b/test/codegen-golden/WmuluVX8VUInt16VBVUVUSU_TUMA.c new file mode 100644 index 0000000..a6c26e5 --- /dev/null +++ b/test/codegen-golden/WmuluVX8VUInt16VBVUVUSU_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmuluVX8VUInt16VBVUVUSU_TUMA -n 1 -l 7 --has-ta --has-ma -c WmuluVX8VUInt16VBVUVUSU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmulu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_4_0= vwmulu_vx_u16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmulu_vx_operator_0() { +uint16_t tmp[] = {65535,4235,2301,5807,507,3702,65535,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmulu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmulu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmuluVX8VUInt16VBVUVUSU_TUMU.c b/test/codegen-golden/WmuluVX8VUInt16VBVUVUSU_TUMU.c new file mode 100644 index 0000000..e0cc019 --- /dev/null +++ b/test/codegen-golden/WmuluVX8VUInt16VBVUVUSU_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WmuluVX8VUInt16VBVUVUSU_TUMU -n 1 -l 7 --has-ta --has-ma -c WmuluVX8VUInt16VBVUVUSU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmulu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_4_0= vwmulu_vx_u16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmulu_vx_operator_0() { +uint16_t tmp[] = {7500,4235,2301,5807,507,3702,6442,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmulu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmulu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmuluVX8VUInt16VUSU_TA.c b/test/codegen-golden/WmuluVX8VUInt16VUSU_TA.c new file mode 100644 index 0000000..7a9642c --- /dev/null +++ b/test/codegen-golden/WmuluVX8VUInt16VUSU_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r WmuluVX8VUInt16VUSU_TA -n 1 -l 7 --has-ta --has-ma -c WmuluVX8VUInt16VUSU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vwmulu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint16m2_t vec_value_2_0= vwmulu_vx_u16m2_ta(vec_value_0_0, placeholder1, tail_vl); + +vse16_v_u16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmulu_vx_operator_0() { +uint16_t tmp[] = {858,65535,3042,65535,2457,65535,858,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwmulu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmulu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmuluVX8VUInt16VUVUSU_TU.c b/test/codegen-golden/WmuluVX8VUInt16VUVUSU_TU.c new file mode 100644 index 0000000..f139587 --- /dev/null +++ b/test/codegen-golden/WmuluVX8VUInt16VUVUSU_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r WmuluVX8VUInt16VUVUSU_TU -n 1 -l 7 --has-ta --has-ma -c WmuluVX8VUInt16VUVUSU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwmulu_vx_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint16m2_t vec_value_3_0= vwmulu_vx_u16m2_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwmulu_vx_operator_0() { +uint16_t tmp[] = {2925,8946,2184,4291,702,1387,2535,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwmulu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwmulu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WmuluVX8VUInt16_m.c b/test/codegen-golden/WmuluVX8VUInt16_m.c new file mode 100644 index 0000000..524abb6 --- /dev/null +++ b/test/codegen-golden/WmuluVX8VUInt16_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r WmuluVX8VUInt16_m -n 1 -l 7 --has-ta --has-ma -c WmuluVX8VUInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwmulu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_4_0= vwmulu_vx_u16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwmulu_vx_operator_0() { +uint16_t tmp[] = {7500,2340,2301,5807,507,3702,6442,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwmulu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwmulu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwmulu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WredsumVS8SInt16VBVIVI_TUM.c b/test/codegen-golden/WredsumVS8SInt16VBVIVI_TUM.c new file mode 100644 index 0000000..32670e6 --- /dev/null +++ b/test/codegen-golden/WredsumVS8SInt16VBVIVI_TUM.c @@ -0,0 +1,112 @@ +// COMMAND: random_gen -r WredsumVS8SInt16VBVIVI_TUM -n 1 -l 7 --has-ta --has-ma -c WredsumVS8SInt16VBVIVI_TUM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwredsum_vs_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; +int placeholder4 = 7; + +vint16m1_t placeholder5= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vint16m1_t placeholder6= vmv_v_v_i16m1(placeholder5, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_3, value_1, sizeof(value_3)); +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m1_t vec_value_1_0= vle16_v_i16m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +placeholder6 = vwredsum_vs_i8m1_i16m1_tum(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder6, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +int16_t *placeholder7 = value_3; +*placeholder7= vmv_x_s_i16m1_i16(placeholder6); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwredsum_vs_operator_0() { +int16_t tmp[] = {51,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwredsum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwredsum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwredsum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WredsumVS8SInt16VBVI_TAM.c b/test/codegen-golden/WredsumVS8SInt16VBVI_TAM.c new file mode 100644 index 0000000..59b9985 --- /dev/null +++ b/test/codegen-golden/WredsumVS8SInt16VBVI_TAM.c @@ -0,0 +1,97 @@ +// COMMAND: random_gen -r WredsumVS8SInt16VBVI_TAM -n 1 -l 7 --has-ta --has-ma -c WredsumVS8SInt16VBVI_TAM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwredsum_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int placeholder3 = 7; + +vint16m1_t placeholder4= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vint16m1_t placeholder5= vmv_v_v_i16m1(placeholder4, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_2, 0xff, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +placeholder5 = vwredsum_vs_i8m1_i16m1_tam(mask_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +int16_t *placeholder6 = value_2; +*placeholder6= vmv_x_s_i16m1_i16(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwredsum_vs_operator_0() { +int16_t tmp[] = {51,-1,-1,-1,-1,-1,-1,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwredsum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwredsum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwredsum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WredsumVS8SInt16VBVI_m.c b/test/codegen-golden/WredsumVS8SInt16VBVI_m.c new file mode 100644 index 0000000..a1a7266 --- /dev/null +++ b/test/codegen-golden/WredsumVS8SInt16VBVI_m.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r WredsumVS8SInt16VBVI_m -n 1 -l 7 --has-ta --has-ma -c WredsumVS8SInt16VBVI_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwredsum_vs_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = &value_2; +int placeholder3 = 7; + +vint16m1_t placeholder4= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vint16m1_t placeholder5= vmv_v_v_i16m1(placeholder4, vsetvlmax_e16m1()); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +placeholder5 = vwredsum_vs_i8m1_i16m1_m (mask_value_0_0, placeholder5, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +} +int16_t *placeholder6 = &value_2; +*placeholder6= vmv_x_s_i16m1_i16(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwredsum_vs_operator_0() { +int16_t tmp = 51; +if(value_2 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwredsum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwredsum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwredsum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WredsumVS8SInt16VI.c b/test/codegen-golden/WredsumVS8SInt16VI.c new file mode 100644 index 0000000..613bbe9 --- /dev/null +++ b/test/codegen-golden/WredsumVS8SInt16VI.c @@ -0,0 +1,57 @@ +// COMMAND: random_gen -r WredsumVS8SInt16VI -n 1 -l 7 --has-ta --has-ma -c WredsumVS8SInt16VI.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vwredsum_vs_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = &value_1; +int placeholder2 = 7; + +vint16m1_t placeholder3= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vint16m1_t placeholder4= vmv_v_v_i16m1(placeholder3, vsetvlmax_e16m1()); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +placeholder4 = vwredsum_vs_i8m1_i16m1(placeholder4, vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +} +int16_t *placeholder5 = &value_1; +*placeholder5= vmv_x_s_i16m1_i16(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vwredsum_vs_operator_0() { +int16_t tmp = -40; +if(value_1 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vwredsum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwredsum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vwredsum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WredsumVS8SInt16VIVI_TU.c b/test/codegen-golden/WredsumVS8SInt16VIVI_TU.c new file mode 100644 index 0000000..bbd72ae --- /dev/null +++ b/test/codegen-golden/WredsumVS8SInt16VIVI_TU.c @@ -0,0 +1,96 @@ +// COMMAND: random_gen -r WredsumVS8SInt16VIVI_TU -n 1 -l 7 --has-ta --has-ma -c WredsumVS8SInt16VIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwredsum_vs_operator_0() { +int16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int placeholder3 = 7; + +vint16m1_t placeholder4= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vint16m1_t placeholder5= vmv_v_v_i16m1(placeholder4, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_2, value_0, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint16m1_t vec_value_0_0= vle16_v_i16m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +placeholder5 = vwredsum_vs_i8m1_i16m1_tu(vec_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +int16_t *placeholder6 = value_2; +*placeholder6= vmv_x_s_i16m1_i16(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwredsum_vs_operator_0() { +int16_t tmp[] = {-50,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwredsum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwredsum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwredsum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WredsumVS8SInt16VI_TA.c b/test/codegen-golden/WredsumVS8SInt16VI_TA.c new file mode 100644 index 0000000..f617ed4 --- /dev/null +++ b/test/codegen-golden/WredsumVS8SInt16VI_TA.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r WredsumVS8SInt16VI_TA -n 1 -l 7 --has-ta --has-ma -c WredsumVS8SInt16VI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vwredsum_vs_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int placeholder2 = 7; + +vint16m1_t placeholder3= vmv_v_x_i16m1(0, vsetvlmax_e16m1()); +vint16m1_t placeholder4= vmv_v_v_i16m1(placeholder3, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_1, 0xff, sizeof(value_1)); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +placeholder4 = vwredsum_vs_i8m1_i16m1_ta(vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +placeholder1 += vl; +} +int16_t *placeholder5 = value_1; +*placeholder5= vmv_x_s_i16m1_i16(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vwredsum_vs_operator_0() { +int16_t tmp[] = {-40,-1,-1,-1,-1,-1,-1,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vwredsum_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwredsum_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vwredsum_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WredsumuVS8SUInt16VBVUVU_TUM.c b/test/codegen-golden/WredsumuVS8SUInt16VBVUVU_TUM.c new file mode 100644 index 0000000..e57a5c9 --- /dev/null +++ b/test/codegen-golden/WredsumuVS8SUInt16VBVUVU_TUM.c @@ -0,0 +1,112 @@ +// COMMAND: random_gen -r WredsumuVS8SUInt16VBVUVU_TUM -n 1 -l 7 --has-ta --has-ma -c WredsumuVS8SUInt16VBVUVU_TUM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwredsumu_vs_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; +int placeholder4 = 7; + +vuint16m1_t placeholder5= vmv_v_x_u16m1(0, vsetvlmax_e16m1()); +vuint16m1_t placeholder6= vmv_v_v_u16m1(placeholder5, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_3, value_1, sizeof(value_3)); +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = vsetvl_e8m1(placeholder4); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m1_t vec_value_1_0= vle16_v_u16m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +placeholder6 = vwredsumu_vs_u8m1_u16m1_tum(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder6, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +uint16_t *placeholder7 = value_3; +*placeholder7= vmv_x_s_u16m1_u16(placeholder6); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwredsumu_vs_operator_0() { +uint16_t tmp[] = {175,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwredsumu_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwredsumu_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwredsumu_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WredsumuVS8SUInt16VBVU_TAM.c b/test/codegen-golden/WredsumuVS8SUInt16VBVU_TAM.c new file mode 100644 index 0000000..6f0731f --- /dev/null +++ b/test/codegen-golden/WredsumuVS8SUInt16VBVU_TAM.c @@ -0,0 +1,97 @@ +// COMMAND: random_gen -r WredsumuVS8SUInt16VBVU_TAM -n 1 -l 7 --has-ta --has-ma -c WredsumuVS8SUInt16VBVU_TAM.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwredsumu_vs_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +int placeholder3 = 7; + +vuint16m1_t placeholder4= vmv_v_x_u16m1(0, vsetvlmax_e16m1()); +vuint16m1_t placeholder5= vmv_v_v_u16m1(placeholder4, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_2, 0xff, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +placeholder5 = vwredsumu_vs_u8m1_u16m1_tam(mask_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +uint16_t *placeholder6 = value_2; +*placeholder6= vmv_x_s_u16m1_u16(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwredsumu_vs_operator_0() { +uint16_t tmp[] = {175,65535,65535,65535,65535,65535,65535,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwredsumu_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwredsumu_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwredsumu_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WredsumuVS8SUInt16VBVU_m.c b/test/codegen-golden/WredsumuVS8SUInt16VBVU_m.c new file mode 100644 index 0000000..9332865 --- /dev/null +++ b/test/codegen-golden/WredsumuVS8SUInt16VBVU_m.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r WredsumuVS8SUInt16VBVU_m -n 1 -l 7 --has-ta --has-ma -c WredsumuVS8SUInt16VBVU_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwredsumu_vs_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = &value_2; +int placeholder3 = 7; + +vuint16m1_t placeholder4= vmv_v_x_u16m1(0, vsetvlmax_e16m1()); +vuint16m1_t placeholder5= vmv_v_v_u16m1(placeholder4, vsetvlmax_e16m1()); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +placeholder5 = vwredsumu_vs_u8m1_u16m1_m (mask_value_0_0, placeholder5, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +} +uint16_t *placeholder6 = &value_2; +*placeholder6= vmv_x_s_u16m1_u16(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwredsumu_vs_operator_0() { +uint16_t tmp = 175; +if(value_2 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwredsumu_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwredsumu_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwredsumu_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WredsumuVS8SUInt16VU.c b/test/codegen-golden/WredsumuVS8SUInt16VU.c new file mode 100644 index 0000000..de325ed --- /dev/null +++ b/test/codegen-golden/WredsumuVS8SUInt16VU.c @@ -0,0 +1,57 @@ +// COMMAND: random_gen -r WredsumuVS8SUInt16VU -n 1 -l 7 --has-ta --has-ma -c WredsumuVS8SUInt16VU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint16_t value_1; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vwredsumu_vs_operator_0() { +uint8_t *placeholder0 = value_0; +uint16_t *placeholder1 = &value_1; +int placeholder2 = 7; + +vuint16m1_t placeholder3= vmv_v_x_u16m1(0, vsetvlmax_e16m1()); +vuint16m1_t placeholder4= vmv_v_v_u16m1(placeholder3, vsetvlmax_e16m1()); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +placeholder4 = vwredsumu_vs_u8m1_u16m1(placeholder4, vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +} +uint16_t *placeholder5 = &value_1; +*placeholder5= vmv_x_s_u16m1_u16(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vwredsumu_vs_operator_0() { +uint16_t tmp = 332; +if(value_1 != tmp) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vwredsumu_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwredsumu_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vwredsumu_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WredsumuVS8SUInt16VUVU_TU.c b/test/codegen-golden/WredsumuVS8SUInt16VUVU_TU.c new file mode 100644 index 0000000..6a5de90 --- /dev/null +++ b/test/codegen-golden/WredsumuVS8SUInt16VUVU_TU.c @@ -0,0 +1,96 @@ +// COMMAND: random_gen -r WredsumuVS8SUInt16VUVU_TU -n 1 -l 7 --has-ta --has-ma -c WredsumuVS8SUInt16VUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwredsumu_vs_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +int placeholder3 = 7; + +vuint16m1_t placeholder4= vmv_v_x_u16m1(0, vsetvlmax_e16m1()); +vuint16m1_t placeholder5= vmv_v_v_u16m1(placeholder4, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memcpy(value_2, value_0, sizeof(value_2)); +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint16m1_t vec_value_0_0= vle16_v_u16m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +placeholder5 = vwredsumu_vs_u8m1_u16m1_tu(vec_value_0_0, vec_value_1_0, placeholder5, vl); +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +uint16_t *placeholder6 = value_2; +*placeholder6= vmv_x_s_u16m1_u16(placeholder5); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwredsumu_vs_operator_0() { +uint16_t tmp[] = {325,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwredsumu_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwredsumu_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwredsumu_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WredsumuVS8SUInt16VU_TA.c b/test/codegen-golden/WredsumuVS8SUInt16VU_TA.c new file mode 100644 index 0000000..54b8150 --- /dev/null +++ b/test/codegen-golden/WredsumuVS8SUInt16VU_TA.c @@ -0,0 +1,81 @@ +// COMMAND: random_gen -r WredsumuVS8SUInt16VU_TA -n 1 -l 7 --has-ta --has-ma -c WredsumuVS8SUInt16VU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint16_t value_1[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vwredsumu_vs_operator_0() { +uint8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +int placeholder2 = 7; + +vuint16m1_t placeholder3= vmv_v_x_u16m1(0, vsetvlmax_e16m1()); +vuint16m1_t placeholder4= vmv_v_v_u16m1(placeholder3, vsetvlmax_e16m1()); +// This function initializes the output elements according to +// its +// tail policy and +// the reason doing so is to maintain VLA style. +// For ta policy, it initializes the value to all 1's, for tu it +// initializes to values of merge instead. E.g. +// in[5]: [1, 1, 2, 2, 3] +// out[5]: [0, 0, 0, 0, 0] (global value is initialized to 0) +// vl: 4 +// If we apply redsum_ta(out, in, vl), We want the result to be: +// [9, -1, -1, -1, -1]. +// However, the vl is only 4, so it might result in something +// like: +// [6, -1, -1, -1, 3], +// but we want to maintain the output consistent as it's in VLA +// style, +// so one of the most convinent way to do so is to initialize +// the +// tail value in the beginning +// before performing actual computing, namely, getting into the +// loop. +memset(value_1, 0xff, sizeof(value_1)); +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = vsetvl_e8m1(placeholder2); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +placeholder4 = vwredsumu_vs_u8m1_u16m1_ta(vec_value_0_0, placeholder4, vl); +placeholder0 += vl; +placeholder1 += vl; +} +uint16_t *placeholder5 = value_1; +*placeholder5= vmv_x_s_u16m1_u16(placeholder4); +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vwredsumu_vs_operator_0() { +uint16_t tmp[] = {332,65535,65535,65535,65535,65535,65535,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vwredsumu_vs_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwredsumu_vs_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vwredsumu_vs_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubVV8VInt16VBVIVIVI_TAMU.c b/test/codegen-golden/WsubVV8VInt16VBVIVIVI_TAMU.c new file mode 100644 index 0000000..9607de6 --- /dev/null +++ b/test/codegen-golden/WsubVV8VInt16VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WsubVV8VInt16VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c WsubVV8VInt16VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwsub_vv_i16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsub_vv_operator_0() { +int16_t tmp[] = {2884,-1,54,-1,-55,-1,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubVV8VInt16VBVIVIVI_TUMA.c b/test/codegen-golden/WsubVV8VInt16VBVIVIVI_TUMA.c new file mode 100644 index 0000000..b92a86e --- /dev/null +++ b/test/codegen-golden/WsubVV8VInt16VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WsubVV8VInt16VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c WsubVV8VInt16VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwsub_vv_i16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsub_vv_operator_0() { +int16_t tmp[] = {-1,8399,54,1879,-55,-7354,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubVV8VInt16VBVIVIVI_TUMU.c b/test/codegen-golden/WsubVV8VInt16VBVIVIVI_TUMU.c new file mode 100644 index 0000000..055eb09 --- /dev/null +++ b/test/codegen-golden/WsubVV8VInt16VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WsubVV8VInt16VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c WsubVV8VInt16VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwsub_vv_i16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsub_vv_operator_0() { +int16_t tmp[] = {2884,8399,54,1879,-55,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubVV8VInt16VBVIVI_TAMA.c b/test/codegen-golden/WsubVV8VInt16VBVIVI_TAMA.c new file mode 100644 index 0000000..f13c2a5 --- /dev/null +++ b/test/codegen-golden/WsubVV8VInt16VBVIVI_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r WsubVV8VInt16VBVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c WsubVV8VInt16VBVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwsub_vv_i16m2_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsub_vv_operator_0() { +int16_t tmp[] = {-1,-1,35,-1,7,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubVV8VInt16VIVIVI_TU.c b/test/codegen-golden/WsubVV8VInt16VIVIVI_TU.c new file mode 100644 index 0000000..bea58b9 --- /dev/null +++ b/test/codegen-golden/WsubVV8VInt16VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r WsubVV8VInt16VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c WsubVV8VInt16VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsub_vv_operator_0() { +int16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwsub_vv_i16m2_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsub_vv_operator_0() { +int16_t tmp[] = {51,7893,35,-1417,7,-7226,19,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubVV8VInt16VIVI_TA.c b/test/codegen-golden/WsubVV8VInt16VIVI_TA.c new file mode 100644 index 0000000..f6dfc97 --- /dev/null +++ b/test/codegen-golden/WsubVV8VInt16VIVI_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r WsubVV8VInt16VIVI_TA -n 1 -l 7 --has-ta --has-ma -c WsubVV8VInt16VIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint16m2_t vec_value_2_0= vwsub_vv_i16m2_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsub_vv_operator_0() { +int16_t tmp[] = {-34,-1,70,-1,10,-1,-31,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubVX8VInt16VBVISI_TAMA.c b/test/codegen-golden/WsubVX8VInt16VBVISI_TAMA.c new file mode 100644 index 0000000..89e6e90 --- /dev/null +++ b/test/codegen-golden/WsubVX8VInt16VBVISI_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r WsubVX8VInt16VBVISI_TAMA -n 1 -l 7 --has-ta --has-ma -c WsubVX8VInt16VBVISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint16m2_t vec_value_3_0= vwsub_vx_i16m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsub_vx_operator_0() { +int16_t tmp[] = {-1,-1,34,-1,-43,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubVX8VInt16VBVIVISI_TAMU.c b/test/codegen-golden/WsubVX8VInt16VBVIVISI_TAMU.c new file mode 100644 index 0000000..4a7be30 --- /dev/null +++ b/test/codegen-golden/WsubVX8VInt16VBVIVISI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WsubVX8VInt16VBVIVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c WsubVX8VInt16VBVIVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwsub_vx_i16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsub_vx_operator_0() { +int16_t tmp[] = {5001,-1,41,-1,-52,-1,2884,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubVX8VInt16VBVIVISI_TUMA.c b/test/codegen-golden/WsubVX8VInt16VBVIVISI_TUMA.c new file mode 100644 index 0000000..1c0f31d --- /dev/null +++ b/test/codegen-golden/WsubVX8VInt16VBVIVISI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WsubVX8VInt16VBVIVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c WsubVX8VInt16VBVIVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwsub_vx_i16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsub_vx_operator_0() { +int16_t tmp[] = {-1,-1530,41,1614,-52,-2596,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubVX8VInt16VBVIVISI_TUMU.c b/test/codegen-golden/WsubVX8VInt16VBVIVISI_TUMU.c new file mode 100644 index 0000000..4b1250a --- /dev/null +++ b/test/codegen-golden/WsubVX8VInt16VBVIVISI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WsubVX8VInt16VBVIVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c WsubVX8VInt16VBVIVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwsub_vx_i16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsub_vx_operator_0() { +int16_t tmp[] = {5001,-1530,41,1614,-52,-2596,2884,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubVX8VInt16VISI_TA.c b/test/codegen-golden/WsubVX8VInt16VISI_TA.c new file mode 100644 index 0000000..8adab81 --- /dev/null +++ b/test/codegen-golden/WsubVX8VInt16VISI_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r WsubVX8VInt16VISI_TA -n 1 -l 7 --has-ta --has-ma -c WsubVX8VInt16VISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vwsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint16m2_t vec_value_2_0= vwsub_vx_i16m2_ta(vec_value_0_0, placeholder1, tail_vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsub_vx_operator_0() { +int16_t tmp[] = {-34,-1,77,-1,48,-1,-35,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubVX8VInt16VIVISI_TU.c b/test/codegen-golden/WsubVX8VInt16VIVISI_TU.c new file mode 100644 index 0000000..e306354 --- /dev/null +++ b/test/codegen-golden/WsubVX8VInt16VIVISI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r WsubVX8VInt16VIVISI_TU -n 1 -l 7 --has-ta --has-ma -c WsubVX8VInt16VIVISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsub_vx_operator_0() { +int16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint16m2_t vec_value_3_0= vwsub_vx_i16m2_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsub_vx_operator_0() { +int16_t tmp[] = {72,7893,34,-1417,-43,-7226,51,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubWV8VInt16VBVIVIVI_TAMU.c b/test/codegen-golden/WsubWV8VInt16VBVIVIVI_TAMU.c new file mode 100644 index 0000000..7a4af02 --- /dev/null +++ b/test/codegen-golden/WsubWV8VInt16VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WsubWV8VInt16VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c WsubWV8VInt16VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {6976,-2834,3879,9191,-3858,-5299,-3986,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsub_wv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwsub_wv_i16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsub_wv_operator_0() { +int16_t tmp[] = {2884,-1,3894,-1,-3874,-1,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsub_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsub_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubWV8VInt16VBVIVIVI_TUMA.c b/test/codegen-golden/WsubWV8VInt16VBVIVIVI_TUMA.c new file mode 100644 index 0000000..e2c6121 --- /dev/null +++ b/test/codegen-golden/WsubWV8VInt16VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WsubWV8VInt16VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c WsubWV8VInt16VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {6976,-2834,3879,9191,-3858,-5299,-3986,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsub_wv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwsub_wv_i16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsub_wv_operator_0() { +int16_t tmp[] = {-1,8399,3894,1879,-3874,-7354,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsub_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsub_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubWV8VInt16VBVIVIVI_TUMU.c b/test/codegen-golden/WsubWV8VInt16VBVIVIVI_TUMU.c new file mode 100644 index 0000000..ac36766 --- /dev/null +++ b/test/codegen-golden/WsubWV8VInt16VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WsubWV8VInt16VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c WsubWV8VInt16VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {6976,-2834,3879,9191,-3858,-5299,-3986,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsub_wv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwsub_wv_i16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsub_wv_operator_0() { +int16_t tmp[] = {2884,8399,3894,1879,-3874,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsub_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsub_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubWV8VInt16VBVIVI_TAMA.c b/test/codegen-golden/WsubWV8VInt16VBVIVI_TAMA.c new file mode 100644 index 0000000..cdb7790 --- /dev/null +++ b/test/codegen-golden/WsubWV8VInt16VBVIVI_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r WsubWV8VInt16VBVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c WsubWV8VInt16VBVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsub_wv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwsub_wv_i16m2_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsub_wv_operator_0() { +int16_t tmp[] = {-1,-1,1973,-1,2287,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwsub_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsub_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubWV8VInt16VIVIVI_TU.c b/test/codegen-golden/WsubWV8VInt16VIVIVI_TU.c new file mode 100644 index 0000000..9b2b405 --- /dev/null +++ b/test/codegen-golden/WsubWV8VInt16VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r WsubWV8VInt16VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c WsubWV8VInt16VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsub_wv_operator_0() { +int16_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_3_0= vwsub_wv_i16m2_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsub_wv_operator_0() { +int16_t tmp[] = {2906,7893,1973,-1417,2287,-7226,-708,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwsub_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsub_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubWV8VInt16VIVI_TA.c b/test/codegen-golden/WsubWV8VInt16VIVI_TA.c new file mode 100644 index 0000000..5fa79c2 --- /dev/null +++ b/test/codegen-golden/WsubWV8VInt16VIVI_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r WsubWV8VInt16VIVI_TA -n 1 -l 7 --has-ta --has-ma -c WsubWV8VInt16VIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsub_wv_operator_0() { +int16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint16m2_t vec_value_2_0= vwsub_wv_i16m2_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsub_wv_operator_0() { +int16_t tmp[] = {-5524,-1,5473,-1,2580,-1,-5604,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwsub_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsub_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubWVV8VInt16.c b/test/codegen-golden/WsubWVV8VInt16.c new file mode 100644 index 0000000..01c3262 --- /dev/null +++ b/test/codegen-golden/WsubWVV8VInt16.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r WsubWVV8VInt16 -n 1 -l 7 --has-ta --has-ma -c WsubWVV8VInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint16m2_t vec_value_2_0= vwsub_vv_i16m2(vec_value_0_0, vec_value_1_0, vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsub_vv_operator_0() { +int16_t tmp[] = {-34,29,70,-26,10,-8,-31,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubWVV8VInt16_m.c b/test/codegen-golden/WsubWVV8VInt16_m.c new file mode 100644 index 0000000..6dbceb7 --- /dev/null +++ b/test/codegen-golden/WsubWVV8VInt16_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r WsubWVV8VInt16_m -n 1 -l 7 --has-ta --has-ma -c WsubWVV8VInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsub_vv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwsub_vv_i16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsub_vv_operator_0() { +int16_t tmp[] = {2884,-78,54,1879,-55,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsub_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsub_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubWVX8VInt16.c b/test/codegen-golden/WsubWVX8VInt16.c new file mode 100644 index 0000000..9347428 --- /dev/null +++ b/test/codegen-golden/WsubWVX8VInt16.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r WsubWVX8VInt16 -n 1 -l 7 --has-ta --has-ma -c WsubWVX8VInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vwsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint16m2_t vec_value_2_0= vwsub_vx_i16m2(vec_value_0_0, placeholder1, vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsub_vx_operator_0() { +int16_t tmp[] = {-34,101,77,8,48,-51,-35,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubWVX8VInt16_m.c b/test/codegen-golden/WsubWVX8VInt16_m.c new file mode 100644 index 0000000..5d53fb1 --- /dev/null +++ b/test/codegen-golden/WsubWVX8VInt16_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r WsubWVX8VInt16_m -n 1 -l 7 --has-ta --has-ma -c WsubWVX8VInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsub_vx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwsub_vx_i16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsub_vx_operator_0() { +int16_t tmp[] = {5001,42,41,1614,-52,-2596,2884,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsub_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsub_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubWWV8VInt16.c b/test/codegen-golden/WsubWWV8VInt16.c new file mode 100644 index 0000000..3923e00 --- /dev/null +++ b/test/codegen-golden/WsubWWV8VInt16.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r WsubWWV8VInt16 -n 1 -l 7 --has-ta --has-ma -c WsubWWV8VInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1[7]; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsub_wv_operator_0() { +int16_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m2(placeholder3); +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint16m2_t vec_value_2_0= vwsub_wv_i16m2(vec_value_0_0, vec_value_1_0, vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsub_wv_operator_0() { +int16_t tmp[] = {-5524,7843,5473,-1429,2580,-7161,-5604,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwsub_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsub_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubWWV8VInt16_m.c b/test/codegen-golden/WsubWWV8VInt16_m.c new file mode 100644 index 0000000..047ad83 --- /dev/null +++ b/test/codegen-golden/WsubWWV8VInt16_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r WsubWWV8VInt16_m -n 1 -l 7 --has-ta --has-ma -c WsubWWV8VInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +int8_t value_3[7]; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int16_t tmp[] = {2884,8399,1958,1879,2303,-7354,-734,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {6976,-2834,3879,9191,-3858,-5299,-3986,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsub_wv_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m2(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint16m2_t vec_value_4_0= vwsub_wv_i16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsub_wv_operator_0() { +int16_t tmp[] = {2884,-2884,3894,1879,-3874,-7354,-734,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsub_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsub_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubWWX8VInt16.c b/test/codegen-golden/WsubWWX8VInt16.c new file mode 100644 index 0000000..67a1542 --- /dev/null +++ b/test/codegen-golden/WsubWWX8VInt16.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r WsubWWX8VInt16 -n 1 -l 7 --has-ta --has-ma -c WsubWWX8VInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vwsub_wx_operator_0() { +int16_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m2(placeholder3); +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); + +vint16m2_t vec_value_2_0= vwsub_wx_i16m2(vec_value_0_0, placeholder1, vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsub_wx_operator_0() { +int16_t tmp[] = {-5524,7915,5480,-1395,2618,-7204,-5608,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwsub_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsub_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubWWX8VInt16_m.c b/test/codegen-golden/WsubWWX8VInt16_m.c new file mode 100644 index 0000000..bf0eaed --- /dev/null +++ b/test/codegen-golden/WsubWWX8VInt16_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r WsubWWX8VInt16_m -n 1 -l 7 --has-ta --has-ma -c WsubWWX8VInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +int8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {8399,1958,1879,2303,-7354,-734,6976,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsub_wx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m2(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwsub_wx_i16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsub_wx_operator_0() { +int16_t tmp[] = {5001,1980,1901,1614,-7332,-2596,2884,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsub_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsub_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubWX8VInt16VBVISI_TAMA.c b/test/codegen-golden/WsubWX8VInt16VBVISI_TAMA.c new file mode 100644 index 0000000..f9abd95 --- /dev/null +++ b/test/codegen-golden/WsubWX8VInt16VBVISI_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r WsubWX8VInt16VBVISI_TAMA -n 1 -l 7 --has-ta --has-ma -c WsubWX8VInt16VBVISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int8_t value_2; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsub_wx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); + +vint16m2_t vec_value_3_0= vwsub_wx_i16m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsub_wx_operator_0() { +int16_t tmp[] = {-1,-1,1206,-1,-6405,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwsub_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsub_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubWX8VInt16VBVIVISI_TAMU.c b/test/codegen-golden/WsubWX8VInt16VBVIVISI_TAMU.c new file mode 100644 index 0000000..a41c006 --- /dev/null +++ b/test/codegen-golden/WsubWX8VInt16VBVIVISI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WsubWX8VInt16VBVIVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c WsubWX8VInt16VBVIVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +int8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {8399,1958,1879,2303,-7354,-734,6976,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsub_wx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwsub_wx_i16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsub_wx_operator_0() { +int16_t tmp[] = {5001,-1,1901,-1,-7332,-1,2884,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsub_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsub_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubWX8VInt16VBVIVISI_TUMA.c b/test/codegen-golden/WsubWX8VInt16VBVIVISI_TUMA.c new file mode 100644 index 0000000..01ba1e1 --- /dev/null +++ b/test/codegen-golden/WsubWX8VInt16VBVIVISI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WsubWX8VInt16VBVIVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c WsubWX8VInt16VBVIVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +int8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {8399,1958,1879,2303,-7354,-734,6976,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsub_wx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwsub_wx_i16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsub_wx_operator_0() { +int16_t tmp[] = {-1,-1530,1901,1614,-7332,-2596,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsub_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsub_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubWX8VInt16VBVIVISI_TUMU.c b/test/codegen-golden/WsubWX8VInt16VBVIVISI_TUMU.c new file mode 100644 index 0000000..af32076 --- /dev/null +++ b/test/codegen-golden/WsubWX8VInt16VBVIVISI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WsubWX8VInt16VBVIVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c WsubWX8VInt16VBVIVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int16_t value_1[7]; +int16_t value_2[7]; +int8_t value_3; +int16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int16_t tmp[] = {8399,1958,1879,2303,-7354,-734,6976,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsub_wx_operator_0() { +int8_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int16_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); +vint16m2_t vec_value_2_0= vle16_v_i16m2(placeholder2, vl); + +vint16m2_t vec_value_4_0= vwsub_wx_i16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_i16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsub_wx_operator_0() { +int16_t tmp[] = {5001,-1530,1901,1614,-7332,-2596,2884,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsub_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsub_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubWX8VInt16VISI_TA.c b/test/codegen-golden/WsubWX8VInt16VISI_TA.c new file mode 100644 index 0000000..4cb5442 --- /dev/null +++ b/test/codegen-golden/WsubWX8VInt16VISI_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r WsubWX8VInt16VISI_TA -n 1 -l 7 --has-ta --has-ma -c WsubWX8VInt16VISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int8_t value_1; +int16_t value_2[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vwsub_wx_operator_0() { +int16_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); + +vint16m2_t vec_value_2_0= vwsub_wx_i16m2_ta(vec_value_0_0, placeholder1, tail_vl); + +vse16_v_i16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsub_wx_operator_0() { +int16_t tmp[] = {-5524,-1,5480,-1,2618,-1,-5608,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwsub_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsub_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubWX8VInt16VIVISI_TU.c b/test/codegen-golden/WsubWX8VInt16VIVISI_TU.c new file mode 100644 index 0000000..b01ce53 --- /dev/null +++ b/test/codegen-golden/WsubWX8VInt16VIVISI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r WsubWX8VInt16VIVISI_TU -n 1 -l 7 --has-ta --has-ma -c WsubWX8VInt16VIVISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int16_t value_0[7]; +int16_t value_1[7]; +int8_t value_2; +int16_t value_3[7]; +void vinit_rif_operator_1() { +int16_t tmp[] = {-5546,7893,5458,-1417,2596,-7226,-5630,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int16_t tmp[] = {5001,-1530,1184,1614,-6427,-2596,2884,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsub_wx_operator_0() { +int16_t *placeholder0 = value_0; +int16_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint16m2_t vec_value_0_0= vle16_v_i16m2(placeholder0, vl); +vint16m2_t vec_value_1_0= vle16_v_i16m2(placeholder1, vl); + +vint16m2_t vec_value_3_0= vwsub_wx_i16m2_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_i16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsub_wx_operator_0() { +int16_t tmp[] = {5023,7893,1206,-1417,-6405,-7226,2906,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwsub_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsub_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsub_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuVV8VUInt16VBVUVUVU_TAMU.c b/test/codegen-golden/WsubuVV8VUInt16VBVUVUVU_TAMU.c new file mode 100644 index 0000000..0e8c892 --- /dev/null +++ b/test/codegen-golden/WsubuVV8VUInt16VBVUVUVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WsubuVV8VUInt16VBVUVUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c WsubuVV8VUInt16VBVUVUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsubu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwsubu_vv_u16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsubu_vv_operator_0() { +uint16_t tmp[] = {6442,65535,28,65535,65509,65535,4633,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuVV8VUInt16VBVUVUVU_TUMA.c b/test/codegen-golden/WsubuVV8VUInt16VBVUVUVU_TUMA.c new file mode 100644 index 0000000..3bce3b5 --- /dev/null +++ b/test/codegen-golden/WsubuVV8VUInt16VBVUVUVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WsubuVV8VUInt16VBVUVUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c WsubuVV8VUInt16VBVUVUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsubu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwsubu_vv_u16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsubu_vv_operator_0() { +uint16_t tmp[] = {65535,9200,28,5940,65509,1323,65535,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuVV8VUInt16VBVUVUVU_TUMU.c b/test/codegen-golden/WsubuVV8VUInt16VBVUVUVU_TUMU.c new file mode 100644 index 0000000..ad66052 --- /dev/null +++ b/test/codegen-golden/WsubuVV8VUInt16VBVUVUVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WsubuVV8VUInt16VBVUVUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c WsubuVV8VUInt16VBVUVUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsubu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwsubu_vv_u16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsubu_vv_operator_0() { +uint16_t tmp[] = {6442,9200,28,5940,65509,1323,4633,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuVV8VUInt16VBVUVU_TAMA.c b/test/codegen-golden/WsubuVV8VUInt16VBVUVU_TAMA.c new file mode 100644 index 0000000..e20636a --- /dev/null +++ b/test/codegen-golden/WsubuVV8VUInt16VBVUVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r WsubuVV8VUInt16VBVUVU_TAMA -n 1 -l 7 --has-ta --has-ma -c WsubuVV8VUInt16VBVUVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsubu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_3_0= vwsubu_vv_u16m2_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsubu_vv_operator_0() { +uint16_t tmp[] = {65535,65535,18,65535,4,65535,65535,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwsubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuVV8VUInt16VUVUVU_TU.c b/test/codegen-golden/WsubuVV8VUInt16VUVUVU_TU.c new file mode 100644 index 0000000..7dbacb9 --- /dev/null +++ b/test/codegen-golden/WsubuVV8VUInt16VUVUVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r WsubuVV8VUInt16VUVUVU_TU -n 1 -l 7 --has-ta --has-ma -c WsubuVV8VUInt16VUVUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {65,92,60,59,62,13,46,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsubu_vv_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_3_0= vwsubu_vv_u16m2_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsubu_vv_operator_0() { +uint16_t tmp[] = {26,8946,18,4291,4,1387,9,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwsubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuVV8VUInt16VUVU_TA.c b/test/codegen-golden/WsubuVV8VUInt16VUVU_TA.c new file mode 100644 index 0000000..374af28 --- /dev/null +++ b/test/codegen-golden/WsubuVV8VUInt16VUVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r WsubuVV8VUInt16VUVU_TA -n 1 -l 7 --has-ta --has-ma -c WsubuVV8VUInt16VUVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsubu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint16m2_t vec_value_2_0= vwsubu_vv_u16m2_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_u16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsubu_vv_operator_0() { +uint16_t tmp[] = {65519,65535,36,65535,5,65535,65521,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwsubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuVX8VUInt16VBVUSU_TAMA.c b/test/codegen-golden/WsubuVX8VUInt16VBVUSU_TAMA.c new file mode 100644 index 0000000..439de0c --- /dev/null +++ b/test/codegen-golden/WsubuVX8VUInt16VBVUSU_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r WsubuVX8VUInt16VBVUSU_TAMA -n 1 -l 7 --has-ta --has-ma -c WsubuVX8VUInt16VBVUSU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsubu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint16m2_t vec_value_3_0= vwsubu_vx_u16m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsubu_vx_operator_0() { +uint16_t tmp[] = {65535,65535,17,65535,65515,65535,65535,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwsubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuVX8VUInt16VBVUVUSU_TAMU.c b/test/codegen-golden/WsubuVX8VUInt16VBVUVUSU_TAMU.c new file mode 100644 index 0000000..2c491a0 --- /dev/null +++ b/test/codegen-golden/WsubuVX8VUInt16VBVUVUSU_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WsubuVX8VUInt16VBVUVUSU_TAMU -n 1 -l 7 --has-ta --has-ma -c WsubuVX8VUInt16VBVUVUSU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsubu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_4_0= vwsubu_vx_u16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsubu_vx_operator_0() { +uint16_t tmp[] = {7500,65535,20,65535,65510,65535,6442,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuVX8VUInt16VBVUVUSU_TUMA.c b/test/codegen-golden/WsubuVX8VUInt16VBVUVUSU_TUMA.c new file mode 100644 index 0000000..361eb58 --- /dev/null +++ b/test/codegen-golden/WsubuVX8VUInt16VBVUVUSU_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WsubuVX8VUInt16VBVUVUSU_TUMA -n 1 -l 7 --has-ta --has-ma -c WsubuVX8VUInt16VBVUVUSU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsubu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_4_0= vwsubu_vx_u16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsubu_vx_operator_0() { +uint16_t tmp[] = {65535,4235,20,5807,65510,3702,65535,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuVX8VUInt16VBVUVUSU_TUMU.c b/test/codegen-golden/WsubuVX8VUInt16VBVUVUSU_TUMU.c new file mode 100644 index 0000000..6a236ac --- /dev/null +++ b/test/codegen-golden/WsubuVX8VUInt16VBVUVUSU_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WsubuVX8VUInt16VBVUVUSU_TUMU -n 1 -l 7 --has-ta --has-ma -c WsubuVX8VUInt16VBVUVUSU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsubu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_4_0= vwsubu_vx_u16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsubu_vx_operator_0() { +uint16_t tmp[] = {7500,4235,20,5807,65510,3702,6442,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuVX8VUInt16VUSU_TA.c b/test/codegen-golden/WsubuVX8VUInt16VUSU_TA.c new file mode 100644 index 0000000..94636ed --- /dev/null +++ b/test/codegen-golden/WsubuVX8VUInt16VUSU_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r WsubuVX8VUInt16VUSU_TA -n 1 -l 7 --has-ta --has-ma -c WsubuVX8VUInt16VUSU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vwsubu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint16m2_t vec_value_2_0= vwsubu_vx_u16m2_ta(vec_value_0_0, placeholder1, tail_vl); + +vse16_v_u16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsubu_vx_operator_0() { +uint16_t tmp[] = {65519,65535,39,65535,24,65535,65519,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwsubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuVX8VUInt16VUVUSU_TU.c b/test/codegen-golden/WsubuVX8VUInt16VUVUSU_TU.c new file mode 100644 index 0000000..7dc4faa --- /dev/null +++ b/test/codegen-golden/WsubuVX8VUInt16VUVUSU_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r WsubuVX8VUInt16VUVUSU_TU -n 1 -l 7 --has-ta --has-ma -c WsubuVX8VUInt16VUVUSU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1[7]; +uint8_t value_2; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {75,42,56,58,18,37,65,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsubu_vx_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint16m2_t vec_value_3_0= vwsubu_vx_u16m2_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsubu_vx_operator_0() { +uint16_t tmp[] = {36,8946,17,4291,65515,1387,26,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwsubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuWV8VUInt16VBVUVUVU_TAMU.c b/test/codegen-golden/WsubuWV8VUInt16VBVUVUVU_TAMU.c new file mode 100644 index 0000000..9768309 --- /dev/null +++ b/test/codegen-golden/WsubuWV8VUInt16VBVUVUVU_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WsubuWV8VUInt16VBVUVUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c WsubuWV8VUInt16VBVUVUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {8488,3583,6940,9596,3071,2350,3007,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsubu_wv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwsubu_wv_u16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsubu_wv_operator_0() { +uint16_t tmp[] = {6442,65535,6898,65535,3013,65535,4633,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsubu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsubu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuWV8VUInt16VBVUVUVU_TUMA.c b/test/codegen-golden/WsubuWV8VUInt16VBVUVUVU_TUMA.c new file mode 100644 index 0000000..dc93277 --- /dev/null +++ b/test/codegen-golden/WsubuWV8VUInt16VBVUVUVU_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WsubuWV8VUInt16VBVUVUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c WsubuWV8VUInt16VBVUVUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {8488,3583,6940,9596,3071,2350,3007,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsubu_wv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwsubu_wv_u16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsubu_wv_operator_0() { +uint16_t tmp[] = {65535,9200,6898,5940,3013,1323,65535,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsubu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsubu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuWV8VUInt16VBVUVUVU_TUMU.c b/test/codegen-golden/WsubuWV8VUInt16VBVUVUVU_TUMU.c new file mode 100644 index 0000000..5f0579a --- /dev/null +++ b/test/codegen-golden/WsubuWV8VUInt16VBVUVUVU_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r WsubuWV8VUInt16VBVUVUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c WsubuWV8VUInt16VBVUVUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {8488,3583,6940,9596,3071,2350,3007,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsubu_wv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwsubu_wv_u16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsubu_wv_operator_0() { +uint16_t tmp[] = {6442,9200,6898,5940,3013,1323,4633,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsubu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsubu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuWV8VUInt16VBVUVU_TAMA.c b/test/codegen-golden/WsubuWV8VUInt16VBVUVU_TAMA.c new file mode 100644 index 0000000..8c49acd --- /dev/null +++ b/test/codegen-golden/WsubuWV8VUInt16VBVUVU_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r WsubuWV8VUInt16VBVUVU_TAMA -n 1 -l 7 --has-ta --has-ma -c WsubuWV8VUInt16VBVUVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsubu_wv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_3_0= vwsubu_wv_u16m2_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsubu_wv_operator_0() { +uint16_t tmp[] = {65535,65535,5937,65535,6094,65535,65535,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwsubu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsubu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuWV8VUInt16VUVUVU_TU.c b/test/codegen-golden/WsubuWV8VUInt16VUVUVU_TU.c new file mode 100644 index 0000000..692c763 --- /dev/null +++ b/test/codegen-golden/WsubuWV8VUInt16VUVUVU_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r WsubuWV8VUInt16VUVUVU_TU -n 1 -l 7 --has-ta --has-ma -c WsubuWV8VUInt16VUVUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsubu_wv_operator_0() { +uint16_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_3_0= vwsubu_wv_u16m2_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsubu_wv_operator_0() { +uint16_t tmp[] = {6403,8946,5937,4291,6094,1387,4596,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwsubu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsubu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuWV8VUInt16VUVU_TA.c b/test/codegen-golden/WsubuWV8VUInt16VUVU_TA.c new file mode 100644 index 0000000..b4aa8ca --- /dev/null +++ b/test/codegen-golden/WsubuWV8VUInt16VUVU_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r WsubuWV8VUInt16VUVU_TA -n 1 -l 7 --has-ta --has-ma -c WsubuWV8VUInt16VUVU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsubu_wv_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint16m2_t vec_value_2_0= vwsubu_wv_u16m2_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_u16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsubu_wv_operator_0() { +uint16_t tmp[] = {2188,65535,7687,65535,6240,65535,2148,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwsubu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsubu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuWVV8VUInt16.c b/test/codegen-golden/WsubuWVV8VUInt16.c new file mode 100644 index 0000000..845dad5 --- /dev/null +++ b/test/codegen-golden/WsubuWVV8VUInt16.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r WsubuWVV8VUInt16 -n 1 -l 7 --has-ta --has-ma -c WsubuWVV8VUInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsubu_vv_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint16m2_t vec_value_2_0= vwsubu_vv_u16m2(vec_value_0_0, vec_value_1_0, vl); + +vse16_v_u16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsubu_vv_operator_0() { +uint16_t tmp[] = {65519,15,36,65523,5,65532,65521,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwsubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuWVV8VUInt16_m.c b/test/codegen-golden/WsubuWVV8VUInt16_m.c new file mode 100644 index 0000000..cf7e193 --- /dev/null +++ b/test/codegen-golden/WsubuWVV8VUInt16_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r WsubuWVV8VUInt16_m -n 1 -l 7 --has-ta --has-ma -c WsubuWVV8VUInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {85,36,70,96,31,23,30,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsubu_vv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwsubu_vv_u16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsubu_vv_operator_0() { +uint16_t tmp[] = {6442,65497,28,5940,65509,1323,4633,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsubu_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsubu_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuWVX8VUInt16.c b/test/codegen-golden/WsubuWVX8VUInt16.c new file mode 100644 index 0000000..dde67bd --- /dev/null +++ b/test/codegen-golden/WsubuWVX8VUInt16.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r WsubuWVX8VUInt16 -n 1 -l 7 --has-ta --has-ma -c WsubuWVX8VUInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint8_t value_1; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vwsubu_vx_operator_0() { +uint8_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vuint8m1_t vec_value_0_0= vle8_v_u8m1(placeholder0, vl); + +vuint16m2_t vec_value_2_0= vwsubu_vx_u16m2(vec_value_0_0, placeholder1, vl); + +vse16_v_u16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsubu_vx_operator_0() { +uint16_t tmp[] = {65519,51,39,4,24,65511,65519,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwsubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuWVX8VUInt16_m.c b/test/codegen-golden/WsubuWVX8VUInt16_m.c new file mode 100644 index 0000000..08a41fd --- /dev/null +++ b/test/codegen-golden/WsubuWVX8VUInt16_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r WsubuWVX8VUInt16_m -n 1 -l 7 --has-ta --has-ma -c WsubuWVX8VUInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint8_t value_3; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {92,60,59,62,13,46,85,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsubu_vx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint8m1_t vec_value_2_0= vle8_v_u8m1(placeholder2, vl); + +vuint16m2_t vec_value_4_0= vwsubu_vx_u16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsubu_vx_operator_0() { +uint16_t tmp[] = {7500,21,20,5807,65510,3702,6442,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsubu_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsubu_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuWWV8VUInt16.c b/test/codegen-golden/WsubuWWV8VUInt16.c new file mode 100644 index 0000000..51400ba --- /dev/null +++ b/test/codegen-golden/WsubuWWV8VUInt16.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r WsubuWWV8VUInt16 -n 1 -l 7 --has-ta --has-ma -c WsubuWWV8VUInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsubu_wv_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m2(placeholder3); +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); +vuint8m1_t vec_value_1_0= vle8_v_u8m1(placeholder1, vl); + +vuint16m2_t vec_value_2_0= vwsubu_wv_u16m2(vec_value_0_0, vec_value_1_0, vl); + +vse16_v_u16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsubu_wv_operator_0() { +uint16_t tmp[] = {2188,8871,7687,4235,6240,1369,2148,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwsubu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsubu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuWWV8VUInt16_m.c b/test/codegen-golden/WsubuWWV8VUInt16_m.c new file mode 100644 index 0000000..cfaef52 --- /dev/null +++ b/test/codegen-golden/WsubuWWV8VUInt16_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r WsubuWWV8VUInt16_m -n 1 -l 7 --has-ta --has-ma -c WsubuWWV8VUInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3[7]; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {8488,3583,6940,9596,3071,2350,3007,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsubu_wv_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t *placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m2(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); +vuint8m1_t vec_value_3_0= vle8_v_u8m1(placeholder3, vl); + +vuint16m2_t vec_value_4_0= vwsubu_wv_u16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsubu_wv_operator_0() { +uint16_t tmp[] = {6442,3508,6898,5940,3013,1323,4633,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsubu_wv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_wv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsubu_wv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuWWX8VUInt16.c b/test/codegen-golden/WsubuWWX8VUInt16.c new file mode 100644 index 0000000..d10dd2e --- /dev/null +++ b/test/codegen-golden/WsubuWWX8VUInt16.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r WsubuWWX8VUInt16 -n 1 -l 7 --has-ta --has-ma -c WsubuWWX8VUInt16.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vwsubu_wx_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e16m2(placeholder3); +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); + +vuint16m2_t vec_value_2_0= vwsubu_wx_u16m2(vec_value_0_0, placeholder1, vl); + +vse16_v_u16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsubu_wx_operator_0() { +uint16_t tmp[] = {2188,8907,7690,4252,6259,1348,2146,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwsubu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsubu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuWWX8VUInt16_m.c b/test/codegen-golden/WsubuWWX8VUInt16_m.c new file mode 100644 index 0000000..e14a255 --- /dev/null +++ b/test/codegen-golden/WsubuWWX8VUInt16_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r WsubuWWX8VUInt16_m -n 1 -l 7 --has-ta --has-ma -c WsubuWWX8VUInt16_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {9200,5979,5940,6152,1323,4633,8488,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsubu_wx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e16m2(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); + +vuint16m2_t vec_value_4_0= vwsubu_wx_u16m2_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsubu_wx_operator_0() { +uint16_t tmp[] = {7500,5940,5901,5807,1284,3702,6442,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsubu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsubu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuWX8VUInt16VBVUSU_TAMA.c b/test/codegen-golden/WsubuWX8VUInt16VBVUSU_TAMA.c new file mode 100644 index 0000000..d6ae115 --- /dev/null +++ b/test/codegen-golden/WsubuWX8VUInt16VBVUSU_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r WsubuWX8VUInt16VBVUSU_TAMA -n 1 -l 7 --has-ta --has-ma -c WsubuWX8VUInt16VBVUSU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsubu_wx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); + +vuint16m2_t vec_value_3_0= vwsubu_wx_u16m2_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsubu_wx_operator_0() { +uint16_t tmp[] = {65535,65535,5553,65535,1747,65535,65535,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwsubu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsubu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuWX8VUInt16VBVUVUSU_TAMU.c b/test/codegen-golden/WsubuWX8VUInt16VBVUVUSU_TAMU.c new file mode 100644 index 0000000..e3fdea2 --- /dev/null +++ b/test/codegen-golden/WsubuWX8VUInt16VBVUVUSU_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WsubuWX8VUInt16VBVUVUSU_TAMU -n 1 -l 7 --has-ta --has-ma -c WsubuWX8VUInt16VBVUVUSU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {9200,5979,5940,6152,1323,4633,8488,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsubu_wx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); + +vuint16m2_t vec_value_4_0= vwsubu_wx_u16m2_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsubu_wx_operator_0() { +uint16_t tmp[] = {7500,65535,5901,65535,1284,65535,6442,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsubu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsubu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuWX8VUInt16VBVUVUSU_TUMA.c b/test/codegen-golden/WsubuWX8VUInt16VBVUVUSU_TUMA.c new file mode 100644 index 0000000..4e39c99 --- /dev/null +++ b/test/codegen-golden/WsubuWX8VUInt16VBVUVUSU_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WsubuWX8VUInt16VBVUVUSU_TUMA -n 1 -l 7 --has-ta --has-ma -c WsubuWX8VUInt16VBVUVUSU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {9200,5979,5940,6152,1323,4633,8488,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsubu_wx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); + +vuint16m2_t vec_value_4_0= vwsubu_wx_u16m2_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsubu_wx_operator_0() { +uint16_t tmp[] = {65535,4235,5901,5807,1284,3702,65535,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsubu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsubu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuWX8VUInt16VBVUVUSU_TUMU.c b/test/codegen-golden/WsubuWX8VUInt16VBVUVUSU_TUMU.c new file mode 100644 index 0000000..559d728 --- /dev/null +++ b/test/codegen-golden/WsubuWX8VUInt16VBVUVUSU_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r WsubuWX8VUInt16VBVUVUSU_TUMU -n 1 -l 7 --has-ta --has-ma -c WsubuWX8VUInt16VBVUVUSU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint16_t value_2[7]; +uint8_t value_3; +uint16_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +uint8_t tmp = 39; +value_3 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint16_t tmp[] = {9200,5979,5940,6152,1323,4633,8488,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vwsubu_wx_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; +uint8_t placeholder3 = value_3; +uint16_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); +vuint16m2_t vec_value_2_0= vle16_v_u16m2(placeholder2, vl); + +vuint16m2_t vec_value_4_0= vwsubu_wx_u16m2_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse16_v_u16m2(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vwsubu_wx_operator_0() { +uint16_t tmp[] = {7500,4235,5901,5807,1284,3702,6442,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vwsubu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vwsubu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuWX8VUInt16VUSU_TA.c b/test/codegen-golden/WsubuWX8VUInt16VUSU_TA.c new file mode 100644 index 0000000..af432ed --- /dev/null +++ b/test/codegen-golden/WsubuWX8VUInt16VUSU_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r WsubuWX8VUInt16VUSU_TA -n 1 -l 7 --has-ta --has-ma -c WsubuWX8VUInt16VUSU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp = 39; +value_1 = tmp; +} +void vwsubu_wx_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); + +vuint16m2_t vec_value_2_0= vwsubu_wx_u16m2_ta(vec_value_0_0, placeholder1, tail_vl); + +vse16_v_u16m2(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsubu_wx_operator_0() { +uint16_t tmp[] = {2188,65535,7690,65535,6259,65535,2146,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vwsubu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsubu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/WsubuWX8VUInt16VUVUSU_TU.c b/test/codegen-golden/WsubuWX8VUInt16VUVUSU_TU.c new file mode 100644 index 0000000..0039ccf --- /dev/null +++ b/test/codegen-golden/WsubuWX8VUInt16VUVUSU_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r WsubuWX8VUInt16VUVUSU_TU -n 1 -l 7 --has-ta --has-ma -c WsubuWX8VUInt16VUVUSU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp = 39; +value_2 = tmp; +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {7500,4235,5592,5807,1786,3702,6442,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vwsubu_wx_operator_0() { +uint16_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m2_t vec_value_0_0= vle16_v_u16m2(placeholder0, vl); +vuint16m2_t vec_value_1_0= vle16_v_u16m2(placeholder1, vl); + +vuint16m2_t vec_value_3_0= vwsubu_wx_u16m2_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse16_v_u16m2(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vwsubu_wx_operator_0() { +uint16_t tmp[] = {7461,8946,5553,4291,1747,1387,6403,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vwsubu_wx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vwsubu_wx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vwsubu_wx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/XorVV8VInt8.c b/test/codegen-golden/XorVV8VInt8.c new file mode 100644 index 0000000..0240775 --- /dev/null +++ b/test/codegen-golden/XorVV8VInt8.c @@ -0,0 +1,75 @@ +// COMMAND: random_gen -r XorVV8VInt8 -n 1 -l 7 --has-ta --has-ma -c XorVV8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vxor_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vxor_vv_i8m1(vec_value_0_0, vec_value_1_0, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vxor_vv_operator_0() { +int8_t tmp[] = {34,125,-58,-2,10,8,33,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vxor_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vxor_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vxor_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/XorVV8VInt8VBVIVIVI_TAMU.c b/test/codegen-golden/XorVV8VInt8VBVIVIVI_TAMU.c new file mode 100644 index 0000000..8940ae4 --- /dev/null +++ b/test/codegen-golden/XorVV8VInt8VBVIVIVI_TAMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r XorVV8VInt8VBVIVIVI_TAMU -n 1 -l 7 --has-ta --has-ma -c XorVV8VInt8VBVIVIVI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vxor_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vxor_vv_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vxor_vv_operator_0() { +int8_t tmp[] = {29,-1,-42,-1,-55,-1,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vxor_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vxor_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vxor_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/XorVV8VInt8VBVIVIVI_TUMA.c b/test/codegen-golden/XorVV8VInt8VBVIVIVI_TUMA.c new file mode 100644 index 0000000..014c508 --- /dev/null +++ b/test/codegen-golden/XorVV8VInt8VBVIVIVI_TUMA.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r XorVV8VInt8VBVIVIVI_TUMA -n 1 -l 7 --has-ta --has-ma -c XorVV8VInt8VBVIVIVI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vxor_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vxor_vv_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vxor_vv_operator_0() { +int8_t tmp[] = {-1,84,-42,19,-55,-74,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vxor_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vxor_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vxor_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/XorVV8VInt8VBVIVIVI_TUMU.c b/test/codegen-golden/XorVV8VInt8VBVIVIVI_TUMU.c new file mode 100644 index 0000000..d839f69 --- /dev/null +++ b/test/codegen-golden/XorVV8VInt8VBVIVIVI_TUMU.c @@ -0,0 +1,107 @@ +// COMMAND: random_gen -r XorVV8VInt8VBVIVIVI_TUMU -n 1 -l 7 --has-ta --has-ma -c XorVV8VInt8VBVIVIVI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vxor_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vxor_vv_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vxor_vv_operator_0() { +int8_t tmp[] = {29,84,-42,19,-55,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vxor_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vxor_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vxor_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/XorVV8VInt8VBVIVI_TAMA.c b/test/codegen-golden/XorVV8VInt8VBVIVI_TAMA.c new file mode 100644 index 0000000..c62f5f2 --- /dev/null +++ b/test/codegen-golden/XorVV8VInt8VBVIVI_TAMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r XorVV8VInt8VBVIVI_TAMA -n 1 -l 7 --has-ta --has-ma -c XorVV8VInt8VBVIVI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vxor_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vxor_vv_i8m1_tama(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vxor_vv_operator_0() { +int8_t tmp[] = {-1,-1,-27,-1,7,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vxor_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vxor_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vxor_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/XorVV8VInt8VIVIVI_TU.c b/test/codegen-golden/XorVV8VInt8VIVIVI_TU.c new file mode 100644 index 0000000..5b2088c --- /dev/null +++ b/test/codegen-golden/XorVV8VInt8VIVIVI_TU.c @@ -0,0 +1,91 @@ +// COMMAND: random_gen -r XorVV8VInt8VIVIVI_TU -n 1 -l 7 --has-ta --has-ma -c XorVV8VInt8VIVIVI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vxor_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_3_0= vxor_vv_i8m1_tu(vec_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vxor_vv_operator_0() { +int8_t tmp[] = {-9,79,-27,-14,7,-73,31,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vxor_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vxor_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vxor_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/XorVV8VInt8VIVI_TA.c b/test/codegen-golden/XorVV8VInt8VIVI_TA.c new file mode 100644 index 0000000..4167ab6 --- /dev/null +++ b/test/codegen-golden/XorVV8VInt8VIVI_TA.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r XorVV8VInt8VIVI_TA -n 1 -l 7 --has-ta --has-ma -c XorVV8VInt8VIVI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vxor_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_2_0= vxor_vv_i8m1_ta(vec_value_0_0, vec_value_1_0, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vxor_vv_operator_0() { +int8_t tmp[] = {34,-1,-58,-1,10,-1,33,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vxor_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vxor_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vxor_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/XorVV8VInt8_m.c b/test/codegen-golden/XorVV8VInt8_m.c new file mode 100644 index 0000000..400bdbe --- /dev/null +++ b/test/codegen-golden/XorVV8VInt8_m.c @@ -0,0 +1,106 @@ +// COMMAND: random_gen -r XorVV8VInt8_m -n 1 -l 7 --has-ta --has-ma -c XorVV8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3[7]; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp[] = {-22,50,-15,12,16,-65,-26,}; +for (int i=0; i<7;++i) {value_3[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp[] = {29,84,20,19,23,-74,-7,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {70,-28,39,92,-39,-53,-40,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vxor_vv_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t *placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); +vint8m1_t vec_value_3_0= vle8_v_i8m1(placeholder3, vl); + +vint8m1_t vec_value_4_0= vxor_vv_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, vec_value_3_0, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vxor_vv_operator_0() { +int8_t tmp[] = {29,-42,-42,19,-55,-74,-7,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vxor_vv_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vxor_vv_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vxor_vv_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/XorVX8VInt8.c b/test/codegen-golden/XorVX8VInt8.c new file mode 100644 index 0000000..915950b --- /dev/null +++ b/test/codegen-golden/XorVX8VInt8.c @@ -0,0 +1,72 @@ +// COMMAND: random_gen -r XorVX8VInt8 -n 1 -l 7 --has-ta --has-ma -c XorVX8VInt8.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vxor_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = vsetvl_e8m1(placeholder3); +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vxor_vx_i8m1(vec_value_0_0, placeholder1, vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vxor_vx_operator_0() { +int8_t tmp[] = {34,-91,-35,24,-16,93,45,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vxor_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vxor_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vxor_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/XorVX8VInt8VBVISI_TAMA.c b/test/codegen-golden/XorVX8VInt8VBVISI_TAMA.c new file mode 100644 index 0000000..c35b182 --- /dev/null +++ b/test/codegen-golden/XorVX8VInt8VBVISI_TAMA.c @@ -0,0 +1,89 @@ +// COMMAND: random_gen -r XorVX8VInt8VBVISI_TAMA -n 1 -l 7 --has-ta --has-ma -c XorVX8VInt8VBVISI_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vxor_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vxor_vx_i8m1_tama(mask_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vxor_vx_operator_0() { +int8_t tmp[] = {-1,-1,-26,-1,85,-1,-1,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vxor_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vxor_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vxor_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/XorVX8VInt8VBVIVISI_TAMU.c b/test/codegen-golden/XorVX8VInt8VBVIVISI_TAMU.c new file mode 100644 index 0000000..2f64ca9 --- /dev/null +++ b/test/codegen-golden/XorVX8VInt8VBVIVISI_TAMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r XorVX8VInt8VBVIVISI_TAMU -n 1 -l 7 --has-ta --has-ma -c XorVX8VInt8VBVIVISI_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vxor_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vxor_vx_i8m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vxor_vx_operator_0() { +int8_t tmp[] = {50,-1,-7,-1,92,-1,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vxor_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vxor_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vxor_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/XorVX8VInt8VBVIVISI_TUMA.c b/test/codegen-golden/XorVX8VInt8VBVIVISI_TUMA.c new file mode 100644 index 0000000..c4d707e --- /dev/null +++ b/test/codegen-golden/XorVX8VInt8VBVIVISI_TUMA.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r XorVX8VInt8VBVIVISI_TUMA -n 1 -l 7 --has-ta --has-ma -c XorVX8VInt8VBVIVISI_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vxor_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vxor_vx_i8m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vxor_vx_operator_0() { +int8_t tmp[] = {-1,-15,-7,16,92,-26,-1,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vxor_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vxor_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vxor_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/XorVX8VInt8VBVIVISI_TUMU.c b/test/codegen-golden/XorVX8VInt8VBVIVISI_TUMU.c new file mode 100644 index 0000000..303d567 --- /dev/null +++ b/test/codegen-golden/XorVX8VInt8VBVIVISI_TUMU.c @@ -0,0 +1,104 @@ +// COMMAND: random_gen -r XorVX8VInt8VBVIVISI_TUMU -n 1 -l 7 --has-ta --has-ma -c XorVX8VInt8VBVIVISI_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vxor_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vxor_vx_i8m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, tail_vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vxor_vx_operator_0() { +int8_t tmp[] = {50,-15,-7,16,92,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vxor_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vxor_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vxor_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/XorVX8VInt8VISI_TA.c b/test/codegen-golden/XorVX8VInt8VISI_TA.c new file mode 100644 index 0000000..0c7de3e --- /dev/null +++ b/test/codegen-golden/XorVX8VInt8VISI_TA.c @@ -0,0 +1,73 @@ +// COMMAND: random_gen -r XorVX8VInt8VISI_TA -n 1 -l 7 --has-ta --has-ma -c XorVX8VInt8VISI_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1; +int8_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +int8_t tmp = -22; +value_1 = tmp; +} +void vxor_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t placeholder1 = value_1; +int8_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); + +vint8m1_t vec_value_2_0= vxor_vx_i8m1_ta(vec_value_0_0, placeholder1, tail_vl); + +vse8_v_i8m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vxor_vx_operator_0() { +int8_t tmp[] = {34,-1,-35,-1,-16,-1,45,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vxor_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vxor_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vxor_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/XorVX8VInt8VIVISI_TU.c b/test/codegen-golden/XorVX8VInt8VIVISI_TU.c new file mode 100644 index 0000000..70a7aeb --- /dev/null +++ b/test/codegen-golden/XorVX8VInt8VIVISI_TU.c @@ -0,0 +1,88 @@ +// COMMAND: random_gen -r XorVX8VInt8VIVISI_TU -n 1 -l 7 --has-ta --has-ma -c XorVX8VInt8VIVISI_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2; +int8_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {-56,79,55,-14,26,-73,-57,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp = -22; +value_2 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vxor_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t placeholder2 = value_2; +int8_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8m1_t vec_value_0_0= vle8_v_i8m1(placeholder0, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); + +vint8m1_t vec_value_3_0= vxor_vx_i8m1_tu(vec_value_0_0, vec_value_1_0, placeholder2, tail_vl); + +vse8_v_i8m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vxor_vx_operator_0() { +int8_t tmp[] = {-40,79,-26,-14,85,-73,-9,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vxor_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vxor_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vxor_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/XorVX8VInt8_m.c b/test/codegen-golden/XorVX8VInt8_m.c new file mode 100644 index 0000000..2c2ecad --- /dev/null +++ b/test/codegen-golden/XorVX8VInt8_m.c @@ -0,0 +1,103 @@ +// COMMAND: random_gen -r XorVX8VInt8_m -n 1 -l 7 --has-ta --has-ma -c XorVX8VInt8_m.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +int8_t value_1[7]; +int8_t value_2[7]; +int8_t value_3; +int8_t value_4[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_4() { +int8_t tmp = -22; +value_3 = tmp; +} +void vinit_rif_operator_2() { +int8_t tmp[] = {50,-15,12,16,-65,-26,29,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +int8_t tmp[] = {84,20,19,23,-74,-7,70,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vxor_vx_operator_0() { +int8_t *placeholder0 = value_0; +int8_t *placeholder1 = value_1; +int8_t *placeholder2 = value_2; +int8_t placeholder3 = value_3; +int8_t *placeholder4 = value_4; + +int placeholder5 = 7; + +for (size_t vl; placeholder5 > 0; placeholder5 -= vl) { +vl = vsetvl_e8m1(placeholder5); +vint8m1_t vec_value_0= vle8_v_i8m1(placeholder0, vl); +vbool8_t mask_value_0_0= vmseq_vx_i8m1_b8(vec_value_0, 1, vl); +vint8m1_t vec_value_1_0= vle8_v_i8m1(placeholder1, vl); +vint8m1_t vec_value_2_0= vle8_v_i8m1(placeholder2, vl); + +vint8m1_t vec_value_4_0= vxor_vx_i8m1_m (mask_value_0_0, vec_value_1_0, vec_value_2_0, placeholder3, vl); + +vse8_v_i8m1(placeholder4, vec_value_4_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder4 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_4() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vxor_vx_operator_0() { +int8_t tmp[] = {50,-2,-7,16,92,-26,29,}; +for (int i=0; i<7;++i) +if(value_4[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_4(); +vinit_rif_operator_2(); +vinit_rif_operator_3(); +vxor_vx_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_4 : %s\n", golden_vinit_rif_operator_4() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vxor_vx_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_4(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vxor_vx_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Zext_vf2V16VUInt16VBVUVU_TAMU.c b/test/codegen-golden/Zext_vf2V16VUInt16VBVUVU_TAMU.c new file mode 100644 index 0000000..85d4a2a --- /dev/null +++ b/test/codegen-golden/Zext_vf2V16VUInt16VBVUVU_TAMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Zext_vf2V16VUInt16VBVUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c Zext_vf2V16VUInt16VBVUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vzext_vf2_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint16m1_t vec_value_1_0= vle16_v_u16m1(placeholder1, vl); +vuint8mf2_t vec_value_2_0= vle8_v_u8mf2(placeholder2, vl); + +vuint16m1_t vec_value_3_0= vzext_vf2_u16m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vzext_vf2_operator_0() { +uint16_t tmp[] = {6442,65535,42,65535,58,65535,4633,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vzext_vf2_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf2_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vzext_vf2_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Zext_vf2V16VUInt16VBVUVU_TUMA.c b/test/codegen-golden/Zext_vf2V16VUInt16VBVUVU_TUMA.c new file mode 100644 index 0000000..be78da3 --- /dev/null +++ b/test/codegen-golden/Zext_vf2V16VUInt16VBVUVU_TUMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Zext_vf2V16VUInt16VBVUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c Zext_vf2V16VUInt16VBVUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vzext_vf2_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint16m1_t vec_value_1_0= vle16_v_u16m1(placeholder1, vl); +vuint8mf2_t vec_value_2_0= vle8_v_u8mf2(placeholder2, vl); + +vuint16m1_t vec_value_3_0= vzext_vf2_u16m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vzext_vf2_operator_0() { +uint16_t tmp[] = {65535,9200,42,5940,58,1323,65535,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vzext_vf2_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf2_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vzext_vf2_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Zext_vf2V16VUInt16VBVUVU_TUMU.c b/test/codegen-golden/Zext_vf2V16VUInt16VBVUVU_TUMU.c new file mode 100644 index 0000000..b6dd616 --- /dev/null +++ b/test/codegen-golden/Zext_vf2V16VUInt16VBVUVU_TUMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Zext_vf2V16VUInt16VBVUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c Zext_vf2V16VUInt16VBVUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint16_t value_1[7]; +uint8_t value_2[7]; +uint16_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint16_t tmp[] = {6442,9200,5979,5940,6152,1323,4633,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vzext_vf2_operator_0() { +int8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint16_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint16m1_t vec_value_1_0= vle16_v_u16m1(placeholder1, vl); +vuint8mf2_t vec_value_2_0= vle8_v_u8mf2(placeholder2, vl); + +vuint16m1_t vec_value_3_0= vzext_vf2_u16m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse16_v_u16m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vzext_vf2_operator_0() { +uint16_t tmp[] = {6442,9200,42,5940,58,1323,4633,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vzext_vf2_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf2_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vzext_vf2_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Zext_vf2V16VUInt16VBVU_TAMA.c b/test/codegen-golden/Zext_vf2V16VUInt16VBVU_TAMA.c new file mode 100644 index 0000000..10552a4 --- /dev/null +++ b/test/codegen-golden/Zext_vf2V16VUInt16VBVU_TAMA.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r Zext_vf2V16VUInt16VBVU_TAMA -n 1 -l 7 --has-ta --has-ma -c Zext_vf2V16VUInt16VBVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vzext_vf2_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf2_t vec_value_0= vle8_v_i8mf2(placeholder0, vl); +vbool16_t mask_value_0_0= vmseq_vx_i8mf2_b16(vec_value_0, 1, vl); +vuint8mf2_t vec_value_1_0= vle8_v_u8mf2(placeholder1, vl); + +vuint16m1_t vec_value_2_0= vzext_vf2_u16m1_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_u16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vzext_vf2_operator_0() { +uint16_t tmp[] = {65535,65535,42,65535,58,65535,65535,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vzext_vf2_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf2_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vzext_vf2_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Zext_vf2V16VUInt16VUVU_TU.c b/test/codegen-golden/Zext_vf2V16VUInt16VUVU_TU.c new file mode 100644 index 0000000..6ccb51b --- /dev/null +++ b/test/codegen-golden/Zext_vf2V16VUInt16VUVU_TU.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r Zext_vf2V16VUInt16VUVU_TU -n 1 -l 7 --has-ta --has-ma -c Zext_vf2V16VUInt16VUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint16_t value_0[7]; +uint8_t value_1[7]; +uint16_t value_2[7]; +void vinit_rif_operator_1() { +uint16_t tmp[] = {2227,8946,7729,4291,6298,1387,2185,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vzext_vf2_operator_0() { +uint16_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint16_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint16m1_t vec_value_0_0= vle16_v_u16m1(placeholder0, vl); +vuint8mf2_t vec_value_1_0= vle8_v_u8mf2(placeholder1, vl); + +vuint16m1_t vec_value_2_0= vzext_vf2_u16m1_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse16_v_u16m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vzext_vf2_operator_0() { +uint16_t tmp[] = {39,8946,42,4291,58,1387,37,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vzext_vf2_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf2_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vzext_vf2_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Zext_vf2V16VUInt16VU_TA.c b/test/codegen-golden/Zext_vf2V16VUInt16VU_TA.c new file mode 100644 index 0000000..35b9e24 --- /dev/null +++ b/test/codegen-golden/Zext_vf2V16VUInt16VU_TA.c @@ -0,0 +1,61 @@ +// COMMAND: random_gen -r Zext_vf2V16VUInt16VU_TA -n 1 -l 7 --has-ta --has-ma -c Zext_vf2V16VUInt16VU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint16_t value_1[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vzext_vf2_operator_0() { +uint8_t *placeholder0 = value_0; +uint16_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8mf2_t vec_value_0_0= vle8_v_u8mf2(placeholder0, vl); + +vuint16m1_t vec_value_1_0= vzext_vf2_u16m1_ta(vec_value_0_0, tail_vl); + +vse16_v_u16m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vzext_vf2_operator_0() { +uint16_t tmp[] = {22,65535,78,65535,63,65535,22,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vzext_vf2_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf2_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vzext_vf2_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Zext_vf4V32VUInt32VBVUVU_TAMU.c b/test/codegen-golden/Zext_vf4V32VUInt32VBVUVU_TAMU.c new file mode 100644 index 0000000..d68909a --- /dev/null +++ b/test/codegen-golden/Zext_vf4V32VUInt32VBVUVU_TAMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Zext_vf4V32VUInt32VBVUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c Zext_vf4V32VUInt32VBVUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint8_t value_2[7]; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vzext_vf4_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +vuint8mf4_t vec_value_2_0= vle8_v_u8mf4(placeholder2, vl); + +vuint32m1_t vec_value_3_0= vzext_vf4_u32m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_u32m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vzext_vf4_operator_0() { +uint32_t tmp[] = {6442165u,4294967295u,42u,4294967295u,58u,4294967295u,4632843u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vzext_vf4_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf4_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vzext_vf4_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Zext_vf4V32VUInt32VBVUVU_TUMA.c b/test/codegen-golden/Zext_vf4V32VUInt32VBVUVU_TUMA.c new file mode 100644 index 0000000..0a3f26e --- /dev/null +++ b/test/codegen-golden/Zext_vf4V32VUInt32VBVUVU_TUMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Zext_vf4V32VUInt32VBVUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c Zext_vf4V32VUInt32VBVUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint8_t value_2[7]; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vzext_vf4_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +vuint8mf4_t vec_value_2_0= vle8_v_u8mf4(placeholder2, vl); + +vuint32m1_t vec_value_3_0= vzext_vf4_u32m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_u32m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vzext_vf4_operator_0() { +uint32_t tmp[] = {4294967295u,9199407u,42u,5939507u,58u,1323058u,4294967295u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vzext_vf4_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf4_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vzext_vf4_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Zext_vf4V32VUInt32VBVUVU_TUMU.c b/test/codegen-golden/Zext_vf4V32VUInt32VBVUVU_TUMU.c new file mode 100644 index 0000000..516d0e1 --- /dev/null +++ b/test/codegen-golden/Zext_vf4V32VUInt32VBVUVU_TUMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Zext_vf4V32VUInt32VBVUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c Zext_vf4V32VUInt32VBVUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint32_t value_1[7]; +uint8_t value_2[7]; +uint32_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint32_t tmp[] = {6442165u,9199407u,5979199u,5939507u,6151593u,1323058u,4632843u,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vzext_vf4_operator_0() { +int8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint32_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint32m1_t vec_value_1_0= vle32_v_u32m1(placeholder1, vl); +vuint8mf4_t vec_value_2_0= vle8_v_u8mf4(placeholder2, vl); + +vuint32m1_t vec_value_3_0= vzext_vf4_u32m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse32_v_u32m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vzext_vf4_operator_0() { +uint32_t tmp[] = {6442165u,9199407u,42u,5939507u,58u,1323058u,4632843u,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vzext_vf4_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf4_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vzext_vf4_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Zext_vf4V32VUInt32VBVU_TAMA.c b/test/codegen-golden/Zext_vf4V32VUInt32VBVU_TAMA.c new file mode 100644 index 0000000..9cf9c98 --- /dev/null +++ b/test/codegen-golden/Zext_vf4V32VUInt32VBVU_TAMA.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r Zext_vf4V32VUInt32VBVU_TAMA -n 1 -l 7 --has-ta --has-ma -c Zext_vf4V32VUInt32VBVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint32_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vzext_vf4_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf4_t vec_value_0= vle8_v_i8mf4(placeholder0, vl); +vbool32_t mask_value_0_0= vmseq_vx_i8mf4_b32(vec_value_0, 1, vl); +vuint8mf4_t vec_value_1_0= vle8_v_u8mf4(placeholder1, vl); + +vuint32m1_t vec_value_2_0= vzext_vf4_u32m1_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse32_v_u32m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vzext_vf4_operator_0() { +uint32_t tmp[] = {4294967295u,4294967295u,42u,4294967295u,58u,4294967295u,4294967295u,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vzext_vf4_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf4_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vzext_vf4_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Zext_vf4V32VUInt32VUVU_TU.c b/test/codegen-golden/Zext_vf4V32VUInt32VUVU_TU.c new file mode 100644 index 0000000..c7eaabf --- /dev/null +++ b/test/codegen-golden/Zext_vf4V32VUInt32VUVU_TU.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r Zext_vf4V32VUInt32VUVU_TU -n 1 -l 7 --has-ta --has-ma -c Zext_vf4V32VUInt32VUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint32_t value_0[7]; +uint8_t value_1[7]; +uint32_t value_2[7]; +void vinit_rif_operator_1() { +uint32_t tmp[] = {2227093u,8946104u,7728937u,4291503u,6298054u,1387269u,2185159u,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vzext_vf4_operator_0() { +uint32_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint32_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint32m1_t vec_value_0_0= vle32_v_u32m1(placeholder0, vl); +vuint8mf4_t vec_value_1_0= vle8_v_u8mf4(placeholder1, vl); + +vuint32m1_t vec_value_2_0= vzext_vf4_u32m1_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse32_v_u32m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vzext_vf4_operator_0() { +uint32_t tmp[] = {39u,8946104u,42u,4291503u,58u,1387269u,37u,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vzext_vf4_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf4_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vzext_vf4_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Zext_vf4V32VUInt32VU_TA.c b/test/codegen-golden/Zext_vf4V32VUInt32VU_TA.c new file mode 100644 index 0000000..c402883 --- /dev/null +++ b/test/codegen-golden/Zext_vf4V32VUInt32VU_TA.c @@ -0,0 +1,61 @@ +// COMMAND: random_gen -r Zext_vf4V32VUInt32VU_TA -n 1 -l 7 --has-ta --has-ma -c Zext_vf4V32VUInt32VU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint32_t value_1[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vzext_vf4_operator_0() { +uint8_t *placeholder0 = value_0; +uint32_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8mf4_t vec_value_0_0= vle8_v_u8mf4(placeholder0, vl); + +vuint32m1_t vec_value_1_0= vzext_vf4_u32m1_ta(vec_value_0_0, tail_vl); + +vse32_v_u32m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vzext_vf4_operator_0() { +uint32_t tmp[] = {22u,4294967295u,78u,4294967295u,63u,4294967295u,22u,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vzext_vf4_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf4_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vzext_vf4_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Zext_vf8V64VUInt64VBVUVU_TAMU.c b/test/codegen-golden/Zext_vf8V64VUInt64VBVUVU_TAMU.c new file mode 100644 index 0000000..80db188 --- /dev/null +++ b/test/codegen-golden/Zext_vf8V64VUInt64VBVUVU_TAMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Zext_vf8V64VUInt64VBVUVU_TAMU -n 1 -l 7 --has-ta --has-ma -c Zext_vf8V64VUInt64VBVUVU_TAMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint64_t value_1[7]; +uint8_t value_2[7]; +uint64_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint64_t tmp[] = {6442165ull,9199407ull,5979199ull,5939507ull,6151593ull,1323058ull,4632843ull,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vzext_vf8_operator_0() { +int8_t *placeholder0 = value_0; +uint64_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint64_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf8_t vec_value_0= vle8_v_i8mf8(placeholder0, vl); +vbool64_t mask_value_0_0= vmseq_vx_i8mf8_b64(vec_value_0, 1, vl); +vuint64m1_t vec_value_1_0= vle64_v_u64m1(placeholder1, vl); +vuint8mf8_t vec_value_2_0= vle8_v_u8mf8(placeholder2, vl); + +vuint64m1_t vec_value_3_0= vzext_vf8_u64m1_tamu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse64_v_u64m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vzext_vf8_operator_0() { +uint64_t tmp[] = {6442165ull,18446744073709551615ull,42ull,18446744073709551615ull,58ull,18446744073709551615ull,4632843ull,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vzext_vf8_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf8_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vzext_vf8_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Zext_vf8V64VUInt64VBVUVU_TUMA.c b/test/codegen-golden/Zext_vf8V64VUInt64VBVUVU_TUMA.c new file mode 100644 index 0000000..c7519a3 --- /dev/null +++ b/test/codegen-golden/Zext_vf8V64VUInt64VBVUVU_TUMA.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Zext_vf8V64VUInt64VBVUVU_TUMA -n 1 -l 7 --has-ta --has-ma -c Zext_vf8V64VUInt64VBVUVU_TUMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint64_t value_1[7]; +uint8_t value_2[7]; +uint64_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint64_t tmp[] = {6442165ull,9199407ull,5979199ull,5939507ull,6151593ull,1323058ull,4632843ull,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vzext_vf8_operator_0() { +int8_t *placeholder0 = value_0; +uint64_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint64_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf8_t vec_value_0= vle8_v_i8mf8(placeholder0, vl); +vbool64_t mask_value_0_0= vmseq_vx_i8mf8_b64(vec_value_0, 1, vl); +vuint64m1_t vec_value_1_0= vle64_v_u64m1(placeholder1, vl); +vuint8mf8_t vec_value_2_0= vle8_v_u8mf8(placeholder2, vl); + +vuint64m1_t vec_value_3_0= vzext_vf8_u64m1_tuma(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse64_v_u64m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vzext_vf8_operator_0() { +uint64_t tmp[] = {18446744073709551615ull,9199407ull,42ull,5939507ull,58ull,1323058ull,18446744073709551615ull,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vzext_vf8_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf8_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vzext_vf8_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Zext_vf8V64VUInt64VBVUVU_TUMU.c b/test/codegen-golden/Zext_vf8V64VUInt64VBVUVU_TUMU.c new file mode 100644 index 0000000..4a69728 --- /dev/null +++ b/test/codegen-golden/Zext_vf8V64VUInt64VBVUVU_TUMU.c @@ -0,0 +1,92 @@ +// COMMAND: random_gen -r Zext_vf8V64VUInt64VBVUVU_TUMU -n 1 -l 7 --has-ta --has-ma -c Zext_vf8V64VUInt64VBVUVU_TUMU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint64_t value_1[7]; +uint8_t value_2[7]; +uint64_t value_3[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_3() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_2[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint64_t tmp[] = {6442165ull,9199407ull,5979199ull,5939507ull,6151593ull,1323058ull,4632843ull,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vzext_vf8_operator_0() { +int8_t *placeholder0 = value_0; +uint64_t *placeholder1 = value_1; +uint8_t *placeholder2 = value_2; +uint64_t *placeholder3 = value_3; + +int placeholder4 = 7; + +for (size_t vl; placeholder4 > 0; placeholder4 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf8_t vec_value_0= vle8_v_i8mf8(placeholder0, vl); +vbool64_t mask_value_0_0= vmseq_vx_i8mf8_b64(vec_value_0, 1, vl); +vuint64m1_t vec_value_1_0= vle64_v_u64m1(placeholder1, vl); +vuint8mf8_t vec_value_2_0= vle8_v_u8mf8(placeholder2, vl); + +vuint64m1_t vec_value_3_0= vzext_vf8_u64m1_tumu(mask_value_0_0, vec_value_1_0, vec_value_2_0, tail_vl); + +vse64_v_u64m1(placeholder3, vec_value_3_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +placeholder3 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_3() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vzext_vf8_operator_0() { +uint64_t tmp[] = {6442165ull,9199407ull,42ull,5939507ull,58ull,1323058ull,4632843ull,}; +for (int i=0; i<7;++i) +if(value_3[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_3(); +vinit_rif_operator_2(); +vzext_vf8_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_3 : %s\n", golden_vinit_rif_operator_3() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf8_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_3(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vzext_vf8_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Zext_vf8V64VUInt64VBVU_TAMA.c b/test/codegen-golden/Zext_vf8V64VUInt64VBVU_TAMA.c new file mode 100644 index 0000000..cd33e91 --- /dev/null +++ b/test/codegen-golden/Zext_vf8V64VUInt64VBVU_TAMA.c @@ -0,0 +1,77 @@ +// COMMAND: random_gen -r Zext_vf8V64VUInt64VBVU_TAMA -n 1 -l 7 --has-ta --has-ma -c Zext_vf8V64VUInt64VBVU_TAMA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +int8_t value_0[7]; +uint8_t value_1[7]; +uint64_t value_2[7]; +void vinit_rif_operator_1() { +int8_t tmp[] = {0,1,1,0,1,0,0,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vzext_vf8_operator_0() { +int8_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint64_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vint8mf8_t vec_value_0= vle8_v_i8mf8(placeholder0, vl); +vbool64_t mask_value_0_0= vmseq_vx_i8mf8_b64(vec_value_0, 1, vl); +vuint8mf8_t vec_value_1_0= vle8_v_u8mf8(placeholder1, vl); + +vuint64m1_t vec_value_2_0= vzext_vf8_u64m1_tama(mask_value_0_0, vec_value_1_0, tail_vl); + +vse64_v_u64m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vzext_vf8_operator_0() { +uint64_t tmp[] = {18446744073709551615ull,18446744073709551615ull,42ull,18446744073709551615ull,58ull,18446744073709551615ull,18446744073709551615ull,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vzext_vf8_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf8_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vzext_vf8_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Zext_vf8V64VUInt64VUVU_TU.c b/test/codegen-golden/Zext_vf8V64VUInt64VUVU_TU.c new file mode 100644 index 0000000..2ff7f43 --- /dev/null +++ b/test/codegen-golden/Zext_vf8V64VUInt64VUVU_TU.c @@ -0,0 +1,76 @@ +// COMMAND: random_gen -r Zext_vf8V64VUInt64VUVU_TU -n 1 -l 7 --has-ta --has-ma -c Zext_vf8V64VUInt64VUVU_TU.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint64_t value_0[7]; +uint8_t value_1[7]; +uint64_t value_2[7]; +void vinit_rif_operator_1() { +uint64_t tmp[] = {2227093ull,8946104ull,7728937ull,4291503ull,6298054ull,1387269ull,2185159ull,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vinit_rif_operator_2() { +uint8_t tmp[] = {39,75,42,56,58,18,37,}; +for (int i=0; i<7;++i) {value_1[i] = tmp[i]; +} +} +void vzext_vf8_operator_0() { +uint64_t *placeholder0 = value_0; +uint8_t *placeholder1 = value_1; +uint64_t *placeholder2 = value_2; + +int placeholder3 = 7; + +for (size_t vl; placeholder3 > 0; placeholder3 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint64m1_t vec_value_0_0= vle64_v_u64m1(placeholder0, vl); +vuint8mf8_t vec_value_1_0= vle8_v_u8mf8(placeholder1, vl); + +vuint64m1_t vec_value_2_0= vzext_vf8_u64m1_tu(vec_value_0_0, vec_value_1_0, tail_vl); + +vse64_v_u64m1(placeholder2, vec_value_2_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +placeholder2 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vinit_rif_operator_2() { +return 1; +} +int golden_vzext_vf8_operator_0() { +uint64_t tmp[] = {39ull,8946104ull,42ull,4291503ull,58ull,1387269ull,37ull,}; +for (int i=0; i<7;++i) +if(value_2[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vinit_rif_operator_2(); +vzext_vf8_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_2 : %s\n", golden_vinit_rif_operator_2() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf8_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vinit_rif_operator_2(); +ret &= golden_vzext_vf8_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/codegen-golden/Zext_vf8V64VUInt64VU_TA.c b/test/codegen-golden/Zext_vf8V64VUInt64VU_TA.c new file mode 100644 index 0000000..faeba8f --- /dev/null +++ b/test/codegen-golden/Zext_vf8V64VUInt64VU_TA.c @@ -0,0 +1,61 @@ +// COMMAND: random_gen -r Zext_vf8V64VUInt64VU_TA -n 1 -l 7 --has-ta --has-ma -c Zext_vf8V64VUInt64VU_TA.c --has-policy +#include +#include +#include +#include +#include +#include +#include +typedef _Float16 float16_t; +typedef float float32_t; +typedef double float64_t; +#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & 0x03FF)) +#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF)) +#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF ))) +uint8_t value_0[7]; +uint64_t value_1[7]; +void vinit_rif_operator_1() { +uint8_t tmp[] = {22,90,78,43,63,14,22,}; +for (int i=0; i<7;++i) {value_0[i] = tmp[i]; +} +} +void vzext_vf8_operator_0() { +uint8_t *placeholder0 = value_0; +uint64_t *placeholder1 = value_1; + +int placeholder2 = 7; + +for (size_t vl; placeholder2 > 0; placeholder2 -= vl) { +vl = 2; +size_t tail_vl = 1; +vuint8mf8_t vec_value_0_0= vle8_v_u8mf8(placeholder0, vl); + +vuint64m1_t vec_value_1_0= vzext_vf8_u64m1_ta(vec_value_0_0, tail_vl); + +vse64_v_u64m1(placeholder1, vec_value_1_0, vl); + +placeholder0 += vl; +placeholder1 += vl; +} +} +int golden_vinit_rif_operator_1() { +return 1; +} +int golden_vzext_vf8_operator_0() { +uint64_t tmp[] = {22ull,18446744073709551615ull,78ull,18446744073709551615ull,63ull,18446744073709551615ull,22ull,}; +for (int i=0; i<7;++i) +if(value_1[i] != tmp[i]) { +return 0; +} +return 1; +} +int main () { +vinit_rif_operator_1(); +vzext_vf8_operator_0(); +printf("operator_1 : %s\n", golden_vinit_rif_operator_1() ? "pass" : "fail"); +printf("operator_0 : %s\n", golden_vzext_vf8_operator_0() ? "pass" : "fail"); +int ret = 1; // 1 = success +ret &= golden_vinit_rif_operator_1(); +ret &= golden_vzext_vf8_operator_0(); +if (!ret) return 1; +return 0; } diff --git a/test/testAddVV.cpp b/test/testAddVV.cpp new file mode 100644 index 0000000..459d249 --- /dev/null +++ b/test/testAddVV.cpp @@ -0,0 +1,28 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {9, 9, 9, 9, 8, 6, 4, 2}; +std::vector dataA = {1, 2, 3, 4, 4, 3, 2, 1}; +std::vector dataB = {8, 7, 6, 5, 4, 3, 2, 1}; + +TEST(Golden, AddVV8VInt8) { + NONMASK_VV_VX_GEN_TEST(OneDInt8, OneDInt8, OneDInt8, NONMASK_VV_VALUE_INIT, + AddVV8VInt8); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, AddVV16VInt16) { + NONMASK_VV_VX_GEN_TEST(OneDInt16, OneDInt16, OneDInt16, NONMASK_VV_VALUE_INIT, + AddVV16VInt16); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, AddVV32VInt32) { + NONMASK_VV_VX_GEN_TEST(OneDInt32, OneDInt32, OneDInt32, NONMASK_VV_VALUE_INIT, + AddVV32VInt32); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, AddVV64VInt64) { + NONMASK_VV_VX_GEN_TEST(OneDInt64, OneDInt64, OneDInt64, NONMASK_VV_VALUE_INIT, + AddVV64VInt64); + EXPECT_EQ(verifyResult(c, golden), true); +} diff --git a/test/testAddVVMask.cpp b/test/testAddVVMask.cpp new file mode 100644 index 0000000..9712602 --- /dev/null +++ b/test/testAddVVMask.cpp @@ -0,0 +1,30 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {2, 99, 5, 7, 10, 14, 94, 29, 43, 65}; +std::vector dataM = {1, 0, 1, 1, 1, 1, 0, 1, 1, 1}; +std::vector dataMO = {100, 99, 98, 97, 96, 95, 94, 93, 92, 91}; +std::vector dataA = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; +std::vector dataB = {1, 1, 2, 3, 5, 8, 13, 21, 34, 55}; + +TEST(Golden, AddVV8VInt8_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt8, OneDInt8, OneDInt8, OneDInt8, + MASK_VV_VALUE_INIT, AddVV8VInt8_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, AddVV16VInt16_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt16, OneDInt16, OneDInt16, OneDInt16, + MASK_VV_VALUE_INIT, AddVV16VInt16_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, AddVV32VInt32_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt32, OneDInt32, OneDInt32, OneDInt32, + MASK_VV_VALUE_INIT, AddVV32VInt32_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, AddVV64VInt64_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt64, OneDInt64, OneDInt64, OneDInt64, + MASK_VV_VALUE_INIT, AddVV64VInt64_m); + EXPECT_EQ(verifyResult(output, golden), true); +} diff --git a/test/testAddVX.cpp b/test/testAddVX.cpp new file mode 100644 index 0000000..f904248 --- /dev/null +++ b/test/testAddVX.cpp @@ -0,0 +1,28 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {3, 4, 5, 6, 6, 5, 4, 3}; +std::vector dataA = {1, 2, 3, 4, 4, 3, 2, 1}; +int dataB = 2; + +TEST(Golden, AddVX8VInt8) { + NONMASK_VV_VX_GEN_TEST(OneDInt8, ScalarInt8, OneDInt8, NONMASK_VX_VALUE_INIT, + AddVX8VInt8); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, AddVX16VInt16) { + NONMASK_VV_VX_GEN_TEST(OneDInt16, ScalarInt16, OneDInt16, + NONMASK_VX_VALUE_INIT, AddVX16VInt16); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, AddVX32VInt32) { + NONMASK_VV_VX_GEN_TEST(OneDInt32, ScalarInt32, OneDInt32, + NONMASK_VX_VALUE_INIT, AddVX32VInt32); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, AddVX64VInt64) { + NONMASK_VV_VX_GEN_TEST(OneDInt64, ScalarInt64, OneDInt64, + NONMASK_VX_VALUE_INIT, AddVX64VInt64); + EXPECT_EQ(verifyResult(c, golden), true); +} diff --git a/test/testAddVXMask.cpp b/test/testAddVXMask.cpp new file mode 100644 index 0000000..8ea192e --- /dev/null +++ b/test/testAddVXMask.cpp @@ -0,0 +1,30 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {4, 99, 6, 7, 8, 9, 94, 11, 12, 13}; +std::vector dataM = {1, 0, 1, 1, 1, 1, 0, 1, 1, 1}; +std::vector dataMO = {100, 99, 98, 97, 96, 95, 94, 93, 92, 91}; +std::vector dataA = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; +int dataB = 3; + +TEST(Golden, AddVX8VInt8_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt8, OneDInt8, ScalarInt8, OneDInt8, + MASK_VX_VALUE_INIT, AddVX8VInt8_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, AddVX16VInt16_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt16, OneDInt16, ScalarInt16, OneDInt16, + MASK_VX_VALUE_INIT, AddVX16VInt16_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, AddVX32VInt32_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt32, OneDInt32, ScalarInt32, OneDInt32, + MASK_VX_VALUE_INIT, AddVX32VInt32_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, AddVX64VInt64_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt64, OneDInt64, ScalarInt64, OneDInt64, + MASK_VX_VALUE_INIT, AddVX64VInt64_m); + EXPECT_EQ(verifyResult(output, golden), true); +} diff --git a/test/testAndVV.cpp b/test/testAndVV.cpp new file mode 100644 index 0000000..0024cb5 --- /dev/null +++ b/test/testAndVV.cpp @@ -0,0 +1,28 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {0, 2, 2, 0, 0, 8, 16, 31}; +std::vector dataA = {1, 2, 3, 10, 0, 10, 16, 31}; +std::vector dataB = {8, 7, 6, 0, 10, 9, 31, 127}; + +TEST(Golden, AndVV8VInt8) { + NONMASK_VV_VX_GEN_TEST(OneDInt8, OneDInt8, OneDInt8, NONMASK_VV_VALUE_INIT, + AndVV8VInt8); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, AndVV16VInt16) { + NONMASK_VV_VX_GEN_TEST(OneDInt16, OneDInt16, OneDInt16, NONMASK_VV_VALUE_INIT, + AndVV16VInt16); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, AndVV32VInt32) { + NONMASK_VV_VX_GEN_TEST(OneDInt32, OneDInt32, OneDInt32, NONMASK_VV_VALUE_INIT, + AndVV32VInt32); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, AndVV64VInt64) { + NONMASK_VV_VX_GEN_TEST(OneDInt64, OneDInt64, OneDInt64, NONMASK_VV_VALUE_INIT, + AndVV64VInt64); + EXPECT_EQ(verifyResult(c, golden), true); +} diff --git a/test/testAndVVMask.cpp b/test/testAndVVMask.cpp new file mode 100644 index 0000000..549ad95 --- /dev/null +++ b/test/testAndVVMask.cpp @@ -0,0 +1,30 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {0, 99, -128, -112, 0, 8, 94, 31, 100, 0}; +std::vector dataA = {1, 2, -30, -111, 0, 10, 16, 31, 111, -111}; +std::vector dataB = {8, 7, -111, -80, 10, 9, 31, 127, 100, 100}; +std::vector dataM = {1, 0, 1, 1, 1, 1, 0, 1, 1, 1}; +std::vector dataMO = {100, 99, 98, 97, 96, 95, 94, 93, 92, 91}; + +TEST(Golden, AndVV8VInt8_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt8, OneDInt8, OneDInt8, OneDInt8, + MASK_VV_VALUE_INIT, AndVV8VInt8_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, AndVV16VInt16_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt16, OneDInt16, OneDInt16, OneDInt16, + MASK_VV_VALUE_INIT, AndVV16VInt16_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, AndVV32VInt32_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt32, OneDInt32, OneDInt32, OneDInt32, + MASK_VV_VALUE_INIT, AndVV32VInt32_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, AndVV64VInt64_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt64, OneDInt64, OneDInt64, OneDInt64, + MASK_VV_VALUE_INIT, AndVV64VInt64_m); + EXPECT_EQ(verifyResult(output, golden), true); +} diff --git a/test/testAndVX.cpp b/test/testAndVX.cpp new file mode 100644 index 0000000..4ce3a7f --- /dev/null +++ b/test/testAndVX.cpp @@ -0,0 +1,28 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {1, 2, 3, 4, 4, 5, 6, 7}; +std::vector dataA = {1, 2, 3, 4, -4, -3, -2, -1}; +int dataB = 7; + +TEST(Golden, AndVX8VInt8) { + NONMASK_VV_VX_GEN_TEST(OneDInt8, ScalarInt8, OneDInt8, NONMASK_VX_VALUE_INIT, + AndVX8VInt8); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, AndVX16VInt16) { + NONMASK_VV_VX_GEN_TEST(OneDInt16, ScalarInt16, OneDInt16, + NONMASK_VX_VALUE_INIT, AndVX16VInt16); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, AndVX32VInt32) { + NONMASK_VV_VX_GEN_TEST(OneDInt32, ScalarInt32, OneDInt32, + NONMASK_VX_VALUE_INIT, AndVX32VInt32); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, AndVX64VInt64) { + NONMASK_VV_VX_GEN_TEST(OneDInt64, ScalarInt64, OneDInt64, + NONMASK_VX_VALUE_INIT, AndVX64VInt64); + EXPECT_EQ(verifyResult(c, golden), true); +} diff --git a/test/testAndVXMask.cpp b/test/testAndVXMask.cpp new file mode 100644 index 0000000..322f29a --- /dev/null +++ b/test/testAndVXMask.cpp @@ -0,0 +1,30 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {1, 99, 3, 4, 5, 11, 94, 13, 14, 15}; +std::vector dataM = {1, 0, 1, 1, 1, 1, 0, 1, 1, 1}; +std::vector dataMO = {100, 99, 98, 97, 96, 95, 94, 93, 92, 91}; +std::vector dataA = {1, 2, 3, 4, 5, -5, -4, -3, -2, -1}; +int dataB = 15; + +TEST(Golden, AndVX8VInt8_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt8, OneDInt8, ScalarInt8, OneDInt8, + MASK_VX_VALUE_INIT, AndVX8VInt8_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, AndVX16VInt16_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt16, OneDInt16, ScalarInt16, OneDInt16, + MASK_VX_VALUE_INIT, AndVX16VInt16_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, AndVX32VInt32_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt32, OneDInt32, ScalarInt32, OneDInt32, + MASK_VX_VALUE_INIT, AndVX32VInt32_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, AndVX64VInt64_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt64, OneDInt64, ScalarInt64, OneDInt64, + MASK_VX_VALUE_INIT, AndVX64VInt64_m); + EXPECT_EQ(verifyResult(output, golden), true); +} diff --git a/test/testCpopM.cpp b/test/testCpopM.cpp new file mode 100644 index 0000000..fa0281b --- /dev/null +++ b/test/testCpopM.cpp @@ -0,0 +1,34 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector dataM; +std::vector dataA; +TEST(Golden, CpopMSUInt32VB) { + dataA = {0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, + 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, + 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, + 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1}; + uint32_t golden = 37; + NONMASK_V_GEN_TEST(OneDBool, ScalarUInt32, NONMASK_V_VALUE_INIT, + CpopMSUInt32VB); + auto computed = getRawPointer(b); + EXPECT_EQ(*computed, golden); +} + +TEST(Golden, CpopMSUInt32VBVB_m) { + dataM = {0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, + 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, + 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, + 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1}; + dataA = {0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, + 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, + 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, + 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1}; + uint32_t golden = 28; + MASK_V_NO_MASKEDOFF_GEN_TEST(OneDBool, OneDBool, ScalarUInt32, + MASK_V_NO_MASKEDOFF_VALUE_INIT, + CpopMSUInt32VBVB_m); + auto computed = getRawPointer(c); + EXPECT_EQ(*computed, golden); +} diff --git a/test/testDatum.cpp b/test/testDatum.cpp new file mode 100644 index 0000000..109c78c --- /dev/null +++ b/test/testDatum.cpp @@ -0,0 +1,113 @@ +#include "softfloat.h" +#include "specialize.h" +#include "gtest/gtest.h" + +#include +#include + +#include "RawDatumOperand.hpp" + +using namespace std; + +#define e16 16 +#define e32 32 +#define e64 64 +/* Convenience wrappers to simplify softfloat code sequences */ +#define isBoxedF16(r) \ + (isBoxedF32(r) && ((uint64_t)((r.v[0] >> 16) + 1) == ((uint64_t)1 << 48))) +#define unboxF16(r) (isBoxedF16(r) ? (uint16_t)r.v[0] : defaultNaNF16UI) +#define isBoxedF32(r) (isBoxedF64(r) && ((uint32_t)((r.v[0] >> 32) + 1) == 0)) +#define unboxF32(r) (isBoxedF32(r) ? (uint32_t)r.v[0] : defaultNaNF32UI) +#define isBoxedF64(r) ((r.v[1] + 1) == 0) +#define unboxF64(r) (isBoxedF64(r) ? r.v[0] : defaultNaNF64UI) +typedef float128_t freg_t; +inline float16_t f16(uint16_t v) { return {v}; } +inline float32_t f32(uint32_t v) { return {v}; } +inline float64_t f64(uint64_t v) { return {v}; } +inline float16_t f16(freg_t r) { return f16(unboxF16(r)); } +inline float32_t f32(freg_t r) { return f32(unboxF32(r)); } +inline float64_t f64(freg_t r) { return f64(unboxF64(r)); } +inline freg_t freg(float16_t f) { + return {((uint64_t)-1 << 16) | f.v, (uint64_t)-1}; +} +inline freg_t freg(float32_t f) { + return {((uint64_t)-1 << 32) | f.v, (uint64_t)-1}; +} +inline freg_t freg(float64_t f) { return {f.v, (uint64_t)-1}; } +inline freg_t freg(float128_t f) { return f; } +#define F16_SIGN ((uint16_t)1 << 15) +#define F32_SIGN ((uint32_t)1 << 31) +#define F64_SIGN ((uint64_t)1 << 63) +#define fsgnj16(a, b, n, x) \ + f16((f16(a).v & ~F16_SIGN) | ((((x) ? f16(a).v \ + : (n) ? F16_SIGN \ + : 0) ^ \ + f16(b).v) & \ + F16_SIGN)) +#define fsgnj32(a, b, n, x) \ + f32((f32(a).v & ~F32_SIGN) | ((((x) ? f32(a).v \ + : (n) ? F32_SIGN \ + : 0) ^ \ + f32(b).v) & \ + F32_SIGN)) +#define fsgnj64(a, b, n, x) \ + f64((f64(a).v & ~F64_SIGN) | ((((x) ? f64(a).v \ + : (n) ? F64_SIGN \ + : 0) ^ \ + f64(b).v) & \ + F64_SIGN)) + +#define VI_VFP_V_LOOP(BODY16, BODY32, BODY64) \ + switch (sew) { \ + case e16: \ + BODY16; \ + break; \ + case e32: \ + BODY32; \ + break; \ + case e64: \ + BODY64; \ + break; \ + default: \ + assert(0); \ + break; \ + } + +#define VI_VFP_VV_LOOP(BODY16, BODY32, BODY64) \ + switch (sew) { \ + case e16: \ + BODY16; \ + break; \ + case e32: \ + BODY32; \ + break; \ + case e64: \ + BODY32; \ + break; \ + default: \ + assert(0); \ + break; \ + } + +// Simulating behavior when Spike header is trying to import vfadd_vv.h +TEST(Datum, ResolveStronglyTyped) { + RIF::RawDatumOperand vs1(ui64_to_f16(0xdeadbeef)); + RIF::RawDatumOperand vs2(ui64_to_f16(0xcafebabe)); + RIF::RawDatumOperand vd; + + size_t sew = 32; + + VI_VFP_VV_LOOP({ vd = f16_add(vs1, vs2); }, { vd = f32_add(vs1, vs2); }, + { vd = f64_add(vs1, vs2); }); +} + +// Simulate behavior for vneg_v.h +TEST(Datum, AccessSoftfloatRawData) { + RIF::RawDatumOperand vs(ui64_to_f32(0xdeadbeef)); + RIF::RawDatumOperand vd; + + size_t sew = 32; + VI_VFP_V_LOOP({ vd = fsgnj16(vs.v, vs.v, true, false); }, + { vd = fsgnj32(vs.v, vs.v, true, false); }, + { vd = fsgnj64(vs.v, vs.v, true, false); }); +} diff --git a/test/testEnumerateLmul.cpp b/test/testEnumerateLmul.cpp new file mode 100644 index 0000000..a64c85e --- /dev/null +++ b/test/testEnumerateLmul.cpp @@ -0,0 +1,294 @@ +#include "TestUtils.hpp" +#include "TypeInfo.hpp" +#include "Utils.hpp" +#include + +#include +#include +#include + +using namespace RIF; + +const char *expectedCCode = + "#include \n#include \n#include \n#include " + "\n#include \n#include \n#include " + "\ntypedef _Float16 float16_t;\ntypedef float " + "float32_t;\ntypedef double float64_t;\n#define isNaNF16UI( a ) (((~(a) & " + "0x7C00) == 0) && ((a) & 0x03FF))\n#define isNaNF32UI( a ) (((~(a) & " + "0x7F800000) == 0) && ((a) & 0x007FFFFF))\n#define isNaNF64UI( a ) (((~(a) " + "& UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( " + "0x000FFFFFFFFFFFFF )))\nint8_t value_A_mf8[70];\nint8_t " + "value_B_mf8[70];\nint8_t output_mf8[70];\nint8_t value_A_mf4[70];\nint8_t " + "value_B_mf4[70];\nint8_t output_mf4[70];\nint8_t value_A_mf2[70];\nint8_t " + "value_B_mf2[70];\nint8_t output_mf2[70];\nint8_t value_A_m1[70];\nint8_t " + "value_B_m1[70];\nint8_t output_m1[70];\nint8_t value_A_m2[70];\nint8_t " + "value_B_m2[70];\nint8_t output_m2[70];\nint8_t value_A_m4[70];\nint8_t " + "value_B_m4[70];\nint8_t output_m4[70];\nint8_t value_A_m8[70];\nint8_t " + "value_B_m8[70];\nint8_t output_m8[70];\nvoid vinit_rif_init_A_m8() " + "{\nint8_t tmp[] = " + "{-56,79,55,-14,26,-73,-57,-22,50,-15,12,16,-65,-26,29,84,20,19,23,-74,-7," + "70,-28,39,92,-39,-53,-40,-82,66,-59,1,15,-75,63,55,18,74,-69,-66,86,-18,9," + "21,-75,34,-10,-16,67,4,85,2,-26,-19,15,-18,-89,50,-92,9,-14,-20,-15,63,15," + "-78,-9,-37,-27,-65,};\nfor (int i=0; i<70;++i) {value_A_m8[i] = " + "tmp[i];\n}\n}\nvoid vinit_rif_init_B_mf4() {\nint8_t tmp[] = " + "{36,83,33,28,82,-68,76,-36,-86,34,-31,-18,-34,65,72,28,-100,-66,-51,38,51," + "-20,-91,2,-71,15,-84,-46,-94,1,100,49,68,86,32,36,-63,-26,-22,35,-3,10,-" + "25,9,18,69,-15,93,55,84,-36,-87,33,49,-14,25,18,15,61,-24,-65,-35,48,-44," + "61,50,96,91,-95,7,};\nfor (int i=0; i<70;++i) {value_B_mf4[i] = " + "tmp[i];\n}\n}\nvoid vinit_rif_init_B_m8() {\nint8_t tmp[] = " + "{-82,-70,35,48,74,-33,79,-81,-56,-62,76,20,70,-3,-64,20,-7,-36,12,97,30," + "20,33,31,10,-11,-25,85,-97,-42,39,-56,61,24,72,82,73,33,-18,-33,-16,49,-" + "20,-84,-64,3,15,83,64,0,-59,-11,-46,37,38,78,-80,69,-56,46,-54,-65,-68,17," + "-48,-74,-48,29,3,70,};\nfor (int i=0; i<70;++i) {value_B_m8[i] = " + "tmp[i];\n}\n}\nvoid vinit_rif_init_A_mf8() {\nint8_t tmp[] = " + "{-50,97,-56,-32,53,68,-26,77,-59,89,-45,69,-54,20,-14,-99,-89,-96,22,8,-" + "65,-92,6,58,-4,-71,-1,-7,54,62,-55,-70,16,10,39,-10,19,-65,-46,74,51,0,-" + "32,-92,14,-54,98,-16,-72,98,21,97,-18,48,-34,-13,-15,93,85,-38,96,-95,21," + "21,40,69,100,-35,9,-46,};\nfor (int i=0; i<70;++i) {value_A_mf8[i] = " + "tmp[i];\n}\n}\nvoid vinit_rif_init_B_m2() {\nint8_t tmp[] = " + "{86,-59,-41,-38,-93,66,35,1,3,58,-100,-55,3,-53,40,98,-27,63,-73,-27,30,-" + "47,81,62,-68,-38,58,-96,95,-42,-86,-86,96,-14,92,24,-79,-81,98,-85,-89,60," + "47,79,81,13,-8,22,-80,-89,78,-64,66,-79,-46,40,3,73,53,96,62,-89,25,-92,-" + "70,-22,89,-42,81,-80,};\nfor (int i=0; i<70;++i) {value_B_m2[i] = " + "tmp[i];\n}\n}\nvoid vinit_rif_init_A_m2() {\nint8_t tmp[] = " + "{-67,-50,80,-8,17,12,33,52,12,-54,40,-84,-10,-83,55,100,73,-83,-33,21,-39," + "-48,17,-38,3,-78,35,-90,50,26,5,-45,-57,81,-7,6,78,-49,87,-76,-34,-84,46," + "82,-20,20,-15,-85,-100,-10,48,-28,87,85,-6,-61,18,59,-34,80,46,-41,31,9," + "26,-71,-59,85,-93,20,};\nfor (int i=0; i<70;++i) {value_A_m2[i] = " + "tmp[i];\n}\n}\nvoid vinit_rif_init_A_mf4() {\nint8_t tmp[] = " + "{-67,48,-43,-90,-100,-100,29,-25,-47,59,-50,-88,-2,8,99,68,88,42,9,-67,65," + "8,-63,-41,-75,44,45,-58,-22,-82,-89,73,78,13,-40,-62,62,-50,58,79,26,22,-" + "6,-89,59,-42,-65,-84,-16,-60,-5,69,-41,0,-2,2,-22,57,18,-32,-100,-93,9,80," + "58,-78,-36,-74,4,-43,};\nfor (int i=0; i<70;++i) {value_A_mf4[i] = " + "tmp[i];\n}\n}\nvoid vinit_rif_init_B_m4() {\nint8_t tmp[] = " + "{17,-25,62,70,-62,-79,-76,75,10,39,90,-34,-44,50,8,-8,8,49,76,9,-49,19,0," + "95,-19,62,24,42,64,-87,19,63,-22,66,-94,22,64,80,45,-57,-33,89,-28,1,78," + "74,-51,26,-25,-71,-20,-25,36,-88,75,43,52,22,16,37,-46,-85,22,-67,46,-19,-" + "32,-18,13,-53,};\nfor (int i=0; i<70;++i) {value_B_m4[i] = " + "tmp[i];\n}\n}\nvoid vinit_rif_init_B_mf2() {\nint8_t tmp[] = " + "{77,-33,91,64,64,24,-82,-60,79,-25,85,59,8,-96,29,-70,-53,42,71,-43,-75,-" + "61,23,39,-6,4,-78,-50,-92,-66,86,-32,-99,27,70,24,19,-65,-14,-63,8,21,92,-" + "67,-16,-86,63,89,-64,0,82,70,-24,-67,37,61,-42,35,-24,40,93,-9,-25,-37,68," + "-9,68,23,-12,-26,};\nfor (int i=0; i<70;++i) {value_B_mf2[i] = " + "tmp[i];\n}\n}\nvoid vinit_rif_init_B_mf8() {\nint8_t tmp[] = " + "{38,-45,-53,37,-91,-65,-53,2,-5,64,-37,-55,-100,-8,-87,-83,88,-37,-87,-3,-" + "36,-71,-11,62,-96,-91,49,17,82,53,-35,-12,32,-88,-80,-69,-6,43,31,-31,92," + "89,-46,-19,-58,93,25,52,-48,-74,-66,-52,79,46,77,26,-94,-78,-12,81,17,69,-" + "50,21,-66,-20,52,49,-99,-17,};\nfor (int i=0; i<70;++i) {value_B_mf8[i] = " + "tmp[i];\n}\n}\nvoid vadd_vv_op_mf4() {\nint8_t *placeholder0 = " + "value_A_mf4;\nint8_t *placeholder1 = value_B_mf4;\nint8_t *placeholder2 = " + "output_mf4;\n\nint placeholder3 = 70;\n\nfor (size_t vl; placeholder3 > " + "0; placeholder3 -= vl) {\nvl = vsetvl_e8mf4(placeholder3);\nvint8mf4_t " + "vec_value_A_mf4_0= vle8_v_i8mf4(placeholder0, vl);\nvint8mf4_t " + "vec_value_B_mf4_0= vle8_v_i8mf4(placeholder1, vl);\n\nvint8mf4_t " + "vec_output_mf4_0= vadd_vv_i8mf4(vec_value_A_mf4_0, vec_value_B_mf4_0, " + "vl);\n\nvse8_v_i8mf4(placeholder2, vec_output_mf4_0, vl);\n\nplaceholder0 " + "+= vl;\nplaceholder1 += vl;\nplaceholder2 += vl;\n}\n}\nvoid " + "vinit_rif_init_A_m4() {\nint8_t tmp[] = " + "{93,75,-31,98,-9,94,94,53,-41,-55,10,-12,-97,48,97,54,-80,60,-15,42,-30,-" + "52,-61,-56,-62,-52,13,97,31,52,57,-90,-58,-42,39,-63,26,79,9,86,-19,-96,-" + "54,-97,-41,22,-59,26,-34,-36,-100,59,83,60,81,-53,94,-52,-28,-64,35,-16,-" + "13,-67,100,38,62,45,-25,-18,};\nfor (int i=0; i<70;++i) {value_A_m4[i] = " + "tmp[i];\n}\n}\nvoid vinit_rif_init_A_mf2() {\nint8_t tmp[] = " + "{71,67,86,-66,-30,-89,-53,61,36,19,6,-60,40,21,71,-46,49,3,97,90,-59,-1," + "72,-10,99,38,95,53,65,1,35,41,-97,-96,15,-59,-4,25,-87,-20,55,-95,-44,-16," + "78,-86,77,6,96,50,20,-94,-100,-8,71,3,-33,83,-10,-79,-95,0,37,-8,19,94,-" + "86,-2,82,-26,};\nfor (int i=0; i<70;++i) {value_A_mf2[i] = " + "tmp[i];\n}\n}\nvoid vinit_rif_init_B_m1() {\nint8_t tmp[] = " + "{0,25,50,61,75,11,77,-39,-46,-21,100,-83,-20,-32,-51,54,-41,4,-44,47,18,-" + "78,-95,23,33,74,-12,13,-13,-17,88,73,-48,97,-63,36,-40,24,-10,26,69,-77," + "26,-96,82,-63,99,-62,-32,6,7,72,42,32,92,-48,-65,-78,-79,73,-19,12,-39,42," + "53,-14,-22,-61,-77,1,};\nfor (int i=0; i<70;++i) {value_B_m1[i] = " + "tmp[i];\n}\n}\nvoid vadd_vv_op_m8() {\nint8_t *placeholder4 = " + "value_A_m8;\nint8_t *placeholder5 = value_B_m8;\nint8_t *placeholder6 = " + "output_m8;\n\nint placeholder7 = 70;\n\nfor (size_t vl; placeholder7 > 0; " + "placeholder7 -= vl) {\nvl = vsetvl_e8m8(placeholder7);\nvint8m8_t " + "vec_value_A_m8_0= vle8_v_i8m8(placeholder4, vl);\nvint8m8_t " + "vec_value_B_m8_0= vle8_v_i8m8(placeholder5, vl);\n\nvint8m8_t " + "vec_output_m8_0= vadd_vv_i8m8(vec_value_A_m8_0, vec_value_B_m8_0, " + "vl);\n\nvse8_v_i8m8(placeholder6, vec_output_m8_0, vl);\n\nplaceholder4 " + "+= vl;\nplaceholder5 += vl;\nplaceholder6 += vl;\n}\n}\nvoid " + "vadd_vv_op_m4() {\nint8_t *placeholder8 = value_A_m4;\nint8_t " + "*placeholder9 = value_B_m4;\nint8_t *placeholder10 = output_m4;\n\nint " + "placeholder11 = 70;\n\nfor (size_t vl; placeholder11 > 0; placeholder11 " + "-= vl) {\nvl = vsetvl_e8m4(placeholder11);\nvint8m4_t vec_value_A_m4_0= " + "vle8_v_i8m4(placeholder8, vl);\nvint8m4_t vec_value_B_m4_0= " + "vle8_v_i8m4(placeholder9, vl);\n\nvint8m4_t vec_output_m4_0= " + "vadd_vv_i8m4(vec_value_A_m4_0, vec_value_B_m4_0, " + "vl);\n\nvse8_v_i8m4(placeholder10, vec_output_m4_0, vl);\n\nplaceholder8 " + "+= vl;\nplaceholder9 += vl;\nplaceholder10 += vl;\n}\n}\nvoid " + "vinit_rif_init_A_m1() {\nint8_t tmp[] = " + "{67,56,-97,-5,45,-3,75,81,66,-40,-10,-39,-23,-39,23,95,57,55,14,100,23,-" + "78,-9,-58,-84,97,-64,10,-11,-72,-26,97,-65,28,77,13,-92,-40,51,-21,-72,22," + "-25,61,-18,-83,99,46,-1,-34,11,41,-73,-18,-1,-44,74,86,94,55,55,16,64,-56," + "15,44,63,-26,21,81,};\nfor (int i=0; i<70;++i) {value_A_m1[i] = " + "tmp[i];\n}\n}\nvoid vadd_vv_op_m2() {\nint8_t *placeholder12 = " + "value_A_m2;\nint8_t *placeholder13 = value_B_m2;\nint8_t *placeholder14 = " + "output_m2;\n\nint placeholder15 = 70;\n\nfor (size_t vl; placeholder15 > " + "0; placeholder15 -= vl) {\nvl = vsetvl_e8m2(placeholder15);\nvint8m2_t " + "vec_value_A_m2_0= vle8_v_i8m2(placeholder12, vl);\nvint8m2_t " + "vec_value_B_m2_0= vle8_v_i8m2(placeholder13, vl);\n\nvint8m2_t " + "vec_output_m2_0= vadd_vv_i8m2(vec_value_A_m2_0, vec_value_B_m2_0, " + "vl);\n\nvse8_v_i8m2(placeholder14, vec_output_m2_0, vl);\n\nplaceholder12 " + "+= vl;\nplaceholder13 += vl;\nplaceholder14 += vl;\n}\n}\nvoid " + "vadd_vv_op_mf8() {\nint8_t *placeholder16 = value_A_mf8;\nint8_t " + "*placeholder17 = value_B_mf8;\nint8_t *placeholder18 = output_mf8;\n\nint " + "placeholder19 = 70;\n\nfor (size_t vl; placeholder19 > 0; placeholder19 " + "-= vl) {\nvl = vsetvl_e8mf8(placeholder19);\nvint8mf8_t " + "vec_value_A_mf8_0= vle8_v_i8mf8(placeholder16, vl);\nvint8mf8_t " + "vec_value_B_mf8_0= vle8_v_i8mf8(placeholder17, vl);\n\nvint8mf8_t " + "vec_output_mf8_0= vadd_vv_i8mf8(vec_value_A_mf8_0, vec_value_B_mf8_0, " + "vl);\n\nvse8_v_i8mf8(placeholder18, vec_output_mf8_0, " + "vl);\n\nplaceholder16 += vl;\nplaceholder17 += vl;\nplaceholder18 += " + "vl;\n}\n}\nvoid vadd_vv_op_m1() {\nint8_t *placeholder20 = " + "value_A_m1;\nint8_t *placeholder21 = value_B_m1;\nint8_t *placeholder22 = " + "output_m1;\n\nint placeholder23 = 70;\n\nfor (size_t vl; placeholder23 > " + "0; placeholder23 -= vl) {\nvl = vsetvl_e8m1(placeholder23);\nvint8m1_t " + "vec_value_A_m1_0= vle8_v_i8m1(placeholder20, vl);\nvint8m1_t " + "vec_value_B_m1_0= vle8_v_i8m1(placeholder21, vl);\n\nvint8m1_t " + "vec_output_m1_0= vadd_vv_i8m1(vec_value_A_m1_0, vec_value_B_m1_0, " + "vl);\n\nvse8_v_i8m1(placeholder22, vec_output_m1_0, vl);\n\nplaceholder20 " + "+= vl;\nplaceholder21 += vl;\nplaceholder22 += vl;\n}\n}\nvoid " + "vadd_vv_op_mf2() {\nint8_t *placeholder24 = value_A_mf2;\nint8_t " + "*placeholder25 = value_B_mf2;\nint8_t *placeholder26 = output_mf2;\n\nint " + "placeholder27 = 70;\n\nfor (size_t vl; placeholder27 > 0; placeholder27 " + "-= vl) {\nvl = vsetvl_e8mf2(placeholder27);\nvint8mf2_t " + "vec_value_A_mf2_0= vle8_v_i8mf2(placeholder24, vl);\nvint8mf2_t " + "vec_value_B_mf2_0= vle8_v_i8mf2(placeholder25, vl);\n\nvint8mf2_t " + "vec_output_mf2_0= vadd_vv_i8mf2(vec_value_A_mf2_0, vec_value_B_mf2_0, " + "vl);\n\nvse8_v_i8mf2(placeholder26, vec_output_mf2_0, " + "vl);\n\nplaceholder24 += vl;\nplaceholder25 += vl;\nplaceholder26 += " + "vl;\n}\n}\nint golden_vinit_rif_init_A_m8() {\nreturn 1;\n}\nint " + "golden_vinit_rif_init_B_mf4() {\nreturn 1;\n}\nint " + "golden_vinit_rif_init_B_m8() {\nreturn 1;\n}\nint " + "golden_vinit_rif_init_A_mf8() {\nreturn 1;\n}\nint " + "golden_vinit_rif_init_B_m2() {\nreturn 1;\n}\nint " + "golden_vinit_rif_init_A_m2() {\nreturn 1;\n}\nint " + "golden_vinit_rif_init_A_mf4() {\nreturn 1;\n}\nint " + "golden_vinit_rif_init_B_m4() {\nreturn 1;\n}\nint " + "golden_vinit_rif_init_B_mf2() {\nreturn 1;\n}\nint " + "golden_vinit_rif_init_B_mf8() {\nreturn 1;\n}\nint " + "golden_vadd_vv_op_mf4() {\nint8_t tmp[] = " + "{-31,-125,-10,-62,-18,88,105,-61,123,93,-81,-106,-36,73,-85,96,-12,-24,-" + "42,-29,116,-12,102,-39,110,59,-39,-104,-116,-81,11,122,-110,99,-8,-26,-1,-" + "76,36,114,23,32,-31,-80,77,27,-80,9,39,24,-41,-18,-8,49,-16,27,-4,72,79,-" + "56,91,-128,57,36,119,-28,60,17,-91,-36,};\nfor (int i=0; " + "i<70;++i)\nif(output_mf4[i] != tmp[i]) {\nreturn 0;\n}\nreturn 1;\n}\nint " + "golden_vinit_rif_init_A_m4() {\nreturn 1;\n}\nint " + "golden_vinit_rif_init_A_mf2() {\nreturn 1;\n}\nint " + "golden_vinit_rif_init_B_m1() {\nreturn 1;\n}\nint golden_vadd_vv_op_m8() " + "{\nint8_t tmp[] = " + "{118,9,90,34,100,-106,22,-103,-6,-77,88,36,5,-29,-35,104,13,-17,35,23,23," + "90,5,70,102,-50,-78,45,77,24,-20,-55,76,-51,-121,-119,91,107,-87,-99,70," + "31,-11,-63,117,37,5,67,-125,4,26,-9,-72,18,53,60,87,119,108,55,-68,-85,-" + "83,80,-33,104,-57,-8,-24,5,};\nfor (int i=0; i<70;++i)\nif(output_m8[i] " + "!= tmp[i]) {\nreturn 0;\n}\nreturn 1;\n}\nint golden_vadd_vv_op_m4() " + "{\nint8_t tmp[] = " + "{110,50,31,-88,-71,15,18,-128,-31,-16,100,-46,115,98,105,46,-72,109,61,51," + "-79,-33,-61,39,-81,10,37,-117,95,-35,76,-27,-80,24,-55,-41,90,-97,54,29,-" + "52,-7,-82,-96,37,96,-110,52,-59,-107,-120,34,119,-28,-100,-10,-110,-30,-" + "12,-27,-11,-101,9,122,-110,19,30,27,-12,-71,};\nfor (int i=0; " + "i<70;++i)\nif(output_m4[i] != tmp[i]) {\nreturn 0;\n}\nreturn 1;\n}\nint " + "golden_vinit_rif_init_A_m1() {\nreturn 1;\n}\nint golden_vadd_vv_op_m2() " + "{\nint8_t tmp[] = " + "{19,-109,39,-46,-76,78,68,53,15,4,-60,117,-7,120,95,-58,46,-20,-106,-6,-9," + "-95,98,24,-65,-116,93,70,-111,-16,-81,125,39,67,85,30,-1,126,-71,95,-123,-" + "24,93,-95,61,33,-23,-63,76,-99,126,-92,-103,6,-52,-21,21,-124,19,-80,108," + "126,56,-83,-44,-93,30,43,-12,-60,};\nfor (int i=0; " + "i<70;++i)\nif(output_m2[i] != tmp[i]) {\nreturn 0;\n}\nreturn 1;\n}\nint " + "golden_vadd_vv_op_mf8() {\nint8_t tmp[] = " + "{-12,52,-109,5,-38,3,-79,79,-64,-103,-82,14,102,12,-101,74,-1,123,-65,5,-" + "101,93,-5,120,-100,94,48,10,-120,115,-90,-82,48,-78,-41,-79,13,-22,-15,43," + "-113,89,-78,-111,-44,39,123,36,-120,24,-45,45,61,94,43,13,-109,15,73,43," + "113,-26,-29,42,-26,49,-104,14,-90,-63,};\nfor (int i=0; " + "i<70;++i)\nif(output_mf8[i] != tmp[i]) {\nreturn 0;\n}\nreturn 1;\n}\nint " + "golden_vadd_vv_op_m1() {\nint8_t tmp[] = " + "{67,81,-47,56,120,8,-104,42,20,-61,90,-122,-43,-71,-28,-107,16,59,-30,-" + "109,41,100,-104,-35,-51,-85,-76,23,-24,-89,62,-86,-113,125,14,49,124,-16," + "41,5,-3,-55,1,-35,64,110,-58,-16,-33,-28,18,113,-31,14,91,-92,9,8,15,-128," + "36,28,25,-14,68,30,41,-87,-56,82,};\nfor (int i=0; " + "i<70;++i)\nif(output_m1[i] != tmp[i]) {\nreturn 0;\n}\nreturn 1;\n}\nint " + "golden_vadd_vv_op_mf2() {\nint8_t tmp[] = " + "{-108,34,-79,-2,34,-65,121,1,115,-6,91,-1,48,-75,100,-116,-4,45,-88,47," + "122,-62,95,29,93,42,17,3,-27,-65,121,9,60,-69,85,-35,15,-40,-101,-83,63,-" + "74,48,-83,62,84,-116,95,32,50,102,-24,-124,-75,108,64,-75,118,-34,-39,-2,-" + "9,12,-45,87,85,-18,21,70,-52,};\nfor (int i=0; " + "i<70;++i)\nif(output_mf2[i] != tmp[i]) {\nreturn 0;\n}\nreturn 1;\n}\nint " + "main () " + "{\nvinit_rif_init_A_m8();\nvinit_rif_init_B_mf4();\nvinit_rif_init_B_m8();" + "\nvinit_rif_init_A_mf8();\nvinit_rif_init_B_m2();\nvinit_rif_init_A_m2();" + "\nvinit_rif_init_A_mf4();\nvinit_rif_init_B_m4();\nvinit_rif_init_B_mf2();" + "\nvinit_rif_init_B_mf8();\nvadd_vv_op_mf4();\nvinit_rif_init_A_m4();" + "\nvinit_rif_init_A_mf2();\nvinit_rif_init_B_m1();\nvadd_vv_op_m8();\nvadd_" + "vv_op_m4();\nvinit_rif_init_A_m1();\nvadd_vv_op_m2();\nvadd_vv_op_mf8();" + "\nvadd_vv_op_m1();\nvadd_vv_op_mf2();\nprintf(\"init_A_m8 : %s\\n\", " + "golden_vinit_rif_init_A_m8() ? \"pass\" : \"fail\");\nprintf(\"init_B_mf4 " + ": %s\\n\", golden_vinit_rif_init_B_mf4() ? \"pass\" : " + "\"fail\");\nprintf(\"init_B_m8 : %s\\n\", golden_vinit_rif_init_B_m8() ? " + "\"pass\" : \"fail\");\nprintf(\"init_A_mf8 : %s\\n\", " + "golden_vinit_rif_init_A_mf8() ? \"pass\" : \"fail\");\nprintf(\"init_B_m2 " + ": %s\\n\", golden_vinit_rif_init_B_m2() ? \"pass\" : " + "\"fail\");\nprintf(\"init_A_m2 : %s\\n\", golden_vinit_rif_init_A_m2() ? " + "\"pass\" : \"fail\");\nprintf(\"init_A_mf4 : %s\\n\", " + "golden_vinit_rif_init_A_mf4() ? \"pass\" : \"fail\");\nprintf(\"init_B_m4 " + ": %s\\n\", golden_vinit_rif_init_B_m4() ? \"pass\" : " + "\"fail\");\nprintf(\"init_B_mf2 : %s\\n\", golden_vinit_rif_init_B_mf2() " + "? \"pass\" : \"fail\");\nprintf(\"init_B_mf8 : %s\\n\", " + "golden_vinit_rif_init_B_mf8() ? \"pass\" : \"fail\");\nprintf(\"op_mf4 : " + "%s\\n\", golden_vadd_vv_op_mf4() ? \"pass\" : " + "\"fail\");\nprintf(\"init_A_m4 : %s\\n\", golden_vinit_rif_init_A_m4() ? " + "\"pass\" : \"fail\");\nprintf(\"init_A_mf2 : %s\\n\", " + "golden_vinit_rif_init_A_mf2() ? \"pass\" : \"fail\");\nprintf(\"init_B_m1 " + ": %s\\n\", golden_vinit_rif_init_B_m1() ? \"pass\" : " + "\"fail\");\nprintf(\"op_m8 : %s\\n\", golden_vadd_vv_op_m8() ? \"pass\" : " + "\"fail\");\nprintf(\"op_m4 : %s\\n\", golden_vadd_vv_op_m4() ? \"pass\" : " + "\"fail\");\nprintf(\"init_A_m1 : %s\\n\", golden_vinit_rif_init_A_m1() ? " + "\"pass\" : \"fail\");\nprintf(\"op_m2 : %s\\n\", golden_vadd_vv_op_m2() ? " + "\"pass\" : \"fail\");\nprintf(\"op_mf8 : %s\\n\", golden_vadd_vv_op_mf8() " + "? \"pass\" : \"fail\");\nprintf(\"op_m1 : %s\\n\", golden_vadd_vv_op_m1() " + "? \"pass\" : \"fail\");\nprintf(\"op_mf2 : %s\\n\", " + "golden_vadd_vv_op_mf2() ? \"pass\" : \"fail\");\nint ret = 1; // 1 = " + "success\nret &= golden_vinit_rif_init_A_m8();\nret &= " + "golden_vinit_rif_init_B_mf4();\nret &= golden_vinit_rif_init_B_m8();\nret " + "&= golden_vinit_rif_init_A_mf8();\nret &= " + "golden_vinit_rif_init_B_m2();\nret &= golden_vinit_rif_init_A_m2();\nret " + "&= golden_vinit_rif_init_A_mf4();\nret &= " + "golden_vinit_rif_init_B_m4();\nret &= golden_vinit_rif_init_B_mf2();\nret " + "&= golden_vinit_rif_init_B_mf8();\nret &= golden_vadd_vv_op_mf4();\nret " + "&= golden_vinit_rif_init_A_m4();\nret &= " + "golden_vinit_rif_init_A_mf2();\nret &= golden_vinit_rif_init_B_m1();\nret " + "&= golden_vadd_vv_op_m8();\nret &= golden_vadd_vv_op_m4();\nret &= " + "golden_vinit_rif_init_A_m1();\nret &= golden_vadd_vv_op_m2();\nret &= " + "golden_vadd_vv_op_mf8();\nret &= golden_vadd_vv_op_m1();\nret &= " + "golden_vadd_vv_op_mf2();\nif (!ret) return 1;\nreturn 0; }\n"; + +TEST(EnumerateLmul, AddVV8) { + uint32_t seed = 0xdeadbeef; + initializeRNG(seed); + + int length = 70; + Graph graph; + + const SewType sew = SewType{e8}; + for (LmulType lmul : TypeInfo::validSewLmul[sew]) { + auto a = static_cast(getInitializeValue( + OneDInt8, graph, "A_" + std::string(LMUL_STR(lmul)), length, lmul)); + auto b = static_cast(getInitializeValue( + OneDInt8, graph, "B_" + std::string(LMUL_STR(lmul)), length, lmul)); + auto c = static_cast(graph.getNewValue( + OneDInt8, "output_" + std::string(LMUL_STR(lmul)), length, lmul)); + auto op = graph.getNewOperator(AddVV8VInt8, + "op_" + std::string(LMUL_STR(lmul)), lmul); + op->addInput(0, a); + op->addInput(1, b); + op->addOutput(c); + op->generateData(); + } + + graph.generateData(); + + std::stringstream generatedCCode; + graph.generateCCode(generatedCCode); + + EXPECT_EQ(generatedCCode.str(), expectedCCode); +} diff --git a/test/testEnumerateLmulMask.cpp b/test/testEnumerateLmulMask.cpp new file mode 100644 index 0000000..f405d48 --- /dev/null +++ b/test/testEnumerateLmulMask.cpp @@ -0,0 +1,61 @@ +#include "Basic.hpp" +#include "TestUtils.hpp" +#include "TypeInfo.hpp" +#include "Utils.hpp" +#include + +#include +#include +#include + +using namespace RIF; + +static int idx = 0; + +static std::string getNewValueName() { + return "value_" + std::to_string(idx++); +} + +void fillOperatorWithInitializedValue(Graph &graph, Graph::Operator *op, + const int length) { + for (int i = 0; i < op->inputs.size(); ++i) { + if (op->inputs[i] == nullptr) { + auto value = + getInitializeValue(op->inputTypes[i], graph, getNewValueName(), + length, op->typeInfo->lmul); + op->addInput(i, value); + } + } + + if (op->outputs[0] == nullptr) { + auto value = getInitializeValue(op->outputType, graph, getNewValueName(), + length, op->typeInfo->lmul); + op->addOutput(value); + } +} + +const char *expectedCCode = ""; + +TEST(EnumerateLmul, AddVV8) { + uint32_t seed = 0xdeadbeef; + initializeRNG(seed); + + int length = 70; + Graph graph; + + const SewType operatorSew = SewType{e32}; + for (LmulType lmul : TypeInfo::validSewLmul[operatorSew]) { + auto op = graph.getNewOperator(AddVV32VInt32_m, + "op_" + std::string(LMUL_STR(lmul)), lmul); + + fillOperatorWithInitializedValue(graph, op, length); + op->generateData(); + } + graph.generateData(); + + graph.generateCCode(std::cout); + // std::stringstream generatedCCode; + // graph.generateCCode(generatedCCode); + + // EXPECT_EQ(generatedCCode.str(), expectedCCode); +} diff --git a/test/testFadd.cpp b/test/testFadd.cpp new file mode 100644 index 0000000..7731383 --- /dev/null +++ b/test/testFadd.cpp @@ -0,0 +1,46 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector goldenVV = {9, 9, 9, 9, 8, 6, 4, 2}; +std::vector goldenVF = {9, 10, 11, 12, 12, 11, 10, 9}; +std::vector dataA = {1, 2, 3, 4, 4, 3, 2, 1}; +std::vector dataBOneD = {8, 7, 6, 5, 4, 3, 2, 1}; +int dataBScalar = 8; + +TEST(Golden, FaddVV16VFloat16VFVF) { + + NONMASK_VV_VX_GEN_TEST(OneDFloat16, OneDFloat16, OneDFloat16, + NONMASK_FP_VV_VALUE_INIT(16), FaddVV16VFloat16VFVF); + EXPECT_EQ(verifyResult(c, goldenVV), true); +} + +TEST(Golden, FaddVV32VFloat32VFVF) { + NONMASK_VV_VX_GEN_TEST(OneDFloat32, OneDFloat32, OneDFloat32, + NONMASK_FP_VV_VALUE_INIT(32), FaddVV32VFloat32VFVF); + EXPECT_EQ(verifyResult(c, goldenVV), true); +} + +TEST(Golden, FaddVV64VFloat64VFVF) { + NONMASK_VV_VX_GEN_TEST(OneDFloat64, OneDFloat64, OneDFloat64, + NONMASK_FP_VV_VALUE_INIT(64), FaddVV64VFloat64VFVF); + EXPECT_EQ(verifyResult(c, goldenVV), true); +} + +TEST(Golden, FaddVF16VFloat16VFSF) { + NONMASK_VV_VX_GEN_TEST(OneDFloat16, ScalarFloat16, OneDFloat16, + NONMASK_FP_VX_VALUE_INIT(16), FaddVF16VFloat16VFSF); + EXPECT_EQ(verifyResult(c, goldenVF), true); +} + +TEST(Golden, FaddVF32VFloat32VFSF) { + NONMASK_VV_VX_GEN_TEST(OneDFloat32, ScalarFloat32, OneDFloat32, + NONMASK_FP_VX_VALUE_INIT(32), FaddVF32VFloat32VFSF); + EXPECT_EQ(verifyResult(c, goldenVF), true); +} + +TEST(Golden, FaddVF64VFloat64VFSF) { + NONMASK_VV_VX_GEN_TEST(OneDFloat64, ScalarFloat64, OneDFloat64, + NONMASK_FP_VX_VALUE_INIT(64), FaddVF64VFloat64VFSF); + EXPECT_EQ(verifyResult(c, goldenVF), true); +} diff --git a/test/testFaddMask.cpp b/test/testFaddMask.cpp new file mode 100644 index 0000000..b36fcb7 --- /dev/null +++ b/test/testFaddMask.cpp @@ -0,0 +1,53 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector goldenVV = {9, 99, 9, 9, 8, 6, 94, 2}; +std::vector goldenVF = {9, 99, 11, 12, 12, 11, 94, 9}; +std::vector dataA = {1, 2, 3, 4, 4, 3, 2, 1}; +std::vector dataBOneD = {8, 7, 6, 5, 4, 3, 2, 1}; +int dataBScalar = 8; +std::vector dataMask = {1, 0, 1, 1, 1, 1, 0, 1}; +std::vector dataMaskedOff = {100, 99, 98, 97, 96, 95, 94, 93}; + +TEST(Golden, FaddVV16VFloat16VBVFVFVF_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDFloat16, OneDFloat16, OneDFloat16, + OneDFloat16, MASK_FP_VV_VALUE_INIT(16), + FaddVV16VFloat16VBVFVFVF_m); + verifyResult(output, goldenVV); +} + +TEST(Golden, FaddVV32VFloat32VBVFVFVF_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDFloat32, OneDFloat32, OneDFloat32, + OneDFloat32, MASK_FP_VV_VALUE_INIT(32), + FaddVV32VFloat32VBVFVFVF_m); + verifyResult(output, goldenVV); +} + +TEST(Golden, FaddVV64VFloat64VBVFVFVF_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDFloat64, OneDFloat64, OneDFloat64, + OneDFloat64, MASK_FP_VV_VALUE_INIT(64), + FaddVV64VFloat64VBVFVFVF_m); + verifyResult(output, goldenVV); +} + +TEST(Golden, FaddVF16VFloat16VBVFVFSF_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDFloat16, OneDFloat16, ScalarFloat16, + OneDFloat16, MASK_FP_VF_VALUE_INIT(16), + FaddVF16VFloat16VBVFVFSF_m); + verifyResult(output, goldenVF); +} + +TEST(Golden, FaddVF32VFloat32VBVFVFSF_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDFloat32, OneDFloat32, ScalarFloat32, + OneDFloat32, MASK_FP_VF_VALUE_INIT(32), + FaddVF32VFloat32VBVFVFSF_m); + verifyResult(output, goldenVF); +} + +TEST(Golden, FaddVF64VFloat64VBVFVFSF_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDFloat64, OneDFloat64, ScalarFloat64, + OneDFloat64, MASK_FP_VF_VALUE_INIT(64), + FaddVF64VFloat64VBVFVFSF_m); + verifyResult(output, goldenVF); +} diff --git a/test/testMsbfM.cpp b/test/testMsbfM.cpp new file mode 100644 index 0000000..333240c --- /dev/null +++ b/test/testMsbfM.cpp @@ -0,0 +1,106 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector dataM, dataMO; +std::vector dataA; +std::vector golden; +TEST(Golden, MsbfMVBoolVB_0) { + dataA = {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, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + golden = {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}; + + NONMASK_V_GEN_TEST(OneDBool, OneDBool, NONMASK_V_VALUE_INIT, MsbfMVBoolVB); + EXPECT_EQ(verifyResult(b, golden), true); +} +TEST(Golden, MsbfMVBoolVB_1) { + dataA = {0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + golden = {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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + NONMASK_V_GEN_TEST(OneDBool, OneDBool, NONMASK_V_VALUE_INIT, MsbfMVBoolVB); + EXPECT_EQ(verifyResult(b, golden), true); +} +TEST(Golden, MsbfMVBoolVB_2) { + dataA = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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}; + golden = { + 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, 0, 0, 0, 0, 0, + }; + + NONMASK_V_GEN_TEST(OneDBool, OneDBool, NONMASK_V_VALUE_INIT, MsbfMVBoolVB); + EXPECT_EQ(verifyResult(b, golden), true); +} + +TEST(Golden, MsbfMVBoolVBVBVB_m_0) { + dataM = {1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; + dataMO = {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 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, 1, 0, 1, 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, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + dataA = {0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + golden = {1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 1, 0, 1, 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, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + MASK_V_GEN_TEST(OneDBool, OneDBool, OneDBool, OneDBool, MASK_V_VALUE_INIT, + MsbfMVBoolVBVBVB_m); + EXPECT_EQ(verifyResult(d, golden), true); +} +TEST(Golden, MsbfMVBoolVBVBVB_m_1) { + dataM = {1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; + dataMO = {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 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, 1, 0, 1, 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, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + dataA = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 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, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0}; + golden = {1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}; + + MASK_V_GEN_TEST(OneDBool, OneDBool, OneDBool, OneDBool, MASK_V_VALUE_INIT, + MsbfMVBoolVBVBVB_m); + EXPECT_EQ(verifyResult(d, golden), true); +} diff --git a/test/testMsifM.cpp b/test/testMsifM.cpp new file mode 100644 index 0000000..342b74d --- /dev/null +++ b/test/testMsifM.cpp @@ -0,0 +1,105 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector dataM, dataMO; +std::vector dataA; +std::vector golden; +TEST(Golden, MsifMVBoolVB_0) { + dataA = {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, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + golden = {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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + NONMASK_V_GEN_TEST(OneDBool, OneDBool, NONMASK_V_VALUE_INIT, MsifMVBoolVB); + EXPECT_EQ(verifyResult(b, golden), true); +} +TEST(Golden, MsifMVBoolVB_1) { + dataA = {0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + golden = {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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + NONMASK_V_GEN_TEST(OneDBool, OneDBool, NONMASK_V_VALUE_INIT, MsifMVBoolVB); + EXPECT_EQ(verifyResult(b, golden), true); +} +TEST(Golden, MsifMVBoolVB_2) { + dataA = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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}; + golden = { + 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, 0, 0, 0, 0, + }; + + NONMASK_V_GEN_TEST(OneDBool, OneDBool, NONMASK_V_VALUE_INIT, MsifMVBoolVB); + EXPECT_EQ(verifyResult(b, golden), true); +} +TEST(Golden, MsifMVBoolVBVBVB_m_0) { + dataM = {1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; + dataMO = {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 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, 1, 0, 1, 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, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + dataA = {0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + golden = {1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 1, 0, 1, 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, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + MASK_V_GEN_TEST(OneDBool, OneDBool, OneDBool, OneDBool, MASK_V_VALUE_INIT, + MsifMVBoolVBVBVB_m); + EXPECT_EQ(verifyResult(d, golden), true); +} +TEST(Golden, MsifMVBoolVBVBVB_m_1) { + dataM = {1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; + dataMO = {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 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, 1, 0, 1, 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, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + dataA = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 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, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0}; + golden = {1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}; + + MASK_V_GEN_TEST(OneDBool, OneDBool, OneDBool, OneDBool, MASK_V_VALUE_INIT, + MsifMVBoolVBVBVB_m); + EXPECT_EQ(verifyResult(d, golden), true); +} diff --git a/test/testMsofM.cpp b/test/testMsofM.cpp new file mode 100644 index 0000000..da006c9 --- /dev/null +++ b/test/testMsofM.cpp @@ -0,0 +1,104 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector dataM, dataMO; +std::vector dataA; +std::vector golden; +TEST(Golden, MsofMVBoolVB_0) { + dataA = {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, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + golden = {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, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + NONMASK_V_GEN_TEST(OneDBool, OneDBool, NONMASK_V_VALUE_INIT, MsofMVBoolVB); + EXPECT_EQ(verifyResult(b, golden), true); +} +TEST(Golden, MsofMVBoolVB_1) { + dataA = {0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + golden = {0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + NONMASK_V_GEN_TEST(OneDBool, OneDBool, NONMASK_V_VALUE_INIT, MsofMVBoolVB); + EXPECT_EQ(verifyResult(b, golden), true); +} +TEST(Golden, MsofMVBoolVB_2) { + dataA = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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}; + golden = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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}; + + NONMASK_V_GEN_TEST(OneDBool, OneDBool, NONMASK_V_VALUE_INIT, MsofMVBoolVB); + EXPECT_EQ(verifyResult(b, golden), true); +} +TEST(Golden, MsofMVBoolVBVBVB_m_0) { + dataM = {1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; + dataMO = {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 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, 1, 0, 1, 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, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + dataA = {0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + golden = {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 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, 1, 0, 1, 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, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + + MASK_V_GEN_TEST(OneDBool, OneDBool, OneDBool, OneDBool, MASK_V_VALUE_INIT, + MsofMVBoolVBVBVB_m); + EXPECT_EQ(verifyResult(d, golden), true); +} +TEST(Golden, MsofMVBoolVBVBVB_m_1) { + dataM = {1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; + dataMO = {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 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, 1, 0, 1, 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, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + dataA = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 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, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0}; + golden = {0, 0, 0, 0, 0, 1, 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, 1, 0, 1, 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, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0}; + + MASK_V_GEN_TEST(OneDBool, OneDBool, OneDBool, OneDBool, MASK_V_VALUE_INIT, + MsofMVBoolVBVBVB_m); + EXPECT_EQ(verifyResult(d, golden), true); +} diff --git a/test/testNegV.cpp b/test/testNegV.cpp new file mode 100644 index 0000000..b80df3d --- /dev/null +++ b/test/testNegV.cpp @@ -0,0 +1,34 @@ +#include "TestUtils.hpp" +#include + +#include + +using namespace RIF; + +std::vector golden = {-1, -2, -3, -4, 4, 3, 2, 1}; +std::vector dataA = {1, 2, 3, 4, -4, -3, -2, -1}; + +TEST(Golden, NegV8) { + Graph graph; + auto result = + NonMaskVOperatorTest(graph, dataA); + EXPECT_EQ(verifyResult(result, golden), true); +} +TEST(Golden, NegV16) { + Graph graph; + auto result = NonMaskVOperatorTest( + graph, dataA); + EXPECT_EQ(verifyResult(result, golden), true); +} +TEST(Golden, NegV32) { + Graph graph; + auto result = NonMaskVOperatorTest( + graph, dataA); + EXPECT_EQ(verifyResult(result, golden), true); +} +TEST(Golden, NegV64) { + Graph graph; + auto result = NonMaskVOperatorTest( + graph, dataA); + EXPECT_EQ(verifyResult(result, golden), true); +} diff --git a/test/testOneDFloatingPointValue.cpp b/test/testOneDFloatingPointValue.cpp new file mode 100644 index 0000000..1a7f00e --- /dev/null +++ b/test/testOneDFloatingPointValue.cpp @@ -0,0 +1,54 @@ +#include "Graph.hpp" +#include "Value.hpp" +#include "gtest/gtest.h" + +#include +#include + +using namespace RIF; + +TEST(OneDValue, Declare_CodeGen_Float16) { + Graph graph; + auto value = static_cast( + graph.getNewValue(CustomValType::OneDFloat16, "value", 70)); + auto op = graph.getNewOperator(CustomValType::Initialize, "op"); + op->addOutput(value); + + uint16_t tmp[] = { + 13, 300, 831, 629, 821, 101, 183, 30, 99, 909, 332, 533, 430, 64, + 96, 680, 647, 980, 599, 988, 311, 779, 43, 151, 474, 80, 725, 616, + 787, 406, 10, 549, 692, 354, 290, 499, 124, 8, 884, 570, 724, 211, + 165, 0, 698, 200, 855, 612, 249, 159, 613, 891, 900, 675, 621, 785, + 359, 777, 617, 617, 414, 844, 138, 39, 488, 461, 836, 975, 637, 592, + }; + + auto raw = value->raw; + for (int i = 0; i < 70; ++i) + raw[i] = tmp[i]; + + const char *expectedCode = + "#include \n#include \n#include " + "\n#include \n#include \n#include " + "\n#include \ntypedef _Float16 " + "float16_t;\ntypedef float float32_t;\ntypedef double " + "float64_t;\n#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & " + "0x03FF))\n#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & " + "0x007FFFFF))\n#define isNaNF64UI( a ) (((~(a) & UINT64_C( " + "0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF " + ")))\nfloat16_t value[70];\nvoid vinit_rif_op() {\nuint16_t tmp[] = " + "{13,300,831,629,821,101,183,30,99,909,332,533,430,64,96,680,647,980,599," + "988,311,779,43,151,474,80,725,616,787,406,10,549,692,354,290,499,124,8," + "884,570,724,211,165,0,698,200,855,612,249,159,613,891,900,675,621,785," + "359,777,617,617,414,844,138,39,488,461,836,975,637,592,};\nfor (int " + "i=0; i<70;++i) {union { uint16_t u16; float16_t f; } " + "converter;\nconverter.u16 = tmp[i];\nvalue[i] = converter.f;\n}\n}\nint " + "golden_vinit_rif_op() {\nreturn 1;\n}\nint main () " + "{\nvinit_rif_op();\nprintf(\"op : %s\\n\", golden_vinit_rif_op() ? " + "\"pass\" : \"fail\");\nint ret = 1; // 1 = success\nret &= " + "golden_vinit_rif_op();\nif (!ret) return 1;\nreturn 0; }\n"; + + std::stringstream generatedCode; + graph.generateCCode(generatedCode); + + EXPECT_EQ(generatedCode.str(), expectedCode); +} diff --git a/test/testOneDIntegralValue.cpp b/test/testOneDIntegralValue.cpp new file mode 100644 index 0000000..3a43479 --- /dev/null +++ b/test/testOneDIntegralValue.cpp @@ -0,0 +1,244 @@ +#include "Graph.hpp" +#include "Value.hpp" +#include "gtest/gtest.h" + +#include +#include + +using namespace RIF; + +TEST(OneDValue, Declare_CodeGen_Bool) { + Graph graph; + auto value = static_cast( + graph.getNewValue(CustomValType::OneDBool, "value", 70)); + auto op = graph.getNewOperator(CustomValType::Initialize, "op"); + op->addOutput(value); + + int64_t tmp[] = { + 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, + 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, + 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, + }; + auto data = getRawPointer(value); + auto raw = value->raw; + for (int i = 0; i < 70; ++i) + data[i] = raw[i] = tmp[i]; + + const char *expectedCode = + "#include \n#include \n#include " + "\n#include \n#include \n#include " + "\n#include \ntypedef _Float16 " + "float16_t;\ntypedef float float32_t;\ntypedef double " + "float64_t;\n#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & " + "0x03FF))\n#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & " + "0x007FFFFF))\n#define isNaNF64UI( a ) (((~(a) & UINT64_C( " + "0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF " + ")))\nint8_t value[70];\nvoid vinit_rif_op() {\nint8_t tmp[] = " + "{1,0,1,1,1,1,1,0,1,1,0,1,0,0,0,0,1,0,1,0,1,1,1,1,0,0,1,0,1,0,0,1,0,0,0," + "1,0,0,0,0,0,1,1,0,0,0,1,0,1,1,1,1,0,1,1,1,1,1,1,1,0,0,0,1,0,1,0,1,1,0,};" + "\nfor (int i=0; i<70;++i) {value[i] = tmp[i];\n}\n}\nint " + "golden_vinit_rif_op() {\nreturn 1;\n}\nint main () " + "{\nvinit_rif_op();\nprintf(\"op : %s\\n\", golden_vinit_rif_op() ? " + "\"pass\" : \"fail\");\nint ret = 1; // 1 = success\nret &= " + "golden_vinit_rif_op();\nif (!ret) return 1;\nreturn 0; }\n"; + + std::stringstream generatedCode; + graph.generateCCode(generatedCode); + + EXPECT_EQ(generatedCode.str(), expectedCode); +} + +TEST(OneDValue, Declare_CodeGen_Int8) { + Graph graph; + auto value = static_cast( + graph.getNewValue(CustomValType::OneDInt8, "value", 70)); + auto op = graph.getNewOperator(CustomValType::Initialize, "op"); + op->addOutput(value); + + int8_t tmp[] = { + 3, 0, 1, 9, 1, 1, 3, 0, 9, 9, 2, 3, 0, 4, 6, 0, 7, 0, 9, 8, 1, 9, 3, 1, + 4, 0, 5, 6, 7, 6, 0, 9, 2, 4, 0, 9, 4, 8, 4, 0, 4, 1, 5, 0, 8, 0, 5, 2, + 9, 9, 3, 1, 0, 5, 1, 5, 9, 7, 7, 7, 4, 4, 8, 9, 8, 1, 6, 5, 7, 2, + }; + auto data = getRawPointer(value); + auto raw = value->raw; + for (int i = 0; i < 70; ++i) + data[i] = raw[i] = tmp[i]; + + const char *expectedCode = + "#include \n#include \n#include " + "\n#include \n#include \n#include " + "\n#include \ntypedef _Float16 " + "float16_t;\ntypedef float float32_t;\ntypedef double " + "float64_t;\n#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & " + "0x03FF))\n#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & " + "0x007FFFFF))\n#define isNaNF64UI( a ) (((~(a) & UINT64_C( " + "0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF " + ")))\nint8_t value[70];\nvoid vinit_rif_op() {\nint8_t tmp[] = " + "{3,0,1,9,1,1,3,0,9,9,2,3,0,4,6,0,7,0,9,8,1,9,3,1,4,0,5,6,7,6,0,9,2,4,0," + "9,4,8,4,0,4,1,5,0,8,0,5,2,9,9,3,1,0,5,1,5,9,7,7,7,4,4,8,9,8,1,6,5,7,2,};" + "\nfor (int i=0; i<70;++i) {value[i] = tmp[i];\n}\n}\nint " + "golden_vinit_rif_op() {\nreturn 1;\n}\nint main () " + "{\nvinit_rif_op();\nprintf(\"op : %s\\n\", golden_vinit_rif_op() ? " + "\"pass\" : \"fail\");\nint ret = 1; // 1 = success\nret &= " + "golden_vinit_rif_op();\nif (!ret) return 1;\nreturn 0; }\n"; + + std::stringstream generatedCode; + graph.generateCCode(generatedCode); + + EXPECT_EQ(generatedCode.str(), expectedCode); +} + +TEST(OneDValue, Declare_CodeGen_Int16) { + Graph graph; + auto value = static_cast( + graph.getNewValue(CustomValType::OneDInt16, "value", 70)); + auto op = graph.getNewOperator(CustomValType::Initialize, "op"); + op->addOutput(value); + + int16_t tmp[] = { + 13, 300, 831, 629, 821, 101, 183, 30, 99, 909, 332, 533, 430, 64, + 96, 680, 647, 980, 599, 988, 311, 779, 43, 151, 474, 80, 725, 616, + 787, 406, 10, 549, 692, 354, 290, 499, 124, 8, 884, 570, 724, 211, + 165, 0, 698, 200, 855, 612, 249, 159, 613, 891, 900, 675, 621, 785, + 359, 777, 617, 617, 414, 844, 138, 39, 488, 461, 836, 975, 637, 592, + }; + auto data = getRawPointer(value); + auto raw = value->raw; + for (int i = 0; i < 70; ++i) + data[i] = raw[i] = tmp[i]; + + const char *expectedCode = + "#include \n#include \n#include " + "\n#include \n#include \n#include " + "\n#include \ntypedef _Float16 " + "float16_t;\ntypedef float float32_t;\ntypedef double " + "float64_t;\n#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & " + "0x03FF))\n#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & " + "0x007FFFFF))\n#define isNaNF64UI( a ) (((~(a) & UINT64_C( " + "0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF " + ")))\nint16_t value[70];\nvoid vinit_rif_op() {\nint16_t tmp[] = " + "{13,300,831,629,821,101,183,30,99,909,332,533,430,64,96,680,647,980,599," + "988,311,779,43,151,474,80,725,616,787,406,10,549,692,354,290,499,124,8," + "884,570,724,211,165,0,698,200,855,612,249,159,613,891,900,675,621,785," + "359,777,617,617,414,844,138,39,488,461,836,975,637,592,};\nfor (int " + "i=0; i<70;++i) {value[i] = tmp[i];\n}\n}\nint golden_vinit_rif_op() " + "{\nreturn 1;\n}\nint main () {\nvinit_rif_op();\nprintf(\"op : %s\\n\", " + "golden_vinit_rif_op() ? \"pass\" : \"fail\");\nint ret = 1; // 1 = " + "success\nret &= golden_vinit_rif_op();\nif (!ret) return 1;\nreturn 0; " + "}\n"; + + std::stringstream generatedCode; + graph.generateCCode(generatedCode); + + EXPECT_EQ(generatedCode.str(), expectedCode); +} + +TEST(OneDValue, Declare_CodeGen_Int32) { + Graph graph; + auto value = static_cast( + graph.getNewValue(CustomValType::OneDInt32, "value", 70)); + auto op = graph.getNewOperator(CustomValType::Initialize, "op"); + op->addOutput(value); + + int32_t tmp[] = { + 5013, 1300, 2831, 3629, 8821, 2101, 8183, 6030, 6099, 9909, 5332, 533, + 8430, 1064, 4096, 1680, 3647, 1980, 7599, 4988, 6311, 6779, 5043, 2151, + 4474, 3080, 3725, 6616, 5787, 7406, 2010, 1549, 8692, 354, 7290, 6499, + 5124, 5008, 5884, 4570, 9724, 4211, 4165, 6000, 8698, 4200, 6855, 4612, + 8249, 8159, 4613, 9891, 6900, 1675, 621, 1785, 4359, 777, 1617, 8617, + 8414, 2844, 5138, 5039, 5488, 2461, 4836, 7975, 5637, 4592, + }; + auto data = getRawPointer(value); + auto raw = value->raw; + for (int i = 0; i < 70; ++i) + data[i] = raw[i] = tmp[i]; + + const char *expectedCode = + "#include \n#include \n#include " + "\n#include \n#include \n#include " + "\n#include \ntypedef _Float16 " + "float16_t;\ntypedef float float32_t;\ntypedef double " + "float64_t;\n#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & " + "0x03FF))\n#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & " + "0x007FFFFF))\n#define isNaNF64UI( a ) (((~(a) & UINT64_C( " + "0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF " + ")))\nint32_t value[70];\nvoid vinit_rif_op() {\nint32_t tmp[] = " + "{5013,1300,2831,3629,8821,2101,8183,6030,6099,9909,5332,533,8430,1064," + "4096,1680,3647,1980,7599,4988,6311,6779,5043,2151,4474,3080,3725,6616," + "5787,7406,2010,1549,8692,354,7290,6499,5124,5008,5884,4570,9724,4211," + "4165,6000,8698,4200,6855,4612,8249,8159,4613,9891,6900,1675,621,1785," + "4359,777,1617,8617,8414,2844,5138,5039,5488,2461,4836,7975,5637,4592,};" + "\nfor (int i=0; i<70;++i) {value[i] = tmp[i];\n}\n}\nint " + "golden_vinit_rif_op() {\nreturn 1;\n}\nint main () " + "{\nvinit_rif_op();\nprintf(\"op : %s\\n\", golden_vinit_rif_op() ? " + "\"pass\" : \"fail\");\nint ret = 1; // 1 = success\nret &= " + "golden_vinit_rif_op();\nif (!ret) return 1;\nreturn 0; }\n"; + + std::stringstream generatedCode; + graph.generateCCode(generatedCode); + + EXPECT_EQ(generatedCode.str(), expectedCode); +} + +TEST(OneDValue, Declare_CodeGen_Int64) { + Graph graph; + auto value = static_cast( + graph.getNewValue(CustomValType::OneDInt64, "value", 70)); + auto op = graph.getNewOperator(CustomValType::Initialize, "op"); + op->addOutput(value); + + int64_t tmp[] = { + 1118455013, 949041300, 1176082831, 984653629, 564558821, 957352101, + 1269278183, 1803356030, 1568086099, 903749909, 172885332, 138400533, + 372968430, 2123121064, 707444096, 1543451680, 1337413647, 199831980, + 2059147599, 1394724988, 1358866311, 2124986779, 1999745043, 1595862151, + 1731904474, 1125143080, 1686233725, 188526616, 1028455787, 160537406, + 912722010, 643131549, 826748692, 946070354, 635517290, 1702916499, + 1403035124, 1440885008, 1928725884, 1977764570, 1537239724, 12284211, + 302304165, 2027276000, 452188698, 2138304200, 339856855, 1815144612, + 2130288249, 907238159, 817844613, 1619069891, 942366900, 668591675, + 1385840621, 215681785, 11364359, 2022220777, 1388401617, 308668617, + 1620438414, 320812844, 1717515138, 1949225039, 762195488, 479612461, + 1340504836, 613837975, 263405637, 1094744592, + }; + auto data = getRawPointer(value); + auto raw = value->raw; + for (int i = 0; i < 70; ++i) + data[i] = raw[i] = tmp[i]; + + const char *expectedCode = + "#include \n#include \n#include " + "\n#include \n#include \n#include " + "\n#include \ntypedef _Float16 " + "float16_t;\ntypedef float float32_t;\ntypedef double " + "float64_t;\n#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & " + "0x03FF))\n#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & " + "0x007FFFFF))\n#define isNaNF64UI( a ) (((~(a) & UINT64_C( " + "0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF " + ")))\nint64_t value[70];\nvoid vinit_rif_op() {\nint64_t tmp[] = " + "{1118455013ll,949041300ll,1176082831ll,984653629ll,564558821ll," + "957352101ll,1269278183ll,1803356030ll,1568086099ll,903749909ll," + "172885332ll,138400533ll,372968430ll,2123121064ll,707444096ll," + "1543451680ll,1337413647ll,199831980ll,2059147599ll,1394724988ll," + "1358866311ll,2124986779ll,1999745043ll,1595862151ll,1731904474ll," + "1125143080ll,1686233725ll,188526616ll,1028455787ll,160537406ll," + "912722010ll,643131549ll,826748692ll,946070354ll,635517290ll," + "1702916499ll,1403035124ll,1440885008ll,1928725884ll,1977764570ll," + "1537239724ll,12284211ll,302304165ll,2027276000ll,452188698ll," + "2138304200ll,339856855ll,1815144612ll,2130288249ll,907238159ll," + "817844613ll,1619069891ll,942366900ll,668591675ll,1385840621ll," + "215681785ll,11364359ll,2022220777ll,1388401617ll,308668617ll," + "1620438414ll,320812844ll,1717515138ll,1949225039ll,762195488ll," + "479612461ll,1340504836ll,613837975ll,263405637ll,1094744592ll,};\nfor " + "(int i=0; i<70;++i) {value[i] = tmp[i];\n}\n}\nint " + "golden_vinit_rif_op() {\nreturn 1;\n}\nint main () " + "{\nvinit_rif_op();\nprintf(\"op : %s\\n\", golden_vinit_rif_op() ? " + "\"pass\" : \"fail\");\nint ret = 1; // 1 = success\nret &= " + "golden_vinit_rif_op();\nif (!ret) return 1;\nreturn 0; }\n"; + + std::stringstream generatedCode; + graph.generateCCode(generatedCode); + + EXPECT_EQ(generatedCode.str(), expectedCode); +} diff --git a/test/testOrVV.cpp b/test/testOrVV.cpp new file mode 100644 index 0000000..f076657 --- /dev/null +++ b/test/testOrVV.cpp @@ -0,0 +1,28 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {9, 7, 7, 10, 10, 11, 31, 127}; +std::vector dataA = {1, 2, 3, 10, 0, 10, 16, 31}; +std::vector dataB = {8, 7, 6, 0, 10, 9, 31, 127}; + +TEST(Golden, OrVV8VInt8) { + NONMASK_VV_VX_GEN_TEST(OneDInt8, OneDInt8, OneDInt8, NONMASK_VV_VALUE_INIT, + OrVV8VInt8); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, OrVV16VInt16) { + NONMASK_VV_VX_GEN_TEST(OneDInt16, OneDInt16, OneDInt16, NONMASK_VV_VALUE_INIT, + OrVV16VInt16); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, OrVV32VInt32) { + NONMASK_VV_VX_GEN_TEST(OneDInt32, OneDInt32, OneDInt32, NONMASK_VV_VALUE_INIT, + OrVV32VInt32); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, OrVV64VInt64) { + NONMASK_VV_VX_GEN_TEST(OneDInt64, OneDInt64, OneDInt64, NONMASK_VV_VALUE_INIT, + OrVV64VInt64); + EXPECT_EQ(verifyResult(c, golden), true); +} diff --git a/test/testOrVVMask.cpp b/test/testOrVVMask.cpp new file mode 100644 index 0000000..ecc9654 --- /dev/null +++ b/test/testOrVVMask.cpp @@ -0,0 +1,30 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {9, 99, -13, -79, 10, 11, 94, 127, 111, -11}; +std::vector dataA = {1, 2, -30, -111, 0, 10, 16, 31, 111, -111}; +std::vector dataB = {8, 7, -111, -80, 10, 9, 31, 127, 100, 100}; +std::vector dataM = {1, 0, 1, 1, 1, 1, 0, 1, 1, 1}; +std::vector dataMO = {100, 99, 98, 97, 96, 95, 94, 93, 92, 91}; + +TEST(Golden, OrVV8VInt8_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt8, OneDInt8, OneDInt8, OneDInt8, + MASK_VV_VALUE_INIT, OrVV8VInt8_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, OrVV16VInt16_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt16, OneDInt16, OneDInt16, OneDInt16, + MASK_VV_VALUE_INIT, OrVV16VInt16_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, OrVV32VInt32_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt32, OneDInt32, OneDInt32, OneDInt32, + MASK_VV_VALUE_INIT, OrVV32VInt32_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, OrVV64VInt64_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt64, OneDInt64, OneDInt64, OneDInt64, + MASK_VV_VALUE_INIT, OrVV64VInt64_m); + EXPECT_EQ(verifyResult(output, golden), true); +} diff --git a/test/testOrVX.cpp b/test/testOrVX.cpp new file mode 100644 index 0000000..aee0b03 --- /dev/null +++ b/test/testOrVX.cpp @@ -0,0 +1,28 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {7, 7, 7, 7, -1, -1, -1, -1}; +std::vector dataA = {1, 2, 3, 4, -4, -3, -2, -1}; +int dataB = 7; + +TEST(Golden, OrVX8VInt8) { + NONMASK_VV_VX_GEN_TEST(OneDInt8, ScalarInt8, OneDInt8, NONMASK_VX_VALUE_INIT, + OrVX8VInt8); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, OrVX16VInt16) { + NONMASK_VV_VX_GEN_TEST(OneDInt16, ScalarInt16, OneDInt16, + NONMASK_VX_VALUE_INIT, OrVX16VInt16); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, OrVX32VInt32) { + NONMASK_VV_VX_GEN_TEST(OneDInt32, ScalarInt32, OneDInt32, + NONMASK_VX_VALUE_INIT, OrVX32VInt32); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, OrVX64VInt64) { + NONMASK_VV_VX_GEN_TEST(OneDInt64, ScalarInt64, OneDInt64, + NONMASK_VX_VALUE_INIT, OrVX64VInt64); + EXPECT_EQ(verifyResult(c, golden), true); +} diff --git a/test/testOrVXMask.cpp b/test/testOrVXMask.cpp new file mode 100644 index 0000000..f863072 --- /dev/null +++ b/test/testOrVXMask.cpp @@ -0,0 +1,30 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {15, 99, 15, 15, 15, -1, 94, -1, -1, -1}; +std::vector dataM = {1, 0, 1, 1, 1, 1, 0, 1, 1, 1}; +std::vector dataMO = {100, 99, 98, 97, 96, 95, 94, 93, 92, 91}; +std::vector dataA = {1, 2, 3, 4, 5, -5, -4, -3, -2, -1}; +int dataB = 15; + +TEST(Golden, OrVX8VInt8_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt8, OneDInt8, ScalarInt8, OneDInt8, + MASK_VX_VALUE_INIT, OrVX8VInt8_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, OrVX16VInt16_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt16, OneDInt16, ScalarInt16, OneDInt16, + MASK_VX_VALUE_INIT, OrVX16VInt16_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, OrVX32VInt32_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt32, OneDInt32, ScalarInt32, OneDInt32, + MASK_VX_VALUE_INIT, OrVX32VInt32_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, OrVX64VInt64_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt64, OneDInt64, ScalarInt64, OneDInt64, + MASK_VX_VALUE_INIT, OrVX64VInt64_m); + EXPECT_EQ(verifyResult(output, golden), true); +} diff --git a/test/testPoc.cpp b/test/testPoc.cpp new file mode 100644 index 0000000..8735f5e --- /dev/null +++ b/test/testPoc.cpp @@ -0,0 +1,49 @@ +// poc output should be stay the same +#include "Graph.hpp" +#include "TestUtils.hpp" +#include "Value.hpp" +#include + +#include +#include +#include +#include + +using namespace RIF; + +TEST(ProofOfConcept, Graphviz) { + + Graph graph; + const int length = 15; + + auto a = getInitializeValue(OneDInt32, graph, "A", length); + auto b = getInitializeValue(OneDInt32, graph, "B", length); + auto c = graph.getNewValue(OneDInt32, "value_C", length); + + auto op1 = graph.getNewOperator(AddVV32VInt32, "op1"); + + op1->addInput(0, a); + op1->addInput(1, b); + op1->addOutput(c); + + const char *expectedGraphviz = "digraph{\n" + "vinit_rif_init_A[shape=oval]\n" + "vinit_rif_init_B[shape=oval]\n" + "vadd_vv_op1[shape=oval]\n" + "OneDInt32_value_A[shape=rectangle]\n" + "OneDInt32_value_B[shape=rectangle]\n" + "OneDInt32_value_C[shape=rectangle]\n" + "vinit_rif_init_A -> OneDInt32_value_A\n" + "OneDInt32_value_A -> vadd_vv_op1\n" + "vinit_rif_init_B -> OneDInt32_value_B\n" + "OneDInt32_value_B -> vadd_vv_op1\n" + "vadd_vv_op1 -> OneDInt32_value_C\n" + "}\n"; + + std::stringstream generatedGraphviz; + + graph.generateData(); + graph.generateGraphViz(generatedGraphviz); + + EXPECT_EQ(generatedGraphviz.str(), expectedGraphviz); +} diff --git a/test/testPolicy.cpp b/test/testPolicy.cpp new file mode 100644 index 0000000..bfefb6e --- /dev/null +++ b/test/testPolicy.cpp @@ -0,0 +1,50 @@ +#include "TestUtils.hpp" +using namespace RIF; + +std::vector goldenTA = {9, -1, 9, -1, 8, -1, 4, -1}; +std::vector goldenTU = {9, 102, 9, 104, 8, 106, 4, 108}; +std::vector goldenTAMA = {9, -1, -1, -1, 8, -1, -1, -1}; +std::vector goldenTAMU = {9, -1, 103, -1, 8, -1, 107, -1}; +std::vector goldenTUMA = {9, 102, -1, 104, 8, 106, -1, 108}; +std::vector goldenTUMU = {9, 102, 103, 104, 8, 106, 107, 108}; + +std::vector dataM = {1, 1, 0, 0, 1, 1, 0, 1}; +std::vector dataMO = {101, 102, 103, 104, 105, 106, 107, 108}; +std::vector dataA = {1, 2, 3, 4, 4, 3, 2, 1}; +std::vector dataB = {8, 7, 6, 5, 4, 3, 2, 1}; + +TEST(Golden, AddVV8VInt8TA) { + NONMASK_VV_VX_GEN_TEST(OneDInt8, OneDInt8, OneDInt8, NONMASK_VV_VALUE_INIT, + AddVV8VInt8TA); + EXPECT_EQ(verifyResult(c, goldenTA), true); +} + +TEST(Golden, AddVV8VInt8TU) { + NONMASK_TA_VV_VX_GEN_TEST(OneDInt8, OneDInt8, OneDInt8, OneDInt8, + NONMASK_TA_VV_VALUE_INIT, AddVV8VInt8TU); + EXPECT_EQ(verifyResult(output, goldenTU), true); +} + +TEST(Golden, AddVV8VInt8TAMA) { + MASK_TAMA_VV_VX_GEN_TEST(OneDBool, OneDInt8, OneDInt8, OneDInt8, + MASK_TAMA_VV_VALUE_INIT, AddVV8VInt8TAMA); + EXPECT_EQ(verifyResult(output, goldenTAMA), true); +} + +TEST(Golden, AddVV8VInt8TAMU) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt8, OneDInt8, OneDInt8, OneDInt8, + MASK_VV_VALUE_INIT, AddVV8VInt8TAMU); + EXPECT_EQ(verifyResult(output, goldenTAMU), true); +} + +TEST(Golden, AddVV8VInt8TUMA) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt8, OneDInt8, OneDInt8, OneDInt8, + MASK_VV_VALUE_INIT, AddVV8VInt8TUMA); + EXPECT_EQ(verifyResult(output, goldenTUMA), true); +} + +TEST(Golden, AddVV8VInt8TUMU) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt8, OneDInt8, OneDInt8, OneDInt8, + MASK_VV_VALUE_INIT, AddVV8VInt8TUMU); + EXPECT_EQ(verifyResult(output, goldenTUMU), true); +} diff --git a/test/testRsubVX.cpp b/test/testRsubVX.cpp new file mode 100644 index 0000000..546d8c7 --- /dev/null +++ b/test/testRsubVX.cpp @@ -0,0 +1,28 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {1, 0, -1, -2, -2, -1, 0, 1}; +std::vector dataA = {1, 2, 3, 4, 4, 3, 2, 1}; +int dataB = 2; + +TEST(Golden, RsubVX8VInt8) { + NONMASK_VV_VX_GEN_TEST(OneDInt8, ScalarInt8, OneDInt8, NONMASK_VX_VALUE_INIT, + RsubVX8VInt8); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, RsubVX16VInt16) { + NONMASK_VV_VX_GEN_TEST(OneDInt16, ScalarInt16, OneDInt16, + NONMASK_VX_VALUE_INIT, RsubVX16VInt16); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, RsubVX32VInt32) { + NONMASK_VV_VX_GEN_TEST(OneDInt32, ScalarInt32, OneDInt32, + NONMASK_VX_VALUE_INIT, RsubVX32VInt32); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, RsubVX64VInt64) { + NONMASK_VV_VX_GEN_TEST(OneDInt64, ScalarInt64, OneDInt64, + NONMASK_VX_VALUE_INIT, RsubVX64VInt64); + EXPECT_EQ(verifyResult(c, golden), true); +} diff --git a/test/testRsubVXMask.cpp b/test/testRsubVXMask.cpp new file mode 100644 index 0000000..d4b3d07 --- /dev/null +++ b/test/testRsubVXMask.cpp @@ -0,0 +1,30 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {2, 99, 0, -1, -2, -3, 94, -5, -6, -7}; +std::vector dataM = {1, 0, 1, 1, 1, 1, 0, 1, 1, 1}; +std::vector dataMO = {100, 99, 98, 97, 96, 95, 94, 93, 92, 91}; +std::vector dataA = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; +int dataB = 3; + +TEST(Golden, RsubVX8VInt8_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt8, OneDInt8, ScalarInt8, OneDInt8, + MASK_VX_VALUE_INIT, RsubVX8VInt8_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, RsubVX16VInt16_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt16, OneDInt16, ScalarInt16, OneDInt16, + MASK_VX_VALUE_INIT, RsubVX16VInt16_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, RsubVX32VInt32_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt32, OneDInt32, ScalarInt32, OneDInt32, + MASK_VX_VALUE_INIT, RsubVX32VInt32_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, RsubVX64VInt64_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt64, OneDInt64, ScalarInt64, OneDInt64, + MASK_VX_VALUE_INIT, RsubVX64VInt64_m); + EXPECT_EQ(verifyResult(output, golden), true); +} diff --git a/test/testScalarValue.cpp b/test/testScalarValue.cpp new file mode 100644 index 0000000..5d63e41 --- /dev/null +++ b/test/testScalarValue.cpp @@ -0,0 +1,141 @@ +#include "Graph.hpp" +#include "Value.hpp" +#include "gtest/gtest.h" + +#include +#include + +using namespace RIF; + +TEST(ScalarValue, Declare_CodeGen_Int8) { + Graph graph; + auto value = static_cast( + graph.getNewValue(CustomValType::ScalarInt8, "value", 1)); + auto op = graph.getNewOperator(CustomValType::Initialize, "op"); + op->addOutput(value); + + auto data = getRawPointer(value); + auto raw = value->raw; + int8_t tmp = 3; + *data = *raw = tmp; + + const char *expectedCode = + "#include \n#include \n#include " + "\n#include \n#include \n#include " + "\n#include \ntypedef _Float16 " + "float16_t;\ntypedef float float32_t;\ntypedef double " + "float64_t;\n#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & " + "0x03FF))\n#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & " + "0x007FFFFF))\n#define isNaNF64UI( a ) (((~(a) & UINT64_C( " + "0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF " + ")))\nint8_t value;\nvoid vinit_rif_op() {\nint8_t tmp = 3;\nvalue = " + "tmp;\n}\nint golden_vinit_rif_op() {\nreturn 1;\n}\nint main () " + "{\nvinit_rif_op();\nprintf(\"op : %s\\n\", golden_vinit_rif_op() ? " + "\"pass\" : \"fail\");\nint ret = 1; // 1 = success\nret &= " + "golden_vinit_rif_op();\nif (!ret) return 1;\nreturn 0; }\n"; + + std::stringstream generatedCode; + graph.generateCCode(generatedCode); + + EXPECT_EQ(generatedCode.str(), expectedCode); +} + +TEST(ScalarValue, Declare_CodeGen_Int16) { + Graph graph; + auto value = static_cast( + graph.getNewValue(CustomValType::ScalarInt16, "value", 1)); + auto op = graph.getNewOperator(CustomValType::Initialize, "op"); + op->addOutput(value); + + auto data = getRawPointer(value); + auto raw = value->raw; + int16_t tmp = 13; + *data = *raw = tmp; + + const char *expectedCode = + "#include \n#include \n#include " + "\n#include \n#include \n#include " + "\n#include \ntypedef _Float16 " + "float16_t;\ntypedef float float32_t;\ntypedef double " + "float64_t;\n#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & " + "0x03FF))\n#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & " + "0x007FFFFF))\n#define isNaNF64UI( a ) (((~(a) & UINT64_C( " + "0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF " + ")))\nint16_t value;\nvoid vinit_rif_op() {\nint16_t tmp = 13;\nvalue = " + "tmp;\n}\nint golden_vinit_rif_op() {\nreturn 1;\n}\nint main () " + "{\nvinit_rif_op();\nprintf(\"op : %s\\n\", golden_vinit_rif_op() ? " + "\"pass\" : \"fail\");\nint ret = 1; // 1 = success\nret &= " + "golden_vinit_rif_op();\nif (!ret) return 1;\nreturn 0; }\n"; + + std::stringstream generatedCode; + graph.generateCCode(generatedCode); + + EXPECT_EQ(generatedCode.str(), expectedCode); +} + +TEST(ScalarValue, Declare_CodeGen_Int32) { + Graph graph; + auto value = static_cast( + graph.getNewValue(CustomValType::ScalarInt32, "value", 1)); + auto op = graph.getNewOperator(CustomValType::Initialize, "op"); + op->addOutput(value); + + auto data = getRawPointer(value); + auto raw = value->raw; + int32_t tmp = 5013; + *data = *raw = tmp; + + const char *expectedCode = + "#include \n#include \n#include " + "\n#include \n#include \n#include " + "\n#include \ntypedef _Float16 " + "float16_t;\ntypedef float float32_t;\ntypedef double " + "float64_t;\n#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & " + "0x03FF))\n#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & " + "0x007FFFFF))\n#define isNaNF64UI( a ) (((~(a) & UINT64_C( " + "0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF " + ")))\nint32_t value;\nvoid vinit_rif_op() {\nint32_t tmp = 5013;\nvalue " + "= tmp;\n}\nint golden_vinit_rif_op() {\nreturn 1;\n}\nint main () " + "{\nvinit_rif_op();\nprintf(\"op : %s\\n\", golden_vinit_rif_op() ? " + "\"pass\" : \"fail\");\nint ret = 1; // 1 = success\nret &= " + "golden_vinit_rif_op();\nif (!ret) return 1;\nreturn 0; }\n"; + + std::stringstream generatedCode; + graph.generateCCode(generatedCode); + + EXPECT_EQ(generatedCode.str(), expectedCode); +} + +TEST(ScalarValue, Declare_CodeGen_Int64) { + Graph graph; + auto value = static_cast( + graph.getNewValue(CustomValType::ScalarInt64, "value", 1)); + auto op = graph.getNewOperator(CustomValType::Initialize, "op"); + op->addOutput(value); + + auto data = getRawPointer(value); + auto raw = value->raw; + int32_t tmp = 1118455013; + *data = *raw = tmp; + + const char *expectedCode = + "#include \n#include \n#include " + "\n#include \n#include \n#include " + "\n#include \ntypedef _Float16 " + "float16_t;\ntypedef float float32_t;\ntypedef double " + "float64_t;\n#define isNaNF16UI( a ) (((~(a) & 0x7C00) == 0) && ((a) & " + "0x03FF))\n#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & " + "0x007FFFFF))\n#define isNaNF64UI( a ) (((~(a) & UINT64_C( " + "0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF " + ")))\nint64_t value;\nvoid vinit_rif_op() {\nint64_t tmp = " + "1118455013ll;\nvalue = tmp;\n}\nint golden_vinit_rif_op() {\nreturn " + "1;\n}\nint main () {\nvinit_rif_op();\nprintf(\"op : %s\\n\", " + "golden_vinit_rif_op() ? \"pass\" : \"fail\");\nint ret = 1; // 1 = " + "success\nret &= golden_vinit_rif_op();\nif (!ret) return 1;\nreturn 0; " + "}\n"; + + std::stringstream generatedCode; + graph.generateCCode(generatedCode); + + EXPECT_EQ(generatedCode.str(), expectedCode); +} diff --git a/test/testSllVV.cpp b/test/testSllVV.cpp new file mode 100644 index 0000000..75f6e8c --- /dev/null +++ b/test/testSllVV.cpp @@ -0,0 +1,28 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {32, 16, 12, 8, 8, 12, 16, 32}; +std::vector dataA = {1, 2, 3, 4, 4, 3, 2, 1}; +std::vector dataB = {5, 3, 2, 1, 1, 2, 3, 5}; + +TEST(Golden, SllVV8VInt8) { + NONMASK_VV_VX_GEN_TEST(OneDInt8, OneDUInt8, OneDInt8, NONMASK_VV_VALUE_INIT, + SllVV8VInt8); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, SllVV16VInt16) { + NONMASK_VV_VX_GEN_TEST(OneDInt16, OneDUInt16, OneDInt16, + NONMASK_VV_VALUE_INIT, SllVV16VInt16); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, SllVV32VInt32) { + NONMASK_VV_VX_GEN_TEST(OneDInt32, OneDUInt32, OneDInt32, + NONMASK_VV_VALUE_INIT, SllVV32VInt32); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, SllVV64VInt64) { + NONMASK_VV_VX_GEN_TEST(OneDInt64, OneDUInt64, OneDInt64, + NONMASK_VV_VALUE_INIT, SllVV64VInt64); + EXPECT_EQ(verifyResult(c, golden), true); +} diff --git a/test/testSllVVMask.cpp b/test/testSllVVMask.cpp new file mode 100644 index 0000000..c55e8c5 --- /dev/null +++ b/test/testSllVVMask.cpp @@ -0,0 +1,30 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {40, 99, 28, 32, 18, 18, 94, 56, 48, 80}; +std::vector dataA = {5, 6, 7, 8, 9, 9, 8, 7, 6, 5}; +std::vector dataB = {3, 3, 2, 2, 1, 1, 2, 3, 3, 4}; +std::vector dataM = {1, 0, 1, 1, 1, 1, 0, 1, 1, 1}; +std::vector dataMO = {100, 99, 98, 97, 96, 95, 94, 93, 92, 91}; + +TEST(Golden, SllVV8VInt8_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt8, OneDInt8, OneDUInt8, OneDInt8, + MASK_VV_VALUE_INIT, SllVV8VInt8_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, SllVV16VInt16_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt16, OneDInt16, OneDUInt16, OneDInt16, + MASK_VV_VALUE_INIT, SllVV16VInt16_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, SllVV32VInt32_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt32, OneDInt32, OneDUInt32, OneDInt32, + MASK_VV_VALUE_INIT, SllVV32VInt32_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, SllVV64VInt64_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt64, OneDInt64, OneDUInt64, OneDInt64, + MASK_VV_VALUE_INIT, SllVV64VInt64_m); + EXPECT_EQ(verifyResult(output, golden), true); +} diff --git a/test/testSllVX.cpp b/test/testSllVX.cpp new file mode 100644 index 0000000..832a2ed --- /dev/null +++ b/test/testSllVX.cpp @@ -0,0 +1,28 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {8, 16, 24, 32, -32, -24, -16, -8}; +std::vector dataA = {1, 2, 3, 4, -4, -3, -2, -1}; +int dataB = 3; + +TEST(Golden, SllVX8VInt8) { + NONMASK_VV_VX_GEN_TEST(OneDInt8, ScalarUInt32, OneDInt8, + NONMASK_VX_VALUE_INIT, SllVX8VInt8); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, SllVX16VInt16) { + NONMASK_VV_VX_GEN_TEST(OneDInt16, ScalarUInt32, OneDInt16, + NONMASK_VX_VALUE_INIT, SllVX16VInt16); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, SllVX32VInt32) { + NONMASK_VV_VX_GEN_TEST(OneDInt32, ScalarUInt32, OneDInt32, + NONMASK_VX_VALUE_INIT, SllVX32VInt32); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, SllVX64VInt64) { + NONMASK_VV_VX_GEN_TEST(OneDInt64, ScalarUInt32, OneDInt64, + NONMASK_VX_VALUE_INIT, SllVX64VInt64); + EXPECT_EQ(verifyResult(c, golden), true); +} diff --git a/test/testSllVXMask.cpp b/test/testSllVXMask.cpp new file mode 100644 index 0000000..550790b --- /dev/null +++ b/test/testSllVXMask.cpp @@ -0,0 +1,30 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {8, 99, 24, 32, 40, -40, 94, -24, -16, -8}; +std::vector dataM = {1, 0, 1, 1, 1, 1, 0, 1, 1, 1}; +std::vector dataMO = {100, 99, 98, 97, 96, 95, 94, 93, 92, 91}; +std::vector dataA = {1, 2, 3, 4, 5, -5, -4, -3, -2, -1}; +int dataB = 3; + +TEST(Golden, SllVX8VInt8_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt8, OneDInt8, ScalarUInt32, OneDInt8, + MASK_VX_VALUE_INIT, SllVX8VInt8_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, SllVX16VInt16_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt16, OneDInt16, ScalarUInt32, OneDInt16, + MASK_VX_VALUE_INIT, SllVX16VInt16_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, SllVX32VInt32_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt32, OneDInt32, ScalarUInt32, OneDInt32, + MASK_VX_VALUE_INIT, SllVX32VInt32_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, SllVX64VInt64_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt64, OneDInt64, ScalarUInt32, OneDInt64, + MASK_VX_VALUE_INIT, SllVX64VInt64_m); + EXPECT_EQ(verifyResult(output, golden), true); +} diff --git a/test/testSraVV.cpp b/test/testSraVV.cpp new file mode 100644 index 0000000..0663b56 --- /dev/null +++ b/test/testSraVV.cpp @@ -0,0 +1,28 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {15, 1, 3, -4, 2, 3, 4, 7}; +std::vector dataA = {120, 7, 50, -50, 32, 6, 8, 14}; +std::vector dataB = {3, 2, 4, 4, 4, 1, 1, 1}; + +TEST(Golden, SraVV8VInt8) { + NONMASK_VV_VX_GEN_TEST(OneDInt8, OneDUInt8, OneDInt8, NONMASK_VV_VALUE_INIT, + SraVV8VInt8); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, SraVV16VInt16) { + NONMASK_VV_VX_GEN_TEST(OneDInt16, OneDUInt16, OneDInt16, + NONMASK_VV_VALUE_INIT, SraVV16VInt16); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, SraVV32VInt32) { + NONMASK_VV_VX_GEN_TEST(OneDInt32, OneDUInt32, OneDInt32, + NONMASK_VV_VALUE_INIT, SraVV32VInt32); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, SraVV64VInt64) { + NONMASK_VV_VX_GEN_TEST(OneDInt64, OneDUInt64, OneDInt64, + NONMASK_VV_VALUE_INIT, SraVV64VInt64); + EXPECT_EQ(verifyResult(c, golden), true); +} diff --git a/test/testSraVVMask.cpp b/test/testSraVVMask.cpp new file mode 100644 index 0000000..0d3f7b8 --- /dev/null +++ b/test/testSraVVMask.cpp @@ -0,0 +1,30 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {15, 99, 3, -4, 2, 3, 94, 7, 5, 2}; +std::vector dataA = {120, 7, 50, -50, 32, 6, 8, 14, 10, 10}; +std::vector dataB = {3, 2, 4, 4, 4, 1, 1, 1, 1, 2}; +std::vector dataM = {1, 0, 1, 1, 1, 1, 0, 1, 1, 1}; +std::vector dataMO = {100, 99, 98, 97, 96, 95, 94, 93, 92, 91}; + +TEST(Golden, SraVV8VInt8_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt8, OneDInt8, OneDUInt8, OneDInt8, + MASK_VV_VALUE_INIT, SraVV8VInt8_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, SraVV16VInt16_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt16, OneDInt16, OneDUInt16, OneDInt16, + MASK_VV_VALUE_INIT, SraVV16VInt16_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, SraVV32VInt32_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt32, OneDInt32, OneDUInt32, OneDInt32, + MASK_VV_VALUE_INIT, SraVV32VInt32_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, SraVV64VInt64_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt64, OneDInt64, OneDUInt64, OneDInt64, + MASK_VV_VALUE_INIT, SraVV64VInt64_m); + EXPECT_EQ(verifyResult(output, golden), true); +} diff --git a/test/testSraVX.cpp b/test/testSraVX.cpp new file mode 100644 index 0000000..09f0999 --- /dev/null +++ b/test/testSraVX.cpp @@ -0,0 +1,28 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {5, 4, 5, 2, -3, -4, -7, -9}; +std::vector dataA = {45, 37, 41, 17, -19, -29, -53, -67}; +int dataB = 3; + +TEST(Golden, SraVX8VInt8) { + NONMASK_VV_VX_GEN_TEST(OneDInt8, ScalarUInt32, OneDInt8, + NONMASK_VX_VALUE_INIT, SraVX8VInt8); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, SraVX16VInt16) { + NONMASK_VV_VX_GEN_TEST(OneDInt16, ScalarUInt32, OneDInt16, + NONMASK_VX_VALUE_INIT, SraVX16VInt16); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, SraVX32VInt32) { + NONMASK_VV_VX_GEN_TEST(OneDInt32, ScalarUInt32, OneDInt32, + NONMASK_VX_VALUE_INIT, SraVX32VInt32); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, SraVX64VInt64) { + NONMASK_VV_VX_GEN_TEST(OneDInt64, ScalarUInt32, OneDInt64, + NONMASK_VX_VALUE_INIT, SraVX64VInt64); + EXPECT_EQ(verifyResult(c, golden), true); +} diff --git a/test/testSraVXMask.cpp b/test/testSraVXMask.cpp new file mode 100644 index 0000000..7749ed6 --- /dev/null +++ b/test/testSraVXMask.cpp @@ -0,0 +1,30 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {5, 99, 5, 2, -3, -4, 94, -9}; +std::vector dataM = {1, 0, 1, 1, 1, 1, 0, 1}; +std::vector dataMO = {100, 99, 98, 97, 96, 95, 94, 93}; +std::vector dataA = {45, 37, 41, 17, -19, -29, -53, -67}; +int dataB = 3; + +TEST(Golden, SraVX8VInt8_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt8, OneDInt8, ScalarUInt32, OneDInt8, + MASK_VX_VALUE_INIT, SraVX8VInt8_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, SraVX16VInt16_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt16, OneDInt16, ScalarUInt32, OneDInt16, + MASK_VX_VALUE_INIT, SraVX16VInt16_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, SraVX32VInt32_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt32, OneDInt32, ScalarUInt32, OneDInt32, + MASK_VX_VALUE_INIT, SraVX32VInt32_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, SraVX64VInt64_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt64, OneDInt64, ScalarUInt32, OneDInt64, + MASK_VX_VALUE_INIT, SraVX64VInt64_m); + EXPECT_EQ(verifyResult(output, golden), true); +} diff --git a/test/testSubVV.cpp b/test/testSubVV.cpp new file mode 100644 index 0000000..4461166 --- /dev/null +++ b/test/testSubVV.cpp @@ -0,0 +1,28 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {-7, -5, -3, -1, 0, 0, 0, 0}; +std::vector dataA = {1, 2, 3, 4, 4, 3, 2, 1}; +std::vector dataB = {8, 7, 6, 5, 4, 3, 2, 1}; + +TEST(Golden, SubVV8VInt8) { + NONMASK_VV_VX_GEN_TEST(OneDInt8, OneDInt8, OneDInt8, NONMASK_VV_VALUE_INIT, + SubVV8VInt8); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, SubVV16VInt16) { + NONMASK_VV_VX_GEN_TEST(OneDInt16, OneDInt16, OneDInt16, NONMASK_VV_VALUE_INIT, + SubVV16VInt16); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, SubVV32VInt32) { + NONMASK_VV_VX_GEN_TEST(OneDInt32, OneDInt32, OneDInt32, NONMASK_VV_VALUE_INIT, + SubVV32VInt32); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, SubVV64VInt64) { + NONMASK_VV_VX_GEN_TEST(OneDInt64, OneDInt64, OneDInt64, NONMASK_VV_VALUE_INIT, + SubVV64VInt64); + EXPECT_EQ(verifyResult(c, golden), true); +} diff --git a/test/testSubVVMask.cpp b/test/testSubVVMask.cpp new file mode 100644 index 0000000..6865ec5 --- /dev/null +++ b/test/testSubVVMask.cpp @@ -0,0 +1,30 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {0, 99, 1, 1, 0, -2, 94, -13, -25, -45}; +std::vector dataA = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; +std::vector dataB = {1, 1, 2, 3, 5, 8, 13, 21, 34, 55}; +std::vector dataM = {1, 0, 1, 1, 1, 1, 0, 1, 1, 1}; +std::vector dataMO = {100, 99, 98, 97, 96, 95, 94, 93, 92, 91}; + +TEST(Golden, SubVV8VInt8_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt8, OneDInt8, OneDInt8, OneDInt8, + MASK_VV_VALUE_INIT, SubVV8VInt8_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, SubVV16VInt16_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt16, OneDInt16, OneDInt16, OneDInt16, + MASK_VV_VALUE_INIT, SubVV16VInt16_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, SubVV32VInt32_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt32, OneDInt32, OneDInt32, OneDInt32, + MASK_VV_VALUE_INIT, SubVV32VInt32_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, SubVV64VInt64_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt64, OneDInt64, OneDInt64, OneDInt64, + MASK_VV_VALUE_INIT, SubVV64VInt64_m); + EXPECT_EQ(verifyResult(output, golden), true); +} diff --git a/test/testSubVX.cpp b/test/testSubVX.cpp new file mode 100644 index 0000000..8afc17e --- /dev/null +++ b/test/testSubVX.cpp @@ -0,0 +1,28 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {-1, 0, 1, 2, 2, 1, 0, -1}; +std::vector dataA = {1, 2, 3, 4, 4, 3, 2, 1}; +int dataB = 2; + +TEST(Golden, SubVX8VInt8) { + NONMASK_VV_VX_GEN_TEST(OneDInt8, ScalarInt8, OneDInt8, NONMASK_VX_VALUE_INIT, + SubVX8VInt8); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, SubVX16VInt16) { + NONMASK_VV_VX_GEN_TEST(OneDInt16, ScalarInt16, OneDInt16, + NONMASK_VX_VALUE_INIT, SubVX16VInt16); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, SubVX32VInt32) { + NONMASK_VV_VX_GEN_TEST(OneDInt32, ScalarInt32, OneDInt32, + NONMASK_VX_VALUE_INIT, SubVX32VInt32); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, SubVX64VInt64) { + NONMASK_VV_VX_GEN_TEST(OneDInt64, ScalarInt64, OneDInt64, + NONMASK_VX_VALUE_INIT, SubVX64VInt64); + EXPECT_EQ(verifyResult(c, golden), true); +} diff --git a/test/testSubVXMask.cpp b/test/testSubVXMask.cpp new file mode 100644 index 0000000..0c25e3c --- /dev/null +++ b/test/testSubVXMask.cpp @@ -0,0 +1,30 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {-2, 99, 0, 1, 2, 3, 94, 5, 6, 7}; +std::vector dataM = {1, 0, 1, 1, 1, 1, 0, 1, 1, 1}; +std::vector dataMO = {100, 99, 98, 97, 96, 95, 94, 93, 92, 91}; +std::vector dataA = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; +int dataB = 3; + +TEST(Golden, SubVX8VInt8_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt8, OneDInt8, ScalarInt8, OneDInt8, + MASK_VX_VALUE_INIT, SubVX8VInt8_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, SubVX16VInt16_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt16, OneDInt16, ScalarInt16, OneDInt16, + MASK_VX_VALUE_INIT, SubVX16VInt16_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, SubVX32VInt32_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt32, OneDInt32, ScalarInt32, OneDInt32, + MASK_VX_VALUE_INIT, SubVX32VInt32_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, SubVX64VInt64_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt64, OneDInt64, ScalarInt64, OneDInt64, + MASK_VX_VALUE_INIT, SubVX64VInt64_m); + EXPECT_EQ(verifyResult(output, golden), true); +} diff --git a/test/testVfirstM.cpp b/test/testVfirstM.cpp new file mode 100644 index 0000000..f49aefe --- /dev/null +++ b/test/testVfirstM.cpp @@ -0,0 +1,49 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector dataM; +std::vector dataA; +TEST(Golden, FirstMSInt32VB_0) { + dataA = {0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, + 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, + 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, + 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1}; + int32_t golden = 3; + NONMASK_V_GEN_TEST(OneDBool, ScalarInt32, NONMASK_V_VALUE_INIT, + FirstMSInt32VB); + auto computed = getRawPointer(b); + EXPECT_EQ(*computed, golden); +} +TEST(Golden, FirstMSInt32VB_1) { + dataA = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + int32_t golden = -1; + NONMASK_V_GEN_TEST(OneDBool, ScalarInt32, NONMASK_V_VALUE_INIT, + FirstMSInt32VB); + auto computed = getRawPointer(b); + EXPECT_EQ(*computed, golden); +} +TEST(Golden, FirstMSInt32VB_2) { + dataA = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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}; + int32_t golden = 119; + NONMASK_V_GEN_TEST(OneDBool, ScalarInt32, NONMASK_V_VALUE_INIT, + FirstMSInt32VB); + auto computed = getRawPointer(b); + EXPECT_EQ(*computed, golden); +} + +TEST(Golden, FirstMSInt32VBVB_m) { + dataM = {0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0}; + dataA = {0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0}; + int32_t golden = 9; + MASK_V_NO_MASKEDOFF_GEN_TEST(OneDBool, OneDBool, ScalarInt32, + MASK_V_NO_MASKEDOFF_VALUE_INIT, + FirstMSInt32VBVB_m); + auto computed = getRawPointer(c); + EXPECT_EQ(*computed, golden); +} diff --git a/test/testWaddVV.cpp b/test/testWaddVV.cpp new file mode 100644 index 0000000..41a9c0b --- /dev/null +++ b/test/testWaddVV.cpp @@ -0,0 +1,43 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {9, 9, 9, 9, 8, 6, 4, 2}; +std::vector dataA = {1, 2, 3, 4, 4, 3, 2, 1}; +std::vector dataB = {8, 7, 6, 5, 4, 3, 2, 1}; + +TEST(Golden, WaddWVV8VInt16) { + NONMASK_VV_VX_GEN_TEST(OneDInt8, OneDInt8, OneDInt16, NONMASK_VV_VALUE_INIT, + WaddWVV8VInt16); + EXPECT_EQ(verifyResult(c, golden), true); +} + +TEST(Golden, WaddWVV16VInt32) { + NONMASK_VV_VX_GEN_TEST(OneDInt16, OneDInt16, OneDInt32, NONMASK_VV_VALUE_INIT, + WaddWVV16VInt32); + EXPECT_EQ(verifyResult(c, golden), true); +} + +TEST(Golden, WaddWVV32VInt64) { + NONMASK_VV_VX_GEN_TEST(OneDInt32, OneDInt32, OneDInt64, NONMASK_VV_VALUE_INIT, + WaddWVV32VInt64); + EXPECT_EQ(verifyResult(c, golden), true); +} + +TEST(Golden, WaddWWV8VInt16) { + NONMASK_VV_VX_GEN_TEST(OneDInt16, OneDInt8, OneDInt16, NONMASK_VV_VALUE_INIT, + WaddWWV8VInt16); + EXPECT_EQ(verifyResult(c, golden), true); +} + +TEST(Golden, WaddWWV16VInt32) { + NONMASK_VV_VX_GEN_TEST(OneDInt32, OneDInt16, OneDInt32, NONMASK_VV_VALUE_INIT, + WaddWWV16VInt32); + EXPECT_EQ(verifyResult(c, golden), true); +} + +TEST(Golden, WaddWWV32VInt64) { + NONMASK_VV_VX_GEN_TEST(OneDInt64, OneDInt32, OneDInt64, NONMASK_VV_VALUE_INIT, + WaddWWV32VInt64); + EXPECT_EQ(verifyResult(c, golden), true); +} diff --git a/test/testWaddVX.cpp b/test/testWaddVX.cpp new file mode 100644 index 0000000..a82ac99 --- /dev/null +++ b/test/testWaddVX.cpp @@ -0,0 +1,39 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {3, 4, 5, 6, 6, 5, 4, 3}; +std::vector dataA = {1, 2, 3, 4, 4, 3, 2, 1}; +int dataB = 2; + +TEST(Golden, WaddWVX8VInt16) { + NONMASK_VV_VX_GEN_TEST(OneDInt8, ScalarInt8, OneDInt16, NONMASK_VX_VALUE_INIT, + WaddWVX8VInt16); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, WaddWVX16VInt32) { + NONMASK_VV_VX_GEN_TEST(OneDInt16, ScalarInt16, OneDInt32, + NONMASK_VX_VALUE_INIT, WaddWVX16VInt32); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, WaddWVX32VInt64) { + NONMASK_VV_VX_GEN_TEST(OneDInt32, ScalarInt32, OneDInt64, + NONMASK_VX_VALUE_INIT, WaddWVX32VInt64); + EXPECT_EQ(verifyResult(c, golden), true); +} + +TEST(Golden, WaddWWX8VInt16) { + NONMASK_VV_VX_GEN_TEST(OneDInt16, ScalarInt8, OneDInt16, + NONMASK_VX_VALUE_INIT, WaddWWX8VInt16); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, WaddWWX16VInt32) { + NONMASK_VV_VX_GEN_TEST(OneDInt32, ScalarInt16, OneDInt32, + NONMASK_VX_VALUE_INIT, WaddWWX16VInt32); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, WaddWWX32VInt64) { + NONMASK_VV_VX_GEN_TEST(OneDInt64, ScalarInt32, OneDInt64, + NONMASK_VX_VALUE_INIT, WaddWWX32VInt64); + EXPECT_EQ(verifyResult(c, golden), true); +} diff --git a/test/testXorVV.cpp b/test/testXorVV.cpp new file mode 100644 index 0000000..637057f --- /dev/null +++ b/test/testXorVV.cpp @@ -0,0 +1,28 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {9, 5, 5, 10, 10, 3, 15, 96}; +std::vector dataA = {1, 2, 3, 10, 0, 10, 16, 31}; +std::vector dataB = {8, 7, 6, 0, 10, 9, 31, 127}; + +TEST(Golden, XorVV8VInt8) { + NONMASK_VV_VX_GEN_TEST(OneDInt8, OneDInt8, OneDInt8, NONMASK_VV_VALUE_INIT, + XorVV8VInt8); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, XorVV16VInt16) { + NONMASK_VV_VX_GEN_TEST(OneDInt16, OneDInt16, OneDInt16, NONMASK_VV_VALUE_INIT, + XorVV16VInt16); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, XorVV32VInt32) { + NONMASK_VV_VX_GEN_TEST(OneDInt32, OneDInt32, OneDInt32, NONMASK_VV_VALUE_INIT, + XorVV32VInt32); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, XorVV64VInt64) { + NONMASK_VV_VX_GEN_TEST(OneDInt64, OneDInt64, OneDInt64, NONMASK_VV_VALUE_INIT, + XorVV64VInt64); + EXPECT_EQ(verifyResult(c, golden), true); +} diff --git a/test/testXorVVMask.cpp b/test/testXorVVMask.cpp new file mode 100644 index 0000000..b5b833c --- /dev/null +++ b/test/testXorVVMask.cpp @@ -0,0 +1,30 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {9, 99, 115, 33, 10, 3, 94, 96, 11, -11}; +std::vector dataA = {1, 2, -30, -111, 0, 10, 16, 31, 111, -111}; +std::vector dataB = {8, 7, -111, -80, 10, 9, 31, 127, 100, 100}; +std::vector dataM = {1, 0, 1, 1, 1, 1, 0, 1, 1, 1}; +std::vector dataMO = {100, 99, 98, 97, 96, 95, 94, 93, 92, 91}; + +TEST(Golden, XorVV8VInt8_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt8, OneDInt8, OneDInt8, OneDInt8, + MASK_VV_VALUE_INIT, XorVV8VInt8_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, XorVV16VInt16_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt16, OneDInt16, OneDInt16, OneDInt16, + MASK_VV_VALUE_INIT, XorVV16VInt16_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, XorVV32VInt32_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt32, OneDInt32, OneDInt32, OneDInt32, + MASK_VV_VALUE_INIT, XorVV32VInt32_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, XorVV64VInt64_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt64, OneDInt64, OneDInt64, OneDInt64, + MASK_VV_VALUE_INIT, XorVV64VInt64_m); + EXPECT_EQ(verifyResult(output, golden), true); +} diff --git a/test/testXorVX.cpp b/test/testXorVX.cpp new file mode 100644 index 0000000..be487c7 --- /dev/null +++ b/test/testXorVX.cpp @@ -0,0 +1,28 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {6, 5, 4, 3, -5, -6, -7, -8}; +std::vector dataA = {1, 2, 3, 4, -4, -3, -2, -1}; +int dataB = 7; + +TEST(Golden, XorVX8VInt8) { + NONMASK_VV_VX_GEN_TEST(OneDInt8, ScalarInt8, OneDInt8, NONMASK_VX_VALUE_INIT, + XorVX8VInt8); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, XorVX16VInt16) { + NONMASK_VV_VX_GEN_TEST(OneDInt16, ScalarInt16, OneDInt16, + NONMASK_VX_VALUE_INIT, XorVX16VInt16); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, XorVX32VInt32) { + NONMASK_VV_VX_GEN_TEST(OneDInt32, ScalarInt32, OneDInt32, + NONMASK_VX_VALUE_INIT, XorVX32VInt32); + EXPECT_EQ(verifyResult(c, golden), true); +} +TEST(Golden, XorVX64VInt64) { + NONMASK_VV_VX_GEN_TEST(OneDInt64, ScalarInt64, OneDInt64, + NONMASK_VX_VALUE_INIT, XorVX64VInt64); + EXPECT_EQ(verifyResult(c, golden), true); +} diff --git a/test/testXorVXMask.cpp b/test/testXorVXMask.cpp new file mode 100644 index 0000000..135b848 --- /dev/null +++ b/test/testXorVXMask.cpp @@ -0,0 +1,30 @@ +#include "TestUtils.hpp" + +using namespace RIF; + +std::vector golden = {14, 99, 12, 11, 10, -12, 94, -14, -15, -16}; +std::vector dataM = {1, 0, 1, 1, 1, 1, 0, 1, 1, 1}; +std::vector dataMO = {100, 99, 98, 97, 96, 95, 94, 93, 92, 91}; +std::vector dataA = {1, 2, 3, 4, 5, -5, -4, -3, -2, -1}; +int dataB = 15; + +TEST(Golden, XorVX8VInt8_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt8, OneDInt8, ScalarInt8, OneDInt8, + MASK_VX_VALUE_INIT, XorVX8VInt8_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, XorVX16VInt16_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt16, OneDInt16, ScalarInt16, OneDInt16, + MASK_VX_VALUE_INIT, XorVX16VInt16_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, XorVX32VInt32_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt32, OneDInt32, ScalarInt32, OneDInt32, + MASK_VX_VALUE_INIT, XorVX32VInt32_m); + EXPECT_EQ(verifyResult(output, golden), true); +} +TEST(Golden, XorVX64VInt64_m) { + MASK_VV_VX_GEN_TEST(OneDBool, OneDInt64, OneDInt64, ScalarInt64, OneDInt64, + MASK_VX_VALUE_INIT, XorVX64VInt64_m); + EXPECT_EQ(verifyResult(output, golden), true); +} diff --git a/tool/CMakeLists.txt b/tool/CMakeLists.txt new file mode 100644 index 0000000..6d1138b --- /dev/null +++ b/tool/CMakeLists.txt @@ -0,0 +1,13 @@ +include_directories(${INC}) +include_directories(${SOFTFLOAT}/include) + +add_library(RandomGenUtils RandomGenUtils.cpp) + +add_executable(poc poc.cpp) +target_link_libraries(poc Graph Utils) + +add_executable(random_gen random_gen.cpp) +target_link_libraries(random_gen Graph Utils RandomGenUtils) + +add_executable(fused_gen fused_gen.cpp) +target_link_libraries(fused_gen Graph FuseGraph Utils RandomGenUtils) diff --git a/tool/RandomGenUtils.cpp b/tool/RandomGenUtils.cpp new file mode 100644 index 0000000..b13908a --- /dev/null +++ b/tool/RandomGenUtils.cpp @@ -0,0 +1,121 @@ +#include "RandomGenUtils.hpp" + +namespace RIF { + +int valueIndex; +int opIndex; + +void initializeIndex() { valueIndex = opIndex = 0; } + +std::string getNewValueName() { + return "value_" + std::to_string(valueIndex++); +} + +std::string getNewOperatorName() { + return "operator_" + std::to_string(opIndex++); +} + +// Currently the value created is hard-coded to OneDInt32 +void fillOperatorWithUninitializedValue(Graph &graph, Graph::Operator *op, + const int length) { + for (int i = 0; i < op->inputs.size(); ++i) { + if (op->inputs[i] == nullptr) { + auto value = + graph.getNewValue(op->inputTypes[i], getNewValueName(), length); + op->addInput(i, value); + } + } + + if (op->outputs[0] == nullptr) { + auto value = graph.getNewValue(op->outputType, getNewValueName(), length); + op->addOutput(value); + } +} + +void initializeGraph(Graph &graph, const int length) { + if (graph.operatorEnumLUT.find(InitialRootName) == + graph.operatorEnumLUT.end()) { + std::cerr << "Can not find root '" << InitialRootName + << "' in .def file, abort.\n"; + exit(1); + } + CustomValType initialType = graph.operatorEnumLUT[InitialRootName]; + Graph::Operator *op = graph.getNewOperator(initialType, getNewOperatorName()); + fillOperatorWithUninitializedValue(graph, op, length); +} + +void growOnExistingValue(Graph &graph, const int length) { + Graph::Value *selectValue; + do + selectValue = *select_random( + graph.values, getRandomNumber(0, (int)graph.values.size() - 1)); + while (graph.useCandidateLUT.find(selectValue->type) == + graph.useCandidateLUT.end() || + graph.defineCandidateLUT.find(selectValue->type) == + graph.defineCandidateLUT.end()); + std::cerr << "Existing value - " << selectValue->getNameWithType() << "\n"; + CustomValType type; + if (selectValue->inputs[0] != nullptr) { // Value is defined + do + type = + *select_random(graph.useCandidateLUT[selectValue->type], + getRandomNumber(0, (int)graph.values.size() - 1)); + while (type == CustomValType::Initialize); + } else // Create a define for + type = + *select_random(graph.defineCandidateLUT[selectValue->type], + getRandomNumber(0, (int)graph.values.size() - 1)); + + Graph::Operator *newOp = graph.getNewOperator(type, getNewOperatorName()); + std::cerr << "Created op - " << newOp->getNameWithType() << "\n"; + + if (selectValue->inputs[0] == nullptr) { + assert(selectValue->type == newOp->outputType); + newOp->addOutput(selectValue); + } else { + for (int i = 0; i < newOp->inputs.size(); ++i) + if (newOp->inputTypes[i] == selectValue->type && !newOp->inputs[i]) { + newOp->addInput(i, selectValue); + break; + } + } + + fillOperatorWithUninitializedValue(graph, newOp, length); +} + +void createRandomOp(Graph &graph, const int length) { + CustomValType randomType; + randomType = *select_random( + graph.validOpTypes, + getRandomNumber(0, (int)graph.validOpTypes.size() - 1)); + + Graph::Operator *op = graph.getNewOperator(randomType, getNewOperatorName()); + std::cerr << "Created randomOp - " << op->typeID << "\n"; + fillOperatorWithUninitializedValue(graph, op, length); +} + +void growUntilMaxNode(Graph &graph, const int maxNode, const int length) { + while (graph.operators.size() < maxNode) { + int coinFlip = getRandomNumber(0, 1); + if (coinFlip & 1) { + std::cerr << "growOnExistingValue...\n"; + growOnExistingValue(graph, length); + } else { + std::cerr << "createRandomOp...\n"; + createRandomOp(graph, length); + } + } +} + +// Currently the value created is hard-coded to OneDInt32 +void defineNonInitializedValue(Graph &graph) { + for (Graph::Value *value : graph.values) { + if (value->inputs[0] == nullptr) { + Graph::Operator *init = + graph.getNewOperator(CustomValType::Initialize, getNewOperatorName()); + init->addOutput(value); + } + } +} + +} // namespace RIF diff --git a/tool/RandomGenUtils.hpp b/tool/RandomGenUtils.hpp new file mode 100644 index 0000000..ec72338 --- /dev/null +++ b/tool/RandomGenUtils.hpp @@ -0,0 +1,32 @@ +// RandomGenUtils.hpp +/* +Utility used for random graph generation. +*/ + +#include "Graph.hpp" +#include + +namespace RIF { + +extern int valueIndex; +extern int opIndex; + +void initializeIndex(); +std::string getNewValueName(); +std::string getNewOperatorName(); +void fillOperatorWithUninitializedValue(Graph &graph, Graph::Operator *op, + const int length); +void initializeGraph(Graph &graph, const int length); +void growOnExistingValue(Graph &graph, const int length); +void createRandomOp(Graph &graph, const int length); +void growUntilMaxNode(Graph &graph, const int maxNode, const int length); +void defineNonInitializedValue(Graph &graph); + +template typename S::iterator select_random(S &s, size_t n) { + n %= s.size(); + typename S::iterator it = std::begin(s); + std::advance(it, n); + return it; +} + +} // namespace RIF diff --git a/tool/fused_gen.cpp b/tool/fused_gen.cpp new file mode 100644 index 0000000..a8ac2ac --- /dev/null +++ b/tool/fused_gen.cpp @@ -0,0 +1,43 @@ +// fused_gen_poc.cpp +/* +Shows the algorithm of operator fusion and how it is done from receiving a Graph +to code generation. +*/ +#include "FuseGraph.hpp" +#include "Graph.hpp" +#include "RandomGenUtils.hpp" +#include "Utils.hpp" + +#include + +using namespace RIF; + +int main(int argc, char *argv[]) { + parseArguments(argc, argv); + // Note: Hard code verification mode to short in fused graph generation + VerificationMode = "short"; + uint32_t seed = InitialSeed; + initializeRNG(seed); + + Graph graph; + const int length = InitialLength; + const int maxNode = NodesToGenerate; + + initializeIndex(); + initializeGraph(graph, length); + growUntilMaxNode(graph, maxNode, length); + defineNonInitializedValue(graph); + graph.generateData(); + + std::ofstream GraphVizFileStream; + GraphVizFileStream.open(RIF::GraphVizFilename, + std::ofstream::out | std::ofstream::trunc); + std::ofstream CCodeFileStream; + CCodeFileStream.open(RIF::CCodeFilename, + std::ofstream::out | std::ofstream::trunc); + + FuseGraphs fgs(graph); + + fgs.generateGraphviz(GraphVizFileStream); + fgs.generateCCode(CCodeFileStream); +} diff --git a/tool/poc.cpp b/tool/poc.cpp new file mode 100644 index 0000000..dd53b7b --- /dev/null +++ b/tool/poc.cpp @@ -0,0 +1,58 @@ +// poc.cpp +/* +Proof-Of-Concept of the graph structure and how it works +*/ +#include "Graph.hpp" +#include "Utils.hpp" +#include "Value.hpp" + +#include +#include +#include +#include + +using namespace RIF; + +Graph::Value *getInitializeValue(CustomValType type, Graph &graph, + const std::string &id, const int &length) { + auto init = graph.getNewOperator(CustomValType::Initialize, "init_" + id); + auto value = graph.getNewValue(type, "value_" + id, length); + init->addOutput(value); + return value; +} + +int main(int argc, char **argv) { + RIF::parseArguments(argc, argv); + + Graph graph; + + const int length = 15; + + auto a = getInitializeValue(OneDInt32, graph, "A", length); + auto b = getInitializeValue(OneDInt32, graph, "B", length); + auto c = graph.getNewValue(OneDInt32, "value_C", length); + + auto op1 = graph.getNewOperator(CustomValType::AddVV32VInt32, "op1"); + + op1->addInput(0, a); + op1->addInput(1, b); + op1->addOutput(c); + + std::ofstream GraphVizFileStream; + GraphVizFileStream.open(RIF::GraphVizFilename, + std::ofstream::out | std::ofstream::trunc); + std::ofstream CCodeFileStream; + CCodeFileStream.open(RIF::CCodeFilename, + std::ofstream::out | std::ofstream::trunc); + + graph.generateData(); + + graph.generateGraphViz(std::cout); + graph.generateGraphViz(GraphVizFileStream); + + graph.generateCCode(std::cout); + graph.generateCCode(CCodeFileStream); + + GraphVizFileStream.close(); + CCodeFileStream.close(); +} \ No newline at end of file diff --git a/tool/random_gen.cpp b/tool/random_gen.cpp new file mode 100644 index 0000000..af4c582 --- /dev/null +++ b/tool/random_gen.cpp @@ -0,0 +1,81 @@ +// random_gen.cpp +/* +Shows the algorithm of graph random generation. +*/ +#include "Graph.hpp" +#include "RandomGenUtils.hpp" +#include "Utils.hpp" + +#include +#include +#include +#include +#include + +using namespace RIF; + +static void printCommand(std::ofstream &file_stream, int argc, char *argv[]) { + auto processArgs = [&]() { + std::vector args; + for (int i = 0; i < argc; ++i) { + args.push_back(argv[i]); + } + // Trim the filepath(if exists) to get the filename-only argument + for (auto &arg : args) { + int index = 0; + for (index = arg.size() - 1; index >= 0; --index) { + if (arg[index] == '/') { + break; + } + } + if (index >= 0) { + arg = arg.substr(index + 1); + } + } + return args; + }; + + file_stream << "// COMMAND: "; + auto args = processArgs(); + for (int i = 0; i < args.size(); ++i) { + file_stream << args[i]; + if (i != args.size() - 1) { + file_stream << ' '; + } + } + file_stream << '\n'; +} + +int main(int argc, char *argv[]) { + parseArguments(argc, argv); + uint32_t seed = InitialSeed; + initializeRNG(seed); + + Graph graph; + const int length = InitialLength; + const int maxNode = NodesToGenerate; + + initializeIndex(); + initializeGraph(graph, length); + growUntilMaxNode(graph, maxNode, length); + defineNonInitializedValue(graph); + + std::ofstream GraphVizFileStream; + GraphVizFileStream.open(RIF::GraphVizFilename, + std::ofstream::out | std::ofstream::trunc); + std::ofstream CCodeFileStream; + CCodeFileStream.open(RIF::CCodeFilename, + std::ofstream::out | std::ofstream::trunc); + + graph.generateData(); + + // graph.generateGraphViz(std::cout); + graph.generateGraphViz(GraphVizFileStream); + + printCommand(CCodeFileStream, argc, argv); + // graph.generateCCode(std::cout); + graph.generateCCode(CCodeFileStream); + + GraphVizFileStream.close(); + CCodeFileStream.close(); +}